From 1a18470dea9bc6a3a7939ad6113e951cd0c19d70 Mon Sep 17 00:00:00 2001 From: jaywcjlove Date: Thu, 23 Nov 2023 16:56:52 +0000 Subject: [PATCH] v1.1.0 chore: fix failed to parse source map issue. https://github.com/kktjs/kkt/issues/446 9ea3c301b053bc1e1b5e609f2391511fe40d1a75 --- asset-manifest.json | 18 +++++++++--------- coverage/lcov-report/index.html | 2 +- coverage/lcov-report/index.tsx.html | 2 +- index.html | 2 +- static/js/main.26319176.js | 3 +++ ...ICENSE.txt => main.26319176.js.LICENSE.txt} | 11 +++++++++++ ...in.35898a2a.js.map => main.26319176.js.map} | 2 +- static/js/main.35898a2a.js | 3 --- static/js/react-vendor.e1575b27.js | 3 --- static/js/react-vendor.eefbee93.js | 3 +++ ...xt => react-vendor.eefbee93.js.LICENSE.txt} | 0 ...b27.js.map => react-vendor.eefbee93.js.map} | 2 +- static/js/refractor-prismjs-vendor.aad9a03f.js | 2 ++ .../refractor-prismjs-vendor.aad9a03f.js.map | 1 + static/js/refractor-prismjs-vendor.f6dda1cf.js | 2 -- .../refractor-prismjs-vendor.f6dda1cf.js.map | 1 - 16 files changed, 34 insertions(+), 23 deletions(-) create mode 100644 static/js/main.26319176.js rename static/js/{main.35898a2a.js.LICENSE.txt => main.26319176.js.LICENSE.txt} (75%) rename static/js/{main.35898a2a.js.map => main.26319176.js.map} (53%) delete mode 100644 static/js/main.35898a2a.js delete mode 100644 static/js/react-vendor.e1575b27.js create mode 100644 static/js/react-vendor.eefbee93.js rename static/js/{react-vendor.e1575b27.js.LICENSE.txt => react-vendor.eefbee93.js.LICENSE.txt} (100%) rename static/js/{react-vendor.e1575b27.js.map => react-vendor.eefbee93.js.map} (99%) create mode 100644 static/js/refractor-prismjs-vendor.aad9a03f.js create mode 100644 static/js/refractor-prismjs-vendor.aad9a03f.js.map delete mode 100644 static/js/refractor-prismjs-vendor.f6dda1cf.js delete mode 100644 static/js/refractor-prismjs-vendor.f6dda1cf.js.map diff --git a/asset-manifest.json b/asset-manifest.json index a2b3bb2..bd63cc7 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,19 +1,19 @@ { "files": { "main.css": "/static/css/main.f0099549.css", - "main.js": "/static/js/main.35898a2a.js", - "refractor-prismjs-vendor.js": "/static/js/refractor-prismjs-vendor.f6dda1cf.js", - "react-vendor.js": "/static/js/react-vendor.e1575b27.js", + "main.js": "/static/js/main.26319176.js", + "refractor-prismjs-vendor.js": "/static/js/refractor-prismjs-vendor.aad9a03f.js", + "react-vendor.js": "/static/js/react-vendor.eefbee93.js", "index.html": "/index.html", "main.f0099549.css.map": "/static/css/main.f0099549.css.map", - "main.35898a2a.js.map": "/static/js/main.35898a2a.js.map", - "refractor-prismjs-vendor.f6dda1cf.js.map": "/static/js/refractor-prismjs-vendor.f6dda1cf.js.map", - "react-vendor.e1575b27.js.map": "/static/js/react-vendor.e1575b27.js.map" + "main.26319176.js.map": "/static/js/main.26319176.js.map", + "refractor-prismjs-vendor.aad9a03f.js.map": "/static/js/refractor-prismjs-vendor.aad9a03f.js.map", + "react-vendor.eefbee93.js.map": "/static/js/react-vendor.eefbee93.js.map" }, "entrypoints": [ - "static/js/refractor-prismjs-vendor.f6dda1cf.js", - "static/js/react-vendor.e1575b27.js", + "static/js/refractor-prismjs-vendor.aad9a03f.js", + "static/js/react-vendor.eefbee93.js", "static/css/main.f0099549.css", - "static/js/main.35898a2a.js" + "static/js/main.26319176.js" ] } \ No newline at end of file diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html index 1d71375..c15c235 100644 --- a/coverage/lcov-report/index.html +++ b/coverage/lcov-report/index.html @@ -101,7 +101,7 @@

All files

\ No newline at end of file +React Monorepo Template
\ No newline at end of file diff --git a/static/js/main.26319176.js b/static/js/main.26319176.js new file mode 100644 index 0000000..68d5ec9 --- /dev/null +++ b/static/js/main.26319176.js @@ -0,0 +1,3 @@ +/*! For license information please see main.26319176.js.LICENSE.txt */ +(()=>{var e={363:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=363,e.exports=t},2460:(e,t,r)=>{"use strict";var n={};r.r(n),r.d(n,{attentionMarkers:()=>za,contentInitial:()=>Ua,disable:()=>Va,document:()=>Ba,flow:()=>Ga,flowInitial:()=>Ha,insideSpan:()=>qa,string:()=>Wa,text:()=>Ka});var a=r(8650),s=r(5773),i=r(808);function o(e,t){return t||(t=e.slice(0)),e.raw=t,e}var d=r(8573);r(6155);var c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?k(U,--L):0,F--,10===B&&(F=1,N--),B}function q(){return B=L2||X(B)>3?"":" "}function ee(e,t){for(;--t&&q()&&!(B<48||B>102||B>57&&B<65||B>70&&B<97););return Y(e,V()+(t<6&&32==z()&&32==q()))}function te(e){for(;q();)switch(B){case e:return L;case 34:case 39:34!==e&&39!==e&&te(B);break;case 40:41===e&&te(e);break;case 92:q()}return L}function re(e,t){for(;q()&&e+B!==57&&(e+B!==84||47!==z()););return"/*"+Y(t,L-1)+"*"+T(47===e?e:q())}function ne(e){for(;!X(z());)q();return Y(e,L)}function ae(e,t){for(var r="",n=0;n6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return A(e,/(.+:)(.+)-([^]+)/,"$1"+h+"$2-$3$1"+g+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~C(e,"stretch")?ie(A(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return A(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,r,n,a,s,i,o){return f+r+":"+n+o+(a?f+r+"-span:"+(s?i:+i-+n)+o:"")+e}));case 4949:if(121===k(e,t+6))return A(e,":",":"+h)+e;break;case 6444:switch(k(e,45===k(e,14)?18:11)){case 120:return A(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+h+(45===k(e,14)?"inline-":"")+"box$3$1"+h+"$2$3$1"+f+"$2box$3")+e;case 100:return A(e,":",":"+f)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return A(e,"scroll-","scroll-snap-")+e}return e}function oe(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case v:return void(e.return=ie(e.value,e.length,r));case x:return ae([G(e,{value:A(e.value,"@","@"+h)})],n);case y:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,(function(t){switch(j(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":W(G(e,{props:[A(t,/:(read-\w+)/,":"+g+"$1")]})),W(G(e,{props:[t]})),w(e,{props:O(r,n)});break;case"::placeholder":W(G(e,{props:[A(t,/:(plac\w+)/,":"+h+"input-$1")]})),W(G(e,{props:[A(t,/:(plac\w+)/,":"+g+"$1")]})),W(G(e,{props:[A(t,/:(plac\w+)/,f+"input-$1")]})),W(G(e,{props:[t]})),w(e,{props:O(r,n)})}return""}))}}function de(e){return $(ce("",null,null,null,[""],e=J(e),0,[0],e))}function ce(e,t,r,n,a,s,i,o,d){for(var c=0,l=0,u=i,p=0,f=0,g=0,h=1,m=1,y=1,v=0,b="",x=a,R=s,E=n,w=b;m;)switch(g=v,v=q()){case 40:if(108!=g&&58==k(w,u-1)){-1!=C(w+=A(Q(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:w+=Q(v);break;case 9:case 10:case 13:case 32:w+=Z(g);break;case 92:w+=ee(V()-1,7);continue;case 47:switch(z()){case 42:case 47:D(ue(re(q(),V()),t,r,d),d);break;default:w+="/"}break;case 123*h:o[c++]=P(w)*y;case 125*h:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+l:-1==y&&(w=A(w,/\f/g,"")),f>0&&P(w)-u&&D(f>32?pe(w+";",n,r,u-1,d):pe(A(w," ","")+";",n,r,u-2,d),d);break;case 59:w+=";";default:if(D(E=le(w,t,r,c,l,a,o,b,x=[],R=[],u,s),s),123===v)if(0===l)ce(w,t,E,E,x,s,u,o,R);else switch(99===p&&110===k(w,3)?100:p){case 100:case 108:case 109:case 115:ce(e,E,E,n&&D(le(e,E,E,0,0,a,o,b,a,x=[],u,R),R),a,R,u,o,n?x:R);break;default:ce(w,E,E,E,[""],R,0,o,R)}}c=l=f=0,h=y=1,b=w="",u=i;break;case 58:u=1+P(w),f=g;default:if(h<1)if(123==v)--h;else if(125==v&&0==h++&&125==K())continue;switch(w+=T(v),v*h){case 38:y=l>0?1:(w+="\f",-1);break;case 44:o[c++]=(P(w)-1)*y,y=1;break;case 64:45===z()&&(w+=Q(q())),p=z(),l=u=P(b=w+=ne(V())),v++;break;case 45:45===g&&2==P(w)&&(h=0)}}return s}function le(e,t,r,n,a,s,i,o,d,c,l,u){for(var p=a-1,f=0===a?s:[""],g=I(f),h=0,m=0,v=0;h0?f[b]+" "+x:A(x,/&\f/g,f[b])))&&(d[v++]=R);return H(e,t,r,0===a?y:o,d,c,l,u)}function ue(e,t,r,n){return H(e,t,r,m,T(B),_(e,2,-2),0,n)}function pe(e,t,r,n,a){return H(e,t,r,v,_(e,0,n),_(e,n+1,-1),n,a)}var fe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ge=r(1713),he="undefined"!=typeof ge&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_ATTR)||"data-styled",me="undefined"!=typeof window&&"HTMLElement"in window,ye=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof ge&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof ge&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.SC_DISABLE_SPEEDY)),ve=(new Set,Object.freeze([])),be=Object.freeze({});function xe(e,t,r){return void 0===r&&(r=be),e.theme!==r.theme&&e.theme||t||r.theme}var Re=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Ee=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Te=/(^-|-$)/g;function we(e){return e.replace(Ee,"-").replace(Te,"")}var Se=/(a)(d)/gi,je=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ae(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=je(t%52)+r;return(je(t%52)+r).replace(Se,"$1-$2")}var Ce,ke=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},_e=function(e){return ke(5381,e)};function Pe(e){return Ae(_e(e)>>>0)}function Ie(e){return e.displayName||e.name||"Component"}function De(e){return"string"==typeof e&&!0}var Oe="function"==typeof Symbol&&Symbol.for,Ne=Oe?Symbol.for("react.memo"):60115,Fe=Oe?Symbol.for("react.forward_ref"):60112,Me={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Le={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Be={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ue=((Ce={})[Fe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ce[Ne]=Be,Ce);function He(e){return("type"in(t=e)&&t.type.$$typeof)===Ne?Be:"$$typeof"in e?Ue[e.$$typeof]:Me;var t}var Ge=Object.defineProperty,We=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,qe=Object.getOwnPropertyDescriptor,ze=Object.getPrototypeOf,Ve=Object.prototype;function Ye(e,t,r){if("string"!=typeof t){if(Ve){var n=ze(t);n&&n!==Ve&&Ye(e,n,r)}var a=We(t);Ke&&(a=a.concat(Ke(t)));for(var s=He(e),i=He(t),o=0;o0?" Args: ".concat(t.join(", ")):""))}var nt=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,a=n;e>=a;)if((a<<=1)<0)throw rt(16,"".concat(e));this.groupSizes=new Uint32Array(a),this.groupSizes.set(r),this.length=a;for(var s=n;s=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),a=n+r,s=n;s=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(d+="".concat(e,","))})),n+="".concat(i).concat(o,'{content:"').concat(d,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},l=d.slice();l.push((function(e){e.type===y&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Rt,r).replace(n,c))})),i.prefix&&l.push(oe),l.push(se);var u=function(e,a,s,o){void 0===a&&(a=""),void 0===s&&(s=""),void 0===o&&(o="&"),t=o,r=a,n=new RegExp("\\".concat(r,"\\b"),"g");var d=e.replace(Et,""),c=de(s||a?"".concat(s," ").concat(a," { ").concat(d," }"):d);i.namespace&&(c=Tt(c,i.namespace));var u,p=[];return ae(c,function(e){var t=I(e);return function(r,n,a,s){for(var i="",o=0;o="A"&&e<="Z"};function Dt(e){for(var t="",r=0;r>>0);if(!t.hasNameForId(this.componentId,s)){var i=r(a,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}n=$e(n,s),this.staticRulesId=s}else{for(var o=ke(this.baseHash,r.hash),d="",c=0;c>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,r(d,".".concat(p),void 0,this.componentId)),n=$e(n,p)}}return n},e}(),Ut=d.createContext(void 0);Ut.Consumer;var Ht={};new Set;function Gt(e,t,r){var n=Je(e),a=e,s=!De(e),i=t.attrs,o=void 0===i?ve:i,l=t.componentId,u=void 0===l?function(e,t){var r="string"!=typeof e?"sc":we(e);Ht[r]=(Ht[r]||0)+1;var n="".concat(r,"-").concat(Pe("6.1.1"+r+Ht[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):l,p=t.displayName,f=void 0===p?function(e){return De(e)?"styled.".concat(e):"Styled(".concat(Ie(e),")")}(e):p,g=t.displayName&&t.componentId?"".concat(we(t.displayName),"-").concat(t.componentId):t.componentId||u,h=n&&a.attrs?a.attrs.concat(o).filter(Boolean):o,m=t.shouldForwardProp;if(n&&a.shouldForwardProp){var y=a.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;m=function(e,t){return y(e,t)&&v(e,t)}}else m=y}var b=new Bt(r,g,n?a.componentStyle:void 0);function x(e,t){return function(e,t,r){var n=e.attrs,a=e.componentStyle,s=e.defaultProps,i=e.foldedComponentIds,o=e.styledComponentId,l=e.target,u=d.useContext(Ut),p=kt(),f=e.shouldForwardProp||p.shouldForwardProp,g=function(e,t,r){for(var n,a=c(c({},t),{className:void 0,theme:r}),s=0;s2&&xt.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),r=ft(),n=Qe([r&&'nonce="'.concat(r,'"'),"".concat(he,'="true"'),"".concat("data-styled-version",'="').concat("6.1.1",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw rt(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw rt(2);var r=((t={})[he]="",t["data-styled-version"]="6.1.1",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=ft();return n&&(r.nonce=n),[d.createElement("style",c({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new xt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw rt(2);return d.createElement(_t,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw rt(3)}})(),"__sc-".concat(he,"__");const Xt=document.createElement("template");Xt.innerHTML='\n\n\n';class Jt extends HTMLElement{static get observedAttributes(){return["style","z-index","target","height","width","href","color","fill","position","top","left","right","bottom","transform"]}constructor(){super(),this.right="0",this.shadow=this.attachShadow({mode:"open"}),this.shadow.appendChild(this.ownerDocument.importNode(Xt.content,!0)),this.update()}setAttr(e,t){const r=this.shadow.querySelector("svg");/(href)/.test(e.toLocaleLowerCase())?r.lastElementChild.setAttribute("xlink:href",t):/(color|fill)/.test(e.toLocaleLowerCase())?r.firstElementChild.style[e]=t:/(z-index|position|top|left|right|bottom|transform)/.test(e.toLocaleLowerCase())?r.style[e]=t:r.setAttribute(e,t)}update(){[...this.getAttributeNames(),"right"].forEach((e=>{const t=this.getAttribute(e)||this[e]||"";this.setAttr(e,t)}))}attributeChangedCallback(e,t,r){t!==r&&this.setAttr(e,r)}}customElements.define("github-corners",Jt);var $t=r(4760),Qt=["size","fixed","bottom","zIndex","className","style","bgColor","color","position"];function Zt(e){var{size:t=80,fixed:r=!1,bottom:n,zIndex:a,style:o,bgColor:d="#151513",color:c="#fff",position:l="right"}=e,u=(0,i.Z)(e,Qt),p="left"===l?{left:0,right:"initial",transform:"scale(-1, 1)"}:{right:0,left:"initial",transform:"scale(1, 1)"};return n?(p.bottom=0,p.top="initial",p.transform="left"===l?"scale(-1, -1)":"scale(1, -1)"):(p.bottom="initial",p.top=0),(0,$t.jsx)("github-corners",(0,s.Z)({target:"__blank",width:t,height:t,href:e.href,position:r?"fixed":"absolute","z-index":a,style:o,fill:d,color:c},p,u))}var er=["className","prefixCls","element","top","size","strokeWidth","smooth","hideProgress","children"],tr={position:"sticky",bottom:15,right:15,visibility:"visible",opacity:0,transition:"visibility 0.3s linear 0s, opacity 0.3s linear 0s",cursor:"pointer",userSelect:"none"},rr={display:"block",transform:"rotate(-90deg)"},nr={transition:"stroke-dashoffset 0.3s linear 0s"},ar={position:"absolute",top:0,display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:12},sr=document.documentElement;function ir(e){void 0===e&&(e={});var{className:t,prefixCls:r="w-back-to-up",element:n=sr,top:a=120,size:o=35,strokeWidth:c=3,smooth:l=!0,hideProgress:u=!1,children:p}=e,f=(0,i.Z)(e,er),g=(0,d.useRef)(null),h=[t,r].filter(Boolean).join(" "),m=Object.assign({},tr,{position:n===sr?"fixed":"sticky"},f.style,{width:o,height:o,opacity:0===a?1:0}),y=(0,d.useMemo)((()=>o/2),[o]),v=(0,d.useMemo)((()=>o/2-c/2),[o,c]),b=(0,d.useMemo)((()=>Math.PI*v*2),[v]),[x,R]=(0,d.useState)(b||0),E=e=>{var{clientHeight:t,scrollHeight:r,scrollTop:s}=n||sr;R(b-b*(s/(r-t))||0),g.current&&a>0&&(g.current.style.opacity=s>a?"1":"0")};(0,d.useEffect)((()=>{var e=n===sr?document:n;return e&&e.addEventListener("scroll",E,{passive:!0}),()=>{e&&e.removeEventListener("scroll",E)}}),[n]);return(0,$t.jsxs)("div",(0,s.Z)({className:h,ref:g},f,{onClick:e=>{n.scrollTo({top:0,behavior:l?"smooth":"auto"})},style:m,children:[!u&&(0,$t.jsxs)("svg",{viewBox:"0 0 "+o+" "+o,width:o,height:o,focusable:"false",style:rr,children:[(0,$t.jsx)("circle",{fill:"rgb(0 0 0 / 75%)",stroke:"rgb(200 200 200 / 85%)",strokeWidth:c,r:v,cx:y,cy:y}),(0,$t.jsx)("circle",{fill:"none",stroke:"rgb(0 0 0 / 50%)",strokeWidth:c,r:v,cx:y,cy:y,strokeDasharray:b,strokeDashoffset:x||0,style:nr})]}),p&&(0,$t.jsx)("div",{style:ar,children:p})]}))}var or={corners:{fixed:!0,target:"__blank",zIndex:10},darkMode:{permanent:!0,dark:"Dark",light:"Light"},example:null},dr=[],cr={setCorners(e){or=(0,s.Z)({},or,{corners:(0,s.Z)({},or.corners,e)}),pr()},setDarkMode(e){or=(0,s.Z)({},or,{darkMode:(0,s.Z)({},or.darkMode,e)}),console.log("globalStore:",or),pr()},setExample(e){or=(0,s.Z)({},or,{example:e}),pr()}};function lr(){return or}function ur(e){return dr=[...dr,e],()=>{dr=dr.filter((t=>t!==e))}}function pr(){for(var e of dr)e()}var fr={},gr=(0,d.createContext)({}),hr=(e,t)=>(0,s.Z)({},e,t),mr=e=>{var{children:t,value:r}=e,[n,a]=(0,d.useReducer)(hr,(0,s.Z)({},fr,r));return(0,$t.jsx)(gr.Provider,{value:(0,s.Z)({},n,{dispatch:a}),children:t})},yr=["tagName","className","children"],vr=d.forwardRef(((e,t)=>{var{tagName:r="div",className:n,children:a}=e,o=(0,i.Z)(e,yr),c=[_r+"-code",n].filter(Boolean).join(" ").trim();if((0,d.useContext)(gr).collapse)return null;var l=e.href&&"string"===typeof r?"a":r,u=(0,s.Z)({},o,{className:c,ref:t});return d.createElement(l,u,a)}));vr.displayName="uiw.CodeLayoutCode";var br=["className","children"],xr=d.forwardRef(((e,t)=>{var{className:r,children:n}=e,a=(0,i.Z)(e,br),o=[_r+"-preview",r].filter(Boolean).join(" ").trim();return(0,$t.jsx)("div",(0,s.Z)({},a,{className:o,ref:t,children:n}))}));xr.displayName="uiw.Preview";var Rr=r(3376),Er=r.n(Rr),Tr=e=>(0,$t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:(0,$t.jsx)("path",{d:"M8.64 5.23a1 1 0 0 0-1.41.13l-5 6a1 1 0 0 0 0 1.27l4.83 6a1 1 0 0 0 .78.37 1 1 0 0 0 .78-1.63L4.29 12l4.48-5.36a1 1 0 0 0-.13-1.41zm13.14 6.14-4.78-6a1 1 0 0 0-1.41-.15 1 1 0 0 0-.15 1.41L19.71 12l-4.48 5.37a1 1 0 0 0 .13 1.41A1 1 0 0 0 16 19a1 1 0 0 0 .77-.36l5-6a1 1 0 0 0 .01-1.27z","data-name":"code"})}),wr=e=>(0,$t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[(0,$t.jsx)("path",{d:"M18 21h-6a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3zm-6-10a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1z"}),(0,$t.jsx)("path",{d:"M9.73 15H5.67A2.68 2.68 0 0 1 3 12.33V5.67A2.68 2.68 0 0 1 5.67 3h6.66A2.68 2.68 0 0 1 15 5.67V9.4h-2V5.67a.67.67 0 0 0-.67-.67H5.67a.67.67 0 0 0-.67.67v6.66a.67.67 0 0 0 .67.67h4.06z"})]}),Sr=e=>(0,$t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"green",children:[(0,$t.jsx)("path",{d:"M9.71 11.29a1 1 0 0 0-1.42 1.42l3 3A1 1 0 0 0 12 16a1 1 0 0 0 .72-.34l7-8a1 1 0 0 0-1.5-1.32L12 13.54z"}),(0,$t.jsx)("path",{d:"M21 11a1 1 0 0 0-1 1 8 8 0 0 1-8 8A8 8 0 0 1 6.33 6.36 7.93 7.93 0 0 1 12 4a8.79 8.79 0 0 1 1.9.22 1 1 0 1 0 .47-1.94A10.54 10.54 0 0 0 12 2a10 10 0 0 0-7 17.09A9.93 9.93 0 0 0 12 22a10 10 0 0 0 10-10 1 1 0 0 0-1-1z"})]}),jr=e=>{var[t,r]=(0,d.useState)(!1);return(0,$t.jsx)("button",{onClick:()=>{r(!0),Er()(e.text||"",(()=>{var e=setTimeout((()=>{r(!1),clearTimeout(e)}),2e3)}))},children:t?(0,$t.jsx)(Sr,{}):(0,$t.jsx)(wr,{})})},Ar=["className","children","extra","text","copied","collapse","visibleButton","visible"],Cr=d.forwardRef(((e,t)=>{var{className:r,children:n,extra:a,text:o="",copied:c=!0,collapse:l=!0,visibleButton:u=!0,visible:p=!0}=e,f=(0,i.Z)(e,Ar),g=(0,d.useContext)(gr),h=[_r+"-toolbar",r].filter(Boolean).join(" ").trim();if((0,d.useEffect)((()=>g.dispatch({collapse:l})),[l]),!p)return null;return(0,$t.jsxs)("div",(0,s.Z)({className:h},f,{ref:t,children:[(0,$t.jsx)("div",{className:_r+"-title",children:n}),(0,$t.jsxs)("div",{className:_r+"-extra",children:[a,c&&(0,$t.jsx)(jr,{text:o}),u&&(0,$t.jsx)("button",{onClick:()=>g.dispatch({collapse:!g.collapse}),children:(0,$t.jsx)(Tr,{})})]})]}))}));Cr.displayName="uiw.Toolbar";var kr=["children","prefixCls","className","bordered","disableCheckered"],_r="w-rcpl",Pr=d.forwardRef(((e,t)=>{var{children:r,prefixCls:n=_r,className:a,bordered:o=!0,disableCheckered:c}=e,l=(0,i.Z)(e,kr),u=[n,a,o?"w-bordered":null,c?"w-disable-checkered":null].filter(Boolean).join(" ").trim();return(0,$t.jsx)("div",(0,s.Z)({ref:t},l,{className:u,children:d.Children.map(r,((e,t)=>d.isValidElement(e)?d.cloneElement(e,(0,s.Z)({},e.props,{key:t})):e))}))})),Ir=d.forwardRef(((e,t)=>(0,$t.jsx)(mr,{value:{collapse:!1},children:(0,$t.jsx)(Pr,(0,s.Z)({},e,{ref:t}))})));Ir.Preview=xr,Ir.Toolbar=Cr,Ir.Code=vr;const Dr=Ir;r(8634),r(872),r(4838),r(8916);var Or=e=>{for(var t,r=/([^?=&]+)=([^&]*)/g,n={};t=r.exec(e);)n[t[1]]=t[2];return n},Nr=function(e){void 0===e&&(e="");var[t=""]=/mdx:(.[\w|:]+)/i.exec(e)||[];return t.replace(/^mdx:preview:?/,"")},Fr=function(e){return void 0===e&&(e=""),e&&e.includes("mdx:preview")};var Mr=r(1046);function Lr(e){return e&&"object"===typeof e?"position"in e||"type"in e?Ur(e.position):"start"in e||"end"in e?Ur(e):"line"in e||"column"in e?Br(e):"":""}function Br(e){return Hr(e&&e.line)+":"+Hr(e&&e.column)}function Ur(e){return Br(e&&e.start)+"-"+Br(e&&e.end)}function Hr(e){return e&&"number"===typeof e?e:1}class Gr extends Error{constructor(e,t,r){const n=[null,null];let a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"===typeof t&&(r=t,t=void 0),"string"===typeof r){const e=r.indexOf(":");-1===e?n[1]=r:(n[0]=r.slice(0,e),n[1]=r.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),this.name=Lr(t)||"1:1",this.message="object"===typeof e?e.message:e,this.stack="","object"===typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.fatal,this.line=a.start.line,this.column=a.start.column,this.position=a,this.source=n[0],this.ruleId=n[1],this.file,this.actual,this.expected,this.url,this.note}}Gr.prototype.file="",Gr.prototype.name="",Gr.prototype.reason="",Gr.prototype.message="",Gr.prototype.stack="",Gr.prototype.fatal=null,Gr.prototype.column=null,Gr.prototype.line=null,Gr.prototype.source=null,Gr.prototype.ruleId=null,Gr.prototype.position=null;const Wr={basename:function(e,t){if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');Kr(e);let r,n=0,a=-1,s=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;s--;)if(47===e.charCodeAt(s)){if(r){n=s+1;break}}else a<0&&(r=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let i=-1,o=t.length-1;for(;s--;)if(47===e.charCodeAt(s)){if(r){n=s+1;break}}else i<0&&(r=!0,i=s+1),o>-1&&(e.charCodeAt(s)===t.charCodeAt(o--)?o<0&&(a=s):(o=-1,a=i));n===a?a=i:a<0&&(a=e.length);return e.slice(n,a)},dirname:function(e){if(Kr(e),0===e.length)return".";let t,r=-1,n=e.length;for(;--n;)if(47===e.charCodeAt(n)){if(t){r=n;break}}else t||(t=!0);return r<0?47===e.charCodeAt(0)?"/":".":1===r&&47===e.charCodeAt(0)?"//":e.slice(0,r)},extname:function(e){Kr(e);let t,r=e.length,n=-1,a=0,s=-1,i=0;for(;r--;){const o=e.charCodeAt(r);if(47!==o)n<0&&(t=!0,n=r+1),46===o?s<0?s=r:1!==i&&(i=1):s>-1&&(i=-1);else if(t){a=r+1;break}}if(s<0||n<0||0===i||1===i&&s===n-1&&s===a+1)return"";return e.slice(s,n)},join:function(){let e,t=-1;for(var r=arguments.length,n=new Array(r),a=0;a2){if(n=a.lastIndexOf("/"),n!==a.length-1){n<0?(a="",s=0):(a=a.slice(0,n),s=a.length-1-a.lastIndexOf("/")),i=d,o=0;continue}}else if(a.length>0){a="",s=0,i=d,o=0;continue}t&&(a=a.length>0?a+"/..":"..",s=2)}else a.length>0?a+="/"+e.slice(i+1,d):a=e.slice(i+1,d),s=d-i-1;i=d,o=0}else 46===r&&o>-1?o++:o=-1}return a}(e,!t);0!==r.length||t||(r=".");r.length>0&&47===e.charCodeAt(e.length-1)&&(r+="/");return t?"/"+r:r}(e)},sep:"/"};function Kr(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qr={cwd:function(){return"/"}};function zr(e){return null!==e&&"object"===typeof e&&e.href&&e.origin}function Vr(e){if("string"===typeof e)e=new URL(e);else if(!zr(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let r=-1;for(;++r1?d-1:0),l=1;la.length;let c;d&&a.push(s);try{c=e.apply(this,a)}catch(n){if(d&&r)throw n;return s(n)}d||(c instanceof Promise?c.then(i,s):c instanceof Error?s(c):i(c))}function s(e){if(!r){r=!0;for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s{if(!e&&t&&r){const n=i.stringify(t,r);void 0===n||null===n||(!function(e){return"string"===typeof e||Mr(e)}(n)?r.result=n:r.value=n),s(e,r)}else s(e)}))}r(null,t)},i.processSync=function(e){let t;i.freeze(),on("processSync",i.Parser),dn("processSync",i.Compiler);const r=pn(e);return i.process(r,n),un("processSync","process",t),r;function n(e){t=!0,Zr(e)}},i;function i(){const t=e();let n=-1;for(;++n1?t-1:0),o=1;oa?0:a+t:t>a?a:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);i0?(mn(e,e.length,0,t),e):t}const vn={}.hasOwnProperty;function bn(e){const t={};let r=-1;for(;++rs))return;const r=t.events.length;let a,o,d=r;for(;d--;)if("exit"===t.events[d][0]&&"chunkFlow"===t.events[d][1].type){if(a){o=t.events[d][1].end;break}a=!0}for(y(i),e=r;en;){const n=r[a];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function v(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Ln={tokenize:function(e,t,r){return Nn(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const Bn={tokenize:function(e,t,r){return function(t){return Pn(t)?Nn(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||kn(e)?t(e):r(e)}},partial:!0};function Un(e){const t={};let r,n,a,s,i,o,d,c=-1;for(;++c=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}},partial:!0};const Kn={tokenize:function(e){const t=this,r=e.attempt(Bn,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,Nn(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Gn,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const qn={resolveAll:Xn()},zn=Yn("string"),Vn=Yn("text");function Yn(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],a=t.attempt(n,s,i);return s;function s(e){return d(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return d(e)?(t.exit("data"),a(e)):(t.consume(e),o)}function d(e){if(null===e)return!0;const t=n[e];let a=-1;if(t)for(;++a-1){const e=i[0];"string"===typeof e?i[0]=e.slice(n):i.shift()}s>0&&i.push(e[a].slice(0,s))}return i}(i,e)}function g(){const{line:e,column:t,offset:r,_index:a,_bufferIndex:s}=n;return{line:e,column:t,offset:r,_index:a,_bufferIndex:s}}function h(){let e;for(;n._index=3&&(null===s||kn(s))?(e.exit("thematicBreak"),t(s)):r(s)}function i(t){return t===n?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),Pn(t)?Nn(e,s,"whitespace")(t):s(t))}}};const ea={name:"list",tokenize:function(e,t,r){const n=this,a=n.events[n.events.length-1];let s=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!n.containerState.marker||t===n.containerState.marker:jn(t)){if(n.containerState.type||(n.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(Zn,r,d)(t):d(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(t)}return r(t)};function o(t){return jn(t)&&++i<10?(e.consume(t),o):(!n.interrupt||i<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),d(t)):r(t)}function d(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(Bn,n.interrupt?r:c,e.attempt(ta,u,l))}function c(e){return n.containerState.initialBlankLine=!0,s++,u(e)}function l(t){return Pn(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):r(t)}function u(r){return n.containerState.size=s+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Bn,a,s);function a(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Nn(e,t,"listItemIndent",n.containerState.size+1)(r)}function s(r){return n.containerState.furtherBlankLines||!Pn(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(ra,t,i)(r))}function i(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,Nn(e,e.attempt(ea,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},ta={tokenize:function(e,t,r){const n=this;return Nn(e,(function(e){const a=n.events[n.events.length-1];return!Pn(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},ra={tokenize:function(e,t,r){const n=this;return Nn(e,(function(e){const a=n.events[n.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const na={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return r(t)};function a(r){return Pn(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){const n=this;return function(t){if(Pn(t))return Nn(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(n){return e.attempt(na,t,r)(n)}}},exit:function(e){e.exit("blockQuote")}};function aa(e,t,r,n,a,s,i,o,d){const c=d||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(a),e.enter(s),e.consume(t),e.exit(s),u;if(null===t||32===t||41===t||Sn(t))return r(t);return e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(t)};function u(r){return 62===r?(e.enter(s),e.consume(r),e.exit(s),e.exit(a),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(r))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(o),u(t)):null===t||60===t||kn(t)?r(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(a){return l||null!==a&&41!==a&&!_n(a)?l999||null===u||91===u||93===u&&!o||94===u&&!d&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):93===u?(e.exit(s),e.enter(a),e.consume(u),e.exit(a),e.exit(n),t):kn(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),l(u))}function l(t){return null===t||91===t||93===t||kn(t)||d++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!Pn(t)),92===t?u:l)}function u(t){return 91===t||92===t||93===t?(e.consume(t),d++,l):l(t)}}function ia(e,t,r,n,a,s){let i;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,o;return r(t)};function o(r){return r===i?(e.enter(a),e.consume(r),e.exit(a),e.exit(n),t):(e.enter(s),d(r))}function d(t){return t===i?(e.exit(s),o(i)):null===t?r(t):kn(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Nn(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||kn(t)?(e.exit("chunkString"),d(t)):(e.consume(t),92===t?l:c)}function l(t){return t===i||92===t?(e.consume(t),c):c(t)}}function oa(e,t){let r;return function n(a){if(kn(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n;if(Pn(a))return Nn(e,n,r?"linePrefix":"lineSuffix")(a);return t(a)}}function da(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ca={name:"definition",tokenize:function(e,t,r){const n=this;let a;return function(t){return e.enter("definition"),function(t){return sa.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function s(t){return a=da(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):r(t)}function i(t){return _n(t)?oa(e,o)(t):o(t)}function o(t){return aa(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function d(t){return e.attempt(la,c,c)(t)}function c(t){return Pn(t)?Nn(e,l,"whitespace")(t):l(t)}function l(s){return null===s||kn(s)?(e.exit("definition"),n.parser.defined.push(a),t(s)):r(s)}}},la={tokenize:function(e,t,r){return function(t){return _n(t)?oa(e,n)(t):r(t)};function n(t){return ia(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return Pn(t)?Nn(e,s,"whitespace")(t):s(t)}function s(e){return null===e||kn(e)?t(e):r(e)}},partial:!0};const ua={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),Nn(e,a,"linePrefix",5)(t)};function a(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?s(e):r(e)}function s(t){return null===t?o(t):kn(t)?e.attempt(pa,s,o)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||kn(t)?(e.exit("codeFlowValue"),s(t)):(e.consume(t),i)}function o(r){return e.exit("codeIndented"),t(r)}}},pa={tokenize:function(e,t,r){const n=this;return a;function a(t){return n.parser.lazy[n.now().line]?r(t):kn(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):Nn(e,s,"linePrefix",5)(t)}function s(e){const s=n.events[n.events.length-1];return s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(e):kn(e)?a(e):r(e)}},partial:!0};const fa={name:"headingAtx",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&n++<6?(e.consume(t),a):null===t||_n(t)?(e.exit("atxHeadingSequence"),s(t)):r(t)}function s(r){return 35===r?(e.enter("atxHeadingSequence"),i(r)):null===r||kn(r)?(e.exit("atxHeading"),t(r)):Pn(r)?Nn(e,s,"whitespace")(r):(e.enter("atxHeadingText"),o(r))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),s(t))}function o(t){return null===t||35===t||_n(t)?(e.exit("atxHeadingText"),s(t)):(e.consume(t),o)}},resolve:function(e,t){let r,n,a=e.length-2,s=3;"whitespace"===e[s][1].type&&(s+=2);a-2>s&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(s===a-1||a-4>s&&"whitespace"===e[a-2][1].type)&&(a-=s+1===a?2:4);a>s&&(r={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},n={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},mn(e,s,a-s+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const ga={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let a;return function(t){let i,o=n.events.length;for(;o--;)if("lineEnding"!==n.events[o][1].type&&"linePrefix"!==n.events[o][1].type&&"content"!==n.events[o][1].type){i="paragraph"===n.events[o][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),s(t)}(t);return r(t)};function s(t){return t===a?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),Pn(t)?Nn(e,i,"lineSuffix")(t):i(t))}function i(n){return null===n||kn(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,a,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){r=s;break}"paragraph"===e[s][1].type&&(n=s)}else"content"===e[s][1].type&&e.splice(s,1),a||"definition"!==e[s][1].type||(a=s);const i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=i;return e.push(["exit",i,t]),e}};const ha=["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"],ma=["pre","script","style","textarea"],ya={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let a,s,i,o,d;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(o){return 33===o?(e.consume(o),l):47===o?(e.consume(o),s=!0,f):63===o?(e.consume(o),a=3,n.interrupt?t:O):En(o)?(e.consume(o),i=String.fromCharCode(o),g):r(o)}function l(s){return 45===s?(e.consume(s),a=2,u):91===s?(e.consume(s),a=5,o=0,p):En(s)?(e.consume(s),a=4,n.interrupt?t:O):r(s)}function u(a){return 45===a?(e.consume(a),n.interrupt?t:O):r(a)}function p(a){const s="CDATA[";return a===s.charCodeAt(o++)?(e.consume(a),6===o?n.interrupt?t:j:p):r(a)}function f(t){return En(t)?(e.consume(t),i=String.fromCharCode(t),g):r(t)}function g(o){if(null===o||47===o||62===o||_n(o)){const d=47===o,c=i.toLowerCase();return d||s||!ma.includes(c)?ha.includes(i.toLowerCase())?(a=6,d?(e.consume(o),h):n.interrupt?t(o):j(o)):(a=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(o):s?m(o):y(o)):(a=1,n.interrupt?t(o):j(o))}return 45===o||Tn(o)?(e.consume(o),i+=String.fromCharCode(o),g):r(o)}function h(a){return 62===a?(e.consume(a),n.interrupt?t:j):r(a)}function m(t){return Pn(t)?(e.consume(t),m):w(t)}function y(t){return 47===t?(e.consume(t),w):58===t||95===t||En(t)?(e.consume(t),v):Pn(t)?(e.consume(t),y):w(t)}function v(t){return 45===t||46===t||58===t||95===t||Tn(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),x):Pn(t)?(e.consume(t),b):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),d=t,R):Pn(t)?(e.consume(t),x):E(t)}function R(t){return t===d?(e.consume(t),d=null,T):null===t||kn(t)?r(t):(e.consume(t),R)}function E(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||_n(t)?b(t):(e.consume(t),E)}function T(e){return 47===e||62===e||Pn(e)?y(e):r(e)}function w(t){return 62===t?(e.consume(t),S):r(t)}function S(t){return null===t||kn(t)?j(t):Pn(t)?(e.consume(t),S):r(t)}function j(t){return 45===t&&2===a?(e.consume(t),_):60===t&&1===a?(e.consume(t),P):62===t&&4===a?(e.consume(t),N):63===t&&3===a?(e.consume(t),O):93===t&&5===a?(e.consume(t),D):!kn(t)||6!==a&&7!==a?null===t||kn(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),j):(e.exit("htmlFlowData"),e.check(va,F,A)(t))}function A(t){return e.check(ba,C,F)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),k}function k(t){return null===t||kn(t)?A(t):(e.enter("htmlFlowData"),j(t))}function _(t){return 45===t?(e.consume(t),O):j(t)}function P(t){return 47===t?(e.consume(t),i="",I):j(t)}function I(t){if(62===t){const r=i.toLowerCase();return ma.includes(r)?(e.consume(t),N):j(t)}return En(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),I):j(t)}function D(t){return 93===t?(e.consume(t),O):j(t)}function O(t){return 62===t?(e.consume(t),N):45===t&&2===a?(e.consume(t),O):j(t)}function N(t){return null===t||kn(t)?(e.exit("htmlFlowData"),F(t)):(e.consume(t),N)}function F(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},va={tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Bn,t,r)}},partial:!0},ba={tokenize:function(e,t,r){const n=this;return function(t){if(kn(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return r(t)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const xa={tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},Ra={name:"codeFenced",tokenize:function(e,t,r){const n=this,a={tokenize:function(e,t,r){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d}function d(t){return e.enter("codeFencedFence"),Pn(t)?Nn(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===s?(e.enter("codeFencedFenceSequence"),l(t)):r(t)}function l(t){return t===s?(a++,e.consume(t),l):a>=o?(e.exit("codeFencedFenceSequence"),Pn(t)?Nn(e,u,"whitespace")(t):u(t)):r(t)}function u(n){return null===n||kn(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0};let s,i=0,o=0;return function(t){return function(t){const r=n.events[n.events.length-1];return i=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,s=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(t)}(t)};function d(t){return t===s?(o++,e.consume(t),d):o<3?r(t):(e.exit("codeFencedFenceSequence"),Pn(t)?Nn(e,c,"whitespace")(t):c(t))}function c(r){return null===r||kn(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(xa,f,v)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(r))}function l(t){return null===t||kn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Pn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Nn(e,u,"whitespace")(t)):96===t&&t===s?r(t):(e.consume(t),l)}function u(t){return null===t||kn(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||kn(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===s?r(t):(e.consume(t),p)}function f(t){return e.attempt(a,v,g)(t)}function g(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return i>0&&Pn(t)?Nn(e,m,"linePrefix",i+1)(t):m(t)}function m(t){return null===t||kn(t)?e.check(xa,f,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||kn(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),y)}function v(r){return e.exit("codeFenced"),t(r)}},concrete:!0};var Ea=r(6068);const Ta={name:"characterReference",tokenize:function(e,t,r){const n=this;let a,s,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function o(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,s=Tn,c(t))}function d(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=An,c):(e.enter("characterReferenceValue"),a=7,s=jn,c(t))}function c(o){if(59===o&&i){const a=e.exit("characterReferenceValue");return s!==Tn||(0,Ea.T)(n.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(o)}return s(o)&&i++1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const u=Object.assign({},e[r][1].end),p=Object.assign({},e[l][1].start);Da(u,-o),Da(p,o),s={type:o>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[r][1].end)},i={type:o>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:p},a={type:o>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:o>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},i.end)},e[r][1].end=Object.assign({},s.start),e[l][1].start=Object.assign({},i.end),d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=yn(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=yn(d,[["enter",n,t],["enter",s,t],["exit",s,t],["enter",a,t]]),d=yn(d,$n(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),d=yn(d,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(c=2,d=yn(d,[["enter",e[l][1],t],["exit",e[l][1],t]])):c=0,mn(e,r-1,l-r+3,d),l=r+d.length-c-2;break}l=-1;for(;++l13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535===(65535&r)||65534===(65535&r)||r>1114111?"\ufffd":String.fromCharCode(r)}const Ja=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $a(e){return e.replace(Ja,Qa)}function Qa(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Xa(r.slice(t?2:1),t?16:10)}return(0,Ea.T)(r)||e}const Za={}.hasOwnProperty,es=function(e,t,r){return"string"!==typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(re),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(Q),blockQuote:o(V),characterEscape:A,characterReference:A,codeFenced:o(Y),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:o(Y,d),codeText:o(X,d),codeTextData:A,data:A,codeFlowValue:A,definition:o(J),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:o($),hardBreakEscape:o(Z),hardBreakTrailing:o(Z),htmlFlow:o(ee,d),htmlFlowData:A,htmlText:o(ee,d),htmlTextData:A,image:o(te),label:d,link:o(re),listItem:o(ae),listItemValue:g,listOrdered:o(ne,f),listUnordered:o(ne),paragraph:o(se),reference:H,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:o(Q),strong:o(ie),thematicBreak:o(de)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:z,autolinkProtocol:q,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:K,codeFenced:l(v),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:C,codeIndented:l(b),codeText:l(D),codeTextData:C,data:C,definition:l(),definitionDestinationString:E,definitionLabelString:x,definitionTitleString:R,emphasis:l(),hardBreakEscape:l(_),hardBreakTrailing:l(_),htmlFlow:l(P),htmlFlowData:C,htmlText:l(I),htmlTextData:C,image:l(N),label:M,labelText:F,lineEnding:k,link:l(O),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:G,resourceDestinationString:L,resourceTitleString:B,resource:U,setextHeading:l(j),setextHeadingLineSequence:S,setextHeadingText:w,strong:l(),thematicBreak:l()}};rs(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let r={type:"root",children:[]};const n={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:d,resume:p,setData:s,getData:i},o=[];let l=-1;for(;++l0){const e=n.tokenStack[n.tokenStack.length-1];(e[1]||as).call(n,void 0,e[0])}for(r.position={start:ts(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ts(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l{const r=this.data("settings");return es(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function is(e){const t=[];let r=-1,n=0,a=0;for(;++r55295&&s<57344){const t=e.charCodeAt(r+1);s<56320&&t>56319&&t<57344?(i=String.fromCharCode(s,t),a=1):i="\ufffd"}else i=String.fromCharCode(s);i&&(t.push(e.slice(n,r),encodeURIComponent(i)),n=r+a+1,i=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}const os=function(e){if(void 0===e||null===e)return cs;if("string"===typeof e)return function(e){return ds(t);function t(t){return t&&t.type===e}}(e);if("object"===typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r1?r-1:0),a=1;a":"")+")"})}return l;function l(){let c,l,u,p=[];if((!t||a(i,o,d[d.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"===typeof e)return[true,e];return[e]}(r(i,d)),p[0]===ls))return p;if(i.children&&p[0]!==us)for(l=(n?i.children.length:-1)+s,u=d.concat(i);l>-1&&l-1?r.offset:null}}}const ys={}.hasOwnProperty;function vs(e){return String(e||"").toUpperCase()}function bs(e,t){const r=String(t.identifier).toUpperCase(),n=is(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s;-1===a?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,s=e.footnoteOrder.length):(e.footnoteCounts[r]++,s=a+1);const i=e.footnoteCounts[r],o={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+n,id:e.clobberPrefix+"fnref-"+n+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const d={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,d),e.applyData(t,d)}function xs(e,t){const r=t.referenceType;let n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+n};const a=e.all(t),s=a[0];s&&"text"===s.type?s.value="["+s.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=n:a.push({type:"text",value:n}),a}function Rs(e){const t=e.spread;return void 0===t||null===t?e.children.length>1:t}const Es=9,Ts=32;function ws(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),a=0;const s=[];for(;n;)s.push(Ss(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return s.push(Ss(t.slice(a),a>0,!1)),s.join("")}function Ss(e,t,r){let n=0,a=e.length;if(t){let t=e.codePointAt(n);for(;t===Es||t===Ts;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(a-1);for(;t===Es||t===Ts;)a--,t=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}const js={blockquote:function(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){const r=t.value?t.value+"\n":"",n=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,a={};n&&(a.className=["language-"+n]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s},delete:function(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:bs,footnote:function(e,t){const r=e.footnoteById;let n=1;for(;n in r;)n++;const a=String(n);return r[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},bs(e,{type:"footnoteReference",identifier:a,position:t.position})},heading:function(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.dangerous){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}return null},imageReference:function(e,t){const r=e.definition(t.identifier);if(!r)return xs(e,t);const n={src:is(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(n.title=r.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const r={src:is(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){const r=e.definition(t.identifier);if(!r)return xs(e,t);const n={href:is(r.url||"")};null!==r.title&&void 0!==r.title&&(n.title=r.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const r={href:is(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){const n=e.all(t),a=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n0&&r.children.unshift({type:"text",value:" "}),r.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o0){const n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=gs(t.children[1]),i=hs(t.children[t.children.length-1]);s.line&&i.line&&(n.position={start:s,end:i}),a.push(n)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)},tableCell:function(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){const n=r?r.children:void 0,a=0===(n?n.indexOf(t):1)?"th":"td",s=r&&"table"===r.type?r.align:void 0,i=s?s.length:t.children.length;let o=-1;const d=[];for(;++o{const r=vs(e.identifier);r&&!ys.call(t,r)&&(t[r]=e)})),function(e){const r=vs(e);return r&&ys.call(t,r)?t[r]:null}}(e),i.footnoteById=a,i.footnoteOrder=[],i.footnoteCounts={},i.patch=_s,i.applyData=Ps,i.one=function(e,t){return Is(i,e,t)},i.all=function(e){return Ds(i,e)},i.wrap=Os,i.augment=s,fs(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();Cs.call(a,t)||(a[t]=e)})),i;function s(e,t){if(e&&"data"in e&&e.data){const r=e.data;r.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=r.hName),"element"===t.type&&r.hProperties&&(t.properties={...t.properties,...r.hProperties}),"children"in t&&t.children&&r.hChildren&&(t.children=r.hChildren)}if(e){const r="type"in e?e:{position:e};(function(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column})(r)||(t.position={start:gs(r),end:hs(r)})}return t}function i(e,t,r,n){return Array.isArray(r)&&(n=r,r={}),s(e,{type:"element",tagName:t,properties:r||{},children:n||[]})}}function _s(e,t){e.position&&(t.position=function(e){return{start:gs(e),end:hs(e)}}(e))}function Ps(e,t){let r=t;if(e&&e.data){const t=e.data.hName,n=e.data.hChildren,a=e.data.hProperties;"string"===typeof t&&("element"===r.type?r.tagName=t:r={type:"element",tagName:t,properties:{},children:[]}),"element"===r.type&&a&&(r.properties={...r.properties,...a}),"children"in r&&r.children&&null!==n&&void 0!==n&&(r.children=n)}return r}function Is(e,t,r){const n=t&&t.type;if(!n)throw new Error("Expected node, got `"+t+"`");return Cs.call(e.handlers,n)?e.handlers[n](e,t,r):e.passThrough&&e.passThrough.includes(n)?"children"in t?{...t,children:Ds(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,r):function(e,t){const r=t.data||{},n=!("value"in t)||Cs.call(r,"hProperties")||Cs.call(r,"hChildren")?{type:"element",tagName:"div",properties:{},children:Ds(e,t)}:{type:"text",value:t.value};return e.patch(t,n),e.applyData(t,n)}(e,t)}function Ds(e,t){const r=[];if("children"in t){const n=t.children;let a=-1;for(;++a0&&r.push({type:"text",value:"\n"}),r}function Ns(e,t){const r=ks(e,t),n=r.one(e,null),a=function(e){const t=[];let r=-1;for(;++r1?"-"+o:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21a9"}]};o>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(o)}]}),d.length>0&&d.push({type:"text",value:" "}),d.push(t)}const c=a[a.length-1];if(c&&"element"===c.type&&"p"===c.tagName){const e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...d)}else a.push(...d);const l={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(a,!0)};e.patch(n,l),t.push(l)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(r);return a&&n.children.push({type:"text",value:"\n"},a),Array.isArray(n)?{type:"root",children:n}:n}const Fs=function(e,t){return e&&"run"in e?function(e,t){return(r,n,a)=>{e.run(Ns(r,t),n,(e=>{a(e)}))}}(e,t):function(e){return t=>Ns(t,e)}(e||t)};var Ms=r(9308),Ls=r(9314);function Bs(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{fs(t,"element",((t,r,n)=>{const a=n;let s;if(e.allowedElements?s=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(t.tagName)),!s&&e.allowElement&&"number"===typeof r&&(s=!e.allowElement(t,r,a)),s&&"number"===typeof r)return e.unwrapDisallowed&&t.children?a.children.splice(r,1,...t.children):a.children.splice(r,1),r}))}}var Us=r(9043);function Hs(e){const t=e&&"object"===typeof e&&"text"===e.type?e.value||"":e;return"string"===typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}var Gs=r(5077);const Ws={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Ks=r(103),qs=r(1064);const zs=r(4977),Vs=["http","https","mailto","tel"];function Ys(e){const t=(e||"").trim(),r=t.charAt(0);if("#"===r||"/"===r)return t;const n=t.indexOf(":");if(-1===n)return t;let a=-1;for(;++aa?t:(a=t.indexOf("#"),-1!==a&&n>a?t:"javascript:void(0)")}const Xs={}.hasOwnProperty,Js=new Set(["table","thead","tbody","tfoot","tr"]);function $s(e,t){const r=[];let n,a=-1;for(;++a0?d.createElement(g,c,p):d.createElement(g,c)}function Zs(e,t){let r=-1,n=0;for(;++r for more info)")),delete ni[s]}const t=nn().use(ss).use(e.remarkPlugins||[]).use(Fs,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(Bs,e),r=new Xr;"string"===typeof e.children?r.value=e.children:void 0!==e.children&&null!==e.children&&console.warn("[react-markdown] Warning: please pass a string as `children` (not: `".concat(e.children,"`)"));const n=t.runSync(t.parse(r),r);if("root"!==n.type)throw new TypeError("Expected a `root` node");let a=d.createElement(d.Fragment,{},$s({options:e,schema:Ls.dy,listDepth:0},n));return e.className&&(a=d.createElement("div",{className:e.className},a)),a}ai.propTypes={children:Ms.string,className:Ms.string,allowElement:Ms.func,allowedElements:Ms.arrayOf(Ms.string),disallowedElements:Ms.arrayOf(Ms.string),unwrapDisallowed:Ms.bool,remarkPlugins:Ms.arrayOf(Ms.oneOfType([Ms.object,Ms.func,Ms.arrayOf(Ms.oneOfType([Ms.bool,Ms.string,Ms.object,Ms.func,Ms.arrayOf(Ms.any)]))])),rehypePlugins:Ms.arrayOf(Ms.oneOfType([Ms.object,Ms.func,Ms.arrayOf(Ms.oneOfType([Ms.bool,Ms.string,Ms.object,Ms.func,Ms.arrayOf(Ms.any)]))])),sourcePos:Ms.bool,rawSourcePos:Ms.bool,skipHtml:Ms.bool,includeElementIndex:Ms.bool,transformLinkUri:Ms.oneOfType([Ms.func,Ms.bool]),linkTarget:Ms.oneOfType([Ms.func,Ms.string]),transformImageUri:Ms.func,components:Ms.object};const si={tokenize:function(e,t,r){let n=0;return function t(s){if((87===s||119===s)&&n<3)return n++,e.consume(s),t;if(46===s&&3===n)return e.consume(s),a;return r(s)};function a(e){return null===e?r(e):t(e)}},partial:!0},ii={tokenize:function(e,t,r){let n,a,s;return i;function i(t){return 46===t||95===t?e.check(di,d,o)(t):null===t||_n(t)||Dn(t)||45!==t&&In(t)?d(t):(s=!0,e.consume(t),i)}function o(t){return 95===t?n=!0:(a=n,n=void 0),e.consume(t),i}function d(e){return a||n||!s?r(e):t(e)}},partial:!0},oi={tokenize:function(e,t){let r=0,n=0;return a;function a(i){return 40===i?(r++,e.consume(i),a):41===i&&n0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}fi[43]=pi,fi[45]=pi,fi[46]=pi,fi[95]=pi,fi[72]=[pi,ui],fi[104]=[pi,ui],fi[87]=[pi,li],fi[119]=[pi,li];const Ri={tokenize:function(e,t,r){const n=this;return Nn(e,(function(e){const a=n.events[n.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Ei(e,t,r){const n=this;let a=n.events.length;const s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i;for(;a--;){const e=n.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return r(a);const o=da(n.sliceSerialize({start:i.end,end:n.now()}));if(94!==o.codePointAt(0)||!s.includes(o.slice(1)))return r(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function Ti(e,t){let r,n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){r=e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},d=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...d),e}function wi(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(o){if(i>999||93===o&&!s||null===o||91===o||_n(o))return r(o);if(93===o){e.exit("chunkString");const s=e.exit("gfmFootnoteCallString");return a.includes(da(n.sliceSerialize(s)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(o)}return _n(o)||(s=!0),i++,e.consume(o),92===o?c:d}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,d):d(t)}}function Si(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s,i,o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),d};function d(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(t)}function c(t){if(o>999||93===t&&!i||null===t||91===t||_n(t))return r(t);if(93===t){e.exit("chunkString");const r=e.exit("gfmFootnoteDefinitionLabelString");return s=da(n.sliceSerialize(r)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return _n(t)||(i=!0),o++,e.consume(t),92===t?l:c}function l(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(s)||a.push(s),Nn(e,p,"gfmFootnoteDefinitionWhitespace")):r(t)}function p(e){return t(e)}}function ji(e,t,r){return e.check(Bn,t,e.attempt(Ri,t,r))}function Ai(e){e.exit("gfmFootnoteDefinition")}function Ci(e){let t=(e||{}).singleTilde;const r={tokenize:function(e,r,n){const a=this.previous,s=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==s[s.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),o(t)};function o(s){const d=Pa(a);if(126===s)return i>1?n(s):(e.consume(s),i++,o);if(i<2&&!t)return n(s);const c=e.exit("strikethroughSequenceTemporary"),l=Pa(s);return c._open=!l||2===l&&Boolean(d),c._close=!d||2===d&&Boolean(l),r(s)}},resolveAll:function(e,t){let r=-1;for(;++re[0]-t[0])),0===this.map.length)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1])),r.push(this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let n=r.pop();for(;n;)e.push(...n),n=r.pop();this.map.length=0}}function _i(e,t){let r=!1;const n=[];for(;t-1;){const e=n.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?n.events[t][1].type:null,s="tableHead"===a||"tableRow"===a?x:o;if(s===x&&n.parser.lazy[n.now().line])return r(e);return s(e)};function o(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return d(e);return a=!0,i+=1,d(e)}(t)}function d(t){return null===t?r(t):kn(t)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):r(t):Pn(t)?Nn(e,d,"whitespace")(t):(i+=1,a&&(a=!1,s+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||_n(t)?(e.exit("data"),d(t)):(e.consume(t),92===t?l:c)}function l(t){return 92===t||124===t?(e.consume(t),c):c(t)}function u(t){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(t):(e.enter("tableDelimiterRow"),a=!1,Pn(t)?Nn(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?g(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):b(t)}function f(t){return Pn(t)?Nn(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(i+=1,h(t)):null===t||kn(t)?v(t):b(t)}function h(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):b(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Pn(t)?Nn(e,v,"whitespace")(t):v(t)}function v(r){return 124===r?p(r):(null===r||kn(r))&&a&&s===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(r)):b(r)}function b(e){return r(e)}function x(t){return e.enter("tableRow"),R(t)}function R(r){return 124===r?(e.enter("tableCellDivider"),e.consume(r),e.exit("tableCellDivider"),R):null===r||kn(r)?(e.exit("tableRow"),t(r)):Pn(r)?Nn(e,R,"whitespace")(r):(e.enter("data"),E(r))}function E(t){return null===t||124===t||_n(t)?(e.exit("data"),R(t)):(e.consume(t),92===t?T:E)}function T(t){return 92===t||124===t?(e.consume(t),E):E(t)}},resolveAll:function(e,t){let r,n,a,s=-1,i=!0,o=0,d=[0,0,0,0],c=[0,0,0,0],l=!1,u=0;const p=new ki;for(;++sr[2]+1){const t=r[2]+1,n=r[3]-r[2]-1;e.add(t,n,[])}}e.add(r[3]+1,0,[["exit",i,t]])}return void 0!==a&&(s.end=Object.assign({},Oi(t.events,a)),e.add(a,0,[["exit",s,t]]),s=void 0),s}function Di(e,t,r,n,a){const s=[],i=Oi(t.events,r);a&&(a.end=Object.assign({},i),s.push(["exit",a,t])),n.end=Object.assign({},i),s.push(["exit",n,t]),e.add(r+1,0,s)}function Oi(e,t){const r=e[t],n="enter"===r[0]?"start":"end";return r[1][n]}const Ni={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return _n(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),s):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),s):r(t)}function s(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):r(t)}function i(n){return kn(n)?t(n):Pn(n)?e.check({tokenize:Mi},t,r)(n):r(n)}}},Fi={text:{91:Ni}};function Mi(e,t,r){return Nn(e,(function(e){return null===e?r(e):t(e)}),"whitespace")}function Li(e,t){const r=String(e);if("string"!==typeof t)throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;-1!==a;)n++,a=r.indexOf(t,a+t.length);return n}const Bi={}.hasOwnProperty,Ui=function(e,t,r,n){let a,s;"string"===typeof t||t instanceof RegExp?(s=[[t,r]],a=n):(s=t,a=r),a||(a={});const i=os(a.ignore||[]),o=function(e){const t=[];if("object"!==typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r0?{type:"text",value:o}:void 0),!1!==o&&(s!==r&&l.push({type:"text",value:e.value.slice(s,r)}),Array.isArray(o)?l.push(...o):o&&l.push(o),s=r+u[0].length,c=!0),!n.global)break;u=n.exec(e.value)}c?(se}const Wi="phrasing",Ki=["autolink","link","image","label"],qi={transforms:[function(e){Ui(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Yi],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,Xi]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:Vi,literalAutolinkHttp:Vi,literalAutolinkWww:Vi},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}}},zi={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wi,notInConstruct:Ki},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wi,notInConstruct:Ki},{character:":",before:"[ps]",after:"\\/",inConstruct:Wi,notInConstruct:Ki}]};function Vi(e){this.config.enter.autolinkProtocol.call(this,e)}function Yi(e,t,r,n,a){let s="";if(!Ji(a))return!1;if(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const a=Li(e,"(");let s=Li(e,")");for(;-1!==n&&a>s;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),s++;return[e,r]}(r+n);if(!i[0])return!1;const o={type:"link",title:null,url:s+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[o,{type:"text",value:i[1]}]:o}function Xi(e,t,r,n){return!(!Ji(n,!0)||/[-\d_]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Ji(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||Dn(r)||In(r))&&(!t||47!==r)}function $i(e){return e.label||!e.identifier?e.label||"":$a(e.identifier)}function Qi(e,t,r,n){let a=n.join.length;for(;a--;){const s=n.join[a](e,t,r,n);if(!0===s||1===s)break;if("number"===typeof s)return"\n".repeat(1+s);if(!1===s)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const Zi=/\r?\n|\r/g;function eo(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function to(e,t){return ro(e,t.inConstruct,!0)&&!ro(e,t.notInConstruct,!1)}function ro(e,t,r){if("string"===typeof t&&(t=[t]),!t||0===t.length)return r;let n=-1;for(;++n=c||(e+10?" ":"")),a.shift(4),s+=a.move(function(e,t){const r=[];let n,a=0,s=0;for(;n=Zi.exec(e);)i(e.slice(a,n.index)),r.push(n[0]),a=n.index+n[0].length,s++;return i(e.slice(a)),r.join("");function i(e){r.push(t(e,s,!e))}}(function(e,t,r){const n=t.indexStack,a=e.children||[],s=t.createTracker(r),i=[];let o=-1;for(n.push(-1);++o0&&("\r"===o||"\n"===o)&&"html"===c.type&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),o=" ",d=t.createTracker(r),d.move(s.join(""))),s.push(d.move(t.handle(c,e,t,{...d.current(),before:o,after:l}))),o=s[s.length-1].slice(-1)}return n.pop(),s.join("")}mo.peek=function(){return"["};Eo.peek=function(){return"~"};const xo={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Ro={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:Eo}};function Eo(e,t,r,n){const a=io(n),s=r.enter("strikethrough");let i=a.move("~~");return i+=bo(e,r,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),s(),i}function To(e,t,r){let n=e.value||"",a="`",s=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++s"none"===e?null:e)),children:[]},e),this.setData("inTable",!0)},tableData:ko,tableHeader:ko,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,_o));const r=this.stack[this.stack.length-1];r.value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:Co,tableHeader:Co,tableRow:Co}};function Co(e){this.exit(e)}function ko(e){this.enter({type:"tableCell",children:[]},e)}function _o(e,t){return"|"===t?t:e}function Po(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,a=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r,n){return o(function(e,t,r){const n=e.children;let a=-1;const s=[],i=t.enter("table");for(;++a1&&void 0!==arguments[1]?arguments[1]:{};const r=(t.align||[]).concat(),n=t.stringLength||So,a=[],s=[],i=[],o=[];let d=0,c=-1;for(;++cd&&(d=e[c].length);++lo[l])&&(o[l]=e)}r.push(s)}s[c]=r,i[c]=a}let l=-1;if("object"===typeof r&&"length"in r)for(;++lo[l]&&(o[l]=s),p[l]=s),u[l]=i}s.splice(1,0,u),i.splice(1,0,p),c=-1;const f=[];for(;++c-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+s);let i=s.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const o=r.createTracker(n);o.move(s+" ".repeat(i-s.length)),o.shift(i);const d=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),(function(e,t,r){if(t)return(r?"":" ".repeat(i))+e;return(r?s:s+" ".repeat(i-s.length))+e}));return d(),c}const Do={exit:{taskListCheckValueChecked:No,taskListCheckValueUnchecked:No,paragraph:function(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"===typeof t.checked){const e=this.stack[this.stack.length-1],r=e.children[0];if(r&&"text"===r.type){const n=t.children;let a,s=-1;for(;++s0&&void 0!==arguments[0]?arguments[0]:{};const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){return bn([gi,{document:{91:{tokenize:Si,continuation:{tokenize:ji},exit:Ai}},text:{91:{tokenize:wi},93:{add:"after",tokenize:Ei,resolveTo:Ti}}},Ci(e),Pi,Fi])}(e)),r("fromMarkdownExtensions",[qi,{enter:{gfmFootnoteDefinition:oo,gfmFootnoteDefinitionLabelString:co,gfmFootnoteCall:po,gfmFootnoteCallString:fo},exit:{gfmFootnoteDefinition:uo,gfmFootnoteDefinitionLabelString:lo,gfmFootnoteCall:ho,gfmFootnoteCallString:go}},xo,Ao,Do]),r("toMarkdownExtensions",function(e){return{extensions:[zi,{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:yo,footnoteReference:mo}},Ro,Po(e),Oo]}}(e))}var Mo=r(3924);const Lo=(0,r(3978).v)(Ls.YP,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);var Bo=r(1154);const Uo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ho={}.hasOwnProperty,Go=Object.prototype;function Wo(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},qo(e,n,r),r}case"#document":case"#document-fragment":{const n=t,a="mode"in n&&("quirks"===n.mode||"limited-quirks"===n.mode);if(r={type:"root",children:Ko(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),n=function(e){const t=String(e),r=[],n=/\r?\n|\r/g;for(;n.test(t);)r.push(n.lastIndex);return r.push(t.length+1),{toPoint:function(e){let t=-1;if("number"===typeof e&&e>-1&&ee)return{line:t+1,column:e-(t>0?r[t-1]:0)+1,offset:e};return{line:void 0,column:void 0,offset:void 0}},toOffset:function(e){const t=e&&e.line,n=e&&e.column;if("number"===typeof t&&"number"===typeof n&&!Number.isNaN(t)&&!Number.isNaN(n)&&t-1 in r){const e=(r[t-2]||0)+n-1||0;if(e>-1&&e1?s-1:0),o=1;o{const n=e;if(n.value.stitch&&null!==r&&null!==t)return r.children[t]=n.value.stitch,t})),"root"!==e.type&&"root"===u.type&&1===u.children.length?u.children[0]:u;function p(e){let t=-1;if(e)for(;++t0&&void 0!==arguments[0]?arguments[0]:{};return(t,r)=>ad(t,r,e)}function ld(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?ld(t.parentElement):null}function ud(e){var t=e=>{var t=ld(e.target);t&&(t.classList.add("active"),Er()(t.dataset.code,(function(){setTimeout((()=>{t.classList.remove("active")}),2e3)})))};(0,d.useEffect)((()=>{var r,n;return null==(r=e.current)||r.removeEventListener("click",t,!1),null==(n=e.current)||n.addEventListener("click",t,!1),()=>{var r;null==(r=e.current)||r.removeEventListener("click",t,!1)}}),[e])}var pd=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement"];const fd=d.forwardRef(((e,t)=>{var{prefixCls:r="wmde-markdown wmde-markdown-color",className:n,source:a,style:o,disableCopy:c=!1,skipHtml:l=!0,onScroll:u,onMouseOver:p,pluginsFilter:f,wrapperElement:g={},warpperElement:h={}}=e,m=(0,i.Z)(e,pd),y=d.useRef(null);(0,d.useImperativeHandle)(t,(()=>(0,s.Z)({},e,{mdp:y})),[y,e]);var v=(r||"")+" "+(n||"");ud(y);var b=[...m.rehypePlugins||[]],x={allowElement:(e,t,r)=>m.allowElement?m.allowElement(e,t,r):/^[A-Za-z0-9]+$/.test(e.tagName)};l&&b.push(cd);var R=[...m.remarkPlugins||[],Fo],E=(0,s.Z)({},h,g);return(0,$t.jsx)("div",(0,s.Z)({ref:y,onScroll:u,onMouseOver:p},E,{className:v,style:o,children:(0,$t.jsx)(ai,(0,s.Z)({},x,m,{skipHtml:l,rehypePlugins:f?f("rehype",b):b,remarkPlugins:f?f("remark",R):R,children:a||""}))}))}));function gd(e){return"children"in e?md(e):"value"in e?e.value:""}function hd(e){return"text"===e.type?e.value:"children"in e?md(e):""}function md(e){let t=-1;const r=[];for(;++t]+)>/g,(function(e,t){var r=s[t];return"$"+(Array.isArray(r)?r.join("$"):r)})))}if("function"==typeof a){var i=this;return e[Symbol.replace].call(this,r,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,i)),a.apply(this,e)}))}return e[Symbol.replace].call(this,r,a)},Rd.apply(this,arguments)}function Ed(e,t){return Ed=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ed(e,t)}function Td(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var Sd=function(e){return function(t){return void 0===t&&(t={}),function(e,t){if(t&&!e.registered(t))throw new Error('The default language "'+t+'" is not registered with refractor.')}(e,t.defaultLanguage),function(e){fs(e,"element",r)};function r(r,n,a){var s,i;if(a&&"pre"===a.tagName&&"code"===r.tagName){var o=(null==r||null==(s=r.data)?void 0:s.meta)||(null==r||null==(i=r.properties)?void 0:i.metastring)||"";r.properties.className?"boolean"==typeof r.properties.className?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[];var d,c,l=function(e){for(var t,r=wd(e.properties.className);!(t=r()).done;){var n=t.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(r);if(!l&&t.defaultLanguage&&r.properties.className.push("language-"+(l=t.defaultLanguage)),r.properties.className.push("code-highlight"),l)try{var u,p;p=null!=(u=l)&&u.includes("diff-")?l.split("-")[1]:l,d=e.highlight(gd(r),p),a.properties.className=(a.properties.className||[]).concat("language-"+p)}catch(x){if(!t.ignoreMissing||!/Unknown language/.test(x.message))throw x;d=r}else d=r;d.children=(c=1,function e(t){return t.reduce((function(t,r){if("text"===r.type){var n=r.value,a=(n.match(/\n/g)||"").length;if(0===a)r.position={start:{line:c,column:1},end:{line:c,column:1}},t.push(r);else for(var s,i=n.split("\n"),o=wd(i.entries());!(s=o()).done;){var d=s.value,l=d[0],u=d[1];t.push({type:"text",value:l===i.length-1?u:u+"\n",position:{start:{line:c+l,column:1},end:{line:c+l,column:1}}})}return c+=a,t}if(Object.prototype.hasOwnProperty.call(r,"children")){var p=c;return r.children=e(r.children),t.push(r),r.position={start:{line:p,column:1},end:{line:c,column:1}},t}return t.push(r),t}),[])})(d.children),d.position=d.children.length>0?{start:{line:d.children[0].position.start.line,column:0},end:{line:d.children[d.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var f,g=function(e){var t=/{([\d,-]+)}/,r=e.split(",").map((function(e){return e.trim()})).join();if(t.test(r)){var n=t.exec(r)[1],a=vd(n);return function(e){return a.includes(e+1)}}return function(){return!1}}(o),h=function(e){var t=Rd(/showLineNumbers=(\d+)/i,{lines:1});if(t.test(e)){var r=t.exec(e);return Number(r.groups.lines)}return 1}(o),m=function(e){for(var t=new Array(e),r=0;r0&&0===i.length)return null}const o={};let d;for(d in t)yd.call(t,d)&&(o[d]="children"===d?i:t[d]);return o}(e)}(d,(function(e){return e.position.start.line<=a+1&&e.position.end.line>=a+1}));s.children=i.children,!o.toLowerCase().includes("showLineNumbers".toLowerCase())&&!t.showLineNumbers||y.some((function(e){return o.toLowerCase().includes(e)}))||(s.properties.line=[(a+h).toString()],s.properties.className.push("line-number")),g(a)&&s.properties.className.push("highlight-line"),("diff"===l||null!=(e=l)&&e.includes("diff-"))&&"-"===gd(s).substring(0,1)?s.properties.className.push("deleted"):("diff"===l||null!=(r=l)&&r.includes("diff-"))&&"+"===gd(s).substring(0,1)&&s.properties.className.push("inserted")},b=wd(m.entries());!(f=b()).done;)v();m.length>0&&""===gd(m[m.length-1]).trim()&&m.pop(),r.children=m}}}},jd=(Sd(bd.$),Sd(xd.$));const Ad="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",Cd="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",kd=new RegExp("^[^"+Cd+"]*["+Ad+"]"),_d=new RegExp("^[^"+Ad+"]*["+Cd+"]");function Pd(e){const t=function(e){const t=String(e||"");return kd.test(t)?"rtl":_d.test(t)?"ltr":"neutral"}(e);return"neutral"===t?void 0:t}function Id(e){const t="element"===e.type&&e.properties&&"string"===typeof e.properties.dir?e.properties.dir.toLowerCase():void 0;return"auto"===t||"ltr"===t||"rtl"===t?t:void 0}const Dd={}.hasOwnProperty;function Od(e,t){const r="string"===typeof t&&function(e){return Boolean(e&&"object"===typeof e&&"type"in e)}(e)&&"element"===e.type&&e.properties&&Dd.call(e.properties,t)&&e.properties[t];return null!==r&&void 0!==r&&!1!==r}const Nd=Xo("operator",{unknown:function(e){throw new Error("Unknown operator `"+e.operator+"`")},invalid:function(e,t,r){return Od(t,r.property)},handlers:{"=":function(e,t,r){return Boolean(Od(t,r.property)&&t.properties&&Fd(t.properties[r.property],r)===e.value)},"~=":function(e,t,r){const n=t.properties&&t.properties[r.property];return!r.commaSeparated&&n&&"object"===typeof n&&e.value&&n.includes(e.value)||Od(t,r.property)&&Fd(n,r)===e.value},"|=":function(e,t,r){const n=Fd(t.properties&&t.properties[r.property],r);return Boolean(Od(t,r.property)&&e.value&&(n===e.value||n.slice(0,e.value.length)===e.value&&"-"===n.charAt(e.value.length)))},"^=":function(e,t,r){return Boolean(Od(t,r.property)&&t.properties&&e.value&&Fd(t.properties[r.property],r).slice(0,e.value.length)===e.value)},"$=":function(e,t,r){return Boolean(Od(t,r.property)&&t.properties&&e.value&&Fd(t.properties[r.property],r).slice(-e.value.length)===e.value)},"*=":function(e,t,r){return Boolean(Od(t,r.property)&&t.properties&&e.value&&Fd(t.properties[r.property],r).includes(e.value))}}});function Fd(e,t){return"boolean"===typeof e?t.attribute:Array.isArray(e)?(t.commaSeparated?qs.P:Ks.P)(e):String(e)}function Md(e,t){return function(r,n){let a=Bd(r,"tag");const s=Bd(null===n||void 0===n?"*":n,"range"),i=[];let o=-1;for(;++oe<=r;if(0===t)return e=>e===r;if(1===t)return r<0?Wd.trueFunc:e=>e>=r;const n=Math.abs(t),a=(r%n+n)%n;return t>1?e=>e>=r&&e%n===a:e=>e<=r&&e%n===a}(function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,r=0,n=s(),a=i();if(t=Hd&&e.charCodeAt(t)<=Gd;)n=10*n+(e.charCodeAt(t)-Hd),t++;return t===r?null:n}function o(){for(;t0},lang:function(e,t,r,n,a){return""!==a.language&&void 0!==a.language&&Ld(a.language,(0,qs.Q)(e.value)).length>0},"last-child":function(e,t,r,n,a){return Zd(a,e),Boolean(a.elementCount&&a.elementIndex===a.elementCount-1)},"last-of-type":function(e,t,r,n,a){return Zd(a,e),"number"===typeof a.typeIndex&&"number"===typeof a.typeCount&&a.typeIndex===a.typeCount-1},matches:Xd,not:function(e,t,r,n,a){return!Xd(e,t,r,n,a)},"nth-child":function(e,t,r,n,a){const s=ec(e);return Zd(a,e),"number"===typeof a.elementIndex&&s(a.elementIndex)},"nth-last-child":function(e,t,r,n,a){const s=ec(e);return Zd(a,e),Boolean("number"===typeof a.elementCount&&"number"===typeof a.elementIndex&&s(a.elementCount-a.elementIndex-1))},"nth-of-type":function(e,t,r,n,a){const s=ec(e);return Zd(a,e),"number"===typeof a.typeIndex&&s(a.typeIndex)},"nth-last-of-type":function(e,t,r,n,a){const s=ec(e);return Zd(a,e),"number"===typeof a.typeCount&&"number"===typeof a.typeIndex&&s(a.typeCount-1-a.typeIndex)},"only-child":function(e,t,r,n,a){return Zd(a,e),1===a.elementCount},"only-of-type":function(e,t,r,n,a){return Zd(a,e),1===a.typeCount},optional:function(e,t){return!$d(e,t)},"read-only":function(e,t,r,n,a){return!Jd(e,t,r,n,a)},"read-write":Jd,required:$d,root:function(e,t,r,n,a){return Boolean((!n||"root"===n.type)&&a.schema&&("html"===a.schema.space||"svg"===a.schema.space)&&("html"===t.tagName||"svg"===t.tagName))},scope:function(e,t,r,n,a){return a.scopeElements.includes(t)}}});function Vd(e,t,r,n,a){const s=e.pseudos;let i=-1;for(;++i"===t.nestingOperator?"directChild":"descendant",e)}else e.found=!0,e.results.includes(r)||e.results.push(r)}null===o.rule.nestingOperator?oc(s,"descendant",o):"~"===o.rule.nestingOperator&&oc(s,"generalSibling",o)}return s}(e,ic(t,e.rootQuery.selectors),r,n,a)),!("children"in r)||e.shallow||e.one&&e.found||function(e,t,r){const n=ic(t.descendant,t.directChild);let a,s=-1;const i={count:0,types:new Map},o={count:0,types:new Map};for(;++s0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:rc}function oc(e,t,r){const n=e[t];n?n.push(r):e[t]=[r]}function dc(e,t){if("element"===t.type){const r=t.tagName.toUpperCase(),n=(e.types.get(r)||0)+1;e.count++,e.types.set(r,n)}}const cc=new(r(6408).N);function lc(e){if("string"!==typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return cc.parse(e)}function uc(e,t,r){return{rootQuery:nc(lc(e)),results:[],scopeElements:t?"root"===t.type?t.children:[t]:[],one:!1,shallow:!1,found:!1,schema:"svg"===r?Ls.YP:Ls.dy,language:void 0,direction:"ltr",editableOrEditingHost:!1,typeIndex:void 0,elementIndex:void 0,typeCount:void 0,elementCount:void 0}}cc.registerAttrEqualityMods("~","|","^","$","*"),cc.registerSelectorPseudos("any","matches","not","has"),cc.registerNestingOperators(">","+","~");const pc=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{"text"===t.type?e+=t.value:"element"===t.type&&t.children&&Array.isArray(t.children)&&(e+=pc(t.children))})),e},fc=e=>{const{selector:t,rewrite:r}=e||{};return e=>{if(r&&"function"===typeof r)if(t&&"string"===typeof t){const n=function(e,t,r){const n=uc(e,t,r);return ac(n,t||void 0),n.results}(t,e);n&&n.length>0&&fs(e,n,((e,t,n)=>{r(e,t,n)}))}else fs(e,((e,t,n)=>{r(e,t,n)}))}},gc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>1?arguments[1]:void 0;for(;n/,"$2")||""))return;if(r){if(gc(e,n,"pre",r))return;return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}return t.value=(t.value||"").replace(/^(\n|\s)+/,""),t}}},hc=e=>{let{value:t=""}=e;const r=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").match(/([^?=&]+)(=([^&]*))/g)||[]).reduce(((e,t)=>(e[t.slice(0,t.indexOf("="))]=t.slice(t.indexOf("=")+1),e)),{})}(t.replace(/^/,"$1").replace(/^rehype:/,""));return Object.keys(r).forEach((e=>{"true"===r[e]&&(r[e]=!0),"false"===r[e]&&(r[e]=!1),"string"!==typeof r[e]||/^0/.test(r[e])||isNaN(+r[e])||(r[e]=+r[e])})),r},mc=(e,t,r)=>"string"===r?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:"attr"===r?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},yc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{properties:t="data",codeBlockParames:r=!0}=e;return e=>{fs(e,"element",((e,n,a)=>{if(r&&"pre"===e.tagName&&e&&Array.isArray(e.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const r=e.children[0];if(r&&"code"===r.tagName&&"number"===typeof n){const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;for(;t>-1;){if(t--,!e[t])return;if(e[t]&&e[t].value&&""!==e[t].value.replace(/(\n|\s)/g,"")||"text"!==e[t].type){if(!/^rehype:/.test(e[t].value)||"comment"!==e[t].type)return;return e[t]}}}(a.children,n);if(s){const n=hc(s);Object.keys(n).length>0&&(e.properties={...e.properties,"data-type":"rehyp"},r.properties=mc(r.properties,n,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(e.tagName)&&a&&Array.isArray(a.children)&&"number"===typeof n){const s=gc(a.children,n,"",r);if(s){const r=hc(s);Object.keys(r).length>0&&(e.properties=mc(e.properties,r,t))}}}))}};var vc=function(e){return void 0===e&&(e={}),e=>{fs(e,(e=>{"element"===e.type&&"code"===e.tagName&&e.data&&e.data.meta&&(e.properties=(0,s.Z)({},e.properties,{"data-meta":String(e.data.meta)}))}))}};const bc=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,xc=Object.hasOwnProperty;function Rc(e){const t=e&&"element"===e.type&&e.tagName.toLowerCase()||"",r=2===t.length&&104===t.charCodeAt(0)?t.charCodeAt(1):0;return r>48&&r<55?r-48:null}const Ec=new class{constructor(){this.occurrences,this.reset()}slug(e,t){const r=this;let n=function(e,t){if("string"!==typeof e)return"";t||(e=e.toLowerCase());return e.replace(bc,"").replace(/ /g,"-")}(e,!0===t);const a=n;for(;xc.call(r.occurrences,n);)r.occurrences[a]++,n=a+"-"+r.occurrences[a];return r.occurrences[n]=0,n}reset(){this.occurrences=Object.create(null)}};const Tc=function(e){if(void 0===e||null===e)return Sc;if("string"===typeof e)return function(e){return t;function t(t){return Sc(t)&&t.tagName===e}}(e);if("object"===typeof e)return function(e){const t=[];let r=-1;for(;++r1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{};const{openDelimiter:t="rehype:ignore:start",closeDelimiter:r="rehype:ignore:end"}=e;return e=>{fs(e,((e,n,a)=>{if("element"===e.type||"root"===e.type){let n=!1;e.children=e.children.filter((e=>{if("raw"===e.type||"comment"===e.type){let a=(e.value||"").trim();if(a=a.replace(/^/,"$1"),a===t)return n=!0,!1;if(a===r)return n=!1,!1}return!n}))}}))}};var Cc={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};var kc=[function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).prefix||"";return t=>{Ec.reset(),fs(t,"element",(t=>{Rc(t)&&t.properties&&!Od(t,"id")&&(t.properties.id=e+Ec.slug(gd(t)))}))}},function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.properties;const r=e.behaviour||e.behavior||"prepend",n=e.content||jc,a=e.group,s=Tc(e.test);let i;return"wrap"===r?i=function(e){return e.children=[c(e,en(!0,{},t),e.children)],[us]}:"before"===r||"after"===r?i=function(e,s,i){if("number"!==typeof s||!i)return;const l=c(e,en(!0,{},t),o(n,e));let u="before"===r?[l,e]:[e,l];if(a){const t=d(a,e);t&&!Array.isArray(t)&&"element"===t.type&&(t.children=u,u=[t])}return i.children.splice(s,1,...u),[us,s+u.length]}:(t||(t={ariaHidden:"true",tabIndex:-1}),i=function(e){return e.children["prepend"===r?"unshift":"push"](c(e,en(!0,{},t),o(n,e))),[us]}),e=>{fs(e,"element",((e,t,r)=>{if(Rc(e)&&Od(e,"id")&&s(e,t,r))return i(e,t,r)}))};function o(e,t){const r=d(e,t);return Array.isArray(r)?r:[r]}function d(e,t){return"function"===typeof e?e(t):en(!0,Array.isArray(e)?[]:{},e)}function c(e,t,r){return{type:"element",tagName:"a",properties:Object.assign({},t,{href:"#"+(e.properties||{}).id}),children:r}}},Ac];const _c=d.forwardRef(((e,t)=>{var r,n,a,i=[vc,[jd,{ignoreMissing:!0}],...kc,[fc,{rewrite:(n=null!=(r=e.disableCopy)&&r,a=e.rehypeRewrite,(e,t,r)=>{if("element"===e.type&&r&&"root"===r.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){var i=e.children&&e.children[0];i&&i.properties&&"true"===i.properties.ariaHidden&&(i.properties=(0,s.Z)({class:"anchor"},i.properties),i.children=[Cc])}if("element"===e.type&&"pre"===e.tagName&&!n){var o=pc(e.children);e.children.push((void 0===(d=o)&&(d=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":d},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}))}var d;a&&a(e,t,r)})}],[yc,{properties:"attr"}],...e.rehypePlugins||[]];return(0,$t.jsx)(fd,(0,s.Z)({},e,{rehypePlugins:i,ref:t}))}));var Pc,Ic,Dc,Oc=["inline","node","components","data"],Nc=["data-meta","data-md"],Fc=["source","components","data","rehypeRewrite"],Mc=Dr.Preview,Lc=Dr.Code,Bc=Dr.Toolbar,Uc=Yt(_c)(Pc||(Pc=o(["\n margin: 0 auto;\n box-shadow:\n rgb(8 15 41 / 8%) 0.5rem 0.5rem 2rem 0px,\n rgb(8 15 41 / 8%) 0px 0px 1px 0px;\n border: 1px solid var(--color-border-default, #30363d);\n text-align: left;\n max-width: 56rem;\n overflow: auto;\n padding: 2rem;\n border-radius: 0.55rem;\n"]))),Hc=e=>{var t,{inline:r,node:n,components:a,data:o}=e,d=(0,i.Z)(e,Oc),c=d,{"data-md":l}=c,u=(0,i.Z)(c,Nc);if(r||!Fr(l))return(0,$t.jsx)("code",(0,s.Z)({},d));var p=null==(t=n.position)?void 0:t.start.line,f=Nr(l)||String(p),g=a[""+f];if(f&&"function"===typeof g){var h=o[f].value||"",{title:m,boreder:y=1,checkered:v=1,code:b=1,toolbar:x=1}=Or(l);return(0,$t.jsxs)(Dr,{bordered:!!Number(y),disableCheckered:!Number(v),style:{marginBottom:16},children:[(0,$t.jsx)(Mc,{children:(0,$t.jsx)(g,{})}),!!Number(x)&&(0,$t.jsx)(Bc,{text:h,visibleButton:!!Number(b),children:m||"Code Example"}),!!Number(b)&&(0,$t.jsx)(Lc,{tagName:"pre",style:{marginBottom:0},children:(0,$t.jsx)("code",(0,s.Z)({},u))})]})}return(0,$t.jsx)("code",(0,s.Z)({},u))};function Gc(e){var{components:t,data:r,rehypeRewrite:n}=e,a=(0,i.Z)(e,Fc);return(0,$t.jsx)(Uc,(0,s.Z)({disableCopy:!0,rehypePlugins:[Ac,...a.rehypePlugins||[]]},a,{rehypeRewrite:(e,t,r)=>{if("element"===e.type&&"pre"===e.tagName&&/(pre|code)/.test(e.tagName)&&e.children[0]){var a,s,i=e.children[0],o=(null==(a=i.data)?void 0:a.meta)||(null==(s=i.properties)?void 0:s.dataMeta);Fr(o)&&(e.tagName="div",e.properties||(e.properties={}),e.properties["data-md"]=o,e.properties["data-meta"]="preview")}n&&n(e,t,r)},source:r.source,components:(0,s.Z)({},t,{div:e=>(0,$t.jsx)(Hc,(0,s.Z)({},e,{components:r.components,data:r.data}))})}))}var Wc,Kc,qc,zc,Vc,Yc=function(e){for(var t=[],r=1;r{var{version:r,title:n,description:a,source:o,logo:c=Jc,components:l,data:u,markdownProps:p,exampleProps:f,className:g="",children:h,disableCorners:m=!1,disableDarkMode:y=!1,disableHeader:v=!1,disableBackToUp:b=!1}=e,x=(0,i.Z)(e,$c),R=(0,d.useSyncExternalStore)(ur,lr);return(0,$t.jsxs)(Zc,(0,s.Z)({className:"wmde-markdown-var "+g},x,{children:[!y&&(0,$t.jsx)("dark-mode",(0,s.Z)({permanent:!0,style:{position:"fixed",top:8,left:12,zIndex:99,fontSize:28}},R.darkMode)),!m&&(0,$t.jsx)(Zt,(0,s.Z)({fixed:!0,target:"__blank",zIndex:10},R.corners)),!v&&(0,$t.jsxs)(el,{children:[c,n&&(0,$t.jsxs)("h1",{children:[n,r&&(0,$t.jsx)(tl,{children:r})]}),a&&(0,$t.jsx)(rl,{children:a})]}),(0,$t.jsx)("div",{}),R.example&&(0,$t.jsx)(Qc,(0,s.Z)({},f,{children:R.example})),(0,$t.jsx)(Gc,(0,s.Z)({},p,{source:o,data:{data:u,components:l,source:o}})),h,!b&&(0,$t.jsx)(ir,{children:"Top"})]}))})),al=nl;al.Github=function(e){return(0,d.useEffect)((()=>cr.setCorners((0,s.Z)({},e))),[e]),null},al.Corners=function(e){return(0,d.useEffect)((()=>cr.setDarkMode((0,s.Z)({},e))),[e]),null},al.Example=function(e){var{children:t}=e;return(0,d.useEffect)((()=>cr.setExample(t)),[t]),null};const sl=al,il=JSON.parse('{"u2":"@uiw/react-monorepo-template","WL":"Simple React package development project example template.."}'),ol={components:{64:function(){var e=n(r(8573)),t=n(r(6078));function n(e){return e&&e.__esModule?e:{default:e}}return function(){return e.default.createElement("div",{className:"container"},e.default.createElement(t.default,null,"Example test"))}}()},data:{64:{name:64,meta:{},code:'"use strict";\n\nvar _react = _interopRequireDefault(require("react"));\nvar _reactMonorepoTemplate = _interopRequireDefault(require("@uiw/react-monorepo-template"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }\nreturn function App() {\n return /*#__PURE__*/_react["default"].createElement("div", {\n className: "container"\n }, /*#__PURE__*/_react["default"].createElement(_reactMonorepoTemplate["default"], null, "Example test"));\n};',language:"jsx",value:'import React from "react";\nimport MonorepoTemplate from \'@uiw/react-monorepo-template\';\n\nexport default function App() {\n return (\n
\n \n Example test\n \n
\n );\n}'}},source:'react-monorepo-template\n===\n\n[![Build & Deploy](https://github.com/uiwjs/react-monorepo-template/actions/workflows/ci.yml/badge.svg)](https://github.com/uiwjs/react-monorepo-template/actions/workflows/ci.yml)\n[![Coverage Status](https://uiwjs.github.io/react-monorepo-template/badges.svg)](https://uiwjs.github.io/react-monorepo-template/coverage/lcov-report/)\n\nSimple [React](https://github.com/facebook/react) package development project example template.\n\n## Directory Structure\n\n```bash\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md -> core/README.md\n\u251c\u2500\u2500 core # \ud83d\udce6 package @uiw/react-monorepo-template\n\u2502 \u251c\u2500\u2500 README.md\n\u2502 \u251c\u2500\u2500 cjs # \ud83d\udd04 Compiled cjs directory\n\u2502 \u251c\u2500\u2500 esm # \ud83d\udd04 Compiled esm directory\n\u2502 \u251c\u2500\u2500 src # Package source directory\n\u2502 \u251c\u2500\u2500 dist.css # \ud83d\udd04 compile less to css\n\u2502 \u251c\u2500\u2500 package.json # name => @uiw/react-monorepo-template\n\u2502 \u2514\u2500\u2500 tsconfig.json\n\u251c\u2500\u2500 lerna.json\n\u251c\u2500\u2500 package.json\n\u251c\u2500\u2500 tsconfig.json\n\u251c\u2500\u2500 test # \u26d1 test case\n\u2514\u2500\u2500 website # \ud83d\udc1d Package example test, website\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 package.json\n \u251c\u2500\u2500 public\n \u251c\u2500\u2500 src\n \u2514\u2500\u2500 tsconfig.json\n```\n\n## Development\n\n1. Dependencies in the installation package and example\n\n```bash\nnpm run install\n```\n\n2. To develop, run the self-reloading build:\n\n```bash\nnpm run build # Compile packages \ud83d\udce6 @uiw/react-monorepo-template\nnpm run watch # Real-time compilation \ud83d\udce6 @uiw/react-monorepo-template\n```\n\n3. Run Document Website Environment:\n\n```bash\nnpm run start\n```\n\n4. To contribute, please fork repos, add your patch and tests for it (in the `test/` folder) and submit a pull request.\n\n```\nnpm run test\n```\n\n\n### Using\n\n```jsx mdx:preview\nimport React from "react";\nimport MonorepoTemplate from \'@uiw/react-monorepo-template\';\n\nexport default function App() {\n return (\n
\n \n Example test\n \n
\n );\n}\n```\n\n## Contributors\n\nAs always, thanks to our amazing contributors!\n\n\n \n\n\nMade with [contributors](https://github.com/jaywcjlove/github-action-contributors).\n\n## License\n\nLicensed under the MIT License.',headings:[],headingsList:[]},dl=sl.Github,cl=document.getElementById("root");(0,a.s)(cl).render((0,$t.jsx)(sl,{source:ol.source,components:ol.components,data:ol.data,title:il.u2,description:il.WL,version:"v".concat("1.1.0"),children:(0,$t.jsx)(dl,{href:"https://github.com/uiwjs/react-monorepo-template"})}))},6078:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(5773),a=r(808),s=r(8573),i=r(4760),o=["className","prefixCls","children"];function d(e){void 0===e&&(e={});var{className:t,prefixCls:r="w-template",children:d}=e,c=(0,a.Z)(e,o),l=[t,r].filter(Boolean).join(" ");return(0,i.jsx)("div",(0,n.Z)({},c,{className:l,children:d&&s.Children.map(d,(e=>s.isValidElement(e)?e:(0,i.jsxs)("span",{children:[" ",e," "]})))}))}},3376:function(e){e.exports=function(){"use strict";function e(e,t){if("undefined"===typeof document)return;const r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style={position:"absolute",left:"-9999px"},document.body.appendChild(r);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);r.select();let a=!1;try{a=!!document.execCommand("copy")}catch(s){a=!1}document.body.removeChild(r),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(a)}return e}()},6155:(e,t,r)=>{var n=r(3231).default;const a=document,s="_dark_mode_theme_",i="permanent",o="colorschemechange",d="light",c="dark",l=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;Object.defineProperty(e,r,{enumerable:!0,get(){const e=this.getAttribute(t);return null===e?"":e},set(e){this.setAttribute(t,e)}})};class u extends HTMLElement{static get observedAttributes(){return["mode",d,c,i]}constructor(){super(),n(this,"LOCAL_NANE",s),this.t()}connectedCallback(){l(this,"mode"),l(this,c),l(this,d),function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;Object.defineProperty(e,r,{enumerable:!0,get(){return this.hasAttribute(t)},set(e){e?this.setAttribute(t,""):this.removeAttribute(t)}})}(this,i);const e=localStorage.getItem(s);e&&[d,c].includes(e)&&(this.mode=e,this.permanent=!0),this.permanent&&!e&&localStorage.setItem(s,this.mode);const t=[d,c].includes(e);this.permanent&&e?this.o():(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(this.mode=c,this.o()),window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&(this.mode=d,this.o())),this.permanent||t||(window.matchMedia("(prefers-color-scheme: light)").onchange=e=>{this.mode=e.matches?d:c,this.o()},window.matchMedia("(prefers-color-scheme: dark)").onchange=e=>{this.mode=e.matches?c:d,this.o()});new MutationObserver(((e,r)=>{this.mode=a.documentElement.dataset.colorMode,this.permanent&&t&&(localStorage.setItem(s,this.mode),this.i("permanentcolorscheme",{permanent:this.permanent})),this.h(),this.i(o,{colorScheme:this.mode})})).observe(a.documentElement,{attributes:!0}),this.i(o,{colorScheme:this.mode}),this.h()}attributeChangedCallback(e,t,r){if("mode"===e&&t!==r&&[d,c].includes(r)){const e=localStorage.getItem(s);this.mode===e?(this.mode=r,this.h(),this.o()):this.mode&&this.mode!==e&&(this.h(),this.o())}else e!==d&&e!==c||t===r||this.h();"permanent"===e&&"boolean"===typeof this.permanent&&(this.permanent?localStorage.setItem(s,this.mode):localStorage.removeItem(s))}o(){a.documentElement.setAttribute("data-color-mode",this.mode)}h(){this.icon.textContent=this.mode===d?"\ud83c\udf12":"\ud83c\udf1e",this.text.textContent=this.mode===d?this.getAttribute(c):this.getAttribute(d),!this.text.textContent&&this.text.parentElement&&this.text&&this.text.parentElement.removeChild(this.text)}t(){var e=this.attachShadow({mode:"open"});this.label=a.createElement("span"),this.label.setAttribute("class","wrapper"),this.label.onclick=()=>{this.mode=this.mode===d?c:d,this.permanent&&localStorage.setItem(s,this.mode),this.o(),this.h()},e.appendChild(this.label),this.icon=a.createElement("span"),this.label.appendChild(this.icon),this.text=a.createElement("span"),this.label.appendChild(this.text);const t="_dark_mode_style_";if(!a.getElementById(t)){var r=a.createElement("style");r.id=t,r.textContent="\n[data-color-mode*='dark'], [data-color-mode*='dark'] body {\n color-scheme: dark;\n --color-theme-bg: #0d1117;\n --color-theme-text: #c9d1d9;\n background-color: var(--color-theme-bg);\n color: var(--color-theme-text);\n}\n\n[data-color-mode*='light'], [data-color-mode*='light'] body {\n color-scheme: light;\n --color-theme-bg: #fff;\n --color-theme-text: #24292f;\n background-color: var(--color-theme-bg);\n color: var(--color-theme-text);\n}",a.head.appendChild(r)}var n=a.createElement("style");n.textContent="\n .wrapper { cursor: pointer; user-select: none; position: relative; }\n .wrapper > span + span { margin-left: .4rem; }\n ",e.appendChild(n)}i(e,t){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t}))}}customElements.define("dark-mode",u)},4838:(e,t)=>{"use strict";function r(e,t){return(Array.isArray(t)?t:[t]).some((function(t){return"string"===typeof t&&(t=new RegExp(t)),t.test(e||"")}))}},8916:(e,t)=>{"use strict"},7190:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},6408:(e,t,r)=>{"use strict";var n=r(4272),a=r(3914),s=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6274);t.parseCssSelector=function(e,t,r,a,s,i){var o=e.length,d="";function c(r,a){var s="";for(t++,d=e.charAt(t);t=o)throw Error("Expected symbol but end of file reached.");if(d=e.charAt(t),n.identSpecialChars[d])r+=d;else{if(n.isHex(d)){var a=d;for(t++,d=e.charAt(t);n.isHex(d);)a+=d,t++,d=e.charAt(t);" "===d&&(t++,d=e.charAt(t)),r+=String.fromCharCode(parseInt(a,16));continue}r+=d}}t++,d=e.charAt(t)}return r}function u(){d=e.charAt(t);for(var r=!1;" "===d||"\t"===d||"\n"===d||"\r"===d||"\f"===d;)r=!0,t++,d=e.charAt(t);return r}function p(){var r=f();if(!r)return null;var n=r;for(d=e.charAt(t);","===d;){if(t++,u(),"selectors"!==n.type&&(n={type:"selectors",selectors:[r]}),!(r=f()))throw Error('Rule expected after ",".');n.selectors.push(r)}return n}function f(){u();var r={type:"ruleSet"},n=g();if(!n)return null;for(var a=r;n&&(n.type="rule",a.rule=n,a=n,u(),d=e.charAt(t),!(t>=o||","===d||")"===d));)if(s[d]){var i=d;if(t++,u(),!(n=g()))throw Error('Rule expected after "'+i+'".');n.nestingOperator=i}else(n=g())&&(n.nestingOperator=null);return r}function g(){for(var s=null;t=o)throw Error('Expected "=" but end of file reached.');if("="!==d)throw Error('Expected "=" but "'+d+'" found.');f.operator=g+"=",t++,u();var h="";if(f.valueType="string",'"'===d)h=c('"',n.doubleQuotesEscapeChars);else if("'"===d)h=c("'",n.singleQuoteEscapeChars);else if(i&&"$"===d)t++,h=l(),f.valueType="substitute";else{for(;t=o)throw Error('Expected "]" but end of file reached.');if("]"!==d)throw Error('Expected "]" but "'+d+'" found.');t++,f.value=h}((s=s||{}).attrs=s.attrs||[]).push(f)}else{if(":"!==d)break;t++;var m=l(),y={name:m};if("("===d){t++;var v="";if(u(),"selector"===r[m])y.valueType="selector",v=p();else{if(y.valueType=r[m]||"string",'"'===d)v=c('"',n.doubleQuotesEscapeChars);else if("'"===d)v=c("'",n.singleQuoteEscapeChars);else if(i&&"$"===d)t++,v=l(),y.valueType="substitute";else{for(;t=o)throw Error('Expected ")" but end of file reached.');if(")"!==d)throw Error('Expected ")" but "'+d+'" found.');t++,y.value=v}((s=s||{}).pseudos=s.pseudos||[]).push(y)}return s}return function(){var r=p();if(t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6274);t.renderEntity=function e(t){var r="";switch(t.type){case"ruleSet":for(var a=t.rule,s=[];a;)a.nestingOperator&&s.push(a.nestingOperator),s.push(e(a)),a=a.rule;r=s.join(" ");break;case"selectors":r=t.selectors.map(e).join(", ");break;case"rule":t.tagName&&(r="*"===t.tagName?"*":n.escapeIdentifier(t.tagName)),t.id&&(r+="#"+n.escapeIdentifier(t.id)),t.classNames&&(r+=t.classNames.map((function(e){return"."+n.escapeIdentifier(e)})).join("")),t.attrs&&(r+=t.attrs.map((function(e){return"operator"in e?"substitute"===e.valueType?"["+n.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+n.escapeIdentifier(e.name)+e.operator+n.escapeStr(e.value)+"]":"["+n.escapeIdentifier(e.name)+"]"})).join("")),t.pseudos&&(r+=t.pseudos.map((function(t){return t.valueType?"selector"===t.valueType?":"+n.escapeIdentifier(t.name)+"("+e(t.value)+")":"substitute"===t.valueType?":"+n.escapeIdentifier(t.name)+"($"+t.value+")":"numeric"===t.valueType?":"+n.escapeIdentifier(t.name)+"("+t.value+")":":"+n.escapeIdentifier(t.name)+"("+n.escapeIdentifier(t.value)+")":":"+n.escapeIdentifier(t.name)})).join(""));break;default:throw Error('Unknown entity type: "'+t.type+'".')}return r}},6274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e},t.isIdent=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e},t.isHex=function(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"},t.escapeIdentifier=function(e){for(var r=e.length,n="",a=0;a="A"&&s<="Z"||s>="a"&&s<="z"||0!==a&&s>="0"&&s<="9")n+=s;else{var i=s.charCodeAt(0);if(55296===(63488&i)){var o=e.charCodeAt(a++);if(55296!==(64512&i)||56320!==(64512&o))throw Error("UCS-2(decode): illegal sequence");i=((1023&i)<<10)+(1023&o)+65536}n+="\\"+i.toString(16)+" "}a++}return n},t.escapeStr=function(e){for(var r,n=e.length,a="",s=0;s":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},t.strReplacementsRev={"\n":"\\n","\r":"\\r","\t":"\\t","\f":"\\f","\v":"\\v"},t.singleQuoteEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\","'":"'"},t.doubleQuotesEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\",'"':'"'}},432:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"===typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},i=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,a=t.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!s)return!1;for(n in e);return"undefined"===typeof n||t.call(e,n)},o=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(a)return a(e,r).value}return e[r]};e.exports=function e(){var t,r,n,a,c,l,u=arguments[0],p=1,f=arguments.length,g=!1;for("boolean"===typeof u&&(g=u,u=arguments[1]||{},p=2),(null==u||"object"!==typeof u&&"function"!==typeof u)&&(u={});p{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,d=/^\s+|\s+$/g,c="";function l(e){return e?e.replace(d,c):c}e.exports=function(e,d){if("string"!==typeof e)throw new TypeError("First argument must be a string");if(!e)return[];d=d||{};var u=1,p=1;function f(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function g(){var e={line:u,column:p};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:u,column:p},this.source=d.source}h.prototype.content=e;var m=[];function y(t){var r=new Error(d.source+":"+u+":"+p+": "+t);if(r.reason=t,r.filename=d.source,r.line=u,r.column=p,r.source=e,!d.silent)throw r;m.push(r)}function v(t){var r=t.exec(e);if(r){var n=r[0];return f(n),e=e.slice(n.length),r}}function b(){v(n)}function x(e){var t;for(e=e||[];t=R();)!1!==t&&e.push(t);return e}function R(){var t=g();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;c!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,c===e.charAt(r-1))return y("End of comment missing");var n=e.slice(2,r-2);return p+=2,f(n),e=e.slice(r),p+=2,t({type:"comment",comment:n})}}function E(){var e=g(),r=v(a);if(r){if(R(),!v(s))return y("property missing ':'");var n=v(i),d=e({type:"declaration",property:l(r[0].replace(t,c)),value:n?l(n[0].replace(t,c)):c});return v(o),d}}return b(),function(){var e,t=[];for(x(t);e=E();)!1!==e&&(t.push(e),x(t));return t}()}},1046:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},5318:(e,t)=>{function r(e){let t,r=[];for(let n of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(n))r.push(parseInt(n,10));else if(t=n.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,n,a,s]=t;if(n&&s){n=parseInt(n),s=parseInt(s);const e=n{"use strict";const{DOCUMENT_MODE:n}=r(1777),a="html",s=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],i=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),o=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],d=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],c=d.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function l(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function u(e,t){for(let r=0;r-1)return n.QUIRKS;let e=null===t?i:s;if(u(r,e))return n.QUIRKS;if(e=null===t?d:c,u(r,e))return n.LIMITED_QUIRKS}return n.NO_QUIRKS},t.serializeContent=function(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=" PUBLIC "+l(t):r&&(n+=" SYSTEM"),null!==r&&(n+=" "+l(r)),n}},4078:e=>{"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},15:(e,t,r)=>{"use strict";const n=r(7796),a=r(1777),s=a.TAG_NAMES,i=a.NAMESPACES,o=a.ATTRS,d="text/html",c="application/xhtml+xml",l={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},u={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:i.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:i.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:i.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:i.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:i.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:i.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:i.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:i.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:i.XML},"xml:space":{prefix:"xml",name:"space",namespace:i.XML},xmlns:{prefix:"",name:"xmlns",namespace:i.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:i.XMLNS}},p=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},f={[s.B]:!0,[s.BIG]:!0,[s.BLOCKQUOTE]:!0,[s.BODY]:!0,[s.BR]:!0,[s.CENTER]:!0,[s.CODE]:!0,[s.DD]:!0,[s.DIV]:!0,[s.DL]:!0,[s.DT]:!0,[s.EM]:!0,[s.EMBED]:!0,[s.H1]:!0,[s.H2]:!0,[s.H3]:!0,[s.H4]:!0,[s.H5]:!0,[s.H6]:!0,[s.HEAD]:!0,[s.HR]:!0,[s.I]:!0,[s.IMG]:!0,[s.LI]:!0,[s.LISTING]:!0,[s.MENU]:!0,[s.META]:!0,[s.NOBR]:!0,[s.OL]:!0,[s.P]:!0,[s.PRE]:!0,[s.RUBY]:!0,[s.S]:!0,[s.SMALL]:!0,[s.SPAN]:!0,[s.STRONG]:!0,[s.STRIKE]:!0,[s.SUB]:!0,[s.SUP]:!0,[s.TABLE]:!0,[s.TT]:!0,[s.U]:!0,[s.UL]:!0,[s.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!!(t===s.FONT&&(null!==n.getTokenAttr(e,o.COLOR)||null!==n.getTokenAttr(e,o.SIZE)||null!==n.getTokenAttr(e,o.FACE)))||f[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t{"use strict";const r=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const n=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[r.HTML]:{[n.ADDRESS]:!0,[n.APPLET]:!0,[n.AREA]:!0,[n.ARTICLE]:!0,[n.ASIDE]:!0,[n.BASE]:!0,[n.BASEFONT]:!0,[n.BGSOUND]:!0,[n.BLOCKQUOTE]:!0,[n.BODY]:!0,[n.BR]:!0,[n.BUTTON]:!0,[n.CAPTION]:!0,[n.CENTER]:!0,[n.COL]:!0,[n.COLGROUP]:!0,[n.DD]:!0,[n.DETAILS]:!0,[n.DIR]:!0,[n.DIV]:!0,[n.DL]:!0,[n.DT]:!0,[n.EMBED]:!0,[n.FIELDSET]:!0,[n.FIGCAPTION]:!0,[n.FIGURE]:!0,[n.FOOTER]:!0,[n.FORM]:!0,[n.FRAME]:!0,[n.FRAMESET]:!0,[n.H1]:!0,[n.H2]:!0,[n.H3]:!0,[n.H4]:!0,[n.H5]:!0,[n.H6]:!0,[n.HEAD]:!0,[n.HEADER]:!0,[n.HGROUP]:!0,[n.HR]:!0,[n.HTML]:!0,[n.IFRAME]:!0,[n.IMG]:!0,[n.INPUT]:!0,[n.LI]:!0,[n.LINK]:!0,[n.LISTING]:!0,[n.MAIN]:!0,[n.MARQUEE]:!0,[n.MENU]:!0,[n.META]:!0,[n.NAV]:!0,[n.NOEMBED]:!0,[n.NOFRAMES]:!0,[n.NOSCRIPT]:!0,[n.OBJECT]:!0,[n.OL]:!0,[n.P]:!0,[n.PARAM]:!0,[n.PLAINTEXT]:!0,[n.PRE]:!0,[n.SCRIPT]:!0,[n.SECTION]:!0,[n.SELECT]:!0,[n.SOURCE]:!0,[n.STYLE]:!0,[n.SUMMARY]:!0,[n.TABLE]:!0,[n.TBODY]:!0,[n.TD]:!0,[n.TEMPLATE]:!0,[n.TEXTAREA]:!0,[n.TFOOT]:!0,[n.TH]:!0,[n.THEAD]:!0,[n.TITLE]:!0,[n.TR]:!0,[n.TRACK]:!0,[n.UL]:!0,[n.WBR]:!0,[n.XMP]:!0},[r.MATHML]:{[n.MI]:!0,[n.MO]:!0,[n.MN]:!0,[n.MS]:!0,[n.MTEXT]:!0,[n.ANNOTATION_XML]:!0},[r.SVG]:{[n.TITLE]:!0,[n.FOREIGN_OBJECT]:!0,[n.DESC]:!0}}},3558:(e,t)=>{"use strict";const r=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="\ufffd",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},7670:(e,t,r)=>{"use strict";const n=r(2850);e.exports=class extends n{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},5878:(e,t,r)=>{"use strict";const n=r(7670),a=r(8845),s=r(7793),i=r(2850);e.exports=class extends n{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(r,n){t._bootstrap.call(this,r,n),i.install(this.tokenizer,a,e.opts),i.install(this.tokenizer,s)},_processInputToken(r){e.ctLoc=r.location,t._processInputToken.call(this,r)},_err(t,r){e.locBeforeToken=r&&r.beforeToken,e._reportError(t)}}}}},4255:(e,t,r)=>{"use strict";const n=r(7670),a=r(2701),s=r(2850);e.exports=class extends n{constructor(e,t){super(e,t),this.posTracker=s.install(e,a),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},8845:(e,t,r)=>{"use strict";const n=r(7670),a=r(4255),s=r(2850);e.exports=class extends n{constructor(e,t){super(e,t);const r=s.install(e.preprocessor,a,t);this.posTracker=r.posTracker}}},5859:(e,t,r)=>{"use strict";const n=r(2850);e.exports=class extends n{constructor(e,t){super(e),this.onItemPop=t.onItemPop}_getOverriddenMethods(e,t){return{pop(){e.onItemPop(this.current),t.pop.call(this)},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(r){e.onItemPop(this.current),t.remove.call(this,r)}}}}},3770:(e,t,r)=>{"use strict";const n=r(2850),a=r(7796),s=r(7793),i=r(5859),o=r(1777).TAG_NAMES;e.exports=class extends n{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const r=t.location,n=this.treeAdapter.getTagName(e),s={};t.type===a.END_TAG_TOKEN&&n===t.tagName?(s.endTag=Object.assign({},r),s.endLine=r.endLine,s.endCol=r.endCol,s.endOffset=r.endOffset):(s.endLine=r.startLine,s.endCol=r.startCol,s.endOffset=r.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,s)}}_getOverriddenMethods(e,t){return{_bootstrap(r,a){t._bootstrap.call(this,r,a),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const o=n.install(this.tokenizer,s);e.posTracker=o.posTracker,n.install(this.openElements,i,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(r){t._runParsingLoop.call(this,r);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(r){e.currentToken=r,t._processTokenInForeignContent.call(this,r)},_processToken(r){e.currentToken=r,t._processToken.call(this,r);if(r.type===a.END_TAG_TOKEN&&(r.tagName===o.HTML||r.tagName===o.BODY&&this.openElements.hasInScope(o.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];if(this.treeAdapter.getTagName(n)===r.tagName){e._setEndLocation(n,r);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const r=this.treeAdapter.getChildNodes(this.document),n=r.length;for(let t=0;t{"use strict";const n=r(2850),a=r(7796),s=r(2701);e.exports=class extends n{constructor(e){super(e),this.tokenizer=e,this.posTracker=n.install(e.preprocessor,s),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation}_getOverriddenMethods(e,t){const r={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc},_createDoctypeToken(r){t._createDoctypeToken.call(this,r),this.currentToken.location=e.ctLoc},_createCharacterToken(r,n){t._createCharacterToken.call(this,r,n),this.currentCharacterToken.location=e.ctLoc},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation()},_createAttr(r){t._createAttr.call(this,r),e.currentAttrLocation=e._getCurrentLocation()},_leaveAttrName(r){t._leaveAttrName.call(this,r),e._attachCurrentAttrLocationInfo()},_leaveAttrValue(r){t._leaveAttrValue.call(this,r),e._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const r=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentToken.type===a.EOF_TOKEN?(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset):(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col+1,r.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const r=this.currentCharacterToken&&this.currentCharacterToken.location;r&&-1===r.endOffset&&(r.endLine=e.posTracker.line,r.endCol=e.posTracker.col,r.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this)}};return Object.keys(a.MODE).forEach((n=>{const s=a.MODE[n];r[s]=function(r){e.ctLoc=e._getCurrentLocation(),t[s].call(this,r)}})),r}}},2701:(e,t,r)=>{"use strict";const n=r(2850);e.exports=class extends n{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const r=this.pos+1,n=this.html[r];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=r),("\n"===n||"\r"===n&&"\n"!==this.html[r+1])&&(e.isEol=!0),e.col=r-e.lineStartPos+1,e.offset=e.droppedBufferSize+r,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const r=this.pos;t.dropParsedChunk.call(this);const n=r-this.pos;e.lineStartPos-=n,e.droppedBufferSize+=n,e.offset=e.droppedBufferSize+this.pos}}}}},3055:e=>{"use strict";class t{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const r=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,a=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const i=this.entries[e];if(i.type===t.MARKER_ENTRY)break;const o=i.element,d=this.treeAdapter.getAttrList(o);this.treeAdapter.getTagName(o)===a&&this.treeAdapter.getNamespaceURI(o)===s&&d.length===n&&r.push({idx:e,attrs:d})}}return r.length<3?[]:r}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let r=t.length;if(r){const n=this.treeAdapter.getAttrList(e),a=n.length,s=Object.create(null);for(let e=0;e=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:t.MARKER_ENTRY}),this.length++}pushElement(e,r){this._ensureNoahArkCondition(e),this.entries.push({type:t.ELEMENT_ENTRY,element:e,token:r}),this.length++}insertElementAfterBookmark(e,r){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:t.ELEMENT_ENTRY,element:e,token:r}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===t.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let r=this.length-1;r>=0;r--){const n=this.entries[r];if(n.type===t.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let r=this.length-1;r>=0;r--){const n=this.entries[r];if(n.type===t.ELEMENT_ENTRY&&n.element===e)return n}return null}}t.MARKER_ENTRY="MARKER_ENTRY",t.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=t},3924:(e,t,r)=>{"use strict";const n=r(7796),a=r(5033),s=r(3055),i=r(3770),o=r(5878),d=r(2850),c=r(1215),l=r(8325),u=r(3920),p=r(15),f=r(4078),g=r(3558),h=r(1777),m=h.TAG_NAMES,y=h.NAMESPACES,v=h.ATTRS,b={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:c},x="hidden",R=8,E=3,T="INITIAL_MODE",w="BEFORE_HTML_MODE",S="BEFORE_HEAD_MODE",j="IN_HEAD_MODE",A="IN_HEAD_NO_SCRIPT_MODE",C="AFTER_HEAD_MODE",k="IN_BODY_MODE",_="TEXT_MODE",P="IN_TABLE_MODE",I="IN_TABLE_TEXT_MODE",D="IN_CAPTION_MODE",O="IN_COLUMN_GROUP_MODE",N="IN_TABLE_BODY_MODE",F="IN_ROW_MODE",M="IN_CELL_MODE",L="IN_SELECT_MODE",B="IN_SELECT_IN_TABLE_MODE",U="IN_TEMPLATE_MODE",H="AFTER_BODY_MODE",G="IN_FRAMESET_MODE",W="AFTER_FRAMESET_MODE",K="AFTER_AFTER_BODY_MODE",q="AFTER_AFTER_FRAMESET_MODE",z={[m.TR]:F,[m.TBODY]:N,[m.THEAD]:N,[m.TFOOT]:N,[m.CAPTION]:D,[m.COLGROUP]:O,[m.TABLE]:P,[m.BODY]:k,[m.FRAMESET]:G},V={[m.CAPTION]:P,[m.COLGROUP]:P,[m.TBODY]:P,[m.TFOOT]:P,[m.THEAD]:P,[m.COL]:O,[m.TR]:N,[m.TD]:F,[m.TH]:F},Y={[T]:{[n.CHARACTER_TOKEN]:de,[n.NULL_CHARACTER_TOKEN]:de,[n.WHITESPACE_CHARACTER_TOKEN]:re,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const r=t.forceQuirks?h.DOCUMENT_MODE.QUIRKS:u.getDocumentMode(t);u.isConforming(t)||e._err(f.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=w},[n.START_TAG_TOKEN]:de,[n.END_TAG_TOKEN]:de,[n.EOF_TOKEN]:de},[w]:{[n.CHARACTER_TOKEN]:ce,[n.NULL_CHARACTER_TOKEN]:ce,[n.WHITESPACE_CHARACTER_TOKEN]:re,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){t.tagName===m.HTML?(e._insertElement(t,y.HTML),e.insertionMode=S):ce(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r!==m.HTML&&r!==m.HEAD&&r!==m.BODY&&r!==m.BR||ce(e,t)},[n.EOF_TOKEN]:ce},[S]:{[n.CHARACTER_TOKEN]:le,[n.NULL_CHARACTER_TOKEN]:le,[n.WHITESPACE_CHARACTER_TOKEN]:re,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:ne,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.HEAD?(e._insertElement(t,y.HTML),e.headElement=e.openElements.current,e.insertionMode=j):le(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HEAD||r===m.BODY||r===m.HTML||r===m.BR?le(e,t):e._err(f.endTagWithoutMatchingOpenElement)},[n.EOF_TOKEN]:le},[j]:{[n.CHARACTER_TOKEN]:fe,[n.NULL_CHARACTER_TOKEN]:fe,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:ne,[n.START_TAG_TOKEN]:ue,[n.END_TAG_TOKEN]:pe,[n.EOF_TOKEN]:fe},[A]:{[n.CHARACTER_TOKEN]:ge,[n.NULL_CHARACTER_TOKEN]:ge,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:ne,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.BASEFONT||r===m.BGSOUND||r===m.HEAD||r===m.LINK||r===m.META||r===m.NOFRAMES||r===m.STYLE?ue(e,t):r===m.NOSCRIPT?e._err(f.nestedNoscriptInHead):ge(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.NOSCRIPT?(e.openElements.pop(),e.insertionMode=j):r===m.BR?ge(e,t):e._err(f.endTagWithoutMatchingOpenElement)},[n.EOF_TOKEN]:ge},[C]:{[n.CHARACTER_TOKEN]:he,[n.NULL_CHARACTER_TOKEN]:he,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:ne,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.BODY?(e._insertElement(t,y.HTML),e.framesetOk=!1,e.insertionMode=k):r===m.FRAMESET?(e._insertElement(t,y.HTML),e.insertionMode=G):r===m.BASE||r===m.BASEFONT||r===m.BGSOUND||r===m.LINK||r===m.META||r===m.NOFRAMES||r===m.SCRIPT||r===m.STYLE||r===m.TEMPLATE||r===m.TITLE?(e._err(f.abandonedHeadElementChild),e.openElements.push(e.headElement),ue(e,t),e.openElements.remove(e.headElement)):r===m.HEAD?e._err(f.misplacedStartTagForHeadElement):he(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.BODY||r===m.HTML||r===m.BR?he(e,t):r===m.TEMPLATE?pe(e,t):e._err(f.endTagWithoutMatchingOpenElement)},[n.EOF_TOKEN]:he},[k]:{[n.CHARACTER_TOKEN]:ye,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:Ce,[n.END_TAG_TOKEN]:Ie,[n.EOF_TOKEN]:De},[_]:{[n.CHARACTER_TOKEN]:ie,[n.NULL_CHARACTER_TOKEN]:ie,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:re,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:re,[n.END_TAG_TOKEN]:function(e,t){t.tagName===m.SCRIPT&&(e.pendingScript=e.openElements.current);e.openElements.pop(),e.insertionMode=e.originalInsertionMode},[n.EOF_TOKEN]:function(e,t){e._err(f.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t)}},[P]:{[n.CHARACTER_TOKEN]:Oe,[n.NULL_CHARACTER_TOKEN]:Oe,[n.WHITESPACE_CHARACTER_TOKEN]:Oe,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:Ne,[n.END_TAG_TOKEN]:Fe,[n.EOF_TOKEN]:De},[I]:{[n.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0},[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t)},[n.COMMENT_TOKEN]:Le,[n.DOCTYPE_TOKEN]:Le,[n.START_TAG_TOKEN]:Le,[n.END_TAG_TOKEN]:Le,[n.EOF_TOKEN]:Le},[D]:{[n.CHARACTER_TOKEN]:ye,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.CAPTION||r===m.COL||r===m.COLGROUP||r===m.TBODY||r===m.TD||r===m.TFOOT||r===m.TH||r===m.THEAD||r===m.TR?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P,e._processToken(t)):Ce(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.CAPTION||r===m.TABLE?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P,r===m.TABLE&&e._processToken(t)):r!==m.BODY&&r!==m.COL&&r!==m.COLGROUP&&r!==m.HTML&&r!==m.TBODY&&r!==m.TD&&r!==m.TFOOT&&r!==m.TH&&r!==m.THEAD&&r!==m.TR&&Ie(e,t)},[n.EOF_TOKEN]:De},[O]:{[n.CHARACTER_TOKEN]:Be,[n.NULL_CHARACTER_TOKEN]:Be,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.COL?(e._appendElement(t,y.HTML),t.ackSelfClosing=!0):r===m.TEMPLATE?ue(e,t):Be(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.COLGROUP?e.openElements.currentTagName===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P):r===m.TEMPLATE?pe(e,t):r!==m.COL&&Be(e,t)},[n.EOF_TOKEN]:De},[N]:{[n.CHARACTER_TOKEN]:Oe,[n.NULL_CHARACTER_TOKEN]:Oe,[n.WHITESPACE_CHARACTER_TOKEN]:Oe,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,y.HTML),e.insertionMode=F):r===m.TH||r===m.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(m.TR),e.insertionMode=F,e._processToken(t)):r===m.CAPTION||r===m.COL||r===m.COLGROUP||r===m.TBODY||r===m.TFOOT||r===m.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P,e._processToken(t)):Ne(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.TBODY||r===m.TFOOT||r===m.THEAD?e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P):r===m.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P,e._processToken(t)):(r!==m.BODY&&r!==m.CAPTION&&r!==m.COL&&r!==m.COLGROUP||r!==m.HTML&&r!==m.TD&&r!==m.TH&&r!==m.TR)&&Fe(e,t)},[n.EOF_TOKEN]:De},[F]:{[n.CHARACTER_TOKEN]:Oe,[n.NULL_CHARACTER_TOKEN]:Oe,[n.WHITESPACE_CHARACTER_TOKEN]:Oe,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.TH||r===m.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,y.HTML),e.insertionMode=M,e.activeFormattingElements.insertMarker()):r===m.CAPTION||r===m.COL||r===m.COLGROUP||r===m.TBODY||r===m.TFOOT||r===m.THEAD||r===m.TR?e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N,e._processToken(t)):Ne(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.TR?e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N):r===m.TABLE?e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N,e._processToken(t)):r===m.TBODY||r===m.TFOOT||r===m.THEAD?(e.openElements.hasInTableScope(r)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=N,e._processToken(t)):(r!==m.BODY&&r!==m.CAPTION&&r!==m.COL&&r!==m.COLGROUP||r!==m.HTML&&r!==m.TD&&r!==m.TH)&&Fe(e,t)},[n.EOF_TOKEN]:De},[M]:{[n.CHARACTER_TOKEN]:ye,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.CAPTION||r===m.COL||r===m.COLGROUP||r===m.TBODY||r===m.TD||r===m.TFOOT||r===m.TH||r===m.THEAD||r===m.TR?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),e._processToken(t)):Ce(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.TD||r===m.TH?e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F):r===m.TABLE||r===m.TBODY||r===m.TFOOT||r===m.THEAD||r===m.TR?e.openElements.hasInTableScope(r)&&(e._closeTableCell(),e._processToken(t)):r!==m.BODY&&r!==m.CAPTION&&r!==m.COL&&r!==m.COLGROUP&&r!==m.HTML&&Ie(e,t)},[n.EOF_TOKEN]:De},[L]:{[n.CHARACTER_TOKEN]:ie,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:Ue,[n.END_TAG_TOKEN]:He,[n.EOF_TOKEN]:De},[B]:{[n.CHARACTER_TOKEN]:ie,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.CAPTION||r===m.TABLE||r===m.TBODY||r===m.TFOOT||r===m.THEAD||r===m.TR||r===m.TD||r===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processToken(t)):Ue(e,t)},[n.END_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.CAPTION||r===m.TABLE||r===m.TBODY||r===m.TFOOT||r===m.THEAD||r===m.TR||r===m.TD||r===m.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processToken(t)):He(e,t)},[n.EOF_TOKEN]:De},[U]:{[n.CHARACTER_TOKEN]:ye,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;if(r===m.BASE||r===m.BASEFONT||r===m.BGSOUND||r===m.LINK||r===m.META||r===m.NOFRAMES||r===m.SCRIPT||r===m.STYLE||r===m.TEMPLATE||r===m.TITLE)ue(e,t);else{const n=V[r]||k;e._popTmplInsertionMode(),e._pushTmplInsertionMode(n),e.insertionMode=n,e._processToken(t)}},[n.END_TAG_TOKEN]:function(e,t){t.tagName===m.TEMPLATE&&pe(e,t)},[n.EOF_TOKEN]:Ge},[H]:{[n.CHARACTER_TOKEN]:We,[n.NULL_CHARACTER_TOKEN]:We,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0])},[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){t.tagName===m.HTML?Ce(e,t):We(e,t)},[n.END_TAG_TOKEN]:function(e,t){t.tagName===m.HTML?e.fragmentContext||(e.insertionMode=K):We(e,t)},[n.EOF_TOKEN]:oe},[G]:{[n.CHARACTER_TOKEN]:re,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.FRAMESET?e._insertElement(t,y.HTML):r===m.FRAME?(e._appendElement(t,y.HTML),t.ackSelfClosing=!0):r===m.NOFRAMES&&ue(e,t)},[n.END_TAG_TOKEN]:function(e,t){t.tagName!==m.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===m.FRAMESET||(e.insertionMode=W))},[n.EOF_TOKEN]:oe},[W]:{[n.CHARACTER_TOKEN]:re,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:ie,[n.COMMENT_TOKEN]:ae,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.NOFRAMES&&ue(e,t)},[n.END_TAG_TOKEN]:function(e,t){t.tagName===m.HTML&&(e.insertionMode=q)},[n.EOF_TOKEN]:oe},[K]:{[n.CHARACTER_TOKEN]:Ke,[n.NULL_CHARACTER_TOKEN]:Ke,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:se,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){t.tagName===m.HTML?Ce(e,t):Ke(e,t)},[n.END_TAG_TOKEN]:Ke,[n.EOF_TOKEN]:oe},[q]:{[n.CHARACTER_TOKEN]:re,[n.NULL_CHARACTER_TOKEN]:re,[n.WHITESPACE_CHARACTER_TOKEN]:me,[n.COMMENT_TOKEN]:se,[n.DOCTYPE_TOKEN]:re,[n.START_TAG_TOKEN]:function(e,t){const r=t.tagName;r===m.HTML?Ce(e,t):r===m.NOFRAMES&&ue(e,t)},[n.END_TAG_TOKEN]:re,[n.EOF_TOKEN]:oe}};function X(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagName)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):Pe(e,t),r}function J(e,t){let r=null;for(let n=e.openElements.stackTop;n>=0;n--){const a=e.openElements.items[n];if(a===t.element)break;e._isSpecialElement(a)&&(r=a)}return r||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),r}function $(e,t,r){let n=t,a=e.openElements.getCommonAncestor(t);for(let s=0,i=a;i!==r;s++,i=a){a=e.openElements.getCommonAncestor(i);const r=e.activeFormattingElements.getElementEntry(i),o=r&&s>=E;!r||o?(o&&e.activeFormattingElements.removeEntry(r),e.openElements.remove(i)):(i=Q(e,r),n===t&&(e.activeFormattingElements.bookmark=r),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(i,n),n=i)}return n}function Q(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Z(e,t,r){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(r);else{const n=e.treeAdapter.getTagName(t),a=e.treeAdapter.getNamespaceURI(t);n===m.TEMPLATE&&a===y.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function ee(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),a=r.token,s=e.treeAdapter.createElement(a.tagName,n,a.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,r.token),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,s)}function te(e,t){let r;for(let n=0;n0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==m.TEMPLATE&&e._err(f.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(f.endTagWithoutMatchingOpenElement)}function fe(e,t){e.openElements.pop(),e.insertionMode=C,e._processToken(t)}function ge(e,t){const r=t.type===n.EOF_TOKEN?f.openElementsLeftAfterEof:f.disallowedContentInNoscriptInHead;e._err(r),e.openElements.pop(),e.insertionMode=j,e._processToken(t)}function he(e,t){e._insertFakeElement(m.BODY),e.insertionMode=k,e._processToken(t)}function me(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ye(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function ve(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML)}function be(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function xe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Re(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ee(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,y.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Te(e,t){e._appendElement(t,y.HTML),t.ackSelfClosing=!0}function we(e,t){e._switchToTextParsing(t,n.MODE.RAWTEXT)}function Se(e,t){e.openElements.currentTagName===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML)}function je(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,y.HTML)}function Ae(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML)}function Ce(e,t){const r=t.tagName;switch(r.length){case 1:r===m.I||r===m.S||r===m.B||r===m.U?xe(e,t):r===m.P?ve(e,t):r===m.A?function(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(m.A);r&&(te(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):Ae(e,t);break;case 2:r===m.DL||r===m.OL||r===m.UL?ve(e,t):r===m.H1||r===m.H2||r===m.H3||r===m.H4||r===m.H5||r===m.H6?function(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement();const r=e.openElements.currentTagName;r!==m.H1&&r!==m.H2&&r!==m.H3&&r!==m.H4&&r!==m.H5&&r!==m.H6||e.openElements.pop(),e._insertElement(t,y.HTML)}(e,t):r===m.LI||r===m.DD||r===m.DT?function(e,t){e.framesetOk=!1;const r=t.tagName;for(let n=e.openElements.stackTop;n>=0;n--){const t=e.openElements.items[n],a=e.treeAdapter.getTagName(t);let s=null;if(r===m.LI&&a===m.LI?s=m.LI:r!==m.DD&&r!==m.DT||a!==m.DD&&a!==m.DT||(s=a),s){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(a!==m.ADDRESS&&a!==m.DIV&&a!==m.P&&e._isSpecialElement(t))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML)}(e,t):r===m.EM||r===m.TT?xe(e,t):r===m.BR?Ee(e,t):r===m.HR?function(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,y.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t):r===m.RB?je(e,t):r===m.RT||r===m.RP?function(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,y.HTML)}(e,t):r!==m.TH&&r!==m.TD&&r!==m.TR&&Ae(e,t);break;case 3:r===m.DIV||r===m.DIR||r===m.NAV?ve(e,t):r===m.PRE?be(e,t):r===m.BIG?xe(e,t):r===m.IMG||r===m.WBR?Ee(e,t):r===m.XMP?function(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,n.MODE.RAWTEXT)}(e,t):r===m.SVG?function(e,t){e._reconstructActiveFormattingElements(),p.adjustTokenSVGAttrs(t),p.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,y.SVG):e._insertElement(t,y.SVG),t.ackSelfClosing=!0}(e,t):r===m.RTC?je(e,t):r!==m.COL&&Ae(e,t);break;case 4:r===m.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):r===m.BASE||r===m.LINK||r===m.META?ue(e,t):r===m.BODY?function(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}(e,t):r===m.MAIN||r===m.MENU?ve(e,t):r===m.FORM?function(e,t){const r=e.openElements.tmplCount>0;e.formElement&&!r||(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML),r||(e.formElement=e.openElements.current))}(e,t):r===m.CODE||r===m.FONT?xe(e,t):r===m.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(te(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,y.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):r===m.AREA?Ee(e,t):r===m.MATH?function(e,t){e._reconstructActiveFormattingElements(),p.adjustTokenMathMLAttrs(t),p.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,y.MATHML):e._insertElement(t,y.MATHML),t.ackSelfClosing=!0}(e,t):r===m.MENU?function(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML)}(e,t):r!==m.HEAD&&Ae(e,t);break;case 5:r===m.STYLE||r===m.TITLE?ue(e,t):r===m.ASIDE?ve(e,t):r===m.SMALL?xe(e,t):r===m.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==h.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML),e.framesetOk=!1,e.insertionMode=P}(e,t):r===m.EMBED?Ee(e,t):r===m.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,y.HTML);const r=n.getTokenAttr(t,v.TYPE);r&&r.toLowerCase()===x||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):r===m.PARAM||r===m.TRACK?Te(e,t):r===m.IMAGE?function(e,t){t.tagName=m.IMG,Ee(e,t)}(e,t):r!==m.FRAME&&r!==m.TBODY&&r!==m.TFOOT&&r!==m.THEAD&&Ae(e,t);break;case 6:r===m.SCRIPT?ue(e,t):r===m.CENTER||r===m.FIGURE||r===m.FOOTER||r===m.HEADER||r===m.HGROUP||r===m.DIALOG?ve(e,t):r===m.BUTTON?function(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML),e.framesetOk=!1}(e,t):r===m.STRIKE||r===m.STRONG?xe(e,t):r===m.APPLET||r===m.OBJECT?Re(e,t):r===m.KEYGEN?Ee(e,t):r===m.SOURCE?Te(e,t):r===m.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,n.MODE.RAWTEXT)}(e,t):r===m.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,y.HTML),e.framesetOk=!1,e.insertionMode===P||e.insertionMode===D||e.insertionMode===N||e.insertionMode===F||e.insertionMode===M?e.insertionMode=B:e.insertionMode=L}(e,t):r===m.OPTION?Se(e,t):Ae(e,t);break;case 7:r===m.BGSOUND?ue(e,t):r===m.DETAILS||r===m.ADDRESS||r===m.ARTICLE||r===m.SECTION||r===m.SUMMARY?ve(e,t):r===m.LISTING?be(e,t):r===m.MARQUEE?Re(e,t):r===m.NOEMBED?we(e,t):r!==m.CAPTION&&Ae(e,t);break;case 8:r===m.BASEFONT?ue(e,t):r===m.FRAMESET?function(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,y.HTML),e.insertionMode=G)}(e,t):r===m.FIELDSET?ve(e,t):r===m.TEXTAREA?function(e,t){e._insertElement(t,y.HTML),e.skipNextNewLine=!0,e.tokenizer.state=n.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_}(e,t):r===m.TEMPLATE?ue(e,t):r===m.NOSCRIPT?e.options.scriptingEnabled?we(e,t):Ae(e,t):r===m.OPTGROUP?Se(e,t):r!==m.COLGROUP&&Ae(e,t);break;case 9:r===m.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,y.HTML),e.tokenizer.state=n.MODE.PLAINTEXT}(e,t):Ae(e,t);break;case 10:r===m.BLOCKQUOTE||r===m.FIGCAPTION?ve(e,t):Ae(e,t);break;default:Ae(e,t)}}function ke(e,t){const r=t.tagName;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function _e(e,t){const r=t.tagName;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function Pe(e,t){const r=t.tagName;for(let n=e.openElements.stackTop;n>0;n--){const t=e.openElements.items[n];if(e.treeAdapter.getTagName(t)===r){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilElementPopped(t);break}if(e._isSpecialElement(t))break}}function Ie(e,t){const r=t.tagName;switch(r.length){case 1:r===m.A||r===m.B||r===m.I||r===m.S||r===m.U?te(e,t):r===m.P?function(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(m.P),e._closePElement()}(e):Pe(e,t);break;case 2:r===m.DL||r===m.UL||r===m.OL?ke(e,t):r===m.LI?function(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}(e):r===m.DD||r===m.DT?function(e,t){const r=t.tagName;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}(e,t):r===m.H1||r===m.H2||r===m.H3||r===m.H4||r===m.H5||r===m.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):r===m.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(m.BR),e.openElements.pop(),e.framesetOk=!1}(e):r===m.EM||r===m.TT?te(e,t):Pe(e,t);break;case 3:r===m.BIG?te(e,t):r===m.DIR||r===m.DIV||r===m.NAV||r===m.PRE?ke(e,t):Pe(e,t);break;case 4:r===m.BODY?function(e){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=H)}(e):r===m.HTML?function(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=H,e._processToken(t))}(e,t):r===m.FORM?function(e){const t=e.openElements.tmplCount>0,r=e.formElement;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):e.openElements.remove(r))}(e):r===m.CODE||r===m.FONT||r===m.NOBR?te(e,t):r===m.MAIN||r===m.MENU?ke(e,t):Pe(e,t);break;case 5:r===m.ASIDE?ke(e,t):r===m.SMALL?te(e,t):Pe(e,t);break;case 6:r===m.CENTER||r===m.FIGURE||r===m.FOOTER||r===m.HEADER||r===m.HGROUP||r===m.DIALOG?ke(e,t):r===m.APPLET||r===m.OBJECT?_e(e,t):r===m.STRIKE||r===m.STRONG?te(e,t):Pe(e,t);break;case 7:r===m.ADDRESS||r===m.ARTICLE||r===m.DETAILS||r===m.SECTION||r===m.SUMMARY||r===m.LISTING?ke(e,t):r===m.MARQUEE?_e(e,t):Pe(e,t);break;case 8:r===m.FIELDSET?ke(e,t):r===m.TEMPLATE?pe(e,t):Pe(e,t);break;case 10:r===m.BLOCKQUOTE||r===m.FIGCAPTION?ke(e,t):Pe(e,t);break;default:Pe(e,t)}}function De(e,t){e.tmplInsertionModeStackTop>-1?Ge(e,t):e.stopped=!0}function Oe(e,t){const r=e.openElements.currentTagName;r===m.TABLE||r===m.TBODY||r===m.TFOOT||r===m.THEAD||r===m.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I,e._processToken(t)):Me(e,t)}function Ne(e,t){const r=t.tagName;switch(r.length){case 2:r===m.TD||r===m.TH||r===m.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(m.TBODY),e.insertionMode=N,e._processToken(t)}(e,t):Me(e,t);break;case 3:r===m.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(m.COLGROUP),e.insertionMode=O,e._processToken(t)}(e,t):Me(e,t);break;case 4:r===m.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,y.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):Me(e,t);break;case 5:r===m.TABLE?function(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):r===m.STYLE?ue(e,t):r===m.TBODY||r===m.TFOOT||r===m.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,y.HTML),e.insertionMode=N}(e,t):r===m.INPUT?function(e,t){const r=n.getTokenAttr(t,v.TYPE);r&&r.toLowerCase()===x?e._appendElement(t,y.HTML):Me(e,t),t.ackSelfClosing=!0}(e,t):Me(e,t);break;case 6:r===m.SCRIPT?ue(e,t):Me(e,t);break;case 7:r===m.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,y.HTML),e.insertionMode=D}(e,t):Me(e,t);break;case 8:r===m.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,y.HTML),e.insertionMode=O}(e,t):r===m.TEMPLATE?ue(e,t):Me(e,t);break;default:Me(e,t)}}function Fe(e,t){const r=t.tagName;r===m.TABLE?e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode()):r===m.TEMPLATE?pe(e,t):r!==m.BODY&&r!==m.CAPTION&&r!==m.COL&&r!==m.COLGROUP&&r!==m.HTML&&r!==m.TBODY&&r!==m.TD&&r!==m.TFOOT&&r!==m.TH&&r!==m.THEAD&&r!==m.TR&&Me(e,t)}function Me(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=r}function Le(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function We(e,t){e.insertionMode=k,e._processToken(t)}function Ke(e,t){e.insertionMode=k,e._processToken(t)}e.exports=class{constructor(e){this.options=l(b,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&d.install(this,i),this.options.onParseError&&d.install(this,o,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(m.TEMPLATE,y.HTML,[]));const r=this.treeAdapter.createElement("documentmock",y.HTML,[]);this._bootstrap(r,t),this.treeAdapter.getTagName(t)===m.TEMPLATE&&this._pushTmplInsertionMode(U),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const n=this.treeAdapter.getFirstChild(r),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(n,a),a}_bootstrap(e,t){this.tokenizer=new n(this.options),this.stopped=!1,this.insertionMode=T,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new a(this.document,this.treeAdapter),this.activeFormattingElements=new s(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===n.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===n.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==y.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,y.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=_}switchToPlaintextParsing(){this.insertionMode=_,this.originalInsertionMode=k,this.tokenizer.state=n.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===m.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===y.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===m.TITLE||e===m.TEXTAREA?this.tokenizer.state=n.MODE.RCDATA:e===m.STYLE||e===m.XMP||e===m.IFRAME||e===m.NOEMBED||e===m.NOFRAMES||e===m.NOSCRIPT?this.tokenizer.state=n.MODE.RAWTEXT:e===m.SCRIPT?this.tokenizer.state=n.MODE.SCRIPT_DATA:e===m.PLAINTEXT&&(this.tokenizer.state=n.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",r=e.publicId||"",n=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,r,n)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r)}_insertElement(e,t){const r=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(r),this.openElements.push(r)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,y.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,y.HTML,e.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,r),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(m.HTML,y.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const r=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,r)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let r=this.treeAdapter.getFirstChild(e);r;r=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(t,r)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const r=this.treeAdapter.getNamespaceURI(t);if(r===y.HTML)return!1;if(this.treeAdapter.getTagName(t)===m.ANNOTATION_XML&&r===y.MATHML&&e.type===n.START_TAG_TOKEN&&e.tagName===m.SVG)return!1;const a=e.type===n.CHARACTER_TOKEN||e.type===n.NULL_CHARACTER_TOKEN||e.type===n.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===n.START_TAG_TOKEN&&e.tagName!==m.MGLYPH&&e.tagName!==m.MALIGNMARK)&&!a||!this._isIntegrationPoint(t,y.MATHML))&&((e.type!==n.START_TAG_TOKEN&&!a||!this._isIntegrationPoint(t,y.HTML))&&e.type!==n.EOF_TOKEN)}_processToken(e){Y[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){Y[k][e.type](this,e)}_processTokenInForeignContent(e){e.type===n.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===n.NULL_CHARACTER_TOKEN?function(e,t){t.chars=g.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===n.WHITESPACE_CHARACTER_TOKEN?ie(this,e):e.type===n.COMMENT_TOKEN?ae(this,e):e.type===n.START_TAG_TOKEN?function(e,t){if(p.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==y.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===y.MATHML?p.adjustTokenMathMLAttrs(t):n===y.SVG&&(p.adjustTokenSVGTagName(t),p.adjustTokenSVGAttrs(t)),p.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}(this,e):e.type===n.END_TAG_TOKEN&&function(e,t){for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===y.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(n).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(n);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===n.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(f.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const r=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e),a=this.treeAdapter.getAttrList(e);return p.isIntegrationPoint(r,n,a,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,r=null;do{if(t--,r=this.activeFormattingElements.entries[t],r.type===s.MARKER_ENTRY||this.openElements.contains(r.element)){t++;break}}while(t>0);for(let n=t;n=0;e--){let r=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(r=this.fragmentContext));const n=this.treeAdapter.getTagName(r),a=z[n];if(a){this.insertionMode=a;break}if(!(t||n!==m.TD&&n!==m.TH)){this.insertionMode=M;break}if(!t&&n===m.HEAD){this.insertionMode=j;break}if(n===m.SELECT){this._resetInsertionModeForSelect(e);break}if(n===m.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(n===m.HTML){this.insertionMode=this.headElement?C:S;break}if(t){this.insertionMode=k;break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],r=this.treeAdapter.getTagName(e);if(r===m.TEMPLATE)break;if(r===m.TABLE)return void(this.insertionMode=B)}this.insertionMode=L}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===m.TABLE||t===m.TBODY||t===m.TFOOT||t===m.THEAD||t===m.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t],n=this.treeAdapter.getTagName(r),a=this.treeAdapter.getNamespaceURI(r);if(n===m.TEMPLATE&&a===y.HTML){e.parent=this.treeAdapter.getTemplateContent(r);break}if(n===m.TABLE){e.parent=this.treeAdapter.getParentNode(r),e.parent?e.beforeElement=r:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e);return h.SPECIAL_ELEMENTS[r][t]}}},5033:(e,t,r)=>{"use strict";const n=r(1777),a=n.TAG_NAMES,s=n.NAMESPACES;function i(e){switch(e.length){case 1:return e===a.P;case 2:return e===a.RB||e===a.RP||e===a.RT||e===a.DD||e===a.DT||e===a.LI;case 3:return e===a.RTC;case 6:return e===a.OPTION;case 8:return e===a.OPTGROUP}return!1}function o(e){switch(e.length){case 1:return e===a.P;case 2:return e===a.RB||e===a.RP||e===a.RT||e===a.DD||e===a.DT||e===a.LI||e===a.TD||e===a.TH||e===a.TR;case 3:return e===a.RTC;case 5:return e===a.TBODY||e===a.TFOOT||e===a.THEAD;case 6:return e===a.OPTION;case 7:return e===a.CAPTION;case 8:return e===a.OPTGROUP||e===a.COLGROUP}return!1}function d(e,t){switch(e.length){case 2:if(e===a.TD||e===a.TH)return t===s.HTML;if(e===a.MI||e===a.MO||e===a.MN||e===a.MS)return t===s.MATHML;break;case 4:if(e===a.HTML)return t===s.HTML;if(e===a.DESC)return t===s.SVG;break;case 5:if(e===a.TABLE)return t===s.HTML;if(e===a.MTEXT)return t===s.MATHML;if(e===a.TITLE)return t===s.SVG;break;case 6:return(e===a.APPLET||e===a.OBJECT)&&t===s.HTML;case 7:return(e===a.CAPTION||e===a.MARQUEE)&&t===s.HTML;case 8:return e===a.TEMPLATE&&t===s.HTML;case 13:return e===a.FOREIGN_OBJECT&&t===s.SVG;case 14:return e===a.ANNOTATION_XML&&t===s.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let r=this.stackTop;r>=0;r--)if(this.items[r]===e){t=r;break}return t}_isInTemplate(){return this.currentTagName===a.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===s.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const r=this._indexOf(e);this.items[r]=t,r===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const r=this._indexOf(e)+1;this.items.splice(r,0,t),r===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,r=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&r===s.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===a.H1||e===a.H2||e===a.H3||e===a.H4||e===a.H5||e===a.H6&&t===s.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===a.TD||e===a.TH&&t===s.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==a.TABLE&&this.currentTagName!==a.TEMPLATE&&this.currentTagName!==a.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==a.TBODY&&this.currentTagName!==a.TFOOT&&this.currentTagName!==a.THEAD&&this.currentTagName!==a.TEMPLATE&&this.currentTagName!==a.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==a.TR&&this.currentTagName!==a.TEMPLATE&&this.currentTagName!==a.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===a.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===a.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===s.HTML)return!0;if(d(r,n))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),r=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===a.H1||t===a.H2||t===a.H3||t===a.H4||t===a.H5||t===a.H6)&&r===s.HTML)return!0;if(d(t,r))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===s.HTML)return!0;if((r===a.UL||r===a.OL)&&n===s.HTML||d(r,n))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&n===s.HTML)return!0;if(r===a.BUTTON&&n===s.HTML||d(r,n))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(r===e)return!0;if(r===a.TABLE||r===a.TEMPLATE||r===a.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===s.HTML){if(t===a.TBODY||t===a.THEAD||t===a.TFOOT)return!0;if(t===a.TABLE||t===a.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const r=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(r===e)return!0;if(r!==a.OPTION&&r!==a.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;i(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;o(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;i(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},7796:(e,t,r)=>{"use strict";const n=r(666),a=r(3558),s=r(9171),i=r(4078),o=a.CODE_POINTS,d=a.CODE_POINT_SEQUENCES,c={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},l="DATA_STATE",u="RCDATA_STATE",p="RAWTEXT_STATE",f="SCRIPT_DATA_STATE",g="PLAINTEXT_STATE",h="TAG_OPEN_STATE",m="END_TAG_OPEN_STATE",y="TAG_NAME_STATE",v="RCDATA_LESS_THAN_SIGN_STATE",b="RCDATA_END_TAG_OPEN_STATE",x="RCDATA_END_TAG_NAME_STATE",R="RAWTEXT_LESS_THAN_SIGN_STATE",E="RAWTEXT_END_TAG_OPEN_STATE",T="RAWTEXT_END_TAG_NAME_STATE",w="SCRIPT_DATA_LESS_THAN_SIGN_STATE",S="SCRIPT_DATA_END_TAG_OPEN_STATE",j="SCRIPT_DATA_END_TAG_NAME_STATE",A="SCRIPT_DATA_ESCAPE_START_STATE",C="SCRIPT_DATA_ESCAPE_START_DASH_STATE",k="SCRIPT_DATA_ESCAPED_STATE",_="SCRIPT_DATA_ESCAPED_DASH_STATE",P="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",I="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",D="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",O="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",N="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",F="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",M="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",L="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",B="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",U="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",H="BEFORE_ATTRIBUTE_NAME_STATE",G="ATTRIBUTE_NAME_STATE",W="AFTER_ATTRIBUTE_NAME_STATE",K="BEFORE_ATTRIBUTE_VALUE_STATE",q="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",z="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",V="ATTRIBUTE_VALUE_UNQUOTED_STATE",Y="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",X="SELF_CLOSING_START_TAG_STATE",J="BOGUS_COMMENT_STATE",$="MARKUP_DECLARATION_OPEN_STATE",Q="COMMENT_START_STATE",Z="COMMENT_START_DASH_STATE",ee="COMMENT_STATE",te="COMMENT_LESS_THAN_SIGN_STATE",re="COMMENT_LESS_THAN_SIGN_BANG_STATE",ne="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",ae="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",se="COMMENT_END_DASH_STATE",ie="COMMENT_END_STATE",oe="COMMENT_END_BANG_STATE",de="DOCTYPE_STATE",ce="BEFORE_DOCTYPE_NAME_STATE",le="DOCTYPE_NAME_STATE",ue="AFTER_DOCTYPE_NAME_STATE",pe="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",fe="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ge="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",he="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",me="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ye="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",ve="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",be="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",xe="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",Re="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Ee="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Te="BOGUS_DOCTYPE_STATE",we="CDATA_SECTION_STATE",Se="CDATA_SECTION_BRACKET_STATE",je="CDATA_SECTION_END_STATE",Ae="CHARACTER_REFERENCE_STATE",Ce="NAMED_CHARACTER_REFERENCE_STATE",ke="AMBIGUOS_AMPERSAND_STATE",_e="NUMERIC_CHARACTER_REFERENCE_STATE",Pe="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Ie="DECIMAL_CHARACTER_REFERENCE_START_STATE",De="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Oe="DECIMAL_CHARACTER_REFERENCE_STATE",Ne="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Fe(e){return e===o.SPACE||e===o.LINE_FEED||e===o.TABULATION||e===o.FORM_FEED}function Me(e){return e>=o.DIGIT_0&&e<=o.DIGIT_9}function Le(e){return e>=o.LATIN_CAPITAL_A&&e<=o.LATIN_CAPITAL_Z}function Be(e){return e>=o.LATIN_SMALL_A&&e<=o.LATIN_SMALL_Z}function Ue(e){return Be(e)||Le(e)}function He(e){return Ue(e)||Me(e)}function Ge(e){return e>=o.LATIN_CAPITAL_A&&e<=o.LATIN_CAPITAL_F}function We(e){return e>=o.LATIN_SMALL_A&&e<=o.LATIN_SMALL_F}function Ke(e){return e+32}function qe(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function ze(e){return String.fromCharCode(Ke(e))}function Ve(e,t){const r=s[++e];let n=++e,a=n+r-1;for(;n<=a;){const e=n+a>>>1,i=s[e];if(it))return s[e+r];a=e-1}}return-1}class Ye{constructor(){this.preprocessor=new n,this.tokenQueue=[],this.allowCDATA=!1,this.state=l,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Ye.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,r){let n=0,a=!0;const s=e.length;let i,d=0,c=t;for(;d0&&(c=this._consume(),n++),c===o.EOF){a=!1;break}if(i=e[d],c!==i&&(r||c!==Ke(i))){a=!1;break}}if(!a)for(;n--;)this._unconsume();return a}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==d.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(i.endTagWithAttributes),e.selfClosing&&this._err(i.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Ye.CHARACTER_TOKEN;Fe(e)?t=Ye.WHITESPACE_CHARACTER_TOKEN:e===o.NULL&&(t=Ye.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,qe(e))}_emitSeveralCodePoints(e){for(let t=0;t-1;){const e=s[n],a=e<7;a&&1&e&&(t=2&e?[s[++n],s[++n]]:[s[++n]],r=0);const i=this._consume();if(this.tempBuff.push(i),r++,i===o.EOF)break;n=a?4&e?Ve(n,i):-1:i===e?++n:-1}for(;r--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===q||this.returnState===z||this.returnState===V}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===o.EQUALS_SIGN||He(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e")):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.state=k,this._emitChars(a.REPLACEMENT_CHARACTER)):e===o.EOF?(this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=k,this._emitCodePoint(e))}[I](e){e===o.SOLIDUS?(this.tempBuff=[],this.state=D):Ue(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(N)):(this._emitChars("<"),this._reconsumeInState(k))}[D](e){Ue(e)?(this._createEndTagToken(),this._reconsumeInState(O)):(this._emitChars("")):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.state=F,this._emitChars(a.REPLACEMENT_CHARACTER)):e===o.EOF?(this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=F,this._emitCodePoint(e))}[B](e){e===o.SOLIDUS?(this.tempBuff=[],this.state=U,this._emitChars("/")):this._reconsumeInState(F)}[U](e){Fe(e)||e===o.SOLIDUS||e===o.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?k:F,this._emitCodePoint(e)):Le(e)?(this.tempBuff.push(Ke(e)),this._emitCodePoint(e)):Be(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(F)}[H](e){Fe(e)||(e===o.SOLIDUS||e===o.GREATER_THAN_SIGN||e===o.EOF?this._reconsumeInState(W):e===o.EQUALS_SIGN?(this._err(i.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=G):(this._createAttr(""),this._reconsumeInState(G)))}[G](e){Fe(e)||e===o.SOLIDUS||e===o.GREATER_THAN_SIGN||e===o.EOF?(this._leaveAttrName(W),this._unconsume()):e===o.EQUALS_SIGN?this._leaveAttrName(K):Le(e)?this.currentAttr.name+=ze(e):e===o.QUOTATION_MARK||e===o.APOSTROPHE||e===o.LESS_THAN_SIGN?(this._err(i.unexpectedCharacterInAttributeName),this.currentAttr.name+=qe(e)):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentAttr.name+=a.REPLACEMENT_CHARACTER):this.currentAttr.name+=qe(e)}[W](e){Fe(e)||(e===o.SOLIDUS?this.state=X:e===o.EQUALS_SIGN?this.state=K:e===o.GREATER_THAN_SIGN?(this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(G)))}[K](e){Fe(e)||(e===o.QUOTATION_MARK?this.state=q:e===o.APOSTROPHE?this.state=z:e===o.GREATER_THAN_SIGN?(this._err(i.missingAttributeValue),this.state=l,this._emitCurrentToken()):this._reconsumeInState(V))}[q](e){e===o.QUOTATION_MARK?this.state=Y:e===o.AMPERSAND?(this.returnState=q,this.state=Ae):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===o.EOF?(this._err(i.eofInTag),this._emitEOFToken()):this.currentAttr.value+=qe(e)}[z](e){e===o.APOSTROPHE?this.state=Y:e===o.AMPERSAND?(this.returnState=z,this.state=Ae):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===o.EOF?(this._err(i.eofInTag),this._emitEOFToken()):this.currentAttr.value+=qe(e)}[V](e){Fe(e)?this._leaveAttrValue(H):e===o.AMPERSAND?(this.returnState=V,this.state=Ae):e===o.GREATER_THAN_SIGN?(this._leaveAttrValue(l),this._emitCurrentToken()):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===o.QUOTATION_MARK||e===o.APOSTROPHE||e===o.LESS_THAN_SIGN||e===o.EQUALS_SIGN||e===o.GRAVE_ACCENT?(this._err(i.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=qe(e)):e===o.EOF?(this._err(i.eofInTag),this._emitEOFToken()):this.currentAttr.value+=qe(e)}[Y](e){Fe(e)?this._leaveAttrValue(H):e===o.SOLIDUS?this._leaveAttrValue(X):e===o.GREATER_THAN_SIGN?(this._leaveAttrValue(l),this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInTag),this._emitEOFToken()):(this._err(i.missingWhitespaceBetweenAttributes),this._reconsumeInState(H))}[X](e){e===o.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInTag),this._emitEOFToken()):(this._err(i.unexpectedSolidusInTag),this._reconsumeInState(H))}[J](e){e===o.GREATER_THAN_SIGN?(this.state=l,this._emitCurrentToken()):e===o.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):this.currentToken.data+=qe(e)}[$](e){this._consumeSequenceIfMatch(d.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=Q):this._consumeSequenceIfMatch(d.DOCTYPE_STRING,e,!1)?this.state=de:this._consumeSequenceIfMatch(d.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=we:(this._err(i.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=J):this._ensureHibernation()||(this._err(i.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(J))}[Q](e){e===o.HYPHEN_MINUS?this.state=Z:e===o.GREATER_THAN_SIGN?(this._err(i.abruptClosingOfEmptyComment),this.state=l,this._emitCurrentToken()):this._reconsumeInState(ee)}[Z](e){e===o.HYPHEN_MINUS?this.state=ie:e===o.GREATER_THAN_SIGN?(this._err(i.abruptClosingOfEmptyComment),this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[ee](e){e===o.HYPHEN_MINUS?this.state=se:e===o.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=te):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):e===o.EOF?(this._err(i.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=qe(e)}[te](e){e===o.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=re):e===o.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(ee)}[re](e){e===o.HYPHEN_MINUS?this.state=ne:this._reconsumeInState(ee)}[ne](e){e===o.HYPHEN_MINUS?this.state=ae:this._reconsumeInState(se)}[ae](e){e!==o.GREATER_THAN_SIGN&&e!==o.EOF&&this._err(i.nestedComment),this._reconsumeInState(ie)}[se](e){e===o.HYPHEN_MINUS?this.state=ie:e===o.EOF?(this._err(i.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(ee))}[ie](e){e===o.GREATER_THAN_SIGN?(this.state=l,this._emitCurrentToken()):e===o.EXCLAMATION_MARK?this.state=oe:e===o.HYPHEN_MINUS?this.currentToken.data+="-":e===o.EOF?(this._err(i.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(ee))}[oe](e){e===o.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=se):e===o.GREATER_THAN_SIGN?(this._err(i.incorrectlyClosedComment),this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(ee))}[de](e){Fe(e)?this.state=ce:e===o.GREATER_THAN_SIGN?this._reconsumeInState(ce):e===o.EOF?(this._err(i.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(ce))}[ce](e){Fe(e)||(Le(e)?(this._createDoctypeToken(ze(e)),this.state=le):e===o.NULL?(this._err(i.unexpectedNullCharacter),this._createDoctypeToken(a.REPLACEMENT_CHARACTER),this.state=le):e===o.GREATER_THAN_SIGN?(this._err(i.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=l):e===o.EOF?(this._err(i.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(qe(e)),this.state=le))}[le](e){Fe(e)?this.state=ue:e===o.GREATER_THAN_SIGN?(this.state=l,this._emitCurrentToken()):Le(e)?this.currentToken.name+=ze(e):e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.name+=a.REPLACEMENT_CHARACTER):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=qe(e)}[ue](e){Fe(e)||(e===o.GREATER_THAN_SIGN?(this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(d.PUBLIC_STRING,e,!1)?this.state=pe:this._consumeSequenceIfMatch(d.SYSTEM_STRING,e,!1)?this.state=ve:this._ensureHibernation()||(this._err(i.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te)))}[pe](e){Fe(e)?this.state=fe:e===o.QUOTATION_MARK?(this._err(i.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=ge):e===o.APOSTROPHE?(this._err(i.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=he):e===o.GREATER_THAN_SIGN?(this._err(i.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te))}[fe](e){Fe(e)||(e===o.QUOTATION_MARK?(this.currentToken.publicId="",this.state=ge):e===o.APOSTROPHE?(this.currentToken.publicId="",this.state=he):e===o.GREATER_THAN_SIGN?(this._err(i.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te)))}[ge](e){e===o.QUOTATION_MARK?this.state=me:e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===o.GREATER_THAN_SIGN?(this._err(i.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=l):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=qe(e)}[he](e){e===o.APOSTROPHE?this.state=me:e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===o.GREATER_THAN_SIGN?(this._err(i.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=l):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=qe(e)}[me](e){Fe(e)?this.state=ye:e===o.GREATER_THAN_SIGN?(this.state=l,this._emitCurrentToken()):e===o.QUOTATION_MARK?(this._err(i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=xe):e===o.APOSTROPHE?(this._err(i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Re):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te))}[ye](e){Fe(e)||(e===o.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=l):e===o.QUOTATION_MARK?(this.currentToken.systemId="",this.state=xe):e===o.APOSTROPHE?(this.currentToken.systemId="",this.state=Re):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te)))}[ve](e){Fe(e)?this.state=be:e===o.QUOTATION_MARK?(this._err(i.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=xe):e===o.APOSTROPHE?(this._err(i.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Re):e===o.GREATER_THAN_SIGN?(this._err(i.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te))}[be](e){Fe(e)||(e===o.QUOTATION_MARK?(this.currentToken.systemId="",this.state=xe):e===o.APOSTROPHE?(this.currentToken.systemId="",this.state=Re):e===o.GREATER_THAN_SIGN?(this._err(i.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=l,this._emitCurrentToken()):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Te)))}[xe](e){e===o.QUOTATION_MARK?this.state=Ee:e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===o.GREATER_THAN_SIGN?(this._err(i.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=l):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=qe(e)}[Re](e){e===o.APOSTROPHE?this.state=Ee:e===o.NULL?(this._err(i.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===o.GREATER_THAN_SIGN?(this._err(i.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=l):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=qe(e)}[Ee](e){Fe(e)||(e===o.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=l):e===o.EOF?(this._err(i.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(i.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Te)))}[Te](e){e===o.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=l):e===o.NULL?this._err(i.unexpectedNullCharacter):e===o.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[we](e){e===o.RIGHT_SQUARE_BRACKET?this.state=Se:e===o.EOF?(this._err(i.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}[Se](e){e===o.RIGHT_SQUARE_BRACKET?this.state=je:(this._emitChars("]"),this._reconsumeInState(we))}[je](e){e===o.GREATER_THAN_SIGN?this.state=l:e===o.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(we))}[Ae](e){this.tempBuff=[o.AMPERSAND],e===o.NUMBER_SIGN?(this.tempBuff.push(e),this.state=_e):He(e)?this._reconsumeInState(Ce):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Ce](e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[o.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===o.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(i.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=ke}[ke](e){He(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=qe(e):this._emitCodePoint(e):(e===o.SEMICOLON&&this._err(i.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[_e](e){this.charRefCode=0,e===o.LATIN_SMALL_X||e===o.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=Pe):this._reconsumeInState(Ie)}[Pe](e){!function(e){return Me(e)||Ge(e)||We(e)}(e)?(this._err(i.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(De)}[Ie](e){Me(e)?this._reconsumeInState(Oe):(this._err(i.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[De](e){Ge(e)?this.charRefCode=16*this.charRefCode+e-55:We(e)?this.charRefCode=16*this.charRefCode+e-87:Me(e)?this.charRefCode=16*this.charRefCode+e-48:e===o.SEMICOLON?this.state=Ne:(this._err(i.missingSemicolonAfterCharacterReference),this._reconsumeInState(Ne))}[Oe](e){Me(e)?this.charRefCode=10*this.charRefCode+e-48:e===o.SEMICOLON?this.state=Ne:(this._err(i.missingSemicolonAfterCharacterReference),this._reconsumeInState(Ne))}[Ne](){if(this.charRefCode===o.NULL)this._err(i.nullCharacterReference),this.charRefCode=o.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(i.characterReferenceOutsideUnicodeRange),this.charRefCode=o.REPLACEMENT_CHARACTER;else if(a.isSurrogate(this.charRefCode))this._err(i.surrogateCharacterReference),this.charRefCode=o.REPLACEMENT_CHARACTER;else if(a.isUndefinedCodePoint(this.charRefCode))this._err(i.noncharacterCharacterReference);else if(a.isControlCodePoint(this.charRefCode)||this.charRefCode===o.CARRIAGE_RETURN){this._err(i.controlCharacterReference);const e=c[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Ye.CHARACTER_TOKEN="CHARACTER_TOKEN",Ye.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Ye.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Ye.START_TAG_TOKEN="START_TAG_TOKEN",Ye.END_TAG_TOKEN="END_TAG_TOKEN",Ye.COMMENT_TOKEN="COMMENT_TOKEN",Ye.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Ye.EOF_TOKEN="EOF_TOKEN",Ye.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Ye.MODE={DATA:l,RCDATA:u,RAWTEXT:p,SCRIPT_DATA:f,PLAINTEXT:g},Ye.getTokenAttr=function(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null},e.exports=Ye},9171:e=>{"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},666:(e,t,r)=>{"use strict";const n=r(3558),a=r(4078),s=n.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(n.isSurrogatePair(t))return this.pos++,this._addGap(),n.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,s.EOF;return this._err(a.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,s.EOF;let e=this.html.charCodeAt(this.pos);if(this.skipNextNewLine&&e===s.LINE_FEED)return this.skipNextNewLine=!1,this._addGap(),this.advance();if(e===s.CARRIAGE_RETURN)return this.skipNextNewLine=!0,s.LINE_FEED;this.skipNextNewLine=!1,n.isSurrogate(e)&&(e=this._processSurrogate(e));return e>31&&e<127||e===s.LINE_FEED||e===s.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){n.isControlCodePoint(e)?this._err(a.controlCharacterInInputStream):n.isUndefinedCodePoint(e)&&this._err(a.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},1215:(e,t,r)=>{"use strict";const{DOCUMENT_MODE:n}=r(1777);t.createDocument=function(){return{nodeName:"#document",mode:n.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const a=function(e){return{nodeName:"#text",value:e,parentNode:null}},s=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},i=t.insertBefore=function(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,r,n){let a=null;for(let s=0;s{"use strict";e.exports=function(e,t){return[e,t=t||Object.create(null)].reduce(((e,t)=>(Object.keys(t).forEach((r=>{e[r]=t[r]})),e)),Object.create(null))}},2850:e=>{"use strict";class t{constructor(e){const t={},r=this._getOverriddenMethods(this,t);for(const n of Object.keys(r))"function"===typeof r[n]&&(t[n]=e[n],e[n]=r[n])}_getOverriddenMethods(){throw new Error("Not implemented")}}t.install=function(e,t,r){e.__mixins||(e.__mixins=[]);for(let a=0;a{var t,r,n=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"===typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var o,d=[],c=!1,l=-1;function u(){c&&o&&(c=!1,o.length?d=o.concat(d):l=-1,d.length&&p())}function p(){if(!c){var e=i(u);c=!0;for(var t=d.length;t;){for(o=d,d=[];++l1)for(var r=1;r{"use strict";var n=r(6606);function a(){}function s(){}s.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,s,i){if(i!==n){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:a};return r.PropTypes=r,r}},9308:(e,t,r)=>{e.exports=r(8339)()},6606:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1117:(e,t)=>{"use strict";var r,n=Symbol.for("react.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case o:case i:case p:case f:return e;default:switch(e=e&&e.$$typeof){case l:case c:case u:case h:case g:case d:return e;default:return t}}case a:return t}}}r=Symbol.for("react.module.reference"),t.ContextConsumer=c,t.ContextProvider=d,t.Element=n,t.ForwardRef=u,t.Fragment=s,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=o,t.StrictMode=i,t.Suspense=p,t.SuspenseList=f,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return y(e)===c},t.isContextProvider=function(e){return y(e)===d},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return y(e)===u},t.isFragment=function(e){return y(e)===s},t.isLazy=function(e){return y(e)===h},t.isMemo=function(e){return y(e)===g},t.isPortal=function(e){return y(e)===a},t.isProfiler=function(e){return y(e)===o},t.isStrictMode=function(e){return y(e)===i},t.isSuspense=function(e){return y(e)===p},t.isSuspenseList=function(e){return y(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===s||e===o||e===i||e===p||e===f||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===d||e.$$typeof===c||e.$$typeof===u||e.$$typeof===r||void 0!==e.getModuleId)},t.typeOf=y},9043:(e,t,r)=>{"use strict";e.exports=r(1117)},6638:(e,t,r)=>{"use strict";e.exports=function(e){var t=this;this.Compiler=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("toMarkdownExtensions")||[]}))}};var n=r(8397)},9528:e=>{"use strict";e.exports=function(e,t){var r,n,a=0,s=0;if("string"!==typeof t||1!==t.length)throw new Error("Expected character");e=String(e),n=e.indexOf(t),r=n;for(;-1!==n;)a++,n===r?a>s&&(s=a):a=1,r=n+1,n=e.indexOf(t,r);return s}},8397:(e,t,r)=>{e.exports=r(4059)},7282:e=>{e.exports=function e(t,r){var n,a=-1;if(r.extensions)for(;++a{e.exports=function(e,t,r){var i=r.enter("blockquote"),o=a(n(e,r),s);return i(),o};var n=r(5162),a=r(2357);function s(e,t,r){return">"+(r?"":" ")+e}},114:(e,t,r)=>{e.exports=function(e,t,r,a){var s=-1;for(;++s{e.exports=function(e,t,r){var l,u,p,f,g=i(r),h=e.value||"",m="`"===g?"GraveAccent":"Tilde";s(e,r)?(p=r.enter("codeIndented"),l=o(h,c)):(u=n(g,Math.max(a(h,g)+1,3)),p=r.enter("codeFenced"),l=u,e.lang&&(f=r.enter("codeFencedLang"+m),l+=d(r,e.lang,{before:"`",after:" ",encode:["`"]}),f()),e.lang&&e.meta&&(f=r.enter("codeFencedMeta"+m),l+=" "+d(r,e.meta,{before:" ",after:"\n",encode:["`"]}),f()),l+="\n",h&&(l+=h+"\n"),l+=u);return p(),l};var n=r(4400),a=r(9528),s=r(6363),i=r(8827),o=r(2357),d=r(4586);function c(e,t,r){return(r?"":" ")+e}},2654:(e,t,r)=>{e.exports=function(e,t,r){var i=a(r),o='"'===i?"Quote":"Apostrophe",d=r.enter("definition"),c=r.enter("label"),l="["+s(r,n(e),{before:"[",after:"]"})+"]: ";c(),!e.url||/[ \t\r\n]/.test(e.url)?(c=r.enter("destinationLiteral"),l+="<"+s(r,e.url,{before:"<",after:">"})+">"):(c=r.enter("destinationRaw"),l+=s(r,e.url,{before:" ",after:" "}));c(),e.title&&(c=r.enter("title"+o),l+=" "+i+s(r,e.title,{before:i,after:i})+i,c());return d(),l};var n=r(2638),a=r(5661),s=r(4586)},2486:(e,t,r)=>{e.exports=s,s.peek=function(e,t,r){return r.options.emphasis||"*"};var n=r(7166),a=r(7462);function s(e,t,r){var s=n(r),i=r.enter("emphasis"),o=a(e,r,{before:s,after:s});return i(),s+o+s}},6216:(e,t,r)=>{e.exports=function(e,t,r){var i,o,d,c,l=Math.max(Math.min(6,e.depth||1),1);if(a(e,r))return i=r.enter("headingSetext"),o=r.enter("phrasing"),d=s(e,r,{before:"\n",after:"\n"}),o(),i(),d+"\n"+n(1===l?"=":"-",d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf("\n"))+1));c=n("#",l),i=r.enter("headingAtx"),o=r.enter("phrasing"),d=(d=s(e,r,{before:"# ",after:"\n"}))?c+" "+d:c,r.options.closeAtx&&(d+=" "+c);return o(),i(),d};var n=r(4400),a=r(4797),s=r(7462)},2841:e=>{function t(e){return e.value||""}e.exports=t,t.peek=function(){return"<"}},4610:(e,t,r)=>{e.exports=s,s.peek=function(){return"!"};var n=r(2638),a=r(4586);function s(e,t,r){var s,i,o=e.referenceType,d=r.enter("imageReference"),c=r.enter("label"),l=a(r,e.alt,{before:"[",after:"]"}),u="!["+l+"]";return c(),i=r.stack,r.stack=[],c=r.enter("reference"),s=a(r,n(e),{before:"[",after:"]"}),c(),r.stack=i,d(),"full"!==o&&l&&l===s?"shortcut"!==o&&(u+="[]"):u+="["+s+"]",u}},7968:(e,t,r)=>{e.exports=s,s.peek=function(){return"!"};var n=r(5661),a=r(4586);function s(e,t,r){var s=n(r),i='"'===s?"Quote":"Apostrophe",o=r.enter("image"),d=r.enter("label"),c="!["+a(r,e.alt,{before:"[",after:"]"})+"](";return d(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(d=r.enter("destinationLiteral"),c+="<"+a(r,e.url,{before:"<",after:">"})+">"):(d=r.enter("destinationRaw"),c+=a(r,e.url,{before:"(",after:e.title?" ":")"})),d(),e.title&&(d=r.enter("title"+i),c+=" "+s+a(r,e.title,{before:s,after:s})+s,d()),c+=")",o(),c}},875:(e,t,r)=>{t.blockquote=r(5673),t.break=r(114),t.code=r(854),t.definition=r(2654),t.emphasis=r(2486),t.hardBreak=r(114),t.heading=r(6216),t.html=r(2841),t.image=r(7968),t.imageReference=r(4610),t.inlineCode=r(5197),t.link=r(3215),t.linkReference=r(8134),t.list=r(107),t.listItem=r(3805),t.paragraph=r(2183),t.root=r(2580),t.strong=r(580),t.text=r(9329),t.thematicBreak=r(8369)},5197:(e,t,r)=>{e.exports=a,a.peek=function(){return"`"};var n=r(6020);function a(e,t,r){for(var a,s,i,o,d=e.value||"",c="`",l=-1;new RegExp("(^|[^`])"+c+"([^`]|$)").test(d);)c+="`";for(/[^ \r\n]/.test(d)&&(/[ \r\n`]/.test(d.charAt(0))||/[ \r\n`]/.test(d.charAt(d.length-1)))&&(d=" "+d+" ");++l{e.exports=i,i.peek=function(){return"["};var n=r(2638),a=r(7462),s=r(4586);function i(e,t,r){var i,o,d=e.referenceType,c=r.enter("linkReference"),l=r.enter("label"),u=a(e,r,{before:"[",after:"]"}),p="["+u+"]";return l(),o=r.stack,r.stack=[],l=r.enter("reference"),i=s(r,n(e),{before:"[",after:"]"}),l(),r.stack=o,c(),"full"!==d&&u&&u===i?"shortcut"!==d&&(p+="[]"):p+="["+i+"]",p}},3215:(e,t,r)=>{e.exports=o,o.peek=function(e,t,r){return a(e,r)?"<":"["};var n=r(5661),a=r(2787),s=r(7462),i=r(4586);function o(e,t,r){var o,d,c,l,u=n(r),p='"'===u?"Quote":"Apostrophe";return a(e,r)?(l=r.stack,r.stack=[],o=r.enter("autolink"),c="<"+s(e,r,{before:"<",after:">"})+">",o(),r.stack=l,c):(o=r.enter("link"),d=r.enter("label"),c="["+s(e,r,{before:"[",after:"]"})+"](",d(),!e.url&&e.title||/[ \t\r\n]/.test(e.url)?(d=r.enter("destinationLiteral"),c+="<"+i(r,e.url,{before:"<",after:">"})+">"):(d=r.enter("destinationRaw"),c+=i(r,e.url,{before:"(",after:e.title?" ":")"})),d(),e.title&&(d=r.enter("title"+p),c+=" "+u+i(r,e.title,{before:u,after:u})+u,d()),c+=")",o(),c)}},3805:(e,t,r)=>{e.exports=function(e,t,r){var d,c,l,u=a(r),p=s(r);t&&t.ordered&&(u=(t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+".");d=u.length+1,("tab"===p||"mixed"===p&&(t&&t.spread||e.spread))&&(d=4*Math.ceil(d/4));return l=r.enter("listItem"),c=o(i(e,r),(function(e,t,r){if(t)return(r?"":n(" ",d))+e;return(r?u:u+n(" ",d-u.length))+e})),l(),c};var n=r(4400),a=r(7697),s=r(5211),i=r(5162),o=r(2357)},107:(e,t,r)=>{e.exports=function(e,t,r){var a=r.enter("list"),s=n(e,r);return a(),s};var n=r(5162)},2183:(e,t,r)=>{e.exports=function(e,t,r){var a=r.enter("paragraph"),s=r.enter("phrasing"),i=n(e,r,{before:"\n",after:"\n"});return s(),a(),i};var n=r(7462)},2580:(e,t,r)=>{e.exports=function(e,t,r){return n(e,r)};var n=r(5162)},580:(e,t,r)=>{e.exports=s,s.peek=function(e,t,r){return r.options.strong||"*"};var n=r(3312),a=r(7462);function s(e,t,r){var s=n(r),i=r.enter("strong"),o=a(e,r,{before:s,after:s});return i(),s+s+o+s+s}},9329:(e,t,r)=>{e.exports=function(e,t,r,a){return n(r,e.value,a)};var n=r(4586)},8369:(e,t,r)=>{e.exports=function(e,t,r){var i=n(s(r)+(r.options.ruleSpaces?" ":""),a(r));return r.options.ruleSpaces?i.slice(0,-1):i};var n=r(4400),a=r(9095),s=r(6899)},4059:(e,t,r)=>{e.exports=function(e,t){var r,u=t||{},p={enter:function(e){return p.stack.push(e),t;function t(){p.stack.pop()}},stack:[],unsafe:[],join:[],handlers:{},options:{}};a(p,{unsafe:o,join:i,handlers:s}),a(p,u),p.options.tightDefinitions&&(p.join=[l].concat(p.join));p.handle=n("type",{invalid:d,unknown:c,handlers:p.handlers}),(r=p.handle(e,null,p,{before:"\n",after:"\n"}))&&10!==r.charCodeAt(r.length-1)&&13!==r.charCodeAt(r.length-1)&&(r+="\n");return r};var n=r(1569),a=r(7282),s=r(875),i=r(9312),o=r(4459);function d(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function c(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function l(e,t){if("definition"===e.type&&e.type===t.type)return 0}},9312:(e,t,r)=>{e.exports=[function(e,t,r,s){if("list"===t.type&&t.type===e.type&&Boolean(e.ordered)===Boolean(t.ordered)||"code"===t.type&&n(t,s)&&("list"===e.type||e.type===t.type&&n(e,s)))return!1;if("boolean"===typeof r.spread){if("paragraph"===e.type&&(e.type===t.type||"definition"===t.type||"heading"===t.type&&a(t,s)))return;return r.spread?1:0}}];var n=r(6363),a=r(4797)},4459:e=>{e.exports=[{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing"},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing"},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*"},{character:"*",inConstruct:"phrasing"},{atBreak:!0,character:"+"},{atBreak:!0,character:"-"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing"},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:["phrasing","label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{before:"[^A-Za-z]",character:"_",inConstruct:"phrasing"},{character:"_",after:"[^A-Za-z]",inConstruct:"phrasing"},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent","phrasing"]},{atBreak:!0,character:"~"}]},2638:(e,t,r)=>{e.exports=function(e){if(e.label||!e.identifier)return e.label||"";return e.identifier.replace(a,"$1").replace(s,i)};var n=r(7849),a=/\\([!-/:-@[-`{-~])/g,s=/&(#(\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i(e,t){return n(t)||e}},7697:e=>{e.exports=function(e){var t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}},7166:e=>{e.exports=function(e){var t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}},8827:e=>{e.exports=function(e){var t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}},5211:e=>{e.exports=function(e){var t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}},5661:e=>{e.exports=function(e){var t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}},9095:e=>{e.exports=function(e){var 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}},6899:e=>{e.exports=function(e){var t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}},3312:e=>{e.exports=function(e){var t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}},5162:(e,t,r)=>{e.exports=function(e,t){var r,a=e.children||[],s=[],i=-1;for(;++i{e.exports=function(e,t,r){var n,a,s,i=e.children||[],o=[],d=-1,c=r.before;for(;++d0&&("\r"===c||"\n"===c)&&"html"===s.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),c=" "),o.push(t.handle(s,e,t,{before:c,after:n})),c=o[o.length-1].slice(-1);return o.join("")}},6363:e=>{e.exports=function(e,t){return!t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value)}},4797:(e,t,r)=>{e.exports=function(e,t){return t.options.setext&&(!e.depth||e.depth<3)&&n(e)};var n=r(9033)},2787:(e,t,r)=>{e.exports=function(e,t){var r=n(e);return!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url)};var n=r(9033)},2357:e=>{e.exports=function(e,r){var n,a=[],s=0,i=0;for(;n=t.exec(e);)o(e.slice(s,n.index)),a.push(n[0]),s=n.index+n[0].length,i++;return o(e.slice(s)),a.join("");function o(e){a.push(r(e,i,!e))}};var t=/\r?\n|\r/g},6020:e=>{e.exports=function(e){var t,r;e._compiled||(t=e.before?"(?:"+e.before+")":"",r=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(r||""),"g"));return e._compiled}},9906:e=>{function t(e,t,r){var n;if(!t)return r;for("string"===typeof t&&(t=[t]),n=-1;++n{e.exports=function(e,t,r){var o,d,c,l,u,p,f,g,h=(r.before||"")+(t||"")+(r.after||""),m=[],y=[],v={},b=-1;for(;++b=g||c+1{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],n=-1;++n{"use strict";var t;e.exports=function(e){var r,n="&"+e+";";if((t=t||document.createElement("i")).innerHTML=n,59===(r=t.textContent).charCodeAt(r.length-1)&&"semi"!==e)return!1;return r!==n&&r}},1569:e=>{"use strict";e.exports=function(e,n){var a=n||{};function s(n){var a=s.invalid,i=s.handlers;return n&&r.call(n,e)&&(a=r.call(i,n[e])?i[n[e]]:s.unknown),(a||t).apply(this,arguments)}return s.handlers=a.handlers||{},s.invalid=a.invalid,s.unknown=a.unknown,s};var t=Function.prototype,r={}.hasOwnProperty},8634:(e,t,r)=>{"use strict";var n=r(282),a=r(1676),s=r(6638);e.exports=n().use(a).use(s).freeze()},6415:e=>{"use strict";e.exports=function(e){if(e)throw e}},3731:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},5715:(e,t,r)=>{"use strict";e.exports=function(e,t,r){"string"!==typeof t&&(r=t,t=void 0);return function(e){var t=e||{},r=function(e,t){var r=-1;for(;++r-1&&(M.call(this,e),L.call(this,e))}function U(){g("atHardBreak",!0)}function H(){var e=this.resume();this.stack[this.stack.length-1].value=e}function G(){var e=this.resume();this.stack[this.stack.length-1].value=e}function W(){var e=this.resume();this.stack[this.stack.length-1].value=e}function K(){var e=this.stack[this.stack.length-1];h("inReference")?(e.type+="Reference",e.referenceType=h("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),g("referenceType")}function q(){var e=this.stack[this.stack.length-1];h("inReference")?(e.type+="Reference",e.referenceType=h("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),g("referenceType")}function z(e){this.stack[this.stack.length-2].identifier=i(this.sliceSerialize(e)).toLowerCase()}function V(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,g("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function Y(){var e=this.resume();this.stack[this.stack.length-1].url=e}function X(){var e=this.resume();this.stack[this.stack.length-1].title=e}function J(){g("inReference")}function $(){g("referenceType","collapsed")}function Q(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=i(this.sliceSerialize(e)).toLowerCase(),g("referenceType","full")}function Z(e){g("characterReferenceType",e.type)}function ee(e){var t,r,n=this.sliceSerialize(e),a=h("characterReferenceType");a?(t=o(n,"characterReferenceMarkerNumeric"===a?10:16),g("characterReferenceType")):t=u(n),(r=this.stack.pop()).value+=t,r.position.end=m(e.end)}function te(e){L.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function re(e){L.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function ne(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function oe(){return{type:"emphasis",children:[]}}function de(){return{type:"heading",depth:void 0,children:[]}}function ce(){return{type:"break"}}function le(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function fe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ge(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function he(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function ve(){return{type:"thematicBreak"}}}(r)(l(d(r).document().write(c()(e,t,!0))))};var n=r(8765),a=r(3667),s=r(8025),i=r(4991),o=r(1744),d=r(4751),c=r(5265),l=r(4811),u=r(4537),p=r(6934);function f(e,t){var r,n;for(r in t)n=s.call(e,r)?e[r]:e[r]={},"canContainEols"===r||"transforms"===r?e[r]=[].concat(n,t[r]):Object.assign(n,t[r])}},5184:(e,t,r)=>{"use strict";e.exports=r(5715)},8765:e=>{"use strict";function t(e){return e&&(e.value||e.alt||e.title||"children"in e&&r(e.children)||"length"in e&&r(e))||""}function r(e){for(var r=[],n=-1;++n{"use strict";var n=r(8254)(/[A-Za-z]/);e.exports=n},6995:(e,t,r)=>{"use strict";var n=r(8254)(/[\dA-Za-z]/);e.exports=n},3290:(e,t,r)=>{"use strict";var n=r(8254)(/[#-'*+\--9=?A-Z^-~]/);e.exports=n},1207:e=>{"use strict";e.exports=function(e){return e<32||127===e}},1091:(e,t,r)=>{"use strict";var n=r(8254)(/\d/);e.exports=n},4900:(e,t,r)=>{"use strict";var n=r(8254)(/[\dA-Fa-f]/);e.exports=n},769:(e,t,r)=>{"use strict";var n=r(8254)(/[!-/:-@[-`{-~]/);e.exports=n},6377:e=>{"use strict";e.exports=function(e){return e<0||32===e}},4392:e=>{"use strict";e.exports=function(e){return e<-2}},9056:e=>{"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},5414:(e,t,r)=>{"use strict";var n=r(5696),a=r(8254)(n);e.exports=a},6548:(e,t,r)=>{"use strict";var n=r(8254)(/\s/);e.exports=n},3667:e=>{"use strict";var t=Object.assign;e.exports=t},9393:e=>{"use strict";var t=String.fromCharCode;e.exports=t},8025:e=>{"use strict";var t={}.hasOwnProperty;e.exports=t},8971:e=>{"use strict";e.exports=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},7322:e=>{"use strict";e.exports=["pre","script","style","textarea"]},7327:e=>{"use strict";var t=[].splice;e.exports=t},5696:e=>{"use strict";e.exports=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/},6236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9402),a=r(2463),s=r(9829),i=r(581),o=r(3382),d=r(4671),c=r(601),l=r(1827),u=r(5518),p=r(8194),f=r(462),g=r(1034),h=r(4428),m=r(4945),y=r(9255),v=r(4902),b=r(721),x=r(2836),R=r(1699),E=r(1862),T=r(5861),w={42:R,43:R,45:R,48:R,49:R,50:R,51:R,52:R,53:R,54:R,55:R,56:R,57:R,62:i},S={91:p},j={"-2":l,"-1":l,32:l},A={35:g,42:T,45:[E,T],60:h,61:E,95:T,96:c,126:c},C={38:d,92:o},k={"-5":x,"-4":x,"-3":x,33:v,38:d,42:a,60:[s,m],91:b,92:[f,o],93:y,95:a,96:u},_={null:[a,n.resolver]};t.contentInitial=S,t.disable={null:[]},t.document=w,t.flow=A,t.flowInitial=j,t.insideSpan=_,t.string=C,t.text=k},490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4392),a=r(6231),s=function(e){var t,r=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,r,"linePrefix")}),(function(t){return e.enter("paragraph"),s(t)}));return r;function s(r){var n=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=n),t=n,i(r)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):n(t)?(e.consume(t),e.exit("chunkText"),s):(e.consume(t),i)}};t.tokenize=s},1717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4392),a=r(6231),s=r(6941),i=function(e){var t,r,a,i=this,c=[],l=0,u={tokenize:function(e,n){var a=0;return t={},l;function l(n){return at;)i.containerState=c[s][1],c[s][0].exit.call(i,e);c.length=t}},o={tokenize:function(e,t,r){return a(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},d={tokenize:function(e,t,r){return a(e,e.lazy(this.parser.constructs.flow,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};t.tokenize=i},6604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2747),a=r(6231),s=r(6941),i=function(e){var t=this,r=e.attempt(s,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,i,a(e,e.attempt(this.parser.constructs.flow,i,e.attempt(n,i)),"linePrefix")));return r;function i(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}};t.tokenize=i},9402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3667),a=r(1339),s=d("text"),i=d("string"),o={resolveAll:c()};function d(e){return{tokenize:function(t){var r=this,n=this.parser.constructs[e],a=t.attempt(n,s,i);return s;function s(e){return d(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),o;t.consume(e)}function o(e){return d(e)?(t.exit("data"),a(e)):(t.consume(e),o)}function d(e){var t=n[e],a=-1;if(null===e)return!0;if(t)for(;++a{"use strict";var n=r(490),a=r(1717),s=r(6604),i=r(9402),o=r(6369),d=r(7058),c=r(9990),l=r(6236);e.exports=function(e){var t={defined:[],constructs:o([l].concat(c((e||{}).extensions))),content:r(n),document:r(a),flow:r(s),string:r(i.string),text:r(i.text)};return t;function r(e){return function(r){return d(t,e,r)}}}},4811:(e,t,r)=>{"use strict";var n=r(6308);e.exports=function(e){for(;!n(e););return e}},5265:e=>{"use strict";var t=/[\0\t\n\r]/g;e.exports=function(){var e,r=!0,n=1,a="";return function(s,i,o){var d,c,l,u,p,f=[];s=a+s.toString(i),l=0,a="",r&&(65279===s.charCodeAt(0)&&l++,r=void 0);for(;l{"use strict";var n=r(5911),a=r(4485),s=r(1084),i=r(8375),o=r(3173),d=r(1339),c={name:"attention",tokenize:function(e,t){var r,n=s(this.previous);return function(t){return e.enter("attentionSequence"),r=t,a(t)};function a(i){var o,d,c,l;return i===r?(e.consume(i),a):(o=e.exit("attentionSequence"),c=!(d=s(i))||2===d&&n,l=!n||2===n&&d,o._open=42===r?c:c&&(n||!l),o._close=42===r?l:l&&(d||!c),t(i))}},resolveAll:function(e,t){var r,s,c,l,u,p,f,g,h=-1;for(;++h1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1)>1?"strongSequence":"emphasisSequence",start:i(d(e[r][1].end),-p),end:d(e[r][1].end)},u={type:p>1?"strongSequence":"emphasisSequence",start:d(e[h][1].start),end:i(d(e[h][1].start),p)},c={type:p>1?"strongText":"emphasisText",start:d(e[r][1].end),end:d(e[h][1].start)},s={type:p>1?"strong":"emphasis",start:d(l.start),end:d(u.end)},e[r][1].end=d(l.start),e[h][1].start=d(u.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=n(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=n(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",c,t]]),f=n(f,o(t.parser.constructs.insideSpan.null,e.slice(r+1,h),t)),f=n(f,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[h][1].end.offset-e[h][1].start.offset?(g=2,f=n(f,[["enter",e[h][1],t],["exit",e[h][1],t]])):g=0,a(e,r-1,h-r+3,f),h=r+f.length-g-2;break}h=-1;for(;++h{"use strict";var n=r(277),a=r(6995),s=r(3290),i=r(1207),o={name:"autolink",tokenize:function(e,t,r){var o=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),d};function d(t){return n(t)?(e.consume(t),c):s(t)?p(t):r(t)}function c(e){return 43===e||45===e||46===e||a(e)?l(e):p(e)}function l(t){return 58===t?(e.consume(t),u):(43===t||45===t||46===t||a(t))&&o++<32?(e.consume(t),l):p(t)}function u(t){return 62===t?(e.exit("autolinkProtocol"),m(t)):32===t||60===t||i(t)?r(t):(e.consume(t),u)}function p(t){return 64===t?(e.consume(t),o=0,f):s(t)?(e.consume(t),p):r(t)}function f(e){return a(e)?g(e):r(e)}function g(t){return 46===t?(e.consume(t),o=0,f):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",m(t)):h(t)}function h(t){return(45===t||a(t))&&o++<63?(e.consume(t),45===t?h:g):r(t)}function m(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};e.exports=o},581:(e,t,r)=>{"use strict";var n=r(9056),a=r(6231),s={name:"blockQuote",tokenize:function(e,t,r){var a=this;return function(t){if(62===t)return a.containerState.open||(e.enter("blockQuote",{_container:!0}),a.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),s;return r(t)};function s(r){return n(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return a(e,e.attempt(s,t,r),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};e.exports=s},3382:(e,t,r)=>{"use strict";var n=r(769),a={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),a};function a(a){return n(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}};e.exports=a},4671:(e,t,r)=>{"use strict";var n=r(4537),a=r(6995),s=r(1091),i=r(4900);function o(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var d=o(n),c={name:"characterReference",tokenize:function(e,t,r){var n,o,c=this,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),u};function u(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),n=31,o=a,f(t))}function p(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,o=i,f):(e.enter("characterReferenceValue"),n=7,o=s,f(t))}function f(s){var i;return 59===s&&l?(i=e.exit("characterReferenceValue"),o!==a||d.default(c.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):o(s)&&l++{"use strict";var n=r(4392),a=r(6377),s=r(557),i=r(6231),o={name:"codeFenced",tokenize:function(e,t,r){var o,d=this,c={tokenize:function(e,t,r){var a=0;return i(e,s,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function s(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(t)}function d(t){return t===o?(e.consume(t),a++,d):a{"use strict";var n=r(4392),a=r(4485),s=r(557),i=r(6231),o={name:"codeIndented",tokenize:function(e,t,r){return e.attempt(d,a,r);function a(r){return null===r?t(r):n(r)?e.attempt(d,a,t)(r):(e.enter("codeFlowValue"),s(r))}function s(t){return null===t||n(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),s)}},resolve:function(e,t){var r={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return a(e,0,0,[["enter",r,t]]),a(e,e.length,0,[["exit",r,t]]),e}},d={tokenize:function(e,t,r){var a=this;return i(e,(function o(d){if(n(d))return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),i(e,o,"linePrefix",5);return s(a.events,"linePrefix")<4?r(d):t(d)}),"linePrefix",5)},partial:!0};e.exports=o},5518:(e,t,r)=>{"use strict";var n=r(4392),a={name:"codeText",tokenize:function(e,t,r){var a,s,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),i++,o):(e.exit("codeTextSequence"),d(t))}function d(t){return null===t?r(t):96===t?(s=e.enter("codeTextSequence"),a=0,l(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),d):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||n(t)?(e.exit("codeTextData"),d(t)):(e.consume(t),c)}function l(r){return 96===r?(e.consume(r),a++,l):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(s.type="codeTextData",c(r))}},resolve:function(e){var t,r,n=e.length-4,a=3;if(("lineEnding"===e[a][1].type||"space"===e[a][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type))for(t=a;++t{"use strict";var n=r(4392),a=r(557),s=r(6308),i=r(6231),o={tokenize:function(e,t){var r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(t)};function a(t){return null===t?s(t):n(t)?e.check(d,i,s)(t):(e.consume(t),a)}function s(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function i(t){return e.consume(t),e.exit("chunkContent"),r=r.next=e.enter("chunkContent",{contentType:"content",previous:r}),a}},resolve:function(e){return s(e),e},interruptible:!0,lazy:!0},d={tokenize:function(e,t,r){var s=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i(e,o,"linePrefix")};function o(i){return null===i||n(i)?r(i):s.parser.constructs.disable.null.indexOf("codeIndented")>-1||a(s.events,"linePrefix")<4?e.interrupt(s.parser.constructs.flow,r,t)(i):t(i)}},partial:!0};e.exports=o},8194:(e,t,r)=>{"use strict";var n=r(4392),a=r(6377),s=r(4991),i=r(4559),o=r(9304),d=r(6231),c=r(9943),l=r(5191),u={name:"definition",tokenize:function(e,t,r){var a,l=this;return function(t){return e.enter("definition"),o.call(l,e,u,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function u(t){return a=s(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),c(e,i(e,e.attempt(p,d(e,f,"whitespace"),d(e,f,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function f(s){return null===s||n(s)?(e.exit("definition"),l.parser.defined.indexOf(a)<0&&l.parser.defined.push(a),t(s)):r(s)}}},p={tokenize:function(e,t,r){return function(t){return a(t)?c(e,s)(t):r(t)};function s(t){return 34===t||39===t||40===t?l(e,d(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||n(e)?t(e):r(e)}},partial:!0};e.exports=u},4559:(e,t,r)=>{"use strict";var n=r(1207),a=r(6377),s=r(4392);e.exports=function(e,t,r,i,o,d,c,l,u){var p=u||1/0,f=0;return function(t){if(60===t)return e.enter(i),e.enter(o),e.enter(d),e.consume(t),e.exit(d),g;if(n(t)||41===t)return r(t);return e.enter(i),e.enter(c),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(t)};function g(r){return 62===r?(e.enter(d),e.consume(r),e.exit(d),e.exit(o),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(l),g(t)):null===t||60===t||s(t)?r(t):(e.consume(t),92===t?m:h)}function m(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function y(s){return 40===s?++f>p?r(s):(e.consume(s),y):41===s?f--?(e.consume(s),y):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(i),t(s)):null===s||a(s)?f?r(s):(e.exit("chunkString"),e.exit(l),e.exit(c),e.exit(i),t(s)):n(s)?r(s):(e.consume(s),92===s?v:y)}function v(t){return 40===t||41===t||92===t?(e.consume(t),y):y(t)}}},9304:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056);e.exports=function(e,t,r,s,i,o){var d,c=this,l=0;return function(t){return e.enter(s),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(a){return null===a||91===a||93===a&&!d||94===a&&!l&&"_hiddenFootnoteSupport"in c.parser.constructs||l>999?r(a):93===a?(e.exit(o),e.enter(i),e.consume(a),e.exit(i),e.exit(s),t):n(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(a))}function p(t){return null===t||91===t||93===t||n(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),d=d||!a(t),92===t?f:p)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,p):p(t)}}},6231:(e,t,r)=>{"use strict";var n=r(9056);e.exports=function(e,t,r,a){var s=a?a-1:1/0,i=0;return function(a){if(n(a))return e.enter(r),o(a);return t(a)};function o(a){return n(a)&&i++{"use strict";var n=r(4392),a=r(6231);e.exports=function(e,t,r,s,i,o){var d;return function(t){return e.enter(s),e.enter(i),e.consume(t),e.exit(i),d=40===t?41:t,c};function c(r){return r===d?(e.enter(i),e.consume(r),e.exit(i),e.exit(s),t):(e.enter(o),l(r))}function l(t){return t===d?(e.exit(o),c(d)):null===t?r(t):n(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===d||null===t||n(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?p:u)}function p(t){return t===d||92===t?(e.consume(t),u):u(t)}}},9943:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056),s=r(6231);e.exports=function(e,t){var r;return function i(o){if(n(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,i;if(a(o))return s(e,i,r?"linePrefix":"lineSuffix")(o);return t(o)}}},462:(e,t,r)=>{"use strict";var n=r(4392),a={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),a};function a(a){return n(a)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(a)):r(a)}}};e.exports=a},1034:(e,t,r)=>{"use strict";var n=r(4392),a=r(6377),s=r(9056),i=r(4485),o=r(6231),d={name:"headingAtx",tokenize:function(e,t,r){var i=this,d=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),c(t)};function c(n){return 35===n&&d++<6?(e.consume(n),c):null===n||a(n)?(e.exit("atxHeadingSequence"),i.interrupt?t(n):l(n)):r(n)}function l(r){return 35===r?(e.enter("atxHeadingSequence"),u(r)):null===r||n(r)?(e.exit("atxHeading"),t(r)):s(r)?o(e,l,"whitespace")(r):(e.enter("atxHeadingText"),p(r))}function u(t){return 35===t?(e.consume(t),u):(e.exit("atxHeadingSequence"),l(t))}function p(t){return null===t||35===t||a(t)?(e.exit("atxHeadingText"),l(t)):(e.consume(t),p)}},resolve:function(e,t){var r,n,a=e.length-2,s=3;"whitespace"===e[s][1].type&&(s+=2);a-2>s&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(s===a-1||a-4>s&&"whitespace"===e[a-2][1].type)&&(a-=s+1===a?2:4);a>s&&(r={type:"atxHeadingText",start:e[s][1].start,end:e[a][1].end},n={type:"chunkText",start:e[s][1].start,end:e[a][1].end,contentType:"text"},i(e,s,a-s+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};e.exports=d},4428:(e,t,r)=>{"use strict";var n=r(277),a=r(6995),s=r(4392),i=r(6377),o=r(9056),d=r(9393),c=r(8971),l=r(7322),u=r(6941),p={name:"htmlFlow",tokenize:function(e,t,r){var u,p,g,h,m,y=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),v};function v(a){return 33===a?(e.consume(a),b):47===a?(e.consume(a),E):63===a?(e.consume(a),u=3,y.interrupt?t:G):n(a)?(e.consume(a),g=d(a),p=!0,T):r(a)}function b(a){return 45===a?(e.consume(a),u=2,x):91===a?(e.consume(a),u=5,g="CDATA[",h=0,R):n(a)?(e.consume(a),u=4,y.interrupt?t:G):r(a)}function x(n){return 45===n?(e.consume(n),y.interrupt?t:G):r(n)}function R(n){return n===g.charCodeAt(h++)?(e.consume(n),h===g.length?y.interrupt?t:N:R):r(n)}function E(t){return n(t)?(e.consume(t),g=d(t),T):r(t)}function T(n){return null===n||47===n||62===n||i(n)?47!==n&&p&&l.indexOf(g.toLowerCase())>-1?(u=1,y.interrupt?t(n):N(n)):c.indexOf(g.toLowerCase())>-1?(u=6,47===n?(e.consume(n),w):y.interrupt?t(n):N(n)):(u=7,y.interrupt?r(n):p?j(n):S(n)):45===n||a(n)?(e.consume(n),g+=d(n),T):r(n)}function w(n){return 62===n?(e.consume(n),y.interrupt?t:N):r(n)}function S(t){return o(t)?(e.consume(t),S):D(t)}function j(t){return 47===t?(e.consume(t),D):58===t||95===t||n(t)?(e.consume(t),A):o(t)?(e.consume(t),j):D(t)}function A(t){return 45===t||46===t||58===t||95===t||a(t)?(e.consume(t),A):C(t)}function C(t){return 61===t?(e.consume(t),k):o(t)?(e.consume(t),C):j(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),m=t,_):o(t)?(e.consume(t),k):(m=void 0,P(t))}function _(t){return t===m?(e.consume(t),I):null===t||s(t)?r(t):(e.consume(t),_)}function P(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||i(t)?C(t):(e.consume(t),P)}function I(e){return 47===e||62===e||o(e)?j(e):r(e)}function D(t){return 62===t?(e.consume(t),O):r(t)}function O(t){return o(t)?(e.consume(t),O):null===t||s(t)?N(t):r(t)}function N(t){return 45===t&&2===u?(e.consume(t),L):60===t&&1===u?(e.consume(t),B):62===t&&4===u?(e.consume(t),W):63===t&&3===u?(e.consume(t),G):93===t&&5===u?(e.consume(t),H):!s(t)||6!==u&&7!==u?null===t||s(t)?F(t):(e.consume(t),N):e.check(f,W,F)(t)}function F(t){return e.exit("htmlFlowData"),M(t)}function M(t){return null===t?K(t):s(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M):(e.enter("htmlFlowData"),N(t))}function L(t){return 45===t?(e.consume(t),G):N(t)}function B(t){return 47===t?(e.consume(t),g="",U):N(t)}function U(t){return 62===t&&l.indexOf(g.toLowerCase())>-1?(e.consume(t),W):n(t)&&g.length<8?(e.consume(t),g+=d(t),U):N(t)}function H(t){return 93===t?(e.consume(t),G):N(t)}function G(t){return 62===t?(e.consume(t),W):N(t)}function W(t){return null===t||s(t)?(e.exit("htmlFlowData"),K(t)):(e.consume(t),W)}function K(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},f={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(u,t,r)}},partial:!0};e.exports=p},4945:(e,t,r)=>{"use strict";var n=r(277),a=r(6995),s=r(4392),i=r(6377),o=r(9056),d=r(6231),c={name:"htmlText",tokenize:function(e,t,r){var c,l,u,p,f=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),g};function g(t){return 33===t?(e.consume(t),h):47===t?(e.consume(t),C):63===t?(e.consume(t),j):n(t)?(e.consume(t),P):r(t)}function h(t){return 45===t?(e.consume(t),m):91===t?(e.consume(t),l="CDATA[",u=0,R):n(t)?(e.consume(t),S):r(t)}function m(t){return 45===t?(e.consume(t),y):r(t)}function y(t){return null===t||62===t?r(t):45===t?(e.consume(t),v):b(t)}function v(e){return null===e||62===e?r(e):b(e)}function b(t){return null===t?r(t):45===t?(e.consume(t),x):s(t)?(p=b,B(t)):(e.consume(t),b)}function x(t){return 45===t?(e.consume(t),H):b(t)}function R(t){return t===l.charCodeAt(u++)?(e.consume(t),u===l.length?E:R):r(t)}function E(t){return null===t?r(t):93===t?(e.consume(t),T):s(t)?(p=E,B(t)):(e.consume(t),E)}function T(t){return 93===t?(e.consume(t),w):E(t)}function w(t){return 62===t?H(t):93===t?(e.consume(t),w):E(t)}function S(t){return null===t||62===t?H(t):s(t)?(p=S,B(t)):(e.consume(t),S)}function j(t){return null===t?r(t):63===t?(e.consume(t),A):s(t)?(p=j,B(t)):(e.consume(t),j)}function A(e){return 62===e?H(e):j(e)}function C(t){return n(t)?(e.consume(t),k):r(t)}function k(t){return 45===t||a(t)?(e.consume(t),k):_(t)}function _(t){return s(t)?(p=_,B(t)):o(t)?(e.consume(t),_):H(t)}function P(t){return 45===t||a(t)?(e.consume(t),P):47===t||62===t||i(t)?I(t):r(t)}function I(t){return 47===t?(e.consume(t),H):58===t||95===t||n(t)?(e.consume(t),D):s(t)?(p=I,B(t)):o(t)?(e.consume(t),I):H(t)}function D(t){return 45===t||46===t||58===t||95===t||a(t)?(e.consume(t),D):O(t)}function O(t){return 61===t?(e.consume(t),N):s(t)?(p=O,B(t)):o(t)?(e.consume(t),O):I(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,F):s(t)?(p=N,B(t)):o(t)?(e.consume(t),N):(e.consume(t),c=void 0,L)}function F(t){return t===c?(e.consume(t),M):null===t?r(t):s(t)?(p=F,B(t)):(e.consume(t),F)}function M(e){return 62===e||47===e||i(e)?I(e):r(e)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||i(t)?I(t):(e.consume(t),L)}function B(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d(e,U,"linePrefix",f.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function U(t){return e.enter("htmlTextData"),p(t)}function H(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};e.exports=c},9255:(e,t,r)=>{"use strict";var n=r(6377),a=r(5911),s=r(4485),i=r(4991),o=r(3173),d=r(1339),c=r(4559),l=r(9304),u=r(5191),p=r(9943),f={name:"labelEnd",tokenize:function(e,t,r){var n,a,s=this,o=s.events.length;for(;o--;)if(("labelImage"===s.events[o][1].type||"labelLink"===s.events[o][1].type)&&!s.events[o][1]._balanced){n=s.events[o][1];break}return function(t){if(!n)return r(t);return n._inactive?c(t):(a=s.parser.defined.indexOf(i(s.sliceSerialize({start:n.end,end:s.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),d)};function d(r){return 40===r?e.attempt(g,t,a?t:c)(r):91===r?e.attempt(h,t,a?e.attempt(m,t,c):c)(r):a?t(r):c(r)}function c(e){return n._balanced=!0,r(e)}},resolveTo:function(e,t){var r,n,i,c,l,u,p,f=e.length,g=0;for(;f--;)if(c=e[f][1],l){if("link"===c.type||"labelLink"===c.type&&c._inactive)break;"enter"===e[f][0]&&"labelLink"===c.type&&(c._inactive=!0)}else if(u){if("enter"===e[f][0]&&("labelImage"===c.type||"labelLink"===c.type)&&!c._balanced&&(l=f,"labelLink"!==c.type)){g=2;break}}else"labelEnd"===c.type&&(u=f);return r={type:"labelLink"===e[l][1].type?"link":"image",start:d(e[l][1].start),end:d(e[e.length-1][1].end)},n={type:"label",start:d(e[l][1].start),end:d(e[u][1].end)},i={type:"labelText",start:d(e[l+g+2][1].end),end:d(e[u-2][1].start)},p=a(p=[["enter",r,t],["enter",n,t]],e.slice(l+1,l+g+3)),p=a(p,[["enter",i,t]]),p=a(p,o(t.parser.constructs.insideSpan.null,e.slice(l+g+4,u-3),t)),p=a(p,[["exit",i,t],e[u-2],e[u-1],["exit",n,t]]),p=a(p,e.slice(u+1)),p=a(p,[["exit",r,t]]),s(e,l,e.length,p),e},resolveAll:function(e){var t,r=-1;for(;++r{"use strict";var n={name:"labelStartImage",tokenize:function(e,t,r){var n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),s):r(t)}function s(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:r(9255).resolveAll};e.exports=n},721:(e,t,r)=>{"use strict";var n={name:"labelStartLink",tokenize:function(e,t,r){var n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:r(9255).resolveAll};e.exports=n},2836:(e,t,r)=>{"use strict";var n=r(6231),a={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n(e,t,"linePrefix")}}};e.exports=a},1699:(e,t,r)=>{"use strict";var n=r(1091),a=r(9056),s=r(557),i=r(353),o=r(6231),d=r(6941),c=r(5861),l={name:"list",tokenize:function(e,t,r){var o=this,l=s(o.events,"linePrefix"),p=0;return function(t){var a=o.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!o.containerState.marker||t===o.containerState.marker:n(t)){if(o.containerState.type||(o.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(c,r,g)(t):g(t);if(!o.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(t)}return r(t)};function f(t){return n(t)&&++p<10?(e.consume(t),f):(!o.interrupt||p<2)&&(o.containerState.marker?t===o.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),g(t)):r(t)}function g(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||t,e.check(d,o.interrupt?r:h,e.attempt(u,y,m))}function h(e){return o.containerState.initialBlankLine=!0,l++,y(e)}function m(t){return a(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),y):r(t)}function y(r){return o.containerState.size=l+i(o.sliceStream(e.exit("listItemPrefix"))),t(r)}},continuation:{tokenize:function(e,t,r){var n=this;return n.containerState._closeFlow=void 0,e.check(d,(function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,o(e,t,"listItemIndent",n.containerState.size+1)(r)}),(function(r){if(n.containerState.furtherBlankLines||!a(r))return n.containerState.furtherBlankLines=n.containerState.initialBlankLine=void 0,s(r);return n.containerState.furtherBlankLines=n.containerState.initialBlankLine=void 0,e.attempt(p,t,s)(r)}));function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,o(e,e.attempt(l,t,r),"linePrefix",n.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},u={tokenize:function(e,t,r){var n=this;return o(e,(function(e){return a(e)||!s(n.events,"listItemPrefixWhitespace")?r(e):t(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},p={tokenize:function(e,t,r){var n=this;return o(e,(function(e){return s(n.events,"listItemIndent")===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};e.exports=l},6941:(e,t,r)=>{"use strict";var n=r(4392),a=r(6231),s={tokenize:function(e,t,r){return a(e,(function(e){return null===e||n(e)?t(e):r(e)}),"linePrefix")},partial:!0};e.exports=s},1862:(e,t,r)=>{"use strict";var n=r(4392),a=r(1339),s=r(6231),i={name:"setextUnderline",tokenize:function(e,t,r){var a,i,o=this,d=o.events.length;for(;d--;)if("lineEnding"!==o.events[d][1].type&&"linePrefix"!==o.events[d][1].type&&"content"!==o.events[d][1].type){i="paragraph"===o.events[d][1].type;break}return function(t){if(!o.lazy&&(o.interrupt||i))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),a=t,c(t);return r(t)};function c(t){return t===a?(e.consume(t),c):(e.exit("setextHeadingLineSequence"),s(e,l,"lineSuffix")(t))}function l(a){return null===a||n(a)?(e.exit("setextHeadingLine"),t(a)):r(a)}},resolveTo:function(e,t){var r,n,s,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),s||"definition"!==e[o][1].type||(s=o);i={type:"setextHeading",start:a(e[n][1].start),end:a(e[e.length-1][1].end)},e[n][1].type="setextHeadingText",s?(e.splice(n,0,["enter",i,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end=a(e[s][1].end)):e[r][1]=i;return e.push(["exit",i,t]),e}};e.exports=i},5861:(e,t,r)=>{"use strict";var n=r(4392),a=r(9056),s=r(6231),i={name:"thematicBreak",tokenize:function(e,t,r){var i,o=0;return function(t){return e.enter("thematicBreak"),i=t,d(t)};function d(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):a(l)?s(e,d,"whitespace")(l):o<3||null!==l&&!n(l)?r(l):(e.exit("thematicBreak"),t(l))}function c(t){return t===i?(e.consume(t),o++,c):(e.exit("thematicBreakSequence"),d(t))}}};e.exports=i},5911:(e,t,r)=>{"use strict";var n=r(4485);e.exports=function(e,t){return e.length?(n(e,e.length,0,t),e):t}},4485:(e,t,r)=>{"use strict";var n=r(7327);e.exports=function(e,t,r,a){var s,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,a.length<1e4)(s=Array.from(a)).unshift(t,r),n.apply(e,s);else for(r&&n.apply(e,[t,r]);o{"use strict";var n=r(6377),a=r(5414),s=r(6548);e.exports=function(e){return null===e||n(e)||s(e)?1:a(e)?2:void 0}},6369:(e,t,r)=>{"use strict";var n=r(8025),a=r(4485),s=r(9990);function i(e,t){var r,a,i,d;for(r in t)for(d in a=n.call(e,r)?e[r]:e[r]={},i=t[r])a[d]=o(s(i[d]),n.call(a,d)?a[d]:[])}function o(e,t){for(var r=-1,n=[];++r{"use strict";var n=r(3667),a=r(4392),s=r(5911),i=r(4485),o=r(9990),d=r(3173),c=r(6392),l=r(1339),u=r(2569);e.exports=function(e,t,r){var p=r?l(r):{line:1,column:1,offset:0},f={},g=[],h=[],m=[],y={consume:function(e){a(e)?(p.line++,p.column=1,p.offset+=-3===e?2:1,A()):-1!==e&&(p.column++,p.offset++);p._bufferIndex<0?p._index++:(p._bufferIndex++,p._bufferIndex===h[p._index].length&&(p._bufferIndex=-1,p._index++));v.previous=e},enter:function(e,t){var r=t||{};return r.type=e,r.start=R(),v.events.push(["enter",r,v]),m.push(r),r},exit:function(e){var t=m.pop();return t.end=R(),v.events.push(["exit",t,v]),t},attempt:S((function(e,t){j(e,t.from)})),check:S(w),interrupt:S(w,{interrupt:!0}),lazy:S(w,{lazy:!0})},v={previous:null,events:[],parser:e,sliceStream:x,sliceSerialize:function(e){return c(x(e))},now:R,defineSkip:function(e){f[e.line]=e.column,A()},write:function(e){if(h=s(h,e),E(),null!==h[h.length-1])return[];return j(t,0),v.events=d(g,v.events,v),v.events}},b=t.tokenize.call(v,y);return t.resolveAll&&g.push(t),p._index=0,p._bufferIndex=-1,v;function x(e){return u(h,e)}function R(){return l(p)}function E(){for(var e,t;p._index-1)return h();return e.tokenize.call(t?n({},v,t):v,y,g,h)(r)}}function g(t){return e(c,l),a}function h(e){return l.restore(),++d{"use strict";e.exports=function(e){return null===e||void 0===e?[]:"length"in e?e:[e]}},8375:e=>{"use strict";e.exports=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}},4991:e=>{"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},557:(e,t,r)=>{"use strict";var n=r(353);e.exports=function(e,t){var r=e[e.length-1];return r&&r[1].type===t?n(r[2].sliceStream(r[1])):0}},8254:(e,t,r)=>{"use strict";var n=r(9393);e.exports=function(e){return function(t){return e.test(n(t))}}},3173:e=>{"use strict";e.exports=function(e,t,r){for(var n,a=[],s=-1;++s{"use strict";var n=r(9393);e.exports=function(e,t){var r=parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535===(65535&r)||65534===(65535&r)||r>1114111?"\ufffd":n(r)}},6392:(e,t,r)=>{"use strict";var n=r(9393);e.exports=function(e){for(var t,r,a,s=-1,i=[];++s{"use strict";var n=r(3667);e.exports=function(e){return n({},e)}},353:e=>{"use strict";e.exports=function(e){for(var t=-1,r=0;++t{"use strict";e.exports=function(e,t){var r,n=t.start._index,a=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;return n===s?r=[e[n].slice(a,i)]:(r=e.slice(n,s),a>-1&&(r[0]=r[0].slice(a)),i>0&&r.push(e[s].slice(0,i))),r}},6308:(e,t,r)=>{"use strict";var n=r(3667),a=r(4485),s=r(1339);function i(e,t){for(var r,n,s,i,o,d,c=e[t][1],l=e[t][2],u=t-1,p=[],f=c._tokenizer||l.parser[c.contentType](c.start),g=f.events,h=[],m={};c;){for(;e[++u][1]!==c;);p.push(u),c._tokenizer||(r=l.sliceStream(c),c.next||r.push(null),n&&f.defineSkip(c.start),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(r),c.isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),n=c,c=c.next}for(c=n,s=g.length;s--;)"enter"===g[s][0]?i=!0:i&&g[s][1].type===g[s-1][1].type&&g[s][1].start.line!==g[s][1].end.line&&(y(g.slice(s+1,o)),c._tokenizer=c.next=void 0,c=c.previous,o=s+1);for(f.events=c._tokenizer=c.next=void 0,y(g.slice(0,o)),s=-1,d=0;++s{"use strict";var t;e.exports=function(e){var r,n="&"+e+";";if((t=t||document.createElement("i")).innerHTML=n,59===(r=t.textContent).charCodeAt(r.length-1)&&"semi"!==e)return!1;return r!==n&&r}},1676:(e,t,r)=>{"use strict";e.exports=function(e){var t=this;this.Parser=function(r){return n(r,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var n=r(5184)},6745:(e,t,r)=>{"use strict";var n=r(4918);e.exports=s,s.wrap=n;var a=[].slice;function s(){var e=[],t={run:function(){var t=-1,r=a.call(arguments,0,-1),s=arguments[arguments.length-1];if("function"!==typeof s)throw new Error("Expected function as last argument, not "+s);(function i(o){var d=e[++t],c=a.call(arguments,0).slice(1),l=r.length,u=-1;if(o)s(o);else{for(;++u{"use strict";var t=[].slice;e.exports=function(e,r){var n;return function(){var r,i=t.call(arguments,0),o=e.length>i.length;o&&i.push(a);try{r=e.apply(null,i)}catch(d){if(o&&n)throw d;return a(d)}o||(r&&"function"===typeof r.then?r.then(s,a):r instanceof Error?a(r):s(r))};function a(){n||(n=!0,r.apply(null,arguments))}function s(e){a(null,e)}}},282:(e,t,r)=>{"use strict";var n=r(6415),a=r(1046),s=r(432),i=r(3731),o=r(6745),d=r(9418);e.exports=function e(){var t,r=[],a=o(),v={},b=-1;return x.data=function(e,r){if("string"===typeof e)return 2===arguments.length?(h("data",t),v[e]=r,x):l.call(v,e)&&v[e]||null;if(e)return h("data",t),v=e,x;return v},x.freeze=R,x.attachers=r,x.use=function(e){var n;if(h("use",t),null===e||void 0===e);else if("function"===typeof e)l.apply(null,arguments);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?d(e):a(e)}n&&(v.settings=s(v.settings||{},n));return x;function a(e){d(e.plugins),e.settings&&(n=s(n||{},e.settings))}function o(e){if("function"===typeof e)l(e);else{if("object"!==typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):a(e)}}function d(e){var t=-1;if(null===e||void 0===e);else{if("object"!==typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t{"use strict";var t={}.hasOwnProperty;function r(e){return e&&"object"===typeof e||(e={}),a(e.line)+":"+a(e.column)}function n(e){return e&&"object"===typeof e||(e={}),r(e.start)+"-"+r(e.end)}function a(e){return e&&"number"===typeof e?e:1}e.exports=function(e){if(!e||"object"!==typeof e)return"";if(t.call(e,"position")||t.call(e,"type"))return n(e.position);if(t.call(e,"start")||t.call(e,"end"))return n(e);if(t.call(e,"line")||t.call(e,"column"))return r(e);return""}},851:(e,t,r)=>{"use strict";var n=r(6934);function a(){}e.exports=i,a.prototype=Error.prototype,i.prototype=new a;var s=i.prototype;function i(e,t,r){var a,s,i;"string"===typeof t&&(r=t,t=null),a=function(e){var t,r=[null,null];"string"===typeof e&&(-1===(t=e.indexOf(":"))?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1)));return r}(r),s=n(t)||"1:1",i={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(i=t,t=t.start):i.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=s,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=i,this.source=a[0],this.ruleId=a[1]}s.file="",s.name="",s.reason="",s.message="",s.stack="",s.fatal=null,s.column=null,s.line=null},9418:(e,t,r)=>{"use strict";e.exports=r(2276)},8884:(e,t,r)=>{"use strict";var n=r(4322),a=r(8833),s=r(1046);e.exports=d;var i={}.hasOwnProperty,o=["history","path","basename","stem","extname","dirname"];function d(e){var t,r;if(e){if("string"===typeof e||s(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof d))return new d(e);for(this.data={},this.messages=[],this.history=[],this.cwd=a.cwd(),r=-1;++r-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+n.sep+"`")}function l(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function u(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}d.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(d.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){l(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(d.prototype,"dirname",{get:function(){return"string"===typeof this.path?n.dirname(this.path):void 0},set:function(e){u(this.path,"dirname"),this.path=n.join(e||"",this.basename)}}),Object.defineProperty(d.prototype,"basename",{get:function(){return"string"===typeof this.path?n.basename(this.path):void 0},set:function(e){l(e,"basename"),c(e,"basename"),this.path=n.join(this.dirname||"",e)}}),Object.defineProperty(d.prototype,"extname",{get:function(){return"string"===typeof this.path?n.extname(this.path):void 0},set:function(e){if(c(e,"extname"),u(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=n.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(d.prototype,"stem",{get:function(){return"string"===typeof this.path?n.basename(this.path,this.extname):void 0},set:function(e){l(e,"stem"),c(e,"stem"),this.path=n.join(this.dirname||"",e+(this.extname||""))}})},2276:(e,t,r)=>{"use strict";var n=r(851),a=r(8884);e.exports=a,a.prototype.message=function(e,t,r){var a=new n(e,t,r);this.path&&(a.name=this.path+":"+a.name,a.file=this.path);return a.fatal=!1,this.messages.push(a),a},a.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},a.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}},4322:(e,t)=>{"use strict";function r(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}t.basename=function(e,t){var n,a,s,i,o=0,d=-1;if(void 0!==t&&"string"!==typeof t)throw new TypeError('"ext" argument must be a string');if(r(e),n=e.length,void 0===t||!t.length||t.length>e.length){for(;n--;)if(47===e.charCodeAt(n)){if(s){o=n+1;break}}else d<0&&(s=!0,d=n+1);return d<0?"":e.slice(o,d)}if(t===e)return"";a=-1,i=t.length-1;for(;n--;)if(47===e.charCodeAt(n)){if(s){o=n+1;break}}else a<0&&(s=!0,a=n+1),i>-1&&(e.charCodeAt(n)===t.charCodeAt(i--)?i<0&&(d=n):(i=-1,d=a));o===d?d=a:d<0&&(d=e.length);return e.slice(o,d)},t.dirname=function(e){var t,n,a;if(r(e),!e.length)return".";t=-1,a=e.length;for(;--a;)if(47===e.charCodeAt(a)){if(n){t=a;break}}else n||(n=!0);return t<0?47===e.charCodeAt(0)?"/":".":1===t&&47===e.charCodeAt(0)?"//":e.slice(0,t)},t.extname=function(e){var t,n,a,s=-1,i=0,o=-1,d=0;r(e),a=e.length;for(;a--;)if(47!==(n=e.charCodeAt(a)))o<0&&(t=!0,o=a+1),46===n?s<0?s=a:1!==d&&(d=1):s>-1&&(d=-1);else if(t){i=a+1;break}if(s<0||o<0||0===d||1===d&&s===o-1&&s===i+1)return"";return e.slice(s,o)},t.join=function(){var e,t=-1;for(;++t2){if((n=a.lastIndexOf("/"))!==a.length-1){n<0?(a="",s=0):s=(a=a.slice(0,n)).length-1-a.lastIndexOf("/"),i=d,o=0;continue}}else if(a.length){a="",s=0,i=d,o=0;continue}t&&(a=a.length?a+"/..":"..",s=2)}else a.length?a+="/"+e.slice(i+1,d):a=e.slice(i+1,d),s=d-i-1;i=d,o=0}else 46===r&&o>-1?o++:o=-1}return a}(e,!t),n.length||t||(n=".");n.length&&47===e.charCodeAt(e.length-1)&&(n+="/");return t?"/"+n:n}(e)},t.sep="/"},8833:(e,t)=>{"use strict";t.cwd=function(){return"/"}},4400:e=>{"use strict";var t,r="";e.exports=function(e,n){if("string"!==typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var a=e.length*n;if(t!==e||"undefined"===typeof t)t=e,r="";else if(r.length>=a)return r.substr(0,a);for(;a>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,a)}},4478:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0>>1,a=e[n];if(!(0>>1;ns(d,r))cs(l,d)?(e[n]=l,e[c]=r,n=c):(e[n]=d,e[o]=r,n=o);else{if(!(cs(l,r)))break e;e[n]=l,e[c]=r,n=c}}}return t}function s(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,d=o.now();t.unstable_now=function(){return o.now()-d}}var c=[],l=[],u=1,p=null,f=3,g=!1,h=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=n(l);null!==t;){if(null===t.callback)a(l);else{if(!(t.startTime<=e))break;a(l),t.sortIndex=t.expirationTime,r(c,t)}t=n(l)}}function R(e){if(m=!1,x(e),!h)if(null!==n(c))h=!0,D(E);else{var t=n(l);null!==t&&O(R,t.startTime-e)}}function E(e,r){h=!1,m&&(m=!1,v(j),j=-1),g=!0;var s=f;try{for(x(r),p=n(c);null!==p&&(!(p.expirationTime>r)||e&&!k());){var i=p.callback;if("function"===typeof i){p.callback=null,f=p.priorityLevel;var o=i(p.expirationTime<=r);r=t.unstable_now(),"function"===typeof o?p.callback=o:p===n(c)&&a(c),x(r)}else a(c);p=n(c)}if(null!==p)var d=!0;else{var u=n(l);null!==u&&O(R,u.startTime-r),d=!1}return d}finally{p=null,f=s,g=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var T,w=!1,S=null,j=-1,A=5,C=-1;function k(){return!(t.unstable_now()-Ce||125i?(e.sortIndex=s,r(l,e),null===n(c)&&e===n(l)&&(m?(v(j),j=-1):m=!0,O(R,s-i))):(e.sortIndex=o,r(c,e),h||g||(h=!0,D(E))),e},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(e){var t=f;return function(){var r=f;f=t;try{return e.apply(this,arguments)}finally{f=r}}}},7029:(e,t,r)=>{"use strict";e.exports=r(4478)},1985:e=>{e.exports=function(e,t,r,n){var a=r?r.call(n,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(t),d=0;d{var n=r(5965);function a(e,t){var r,a=null;if(!e||"string"!==typeof e)return a;for(var s,i,o=n(e),d="function"===typeof t,c=0,l=o.length;c{var n=r(4040);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},6027:(e,t,r)=>{var n=r(7501).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!==n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4040:(e,t,r)=>{var n=r(7501).default,a=r(6027);e.exports=function(e){var t=a(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},7501:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},872:function(e,t,r){!function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!==typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var n=Object.freeze({__proto__:null,get DEFAULT_EXTENSIONS(){return Q7},get File(){return m$},get buildExternalHelpers(){return G$},get createConfigItem(){return W4},get createConfigItemAsync(){return H4},get createConfigItemSync(){return G4},get getEnv(){return sQ},get loadOptions(){return B4},get loadOptionsAsync(){return M4},get loadOptionsSync(){return L4},get loadPartialConfig(){return O4},get loadPartialConfigAsync(){return I4},get loadPartialConfigSync(){return D4},get parse(){return Y7},get parseAsync(){return J7},get parseSync(){return X7},get resolvePlugin(){return tQ},get resolvePreset(){return rQ},get template(){return ZU},get tokTypes(){return QL},get transform(){return M7},get transformAsync(){return B7},get transformFile(){return U7},get transformFileAsync(){return G7},get transformFileSync(){return H7},get transformFromAst(){return K7},get transformFromAstAsync(){return z7},get transformFromAstSync(){return q7},get transformSync(){return L7},get traverse(){return cq},get types(){return vR},get version(){return $7}});function a(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,s,i,o=[],d=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);d=!0);}catch(e){c=!0,a=e}finally{try{if(!d&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return o}}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",d=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var s=t&&t.prototype instanceof v?t:v,i=Object.create(s.prototype),o=new P(n||[]);return a(i,"_invoke",{value:A(e,r,o)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",g="suspendedYield",h="executing",m="completed",y={};function v(){}function b(){}function x(){}var R={};l(R,o,(function(){return this}));var E=Object.getPrototypeOf,T=E&&E(E(I([])));T&&T!==r&&n.call(T,o)&&(R=T);var w=x.prototype=v.prototype=Object.create(R);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(a,s,i,o){var d=p(e[a],e,s);if("throw"!==d.type){var c=d.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(l).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(d.arg)}var s;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return s=s?s.then(a,a):a()}})}function A(t,r,n){var a=f;return function(s,i){if(a===h)throw new Error("Generator is already running");if(a===m){if("throw"===s)throw i;return{value:e,done:!0}}for(n.method=s,n.arg=i;;){var o=n.delegate;if(o){var d=C(o,n);if(d){if(d===y)continue;return d}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=h;var c=p(t,r,n);if("normal"===c.type){if(a=n.done?m:g,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function C(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var s=p(a,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,y;var i=s.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function r(){for(;++a=0;--s){var i=this.tryEntries[s],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var d=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(d&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,r,n,a,s,i){try{var o=e[s](i),d=o.value}catch(xZ){return void r(xZ)}o.done?t(d):Promise.resolve(d).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var s=e.apply(t,r);function o(e){i(s,n,a,o,d,"next",e)}function d(e){i(s,n,a,o,d,"throw",e)}o(void 0)}))}}function d(e,t){for(var r=0;r=0||(a[r]=e[r]);return a}function v(e,t){if(null==e)return{};var r,n,a=y(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){return t||(t=e.slice(0)),e.raw=t,e}function R(e,t){return w(e)||a(e,t)||j(e,t)||k()}function E(e){return T(e)||S(e)||j(e)||C()}function T(e){if(Array.isArray(e))return A(e)}function w(e){if(Array.isArray(e))return e}function S(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function j(e,t){if(e){if("string"===typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function I(e){var t=P(e,"string");return"symbol"===typeof t?t:String(t)}var D=["Identifier","JSXIdentifier"],O=["MemberExpression"],N=["Identifier"],F=["Statement"],M=["Expression"],L=["Scopable","Pattern"],B=null,U=null,H=["VariableDeclaration"],G=null,W=null,K=null,q=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],z=["RestElement"],V=["RestElement"],Y=["ExistsTypeAnnotation"],X=["NumberLiteralTypeAnnotation"],J=["ForOfStatement"],$=Object.freeze({__proto__:null,BindingIdentifier:N,BlockScoped:U,ExistentialTypeParam:Y,Expression:M,Flow:q,ForAwaitStatement:J,Generated:W,NumericLiteralTypeAnnotation:X,Pure:K,Referenced:B,ReferencedIdentifier:D,ReferencedMemberExpression:O,RestProperty:z,Scope:L,SpreadProperty:V,Statement:F,User:G,Var:H});function Q(e,t){for(var r=0,n=Object.keys(t);ra.length)return!1;for(var i=0,o=s.length-1;i1)for(var r=1;re)return!1;if((r+=t[n+1])>=e)return!0}return!1}function qi(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Ui.test(String.fromCharCode(e)):Ki(e,Gi)))}function zi(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&Hi.test(String.fromCharCode(e)):Ki(e,Gi)||Ki(e,Wi))))}function Vi(e){for(var t=!0,r=0;r=48&&e<=57},so={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},io={bin:function(e){return 48===e||49===e},oct:function(e){return e>=48&&e<=55},dec:function(e){return e>=48&&e<=57},hex:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}};function oo(e,t,r,n,a,s){for(var i=r,o=n,d=a,c="",l=null,u=r,p=t.length;;){if(r>=p){s.unterminated(i,o,d),c+=t.slice(u,r);break}var f=t.charCodeAt(r);if(co(e,f,t,r)){c+=t.slice(u,r);break}if(92===f){c+=t.slice(u,r);var g=lo(t,r,n,a,"template"===e,s);null!==g.ch||l?c+=g.ch:l={pos:r,lineStart:n,curLine:a},r=g.pos,n=g.lineStart,a=g.curLine,u=r}else 8232===f||8233===f?(++a,n=++r):10===f||13===f?"template"===e?(c+=t.slice(u,r)+"\n",++r,13===f&&10===t.charCodeAt(r)&&++r,++a,u=n=r):s.unterminated(i,o,d):++r}return{pos:r,str:c,firstInvalidLoc:l,lineStart:n,curLine:a,containsInvalid:!!l}}function co(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function lo(e,t,r,n,a,s){var i=!a;t++;var o=function(e){return{pos:t,ch:e,lineStart:r,curLine:n}},d=e.charCodeAt(t++);switch(d){case 110:return o("\n");case 114:return o("\r");case 120:var c,l=uo(e,t,r,n,2,!1,i,s);return c=l.code,t=l.pos,o(null===c?null:String.fromCharCode(c));case 117:var u,p=fo(e,t,r,n,i,s);return u=p.code,t=p.pos,o(null===u?null:String.fromCodePoint(u));case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(a)return o(null);s.strictNumericEscape(t-1,r,n);default:if(d>=48&&d<=55){var f=t-1,g=e.slice(f,t+2).match(/^[0-7]+/)[0],h=parseInt(g,8);h>255&&(g=g.slice(0,-1),h=parseInt(g,8)),t+=g.length-1;var m=e.charCodeAt(t);if("0"!==g||56===m||57===m){if(a)return o(null);s.strictNumericEscape(f,r,n)}return o(String.fromCharCode(h))}return o(String.fromCharCode(d))}}function uo(e,t,r,n,a,s,i,o){var d,c=t,l=po(e,t,r,n,16,a,s,!1,o,!i);return d=l.n,t=l.pos,null===d&&(i?o.invalidEscapeSequence(c,r,n):t=c-1),{code:d,pos:t}}function po(e,t,r,n,a,s,i,o,d,c){for(var l=t,u=16===a?so.hex:so.decBinOct,p=16===a?io.hex:10===a?io.dec:8===a?io.oct:io.bin,f=!1,g=0,h=0,m=null==s?1/0:s;h=97?y-97+10:y>=65?y-65+10:ao(y)?y-48:1/0)>=a){if(v<=9&&c)return{n:null,pos:t};if(v<=9&&d.invalidDigit(t,r,n,a))v=0;else{if(!i)break;v=0,f=!0}}++t,g=g*a+v}else{var b=e.charCodeAt(t-1),x=e.charCodeAt(t+1);if(o){if(Number.isNaN(x)||!p(x)||u.has(b)||u.has(x)){if(c)return{n:null,pos:t};d.unexpectedNumericSeparator(t,r,n)}}else{if(c)return{n:null,pos:t};d.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===l||null!=s&&t-l!==s||f?{n:null,pos:t}:{n:g,pos:t}}function fo(e,t,r,n,a,s){var i;if(123===e.charCodeAt(t)){var o=uo(e,++t,r,n,e.indexOf("}",t)-t,!0,a,s);if(i=o.code,t=o.pos,++t,null!==i&&i>1114111){if(!a)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else{var d=uo(e,t,r,n,4,!1,a,s);i=d.code,t=d.pos}return{code:i,pos:t}}var go=["consequent","body","alternate"],ho=["body","expressions"],mo=["left","init"],yo=["leadingComments","trailingComments","innerComments"],vo=["||","&&","??"],bo=["++","--"],xo=[">","<",">=","<="],Ro=["==","===","!=","!=="],Eo=[].concat(Ro,["in","instanceof"]),To=[].concat(E(Eo),xo),wo=["-","/","%","*","**","&","|",">>",">>>","<<","^"],So=["+"].concat(wo,E(To),["|>"]),jo=["=","+="].concat(E(wo.map((function(e){return e+"="}))),E(vo.map((function(e){return e+"="})))),Ao=["delete","!"],Co=["+","-","~"],ko=["typeof"],_o=["void","throw"].concat(Ao,Co,ko),Po={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},Io=Symbol.for("var used to be block scoped"),Do=Symbol.for("should not be considered a local binding"),Oo={},No={},Fo={},Mo={},Lo={},Bo={},Uo={};function Ho(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function Go(e){return{validate:e}}function Wo(e){return"string"===typeof e?Qo(e):Qo.apply(void 0,E(e))}function Ko(e){return Go(Wo(e))}function qo(e){return{validate:e,optional:!0}}function zo(e){return{validate:Wo(e),optional:!0}}function Vo(e){return nd(ed("array"),Jo(e))}function Yo(e){return Vo(Wo(e))}function Xo(e){return Go(Yo(e))}function Jo(e){function t(t,r,n){if(Array.isArray(n))for(var a=0;a=2&&"type"in t[0]&&"array"===t[0].type&&!("each"in t[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return n}var ad=["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate"],sd=["default","optional","deprecated","validate"],id={};function od(){for(var e=arguments.length,t=new Array(e),r=0;r0:d&&"object"===typeof d)throw new Error("field defaults can only be primitives or empty arrays currently");n[i]={default:Array.isArray(d)?[]:d,optional:o.optional,deprecated:o.deprecated,validate:o.validate}}for(var c=t.visitor||r.visitor||[],l=t.aliases||r.aliases||[],u=t.builder||r.builder||t.visitor||[],p=0,f=Object.keys(t);p+s+1)throw new TypeError("RestElement must be last element of "+a)}}}),cd("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:Qo("Expression"),optional:!0}}}),cd("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:nd(ed("array"),Jo(Qo("Expression")))}},aliases:["Expression"]}),cd("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:Qo("Expression")}}}),cd("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:Qo("Expression"),optional:!0},consequent:{validate:nd(ed("array"),Jo(Qo("Statement")))}}}),cd("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:Qo("Expression")},cases:{validate:nd(ed("array"),Jo(Qo("SwitchCase")))}}}),cd("ThisExpression",{aliases:["Expression"]}),cd("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:Qo("Expression")}}}),cd("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:nd(Qo("BlockStatement"),Object.assign((function(e){if(ki.env.BABEL_TYPES_8_BREAKING&&!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")}),{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:!0,validate:Qo("CatchClause")},finalizer:{optional:!0,validate:Qo("BlockStatement")}}}),cd("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:Qo("Expression")},operator:{validate:$o.apply(void 0,E(_o))}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),cd("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:ki.env.BABEL_TYPES_8_BREAKING?Qo("Identifier","MemberExpression"):Qo("Expression")},operator:{validate:$o.apply(void 0,E(bo))}},visitor:["argument"],aliases:["Expression"]}),cd("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:ed("boolean"),optional:!0},kind:{validate:$o("var","let","const","using","await using")},declarations:{validate:nd(ed("array"),Jo(Qo("VariableDeclarator")))}},validate:function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&Mi("ForXStatement",e,{left:r})&&1!==r.declarations.length)throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a "+e.type)}}),cd("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!ki.env.BABEL_TYPES_8_BREAKING)return Qo("LVal");var e=Qo("Identifier","ArrayPattern","ObjectPattern"),t=Qo("Identifier");return function(r,n,a){(r.init?e:t)(r,n,a)}}()},definite:{optional:!0,validate:ed("boolean")},init:{optional:!0,validate:Qo("Expression")}}}),cd("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:Qo("Expression")},body:{validate:Qo("Statement")}}}),cd("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:Qo("Expression")},body:{validate:Qo("Statement")}}}),cd("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{left:{validate:Qo("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:Qo("Expression")},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0}})}),cd("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{elements:{validate:nd(ed("array"),Jo(Zo("null","PatternLike","LVal")))}})}),cd("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},ld(),ud(),{expression:{validate:ed("boolean")},body:{validate:Qo("BlockStatement","Expression")},predicate:{validate:Qo("DeclaredPredicate","InferredPredicate"),optional:!0}})}),cd("ClassBody",{visitor:["body"],fields:{body:{validate:nd(ed("array"),Jo(Qo("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")))}}}),cd("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:Qo("Identifier"),optional:!0},typeParameters:{validate:Qo("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:Qo("ClassBody")},superClass:{optional:!0,validate:Qo("Expression")},superTypeParameters:{validate:Qo("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:nd(ed("array"),Jo(Qo("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0},mixins:{validate:Qo("InterfaceExtends"),optional:!0}}}),cd("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:Qo("Identifier"),optional:!0},typeParameters:{validate:Qo("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:Qo("ClassBody")},superClass:{optional:!0,validate:Qo("Expression")},superTypeParameters:{validate:Qo("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:nd(ed("array"),Jo(Qo("TSExpressionWithTypeArguments","ClassImplements"))),optional:!0},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0},mixins:{validate:Qo("InterfaceExtends"),optional:!0},declare:{validate:ed("boolean"),optional:!0},abstract:{validate:ed("boolean"),optional:!0}},validate:function(){var e=Qo("Identifier");return function(t,r,n){ki.env.BABEL_TYPES_8_BREAKING&&(Mi("ExportDefaultDeclaration",t)||e(n,"id",n.id))}}()}),cd("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{source:{validate:Qo("StringLiteral")},exportKind:qo($o("type","value")),attributes:{optional:!0,validate:nd(ed("array"),Jo(Qo("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo(Qo("ImportAttribute")))}}}),cd("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{validate:Qo("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression")},exportKind:qo($o("value"))}}),cd("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:{optional:!0,validate:nd(Qo("Declaration"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")}),{oneOfNodeTypes:["Declaration"]}),(function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&e.source)throw new TypeError("Cannot export a declaration from a source")}))},attributes:{optional:!0,validate:nd(ed("array"),Jo(Qo("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo(Qo("ImportAttribute")))},specifiers:{default:[],validate:nd(ed("array"),Jo(function(){var e=Qo("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=Qo("ExportSpecifier");return ki.env.BABEL_TYPES_8_BREAKING?function(r,n,a){(r.source?e:t)(r,n,a)}:e}()))},source:{validate:Qo("StringLiteral"),optional:!0},exportKind:qo($o("type","value"))}}),cd("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:Qo("Identifier")},exported:{validate:Qo("Identifier","StringLiteral")},exportKind:{validate:$o("type","value"),optional:!0}}}),cd("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!ki.env.BABEL_TYPES_8_BREAKING)return Qo("VariableDeclaration","LVal");var e=Qo("VariableDeclaration"),t=Qo("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return function(r,n,a){Mi("VariableDeclaration",a)?e(r,n,a):t(r,n,a)}}()},right:{validate:Qo("Expression")},body:{validate:Qo("Statement")},await:{default:!1}}}),cd("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:{attributes:{optional:!0,validate:nd(ed("array"),Jo(Qo("ImportAttribute")))},assertions:{optional:!0,validate:nd(ed("array"),Jo(Qo("ImportAttribute")))},module:{optional:!0,validate:ed("boolean")},phase:{default:null,validate:$o("source","defer")},specifiers:{validate:nd(ed("array"),Jo(Qo("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:Qo("StringLiteral")},importKind:{validate:$o("type","typeof","value"),optional:!0}}}),cd("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:Qo("Identifier")}}}),cd("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:Qo("Identifier")}}}),cd("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:Qo("Identifier")},imported:{validate:Qo("Identifier","StringLiteral")},importKind:{validate:$o("type","typeof","value"),optional:!0}}}),cd("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:$o("source","defer")},source:{validate:Qo("Expression")},options:{validate:Qo("Expression"),optional:!0}}}),cd("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:nd(Qo("Identifier"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING){var n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta"}if(!Mi("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")}}),{oneOfNodeTypes:["Identifier"]}))},property:{validate:Qo("Identifier")}}});var gd=function(){return{abstract:{validate:ed("boolean"),optional:!0},accessibility:{validate:$o("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:ed("boolean"),optional:!0},key:{validate:nd(function(){var e=Qo("Identifier","StringLiteral","NumericLiteral"),t=Qo("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),Qo("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}}},hd=function(){return Object.assign({},ld(),gd(),{params:{validate:nd(ed("array"),Jo(Qo("Identifier","Pattern","RestElement","TSParameterProperty")))},kind:{validate:$o("get","set","method","constructor"),default:"method"},access:{validate:nd(ed("string"),$o("public","private","protected")),optional:!0},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0}})};cd("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},hd(),ud(),{body:{validate:Qo("BlockStatement")}})}),cd("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},fd(),{properties:{validate:nd(ed("array"),Jo(Qo("RestElement","ObjectProperty")))}})}),cd("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:Qo("Expression")}}}),cd("Super",{aliases:["Expression"]}),cd("TaggedTemplateExpression",{visitor:["tag","quasi","typeParameters"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:Qo("Expression")},quasi:{validate:Qo("TemplateLiteral")},typeParameters:{validate:Qo("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),cd("TemplateElement",{builder:["value","tail"],fields:{value:{validate:nd(td({raw:{validate:ed("string")},cooked:{validate:ed("string"),optional:!0}}),(function(e){var t=e.value.raw,r=!1,n=function(){throw new Error("Internal @babel/types error.")},a=oo("template",t,0,0,0,{unterminated:function(){r=!0},strictNumericEscape:n,invalidEscapeSequence:n,numericSeparatorInEscapeSequence:n,unexpectedNumericSeparator:n,invalidDigit:n,invalidCodePoint:n}),s=a.str,i=a.firstInvalidLoc;if(!r)throw new Error("Invalid raw");e.value.cooked=i?null:s}))},tail:{default:!1}}}),cd("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:nd(ed("array"),Jo(Qo("TemplateElement")))},expressions:{validate:nd(ed("array"),Jo(Qo("Expression","TSType")),(function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError("Number of "+e.type+" quasis should be exactly one more than the number of expressions.\nExpected "+(r.length+1)+" quasis but got "+e.quasis.length)}))}}}),cd("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:nd(ed("boolean"),Object.assign((function(e,t,r){if(ki.env.BABEL_TYPES_8_BREAKING&&r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}),{type:"boolean"})),default:!1},argument:{optional:!0,validate:Qo("Expression")}}}),cd("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:Qo("Expression")}}}),cd("Import",{aliases:["Expression"]}),cd("BigIntLiteral",{builder:["value"],fields:{value:{validate:ed("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),cd("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:Qo("Identifier")}}}),cd("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:Qo("Expression")},property:{validate:function(){var e=Qo("Identifier"),t=Qo("Expression"),r=Object.assign((function(r,n,a){(r.computed?t:e)(r,n,a)}),{oneOfNodeTypes:["Expression","Identifier"]});return r}()},computed:{default:!1},optional:{validate:ki.env.BABEL_TYPES_8_BREAKING?nd(ed("boolean"),rd()):ed("boolean")}}}),cd("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:Qo("Expression")},arguments:{validate:nd(ed("array"),Jo(Qo("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:ki.env.BABEL_TYPES_8_BREAKING?nd(ed("boolean"),rd()):ed("boolean")},typeArguments:{validate:Qo("TypeParameterInstantiation"),optional:!0},typeParameters:{validate:Qo("TSTypeParameterInstantiation"),optional:!0}}}),cd("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},gd(),{value:{validate:Qo("Expression"),optional:!0},definite:{validate:ed("boolean"),optional:!0},typeAnnotation:{validate:Qo("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0},readonly:{validate:ed("boolean"),optional:!0},declare:{validate:ed("boolean"),optional:!0},variance:{validate:Qo("Variance"),optional:!0}})}),cd("ClassAccessorProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],fields:Object.assign({},gd(),{key:{validate:nd(function(){var e=Qo("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=Qo("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),Qo("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:Qo("Expression"),optional:!0},definite:{validate:ed("boolean"),optional:!0},typeAnnotation:{validate:Qo("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0},readonly:{validate:ed("boolean"),optional:!0},declare:{validate:ed("boolean"),optional:!0},variance:{validate:Qo("Variance"),optional:!0}})}),cd("ClassPrivateProperty",{visitor:["key","value","decorators","typeAnnotation"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:Qo("PrivateName")},value:{validate:Qo("Expression"),optional:!0},typeAnnotation:{validate:Qo("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:nd(ed("array"),Jo(Qo("Decorator"))),optional:!0},static:{validate:ed("boolean"),default:!1},readonly:{validate:ed("boolean"),optional:!0},definite:{validate:ed("boolean"),optional:!0},variance:{validate:Qo("Variance"),optional:!0}}}),cd("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},hd(),ud(),{kind:{validate:$o("get","set","method"),default:"method"},key:{validate:Qo("PrivateName")},body:{validate:Qo("BlockStatement")}})}),cd("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:Qo("Identifier")}}}),cd("StaticBlock",{visitor:["body"],fields:{body:{validate:nd(ed("array"),Jo(Qo("Statement")))}},aliases:["Scopable","BlockParent","FunctionParent"]});var md=od("Flow"),yd=function(e){var t="DeclareClass"===e;md(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends"].concat(E(t?["mixins","implements"]:[]),["body"]),aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:Ko("Identifier"),typeParameters:zo("TypeParameterDeclaration"),extends:qo(Yo("InterfaceExtends"))},t?{mixins:qo(Yo("InterfaceExtends")),implements:qo(Yo("ClassImplements"))}:{},{body:Ko("ObjectTypeAnnotation")})})};md("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:Ko("FlowType")}}),md("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("boolean"))}}),md("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ClassImplements",{visitor:["id","typeParameters"],fields:{id:Ko("Identifier"),typeParameters:zo("TypeParameterInstantiation")}}),yd("DeclareClass"),md("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko("Identifier"),predicate:zo("DeclaredPredicate")}}),yd("DeclareInterface"),md("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko(["Identifier","StringLiteral"]),body:Ko("BlockStatement"),kind:qo($o("CommonJS","ES"))}}),md("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:Ko("TypeAnnotation")}}),md("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko("Identifier"),typeParameters:zo("TypeParameterDeclaration"),right:Ko("FlowType")}}),md("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko("Identifier"),typeParameters:zo("TypeParameterDeclaration"),supertype:zo("FlowType"),impltype:zo("FlowType")}}),md("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko("Identifier")}}),md("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:zo("Flow"),specifiers:qo(Yo(["ExportSpecifier","ExportNamespaceSpecifier"])),source:zo("StringLiteral"),default:qo(ed("boolean"))}}),md("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:Ko("StringLiteral"),exportKind:qo($o("type","value"))}}),md("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:Ko("Flow")}}),md("ExistsTypeAnnotation",{aliases:["FlowType"]}),md("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:zo("TypeParameterDeclaration"),params:Go(Yo("FunctionTypeParam")),rest:zo("FunctionTypeParam"),this:zo("FunctionTypeParam"),returnType:Ko("FlowType")}}),md("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:zo("Identifier"),typeAnnotation:Ko("FlowType"),optional:qo(ed("boolean"))}}),md("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:Ko(["Identifier","QualifiedTypeIdentifier"]),typeParameters:zo("TypeParameterInstantiation")}}),md("InferredPredicate",{aliases:["FlowPredicate"]}),md("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:Ko(["Identifier","QualifiedTypeIdentifier"]),typeParameters:zo("TypeParameterInstantiation")}}),yd("InterfaceDeclaration"),md("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:qo(Yo("InterfaceExtends")),body:Ko("ObjectTypeAnnotation")}}),md("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:Ko("FlowType")}}),md("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("number"))}}),md("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:Go(Yo(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:{validate:Yo("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:Yo("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:Yo("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:ed("boolean"),default:!1},inexact:qo(ed("boolean"))}}),md("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:Ko("Identifier"),value:Ko("FlowType"),optional:Go(ed("boolean")),static:Go(ed("boolean")),method:Go(ed("boolean"))}}),md("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:Ko("FlowType"),static:Go(ed("boolean"))}}),md("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:zo("Identifier"),key:Ko("FlowType"),value:Ko("FlowType"),static:Go(ed("boolean")),variance:zo("Variance")}}),md("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:Ko(["Identifier","StringLiteral"]),value:Ko("FlowType"),kind:Go($o("init","get","set")),static:Go(ed("boolean")),proto:Go(ed("boolean")),optional:Go(ed("boolean")),variance:zo("Variance"),method:Go(ed("boolean"))}}),md("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:Ko("FlowType")}}),md("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko("Identifier"),typeParameters:zo("TypeParameterDeclaration"),supertype:zo("FlowType"),impltype:Ko("FlowType")}}),md("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:Ko("Identifier"),qualification:Ko(["Identifier","QualifiedTypeIdentifier"])}}),md("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:Go(ed("string"))}}),md("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:Ko("FlowType")}}),md("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:Ko("Identifier"),typeParameters:zo("TypeParameterDeclaration"),right:Ko("FlowType")}}),md("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:Ko("FlowType")}}),md("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:Ko("Expression"),typeAnnotation:Ko("TypeAnnotation")}}),md("TypeParameter",{visitor:["bound","default","variance"],fields:{name:Go(ed("string")),bound:zo("TypeAnnotation"),default:zo("FlowType"),variance:zo("Variance")}}),md("TypeParameterDeclaration",{visitor:["params"],fields:{params:Go(Yo("TypeParameter"))}}),md("TypeParameterInstantiation",{visitor:["params"],fields:{params:Go(Yo("FlowType"))}}),md("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:Go(Yo("FlowType"))}}),md("Variance",{builder:["kind"],fields:{kind:Go($o("minus","plus"))}}),md("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),md("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:Ko("Identifier"),body:Ko(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}}),md("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo("EnumBooleanMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo("EnumNumberMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:Go(ed("boolean")),members:Xo(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:Xo("EnumDefaultedMember"),hasUnknownMembers:Go(ed("boolean"))}}),md("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Ko("Identifier"),init:Ko("BooleanLiteral")}}),md("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Ko("Identifier"),init:Ko("NumericLiteral")}}),md("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:Ko("Identifier"),init:Ko("StringLiteral")}}),md("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:Ko("Identifier")}}),md("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Ko("FlowType"),indexType:Ko("FlowType")}}),md("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:Ko("FlowType"),indexType:Ko("FlowType"),optional:Go(ed("boolean"))}});var vd=od("JSX");vd("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:Qo("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:Qo("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),vd("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:Qo("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),vd("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:Qo("JSXOpeningElement")},closingElement:{optional:!0,validate:Qo("JSXClosingElement")},children:{validate:nd(ed("array"),Jo(Qo("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}},{selfClosing:{validate:ed("boolean"),optional:!0}})}),vd("JSXEmptyExpression",{}),vd("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:Qo("Expression","JSXEmptyExpression")}}}),vd("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:Qo("Expression")}}}),vd("JSXIdentifier",{builder:["name"],fields:{name:{validate:ed("string")}}}),vd("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:Qo("JSXMemberExpression","JSXIdentifier")},property:{validate:Qo("JSXIdentifier")}}}),vd("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:Qo("JSXIdentifier")},name:{validate:Qo("JSXIdentifier")}}}),vd("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:Qo("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:{validate:nd(ed("array"),Jo(Qo("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:Qo("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),vd("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:Qo("Expression")}}}),vd("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:ed("string")}}}),vd("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:Qo("JSXOpeningFragment")},closingFragment:{validate:Qo("JSXClosingFragment")},children:{validate:nd(ed("array"),Jo(Qo("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}}),vd("JSXOpeningFragment",{aliases:["Immutable"]}),vd("JSXClosingFragment",{aliases:["Immutable"]});for(var bd=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],xd={Declaration:["Statement"],Pattern:["PatternLike","LVal"]},Rd=0,Ed=bd;Rd=0)){if(Ft(o))return[o];if(xs(o))n.set(o.type,o);else if(Dr(o))a.has(o.types)||(t.push.apply(t,E(o.types)),a.add(o.types));else if(rr(o)){var d=hb(o.id);if(r.has(d)){var c,l=r.get(d);l.typeParameters?o.typeParameters&&((c=l.typeParameters.params).push.apply(c,E(o.typeParameters.params)),l.typeParameters.params=mb(l.typeParameters.params)):l=o.typeParameters}else r.set(d,o)}else s.push(o)}}for(var u,p=_(n);!(u=p()).done;){var f=R(u.value,2)[1];s.push(f)}for(var g,h=_(r);!(g=h()).done;){var m=R(g.value,2)[1];s.push(m)}return s}function yb(e){var t=mb(e);return 1===t.length?t[0]:Ru(t)}function vb(e){return Te(e)?e.name:e.right.name+"."+vb(e.left)}function bb(e){for(var t=Array.from(e),r=new Map,n=new Map,a=new Set,s=[],i=0;i=0)){if(Nn(o))return[o];if(_s(o))n.set(o.type,o);else if(ia(o))a.has(o.types)||(t.push.apply(t,E(o.types)),a.add(o.types));else if($n(o)&&o.typeParameters){var d=vb(o.typeName);if(r.has(d)){var c,l=r.get(d);l.typeParameters?o.typeParameters&&((c=l.typeParameters.params).push.apply(c,E(o.typeParameters.params)),l.typeParameters.params=bb(l.typeParameters.params)):l=o.typeParameters}else r.set(d,o)}else s.push(o)}}for(var u,p=_(n);!(u=p()).done;){var f=R(u.value,2)[1];s.push(f)}for(var g,h=_(r);!(g=h()).done;){var m=R(g.value,2)[1];s.push(m)}return s}function xb(e){var t=e.map((function(e){return Da(e)?e.typeAnnotation:e})),r=bb(t);return 1===r.length?r[0]:Vp(r)}function Rb(){return Nc("void",hc(0),!0)}var Eb=Function.call.bind(Object.prototype.hasOwnProperty);function Tb(e,t,r,n){return e&&"string"===typeof e.type?jb(e,t,r,n):e}function wb(e,t,r,n){return Array.isArray(e)?e.map((function(e){return Tb(e,t,r,n)})):Tb(e,t,r,n)}function Sb(e,t,r){return void 0===t&&(t=!0),void 0===r&&(r=!1),jb(e,t,r,new Map)}function jb(e,t,r,n){if(void 0===t&&(t=!0),void 0===r&&(r=!1),!e)return e;var a=e.type,s={type:e.type};if(Te(e))s.name=e.name,Eb(e,"optional")&&"boolean"===typeof e.optional&&(s.optional=e.optional),Eb(e,"typeAnnotation")&&(s.typeAnnotation=t?wb(e.typeAnnotation,!0,r,n):e.typeAnnotation);else{if(!Eb(Mo,a))throw new Error('Unknown node type: "'+a+'"');for(var i=0,o=Object.keys(Mo[a]);i=Number.MAX_SAFE_INTEGER?Vx.uid=0:Vx.uid++};var Xx=Function.call.bind(Object.prototype.toString);function Jx(e){return"[object RegExp]"===Xx(e)}function $x(e){if("object"!==typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function Qx(e){if(void 0===e)return uc("undefined");if(!0===e||!1===e)return yc(e);if(null===e)return mc();if("string"===typeof e)return gc(e);var t;if("number"===typeof e)return t=Number.isFinite(e)?hc(Math.abs(e)):zd("/",Number.isNaN(e)?hc(0):hc(1),hc(0)),(e<0||Object.is(e,-0))&&(t=Nc("-",t)),t;if(Jx(e))return vc(e.source,e.toString().match(/\/([a-z]+|)$/)[1]);if(Array.isArray(e))return Kd(e.map(Qx));if($x(e)){for(var r=[],n=0,a=Object.keys(e);n=0)return!0}else if(s===e)return!0}return!1}function oR(e){return Xe(e)&&("var"!==e.kind||e[Io])}function dR(e){return Re(e)||at(e)||oR(e)}function cR(e){return!!Ni(e.type,"Immutable")||!!Te(e)&&"undefined"===e.name}function lR(e,t){if("object"!==typeof e||"object"!==typeof t||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=Object.keys(Mo[e.type]||e.type),n=Oo[e.type],a=0,s=r;a100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(o){var d=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return d*s;case"weeks":case"week":case"w":return d*a;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function o(a){var s=Math.abs(a);return s>=n?Math.round(a/n)+"d":s>=r?Math.round(a/r)+"h":s>=t?Math.round(a/t)+"m":s>=e?Math.round(a/e)+"s":a+"ms"}function d(a){var s=Math.abs(a);return s>=n?c(a,s,n,"day"):s>=r?c(a,s,r,"hour"):s>=t?c(a,s,t,"minute"):s>=e?c(a,s,e,"second"):a+" ms"}function c(e,t,r,n){var a=t>=1.5*r;return Math.round(e/r)+" "+n+(a?"s":"")}return kE=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return i(e);if("number"===r&&isFinite(e))return t.long?d(e):o(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},kE}function OE(e){function t(e){for(var t=0,n=0;n=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function n(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(a=n))})),t.splice(a,0,r)}}function a(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(xZ){}}function s(){var e;try{e=t.storage.getItem("debug")}catch(xZ){}return!e&&"undefined"!==typeof ki&&"env"in ki&&(e=ki.env.DEBUG),e}function i(){try{return localStorage}catch(xZ){}}t.formatArgs=n,t.save=a,t.load=s,t.useColors=r,t.storage=i(),t.destroy=function(){var e=!1;return function(){e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=NE(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(xZ){return"[UnexpectedJSONParseError]: "+xZ.message}}}(IE,IE.exports);var FE=IE.exports,ME=Sb,LE=Xc,BE=Jc,UE=uc,HE=Mc,GE=Lc;function WE(e){if(!e.isExportDeclaration()||e.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(e.isExportDefaultDeclaration()){var t=e.get("declaration"),r=t.isFunctionDeclaration()||t.isClassDeclaration(),n=t.isFunctionExpression()||t.isClassExpression(),a=t.isScope()?t.scope.parent:t.scope,s=t.node.id,i=!1;s?n&&a.hasBinding(s.name)&&(i=!0,s=a.generateUidIdentifier(s.name)):(i=!0,s=a.generateUidIdentifier("default"),(r||n)&&(t.node.id=ME(s)));var o=r?t.node:HE("var",[GE(ME(s),t.node)]),d=LE(null,[BE(ME(s),UE("default"))]);return e.insertAfter(d),e.replaceWith(o),i&&a.registerDeclaration(e),e}if(e.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");var c=e.get("declaration"),l=c.getOuterBindingIdentifiers(),u=Object.keys(l).map((function(e){return BE(UE(e),UE(e))})),p=LE(null,u);return e.insertAfter(p),e.replaceWith(c.node),e}function KE(e){var t=e.context,r=e.node;if(r.computed&&t.maybeQueue(e.get("key")),r.decorators)for(var n,a=_(e.get("decorators"));!(n=a()).done;){var s=n.value;t.maybeQueue(s)}}var qE={FunctionParent:function(e){e.isArrowFunctionExpression()||(e.skip(),e.isMethod()&&KE(e))},Property:function(e){e.isObjectProperty()||(e.skip(),KE(e))}},zE={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||(e.skip(),e.isMethod()&&KE(e))},ObjectProperty:function(e,t){var r,n=e.node,a=e.scope,s=n.key.name;!n.shorthand||s!==t.oldName&&s!==t.newName||a.getBindingIdentifier(s)!==t.binding.identifier||(n.shorthand=!1,null!=(r=n.extra)&&r.shorthand&&(n.extra.shorthand=!1))},"AssignmentExpression|Declaration|VariableDeclarator":function(e,t){if(!e.isVariableDeclaration()){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}}},VE=function(){function e(e,t,r){this.newName=r,this.oldName=t,this.binding=e}var t=e.prototype;return t.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath;if(t.isExportDeclaration()){if(t.isExportDefaultDeclaration()){var r=t.node.declaration;if(ts(r)&&!r.id)return}t.isExportAllDeclaration()||WE(t)}},t.maybeConvertFromClassFunctionDeclaration=function(e){return e},t.maybeConvertFromClassFunctionExpression=function(e){return e},t.rename=function(){var e=this.binding,t=this.oldName,r=this.newName,n=e.scope,a=e.path,s=a.find((function(e){return e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression()}));s&&s.getOuterBindingIdentifiers()[t]===e.identifier&&this.maybeConvertFromExportDeclaration(s),sq(arguments[0]||n.block,lE(zE),n,this,n.path,{discriminant:!0}),arguments[0]||(n.removeOwnBinding(t),n.bindings[r]=e,this.binding.identifier.name=r),s&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},c(e)}(),YE=function(){function e(e){var t=e.identifier,r=e.scope,n=e.path,a=e.kind;this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=t,this.scope=r,this.path=n,this.kind=a,"var"!==a&&"hoisted"!==a||!XE(n)||this.reassign(n),this.clearValue()}var t=e.prototype;return t.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},t.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},t.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},t.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},t.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},t.dereference=function(){this.references--,this.referenced=!!this.references},c(e)}();function XE(e){for(var t=e.parentPath,r=e.key;t;t=(n=t).parentPath,r=n.key,n){var n;if(t.isFunctionParent())return!1;if(t.isWhile()||t.isForXStatement()||t.isForStatement()&&"body"===r)return!0}return!1}var JE,$E,QE={builtin:{Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es2015:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es2017:{Array:!1,ArrayBuffer:!1,Atomics:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{AbortController:!1,AbortSignal:!1,addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AudioScheduledSourceNode:!1,"AudioWorkletGlobalScope ":!1,AudioWorkletNode:!1,AudioWorkletProcessor:!1,BarProp:!1,BaseAudioContext:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,BlobEvent:!1,blur:!1,BroadcastChannel:!1,btoa:!1,BudgetService:!1,ByteLengthQueuingStrategy:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasCaptureMediaStreamTrack:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConstantSourceNode:!1,ConvolverNode:!1,CountQueuingStrategy:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSConditionRule:!1,CSSFontFaceRule:!1,CSSGroupingRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSNamespaceRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CustomElementRegistry:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,defaultstatus:!1,defaultStatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMMatrix:!1,DOMMatrixReadOnly:!1,DOMParser:!1,DOMPoint:!1,DOMPointReadOnly:!1,DOMQuad:!1,DOMRect:!1,DOMRectReadOnly:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FontFaceSetLoadEvent:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLLabelElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSlotElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTimeElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,IdleDeadline:!1,IIRFilterNode:!1,Image:!1,ImageBitmap:!1,ImageBitmapRenderingContext:!1,ImageCapture:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,isSecureContext:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!0,Location:!1,locationbar:!1,matchMedia:!1,MediaDeviceInfo:!1,MediaDevices:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyMessageEvent:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaRecorder:!1,MediaSettingsRange:!1,MediaSource:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,MediaStreamTrackEvent:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,NavigationPreloadManager:!1,navigator:!1,Navigator:!1,NetworkInformation:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,OffscreenCanvas:!0,onabort:!0,onafterprint:!0,onanimationend:!0,onanimationiteration:!0,onanimationstart:!0,onappinstalled:!0,onauxclick:!0,onbeforeinstallprompt:!0,onbeforeprint:!0,onbeforeunload:!0,onblur:!0,oncancel:!0,oncanplay:!0,oncanplaythrough:!0,onchange:!0,onclick:!0,onclose:!0,oncontextmenu:!0,oncuechange:!0,ondblclick:!0,ondevicemotion:!0,ondeviceorientation:!0,ondeviceorientationabsolute:!0,ondrag:!0,ondragend:!0,ondragenter:!0,ondragleave:!0,ondragover:!0,ondragstart:!0,ondrop:!0,ondurationchange:!0,onemptied:!0,onended:!0,onerror:!0,onfocus:!0,ongotpointercapture:!0,onhashchange:!0,oninput:!0,oninvalid:!0,onkeydown:!0,onkeypress:!0,onkeyup:!0,onlanguagechange:!0,onload:!0,onloadeddata:!0,onloadedmetadata:!0,onloadstart:!0,onlostpointercapture:!0,onmessage:!0,onmessageerror:!0,onmousedown:!0,onmouseenter:!0,onmouseleave:!0,onmousemove:!0,onmouseout:!0,onmouseover:!0,onmouseup:!0,onmousewheel:!0,onoffline:!0,ononline:!0,onpagehide:!0,onpageshow:!0,onpause:!0,onplay:!0,onplaying:!0,onpointercancel:!0,onpointerdown:!0,onpointerenter:!0,onpointerleave:!0,onpointermove:!0,onpointerout:!0,onpointerover:!0,onpointerup:!0,onpopstate:!0,onprogress:!0,onratechange:!0,onrejectionhandled:!0,onreset:!0,onresize:!0,onscroll:!0,onsearch:!0,onseeked:!0,onseeking:!0,onselect:!0,onstalled:!0,onstorage:!0,onsubmit:!0,onsuspend:!0,ontimeupdate:!0,ontoggle:!0,ontransitionend:!0,onunhandledrejection:!0,onunload:!0,onvolumechange:!0,onwaiting:!0,onwheel:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,origin:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,PannerNode:!1,parent:!1,Path2D:!1,PaymentAddress:!1,PaymentRequest:!1,PaymentRequestUpdateEvent:!1,PaymentResponse:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceLongTaskTiming:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceNavigationTiming:!1,PerformanceObserver:!1,PerformanceObserverEntryList:!1,PerformancePaintTiming:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,PhotoCapabilities:!1,Plugin:!1,PluginArray:!1,PointerEvent:!1,PopStateEvent:!1,postMessage:!1,Presentation:!1,PresentationAvailability:!1,PresentationConnection:!1,PresentationConnectionAvailableEvent:!1,PresentationConnectionCloseEvent:!1,PresentationConnectionList:!1,PresentationReceiver:!1,PresentationRequest:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,PushSubscriptionOptions:!1,queueMicrotask:!1,RadioNodeList:!1,Range:!1,ReadableStream:!1,registerProcessor:!1,RemotePlayback:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,ResizeObserver:!1,ResizeObserverEntry:!1,resizeTo:!1,Response:!1,RTCCertificate:!1,RTCDataChannel:!1,RTCDataChannelEvent:!1,RTCDtlsTransport:!1,RTCIceCandidate:!1,RTCIceGatherer:!1,RTCIceTransport:!1,RTCPeerConnection:!1,RTCPeerConnectionIceEvent:!1,RTCRtpContributingSource:!1,RTCRtpReceiver:!1,RTCRtpSender:!1,RTCSctpTransport:!1,RTCSessionDescription:!1,RTCStatsReport:!1,RTCTrackEvent:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedWorker:!1,SourceBuffer:!1,SourceBufferList:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,StaticRange:!1,status:!1,statusbar:!1,StereoPannerNode:!1,stop:!1,Storage:!1,StorageEvent:!1,StorageManager:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAngle:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGComponentTransferFunctionElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGElement:!1,SVGEllipseElement:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGImageElement:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPathElement:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGViewElement:!1,TaskAttributionTiming:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,visualViewport:!1,VisualViewport:!1,VTTCue:!1,WaveShaperNode:!1,WebAssembly:!1,WebGL2RenderingContext:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLQuery:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLSampler:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLSync:!1,WebGLTexture:!1,WebGLTransformFeedback:!1,WebGLUniformLocation:!1,WebGLVertexArrayObject:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,WritableStream:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathExpression:!1,XPathResult:!1,XSLTProcessor:!1},worker:{addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,queueMicrotask:!1,removeEventListener:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,WorkerGlobalScope:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,global:!1,Intl:!1,module:!1,process:!1,queueMicrotask:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1},commonjs:{exports:!0,global:!1,module:!1,require:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fdescribe:!1,fit:!1,it:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,java:!1,Java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{YAHOO:!1,YAHOO_config:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ln:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{_:!1,$:!1,Accounts:!1,AccountsClient:!1,AccountsCommon:!1,AccountsServer:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPRateLimiter:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{addEventListener:!1,applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,clearInterval:!1,clearTimeout:!1,Client:!1,clients:!1,Clients:!1,close:!0,console:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,fetch:!1,FetchEvent:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!1,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onfetch:!0,oninstall:!0,onlanguagechange:!0,onmessage:!0,onmessageerror:!0,onnotificationclick:!0,onnotificationclose:!0,onoffline:!0,ononline:!0,onpush:!0,onpushsubscriptionchange:!0,onrejectionhandled:!0,onsync:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,queueMicrotask:!1,registration:!1,removeEventListener:!1,Request:!1,Response:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,skipWaiting:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,WindowClient:!1,Worker:!1,WorkerGlobalScope:!1,XMLHttpRequest:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findAll:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1,wait:!1},protractor:{$:!1,$$:!1,browser:!1,by:!1,By:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1,URL:!1,URLSearchParams:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{cloneInto:!1,createObjectIn:!1,exportFunction:!1,GM:!1,GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1},devtools:{$:!1,$_:!1,$$:!1,$0:!1,$1:!1,$2:!1,$3:!1,$4:!1,$x:!1,chrome:!1,clear:!1,copy:!1,debug:!1,dir:!1,dirxml:!1,getEventListeners:!1,inspect:!1,keys:!1,monitor:!1,monitorEvents:!1,profile:!1,profileEnd:!1,queryObjects:!1,table:!1,undebug:!1,unmonitor:!1,unmonitorEvents:!1,values:!1}};function ZE(){return $E?JE:($E=1,JE=QE)}function eT(e){return null!=e&&e&&"false"!==e&&"0"!==e}var tT=(eT(ki.env.BABEL_8_BREAKING),ZE()),rT=Do,nT=Qd,aT=Sb,sT=rR,iT=uc,oT=re,dT=Ba,cT=ps,lT=rt,uT=at,pT=st,fT=it,gT=ot,hT=Re,mT=Te,yT=lt,vT=ss,bT=os,xT=hs,RT=Ce,ET=Ne,TT=cs,wT=es,ST=_e,jT=bt,AT=xt,CT=Et,kT=Ke,_T=Ve,PT=Xe,IT=Fs,DT=xc,OT=hc,NT=Lx,FT=Mc,MT=Lc,LT=vn,BT=bn,UT=Me,HT=En,GT=ht,WT=Ot,KT=gs,qT=Rb;function zT(e,t){switch(null==e?void 0:e.type){default:var r;if(yT(e)||KT(e))if((pT(e)||gT(e)||yT(e))&&e.source)zT(e.source,t);else if((gT(e)||yT(e))&&null!=(r=e.specifiers)&&r.length)for(var n,a=_(e.specifiers);!(n=a()).done;)zT(n.value,t);else(fT(e)||gT(e))&&e.declaration&&zT(e.declaration,t);else xT(e)?zT(e.local,t):!vT(e)||RT(e)||ST(e)||CT(e)||t.push(e.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":zT(e.object,t),zT(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":zT(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(var s,i=_(e.properties);!(s=i()).done;)zT(s.value,t);break;case"SpreadElement":case"RestElement":case"UnaryExpression":case"UpdateExpression":zT(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":zT(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield"),zT(e.argument,t);break;case"AwaitExpression":t.push("await"),zT(e.argument,t);break;case"AssignmentExpression":zT(e.left,t);break;case"VariableDeclarator":case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":case"PrivateName":zT(e.id,t);break;case"ParenthesizedExpression":zT(e.expression,t);break;case"MetaProperty":zT(e.meta,t),zT(e.property,t);break;case"JSXElement":zT(e.openingElement,t);break;case"JSXOpeningElement":zT(e.name,t);break;case"JSXFragment":zT(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":zT(e.namespace,t),zT(e.name,t)}}var VT={ForStatement:function(e){var t=e.get("init");if(t.isVar()){var r=e.scope;(r.getFunctionParent()||r.getProgramParent()).registerBinding("var",t)}},Declaration:function(e){e.isBlockScoped()||e.isImportDeclaration()||e.isExportDeclaration()||(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ImportDeclaration:function(e){e.scope.getBlockParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");if(r.isPattern()||r.isIdentifier())t.constantViolations.push(e);else if(r.isVar()){var n=e.scope;(n.getFunctionParent()||n.getProgramParent()).registerBinding("var",r)}},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope;if(!pT(t)){var n=t.declaration;if(uT(n)||hT(n)){var a=n.id;if(!a)return;var s=r.getBinding(a.name);null==s||s.reference(e)}else if(PT(n))for(var i,o=_(n.declarations);!(i=o()).done;)for(var d=i.value,c=0,l=Object.keys(sT(d));c1&&(r+=t),"_"+r},t.generateUidBasedOnNode=function(e,t){var r=[];zT(e,r);var n=r.join("$");return n=n.replace(/^_/,"")||t||"ref",this.generateUid(n.slice(0,20))},t.generateUidIdentifierBasedOnNode=function(e,t){return iT(this.generateUidBasedOnNode(e,t))},t.isStatic=function(e){if(kT(e)||jT(e)||HT(e))return!0;if(mT(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},t.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t?r:(this.push({id:r}),aT(r))},t.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&"local"!==e.kind&&("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&"const"===t))throw this.hub.buildError(n,'Duplicate declaration "'+r+'"',TypeError)},t.rename=function(e,t){var r=this.getBinding(e);r&&(t||(t=this.generateUidIdentifier(e).name),new VE(r,e,t).rename(arguments[2]))},t._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},t.dump=function(){var e="-".repeat(60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r=0,n=Object.keys(t.bindings);r0)&&this.isPure(e.body,t);if(lT(e)){for(var i,o=_(e.body);!(i=o()).done;){var d=i.value;if(!this.isPure(d,t))return!1}return!0}if(dT(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(oT(e)||BT(e)){for(var c,l=_(e.elements);!(c=l()).done;){var u=c.value;if(null!==u&&!this.isPure(u,t))return!1}return!0}if(ET(e)||LT(e)){for(var p,f=_(e.properties);!(p=f()).done;){var g=p.value;if(!this.isPure(g,t))return!1}return!0}if(bT(e))return!(e.computed&&!this.isPure(e.key,t))&&!((null==(a=e.decorators)?void 0:a.length)>0);if(TT(e))return!(e.computed&&!this.isPure(e.key,t))&&!((null==(s=e.decorators)?void 0:s.length)>0)&&!((UT(e)||e.static)&&null!==e.value&&!this.isPure(e.value,t));if(_T(e))return this.isPure(e.argument,t);if(AT(e))return IT(e.tag,"String.raw")&&!this.hasBinding("String",!0)&&this.isPure(e.quasi,t);if(CT(e)){for(var h,m=_(e.expressions);!(h=m()).done;){var y=h.value;if(!this.isPure(y,t))return!1}return!0}return wT(e)},t.setData=function(e,t){return this.data[e]=t},t.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},t.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},t.init=function(){this.inited||(this.inited=!0,this.crawl())},t.crawl=function(){var e=this.path;this.references=Object.create(null),this.bindings=Object.create(null),this.globals=Object.create(null),this.uids=Object.create(null),this.data=Object.create(null);var t=this.getProgramParent();if(!t.crawling){var r={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,"Program"!==e.type&&cE(VT)){for(var n,a=_(VT.enter);!(n=a()).done;)n.value.call(r,e,r);var s=VT[e.type];if(s)for(var i,o=_(s.enter);!(i=o()).done;)i.value.call(r,e,r)}e.traverse(VT,r),this.crawling=!1;for(var d,c=_(r.assignments);!(d=c()).done;){for(var l=d.value,u=l.getBindingIdentifiers(),p=0,f=Object.keys(u);p0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[o-2]?2:"="===e[o-1]?1:0,i=new rw(3*o/4-s),n=s>0?o-4:o;var d=0;for(t=0,r=0;t>16&255,i[d++]=a>>8&255,i[d++]=255&a;return 2===s?(a=tw[e.charCodeAt(t)]<<2|tw[e.charCodeAt(t+1)]>>4,i[d++]=255&a):1===s&&(a=tw[e.charCodeAt(t)]<<10|tw[e.charCodeAt(t+1)]<<4|tw[e.charCodeAt(t+2)]>>2,i[d++]=a>>8&255,i[d++]=255&a),i}function iw(e){return ew[e>>18&63]+ew[e>>12&63]+ew[e>>6&63]+ew[63&e]}function ow(e,t,r){for(var n,a=[],s=t;sd?d:o+i));return 1===n?(t=e[r-1],a+=ew[t>>2],a+=ew[t<<4&63],a+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],a+=ew[t>>10],a+=ew[t>>4&63],a+=ew[t<<2&63],a+="="),s.push(a),s.join("")}function cw(e,t,r,n,a){var s,i,o=8*a-n-1,d=(1<>1,l=-7,u=r?a-1:0,p=r?-1:1,f=e[t+u];for(u+=p,s=f&(1<<-l)-1,f>>=-l,l+=o;l>0;s=256*s+e[t+u],u+=p,l-=8);for(i=s&(1<<-l)-1,s>>=-l,l+=n;l>0;i=256*i+e[t+u],u+=p,l-=8);if(0===s)s=1-c;else{if(s===d)return i?NaN:1/0*(f?-1:1);i+=Math.pow(2,n),s-=c}return(f?-1:1)*i*Math.pow(2,s-n)}function lw(e,t,r,n,a,s){var i,o,d,c=8*s-a-1,l=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,g=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,i=l):(i=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-i))<1&&(i--,d*=2),(t+=i+u>=1?p/d:p*Math.pow(2,1-u))*d>=2&&(i++,d/=2),i+u>=l?(o=0,i=l):i+u>=1?(o=(t*d-1)*Math.pow(2,a),i+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[r+f]=255&o,f+=g,o/=256,a-=8);for(i=i<0;e[r+f]=255&i,f+=g,i/=256,c-=8);e[r+f-g]|=128*h}var uw={}.toString,pw=Array.isArray||function(e){return"[object Array]"==uw.call(e)},fw=50;function gw(){return mw.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function hw(e,t){if(gw()=gw())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gw().toString(16)+" bytes");return 0|e}function jw(e){return!(null==e||!e._isBuffer)}function Aw(e,t){if(jw(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return nS(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return iS(e).length;default:if(n)return nS(e).length;t=(""+t).toLowerCase(),n=!0}}function Cw(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Kw(this,t,r);case"utf8":case"utf-8":return Bw(this,t,r);case"ascii":return Gw(this,t,r);case"latin1":case"binary":return Ww(this,t,r);case"base64":return Lw(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qw(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function kw(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _w(e,t,r,n,a){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"===typeof t&&(t=mw.from(t,n)),jw(t))return 0===t.length?-1:Pw(e,t,r,n,a);if("number"===typeof t)return t&=255,mw.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Pw(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function Pw(e,t,r,n,a){var s,i=1,o=e.length,d=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,o/=2,d/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var l=-1;for(s=r;so&&(r=o-d),s=r;s>=0;s--){for(var u=!0,p=0;pa&&(n=a):n=a;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var i=0;i239?4:c>223?3:c>191?2:1;if(a+u<=r)switch(u){case 1:c<128&&(l=c);break;case 2:128===(192&(s=e[a+1]))&&(d=(31&c)<<6|63&s)>127&&(l=d);break;case 3:s=e[a+1],i=e[a+2],128===(192&s)&&128===(192&i)&&(d=(15&c)<<12|(63&s)<<6|63&i)>2047&&(d<55296||d>57343)&&(l=d);break;case 4:s=e[a+1],i=e[a+2],o=e[a+3],128===(192&s)&&128===(192&i)&&128===(192&o)&&(d=(15&c)<<18|(63&s)<<12|(63&i)<<6|63&o)>65535&&d<1114112&&(l=d)}null===l?(l=65533,u=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),a+=u}return Hw(n)}mw.TYPED_ARRAY_SUPPORT=void 0===Us.TYPED_ARRAY_SUPPORT||Us.TYPED_ARRAY_SUPPORT,gw(),mw.poolSize=8192,mw._augment=function(e){return e.__proto__=mw.prototype,e},mw.from=function(e,t,r){return yw(null,e,t,r)},mw.TYPED_ARRAY_SUPPORT&&(mw.prototype.__proto__=Uint8Array.prototype,mw.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&mw[Symbol.species]),mw.alloc=function(e,t,r){return bw(null,e,t,r)},mw.allocUnsafe=function(e){return xw(null,e)},mw.allocUnsafeSlow=function(e){return xw(null,e)},mw.isBuffer=cS,mw.compare=function(e,t){if(!jw(e)||!jw(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,s=Math.min(r,n);a0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},mw.prototype.compare=function(e,t,r,n,a){if(!jw(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),o=Math.min(s,i),d=this.slice(n,a),c=e.slice(t,r),l=0;la)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return Iw(this,e,t,r);case"utf8":case"utf-8":return Dw(this,e,t,r);case"ascii":return Ow(this,e,t,r);case"latin1":case"binary":return Nw(this,e,t,r);case"base64":return Fw(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Mw(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},mw.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Uw=4096;function Hw(e){var t=e.length;if(t<=Uw)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var a="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function Vw(e,t,r,n,a,s){if(!jw(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function Yw(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,s=Math.min(e.length-r,2);a>>8*(n?a:1-a)}function Xw(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,s=Math.min(e.length-r,4);a>>8*(n?a:3-a)&255}function Jw(e,t,r,n,a,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $w(e,t,r,n,a){return a||Jw(e,t,r,4),lw(e,t,r,n,23,4),r+4}function Qw(e,t,r,n,a){return a||Jw(e,t,r,8),lw(e,t,r,n,52,8),r+8}mw.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(a*=256);)n+=this[e+--t]*a;return n},mw.prototype.readUInt8=function(e,t){return t||zw(e,1,this.length),this[e]},mw.prototype.readUInt16LE=function(e,t){return t||zw(e,2,this.length),this[e]|this[e+1]<<8},mw.prototype.readUInt16BE=function(e,t){return t||zw(e,2,this.length),this[e]<<8|this[e+1]},mw.prototype.readUInt32LE=function(e,t){return t||zw(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},mw.prototype.readUInt32BE=function(e,t){return t||zw(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},mw.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||zw(e,t,this.length);for(var n=this[e],a=1,s=0;++s=(a*=128)&&(n-=Math.pow(2,8*t)),n},mw.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||zw(e,t,this.length);for(var n=t,a=1,s=this[e+--n];n>0&&(a*=256);)s+=this[e+--n]*a;return s>=(a*=128)&&(s-=Math.pow(2,8*t)),s},mw.prototype.readInt8=function(e,t){return t||zw(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},mw.prototype.readInt16LE=function(e,t){t||zw(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},mw.prototype.readInt16BE=function(e,t){t||zw(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},mw.prototype.readInt32LE=function(e,t){return t||zw(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},mw.prototype.readInt32BE=function(e,t){return t||zw(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},mw.prototype.readFloatLE=function(e,t){return t||zw(e,4,this.length),cw(this,e,!0,23,4)},mw.prototype.readFloatBE=function(e,t){return t||zw(e,4,this.length),cw(this,e,!1,23,4)},mw.prototype.readDoubleLE=function(e,t){return t||zw(e,8,this.length),cw(this,e,!0,52,8)},mw.prototype.readDoubleBE=function(e,t){return t||zw(e,8,this.length),cw(this,e,!1,52,8)},mw.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||Vw(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+a]=e/s&255;return t+r},mw.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,1,255,0),mw.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},mw.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,2,65535,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yw(this,e,t,!0),t+2},mw.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,2,65535,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yw(this,e,t,!1),t+2},mw.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,4,4294967295,0),mw.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Xw(this,e,t,!0),t+4},mw.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,4,4294967295,0),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Xw(this,e,t,!1),t+4},mw.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);Vw(this,e,t,r,a-1,-a)}var s=0,i=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},mw.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);Vw(this,e,t,r,a-1,-a)}var s=r-1,i=1,o=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},mw.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,1,127,-128),mw.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},mw.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,2,32767,-32768),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Yw(this,e,t,!0),t+2},mw.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,2,32767,-32768),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Yw(this,e,t,!1),t+2},mw.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,4,2147483647,-2147483648),mw.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Xw(this,e,t,!0),t+4},mw.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Vw(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),mw.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Xw(this,e,t,!1),t+4},mw.prototype.writeFloatLE=function(e,t,r){return $w(this,e,t,!0,r)},mw.prototype.writeFloatBE=function(e,t,r){return $w(this,e,t,!1,r)},mw.prototype.writeDoubleLE=function(e,t,r){return Qw(this,e,t,!0,r)},mw.prototype.writeDoubleBE=function(e,t,r){return Qw(this,e,t,!1,r)},mw.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--a)e[a+t]=this[a+r];else if(s<1e3||!mw.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(s=t;s55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&s.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function aS(e){for(var t=[],r=0;r>8,a=r%256,s.push(a),s.push(n);return s}function iS(e){return sw(eS(e))}function oS(e,t,r,n){for(var a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function dS(e){return e!==e}function cS(e){return null!=e&&(!!e._isBuffer||lS(e)||uS(e))}function lS(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function uS(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&lS(e.slice(0,0))}var pS,fS={exports:{}};function gS(){return pS||(pS=1,function(e,t){!function(e,r){r(t)}(0,(function(e){for(var t=",".charCodeAt(0),r=";".charCodeAt(0),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),s=new Uint8Array(128),i=0;i>>=1,c&&(a=-2147483648|-a),r[n]+=a,t}function p(e,r,n){return!(r>=n)&&e.charCodeAt(r)!==t}function f(e){e.sort(g)}function g(e,t){return e[0]-t[0]}function h(e){for(var n=new Int32Array(5),a=16384,s=a-36,i=new Uint8Array(a),o=i.subarray(0,s),c=0,l="",u=0;u0&&(c===a&&(l+=d.decode(i),c=0),i[c++]=r),0!==p.length){n[0]=0;for(var f=0;fs&&(l+=d.decode(o),i.copyWithin(0,s,c),c-=s),f>0&&(i[c++]=t),c=m(i,c,n,g,0),1!==g.length&&(c=m(i,c,n,g,1),c=m(i,c,n,g,2),c=m(i,c,n,g,3),4!==g.length&&(c=m(i,c,n,g,4)))}}}return l+d.decode(i.subarray(0,c))}function m(e,t,r,n,s){var i=n[s],o=i-r[s];r[s]=i,o=o<0?-o<<1|1:o<<1;do{var d=31&o;(o>>>=5)>0&&(d|=32),e[t++]=a[d]}while(o>0);return t}e.decode=c,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}))}(0,fS.exports)),fS.exports}var hS,mS={exports:{}},yS={exports:{}};function vS(){return hS||(hS=1,function(e,t){!function(e,r){r(t)}(0,(function(e){for(var t=",".charCodeAt(0),r=";".charCodeAt(0),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),s=new Uint8Array(128),i=0;i>>=1,c&&(a=-2147483648|-a),r[n]+=a,t}function p(e,r,n){return!(r>=n)&&e.charCodeAt(r)!==t}function f(e){e.sort(g)}function g(e,t){return e[0]-t[0]}function h(e){for(var n=new Int32Array(5),a=16384,s=a-36,i=new Uint8Array(a),o=i.subarray(0,s),c=0,l="",u=0;u0&&(c===a&&(l+=d.decode(i),c=0),i[c++]=r),0!==p.length){n[0]=0;for(var f=0;fs&&(l+=d.decode(o),i.copyWithin(0,s,c),c-=s),f>0&&(i[c++]=t),c=m(i,c,n,g,0),1!==g.length&&(c=m(i,c,n,g,1),c=m(i,c,n,g,2),c=m(i,c,n,g,3),4!==g.length&&(c=m(i,c,n,g,4)))}}}return l+d.decode(i.subarray(0,c))}function m(e,t,r,n,s){var i=n[s],o=i-r[s];r[s]=i,o=o<0?-o<<1|1:o<<1;do{var d=31&o;(o>>>=5)>0&&(d|=32),e[t++]=a[d]}while(o>0);return t}e.decode=c,e.encode=h,Object.defineProperty(e,"__esModule",{value:!0})}))}(0,yS.exports)),yS.exports}var bS,xS={exports:{}};function RS(){return bS||(bS=1,e=xS,function(t,r){e.exports=r()}(0,(function(){var e,t=/^[\w+.-]+:\/\//,r=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function a(e){return t.test(e)}function s(e){return e.startsWith("//")}function i(e){return e.startsWith("/")}function o(e){return e.startsWith("file:")}function d(e){return/^[.?#]/.test(e)}function c(e){var t=r.exec(e);return u(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function l(e){var t=n.exec(e),r=t[2];return u("file:","",t[1]||"","",i(r)?r:"/"+r,t[3]||"",t[4]||"")}function u(t,r,n,a,s,i,o){return{scheme:t,user:r,host:n,port:a,path:s,query:i,hash:o,type:e.Absolute}}function p(t){if(s(t)){var r=c("http:"+t);return r.scheme="",r.type=e.SchemeRelative,r}if(i(t)){var n=c("http://foo.com"+t);return n.scheme="",n.host="",n.type=e.AbsolutePath,n}if(o(t))return l(t);if(a(t))return c(t);var d=c("http://foo.com/"+t);return d.scheme="",d.host="",d.type=t?t.startsWith("?")?e.Query:t.startsWith("#")?e.Hash:e.RelativePath:e.Empty,d}function f(e){if(e.endsWith("/.."))return e;var t=e.lastIndexOf("/");return e.slice(0,t+1)}function g(e,t){h(t,t.type),"/"===e.path?e.path=t.path:e.path=f(t.path)+e.path}function h(t,r){for(var n=r<=e.RelativePath,a=t.path.split("/"),s=1,i=0,o=!1,d=1;da&&(a=i)}h(n,a);var o=n.query+n.hash;switch(a){case e.Hash:case e.Query:return o;case e.RelativePath:var c=n.path.slice(1);return c?d(r||t)&&!d(c)?"./"+c+o:c+o:o||".";case e.AbsolutePath:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}return function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"}(e||(e={})),m}))),xS.exports;var e}!function(e,t){!function(e,r){r(t,vS(),RS())}(0,(function(e,t,r){function n(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var a=n(r);function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),a.default(e,t)}function i(e){if(!e)return"";var t=e.lastIndexOf("/");return e.slice(0,t+1)}var o=0,d=1,l=2,u=3,p=4,f=1,g=2;function h(e,t){var r=m(e,0);if(r===e.length)return e;t||(e=e.slice());for(var n=r;n>1),s=e[a][o]-t;if(0===s)return x=!0,a;s<0?r=a+1:n=a-1}return x=!1,r-1}function E(e,t,r){for(var n=r+1;n=0&&e[n][o]===t;r=n--);return r}function w(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function S(e,t,r,n){var a=r.lastKey,s=r.lastNeedle,i=r.lastIndex,d=0,c=e.length-1;if(n===a){if(t===s)return x=-1!==i&&e[i][o]===t,i;t>=s?d=-1===i?0:i:c=i}return r.lastKey=n,r.lastNeedle=t,r.lastIndex=R(e,t,d,c)}function j(e,t){for(var r=t.map(C),n=0;nt;n--)e[n]=e[n-1];e[t]=r}function C(){return{__proto__:null}}var k=function(t,r){var n="string"===typeof t?JSON.parse(t):t;if(!("sections"in n))return new L(n,r);var a=[],s=[],i=[],o=[];_(n,r,a,s,i,o,0,0,1/0,1/0);var d={version:3,file:n.file,names:o,sources:s,sourcesContent:i,mappings:a};return e.presortedDecodedMap(d)};function _(e,t,r,n,a,s,i,o,d,c){for(var l=e.sections,u=0;ug)return;for(var S=D(n,w),j=0===T?f:0,A=b[T],C=0;C=h)return;if(1!==k.length){var O=y+k[d],N=k[l],F=k[u];S.push(4===k.length?[P,O,N,F]:[P,O,N,F,v+k[p]])}else S.push([P])}}}function I(e,t){for(var r=0;r=a.length)return null;var s=a[r],i=G(s,t._decodedMemo,r,n,M);return-1===i?null:s[i]},e.originalPositionFor=function(t,r){var n=r.line,a=r.column,s=r.bias;if(--n<0)throw new Error(O);if(a<0)throw new Error(N);var i=e.decodedMappings(t);if(n>=i.length)return U(null,null,null,null);var o=i[n],c=G(o,t._decodedMemo,n,a,s||M);if(-1===c)return U(null,null,null,null);var f=o[c];if(1===f.length)return U(null,null,null,null);var g=t.names;return U(t.resolvedSources[f[d]],f[l]+1,f[u],5===f.length?g[f[p]]:null)},e.allGeneratedPositionsFor=function(e,t){return r(e,t.source,t.line,t.column,t.bias||F,!0)},e.generatedPositionFor=function(e,t){return r(e,t.source,t.line,t.column,t.bias||M,!1)},e.eachMapping=function(t,r){for(var n=e.decodedMappings(t),a=t.names,s=t.resolvedSources,i=0;i=0&&!(t>=e[n][s]);r=n--);return r}function h(e,t,r){for(var n=e.length;n>t;n--)e[n]=e[n-1];e[t]=r}function m(e){for(var t=e.length,r=t,n=r-1;n>=0&&!(e[n].length>0);r=n,n--);r1?this._indentChar.repeat(t):this._indentChar}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);10!==e?(this._mark(r.line,r.column,r.identifierName,r.identifierNamePos,r.filename),this._position.column+=t):(this._position.line++,this._position.column=0),this._canMarkIdName&&(r.identifierName=void 0,r.identifierNamePos=void 0)},t._append=function(e,t,r){var n=e.length,a=this._position;if(this._last=e.charCodeAt(n-1),++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e,r||this._map){var s=t.column,i=t.identifierName,o=t.identifierNamePos,d=t.filename,c=t.line;null==i&&null==o||!this._canMarkIdName||(t.identifierName=void 0,t.identifierNamePos=void 0);var l=e.indexOf("\n"),u=0;for(0!==l&&this._mark(c,s,i,o,d);-1!==l;)a.line++,a.column=0,(u=l+1)=0&&10===this._queue[r].char;r--)t++;return t===e&&10===this._last?t+1:t},t.endsWithCharAndNewline=function(){var e=this._queue,t=this._queueCursor;if(0!==t){if(10!==e[t-1].char)return;return t>1?e[t-2].char:this._last}},t.hasContent=function(){return 0!==this._queueCursor||!!this._last},t.exactSource=function(e,t){if(this._map){this.source("start",e);var r=e.identifierName,n=this._sourcePosition;r&&(this._canMarkIdName=!1,n.identifierName=r),t(),r&&(this._canMarkIdName=!0,n.identifierName=void 0,n.identifierNamePos=void 0),this.source("end",e)}else t()},t.source=function(e,t){this._map&&this._normalizePosition(e,t,0)},t.sourceWithOffset=function(e,t,r){this._map&&this._normalizePosition(e,t,r)},t.withSource=function(e,t,r){this._map&&this.source(e,t),r()},t._normalizePosition=function(e,t,r){var n=t[e],a=this._sourcePosition;n&&(a.line=n.line,a.column=Math.max(n.column+r,0),a.filename=t.filename)},t.getCurrentColumn=function(){for(var e=this._queue,t=this._queueCursor,r=-1,n=0,a=0;a",0],["&&",1],["|",2],["^",3],["&",4],["==",5],["===",5],["!=",5],["!==",5],["<",6],[">",6],["<=",6],[">=",6],["in",6],["instanceof",6],[">>",7],["<<",7],[">>>",7],["+",8],["-",8],["*",9],["/",9],["%",9],["**",10]]);function nj(e){return"TSAsExpression"===e||"TSSatisfiesExpression"===e||"TSTypeAssertion"===e}var aj=function(e,t){var r=t.type;return("ClassDeclaration"===r||"ClassExpression"===r)&&t.superClass===e},sj=function(e,t){var r=t.type;return("MemberExpression"===r||"OptionalMemberExpression"===r)&&t.object===e||("CallExpression"===r||"OptionalCallExpression"===r||"NewExpression"===r)&&t.callee===e||"TaggedTemplateExpression"===r&&t.tag===e||"TSNonNullExpression"===r};function ij(e,t){return qS(t)}function oj(e,t,r){if(!(r.length<3)){var n=t.type;return"UnionTypeAnnotation"===n||"IntersectionTypeAnnotation"===n||"ArrayTypeAnnotation"===n||"TypeAnnotation"===n&&zS(r[r.length-3])}}function dj(e,t){return sj(e,t)||aj(e,t)}function cj(e,t,r){return _j(r,3)}function lj(e,t,r){return!e.async&&_j(r,1)}function uj(e,t){var r=t.type;if("**"===e.operator&&"BinaryExpression"===r&&"**"===t.operator)return t.left===e;if(aj(e,t))return!0;if(sj(e,t)||"UnaryExpression"===r||"SpreadElement"===r||"AwaitExpression"===r)return!0;if("BinaryExpression"===r||"LogicalExpression"===r){var n=rj.get(t.operator),a=rj.get(e.operator);if(n===a&&t.right===e&&"LogicalExpression"!==r||n>a)return!0}}function pj(e,t){var r=t.type;return"ArrayTypeAnnotation"===r||"NullableTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"UnionTypeAnnotation"===r}function fj(e,t){return $S(t)&&t.objectType===e}function gj(){return!0}function hj(e,t){var r=t.type;return"TSArrayType"===r||"TSOptionalType"===r||"TSIntersectionType"===r||"TSUnionType"===r||"TSRestType"===r}function mj(e,t){var r=t.type;return"TSArrayType"===r||"TSOptionalType"===r}function yj(e,t){var r=t.type;return("CallExpression"===r||"OptionalCallExpression"===r||"NewExpression"===r||"TSInstantiationExpression"===r)&&!!t.typeParameters}function vj(e,t){if("in"===e.operator){var r=t.type;return"VariableDeclarator"===r||"ForStatement"===r||"ForInStatement"===r||"ForOfStatement"===r}return!1}function bj(e,t){var r=t.type;return!("ForStatement"===r||"ThrowStatement"===r||"ReturnStatement"===r||"IfStatement"===r&&t.test===e||"WhileStatement"===r&&t.test===e||"ForInStatement"===r&&t.right===e||"SwitchStatement"===r&&t.discriminant===e||"ExpressionStatement"===r&&t.expression===e)}function xj(e,t){var r=t.type;return"BinaryExpression"===r||"LogicalExpression"===r||"UnaryExpression"===r||"SpreadElement"===r||sj(e,t)||"AwaitExpression"===r&&tj(e)||"ConditionalExpression"===r&&e===t.test||aj(e,t)}function Rj(e,t,r){return _j(r,5)}function Ej(e,t){return sj(e,t)||VS(t)&&"**"===t.operator&&t.left===e||aj(e,t)}function Tj(e,t,r){return _j(r,5)}function wj(e,t){return XS(t)||Sj(e,t)}function Sj(e,t){var r=t.type;return!!("UnaryExpression"===r||"SpreadElement"===r||"BinaryExpression"===r||"LogicalExpression"===r||"ConditionalExpression"===r&&t.test===e||"AwaitExpression"===r||nj(r))||Ej(e,t)}function jj(e,t){return YS(t)&&t.callee===e||QS(t)&&t.object===e}function Aj(e,t){return!!ZS(e.left)||Sj(e,t)}function Cj(e,t){var r=t.type;if(nj(r))return!0;if("LogicalExpression"!==r)return!1;switch(e.operator){case"||":return"??"===t.operator||"&&"===t.operator;case"&&":return"??"===t.operator;case"??":return"??"!==t.operator}}function kj(e,t,r){var n,a=t.type;if(null!=(n=e.extra)&&n.parenthesized&&"AssignmentExpression"===a&&t.left===e){var s=t.right.type;if(("FunctionExpression"===s||"ClassExpression"===s)&&null==t.right.id)return!0}return"let"===e.name?_j(r,QS(t,{object:e,computed:!0})||ej(t,{object:e,computed:!0,optional:!1})?57:32):"async"===e.name&&JS(t)&&e===t.left}function _j(e,t){var r=1&t,n=2&t,a=4&t,s=8&t,i=16&t,o=32&t,d=e.length-1;if(!(d<=0)){for(var c=e[d],l=e[--d];d>=0;){var u=l.type;if(r&&"ExpressionStatement"===u&&l.expression===c||a&&"ExportDefaultDeclaration"===u&&c===l.declaration||n&&"ArrowFunctionExpression"===u&&l.body===c||s&&"ForStatement"===u&&l.init===c||i&&"ForInStatement"===u&&l.left===c||o&&"ForOfStatement"===u&&l.left===c)return!0;if(!(d>0&&(sj(c,l)&&"NewExpression"!==u||"SequenceExpression"===u&&l.expressions[0]===c||"UpdateExpression"===u&&!l.prefix||"ConditionalExpression"===u&&l.test===c||("BinaryExpression"===u||"LogicalExpression"===u)&&l.left===c||"AssignmentExpression"===u&&l.left===c)))return!1;c=l,l=e[--d]}return!1}}var Pj=Fo,Ij=le,Dj=Ie,Oj=De;function Nj(e){var t=new Map;function r(e,r){var n=t.get(e);t.set(e,n?function(e,t,a){var s;return null!=(s=n(e,t,a))?s:r(e,t,a)}:r)}for(var n=0,a=Object.keys(e);n1}),RA(t))if(EA(t)){if(t.init===e)return}else if(t.left===e)return;this.semicolon()}function zA(e){this.print(e.id,e),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init,e))}var VA=it,YA=ot;function XA(e,t){(VA(t)||YA(t))&&this._shouldPrintDecoratorsBeforeExport(t)||this.printJoin(e.decorators,e),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function JA(e){this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.endsWith(10)||this.newline(),this.rightBrace(e))}function $A(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),e.computed?(this.tokenChar(91),this.print(e.key,e),this.tokenChar(93)):(this._variance(e),this.print(e.key,e)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function QA(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key,e),this.tokenChar(93)):(this._variance(e),this.print(e.key,e)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function ZA(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),this.print(e.key,e),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value,e)),this.semicolon()}function eC(e){this._classMethodHead(e),this.space(),this.print(e.body,e)}function tC(e){this._classMethodHead(e),this.space(),this.print(e.body,e)}function rC(e){var t;this.printJoin(e.decorators,e);var r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this._methodHead(e)}function nC(e){this.word("static"),this.space(),this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,e,{indent:!0}),this.rightBrace(e))}var aC=Te;function sC(e,t,r){this.print(e.typeParameters,e);var n=gC.call(this,t,r);n&&this.sourceIdentifierName(n.name,n.pos),this.tokenChar(40),this._parameters(e.params,e),this.tokenChar(41);var a="ArrowFunctionExpression"===e.type;this.print(e.returnType,e,a),this._noLineTerminator=a}function iC(e,t){for(var r=e.length,n=0;n"),this.space(),this.print(e.body,e)}function fC(e,t){var r,n;return!!(e.typeParameters||e.returnType||e.predicate||t.typeAnnotation||t.optional||null!=(r=t.leadingComments)&&r.length||null!=(n=t.trailingComments)&&n.length)}function gC(e,t){var r=e;if(!r&&t){var n=t.type;"VariableDeclarator"===n?r=t.id:"AssignmentExpression"===n||"AssignmentPattern"===n?r=t.left:"ObjectProperty"===n||"ClassProperty"===n?t.computed&&"StringLiteral"!==t.key.type||(r=t.key):"ClassPrivateProperty"!==n&&"ClassAccessorProperty"!==n||(r=t.key)}if(r){var a,s,i;if("Identifier"===r.type)a={pos:null==(s=r.loc)?void 0:s.start,name:(null==(i=r.loc)?void 0:i.identifierName)||r.name};else if("PrivateName"===r.type){var o;a={pos:null==(o=r.loc)?void 0:o.start,name:"#"+r.id.name}}else if("StringLiteral"===r.type){var d;a={pos:null==(d=r.loc)?void 0:d.start,name:r.value}}return a}}var hC=at,mC=yn,yC=At,vC=ut,bC=pt,xC=Wa;function RC(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function EC(e){this.print(e.local,e)}function TC(e){this.print(e.exported,e)}function wC(e){"type"===e.exportKind&&(this.word("type"),this.space()),this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function SC(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}var jC,AC,CC=!1;function kC(e){var t=this.format.importAttributesKeyword,r=e.attributes,n=e.assertions;!r||t||CC||(CC=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));var a="assert"===t||!t&&n;this.word(a?"assert":"with"),this.space(),a||"with"===t?(this.tokenChar(123),this.space(),this.printList(r||n,e),this.space(),this.tokenChar(125)):this.printList(r||n,e)}function _C(e){var t,r;this.word("export"),this.space(),"type"===e.exportKind&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e),this.semicolon()}function PC(e,t){hC(t.declaration)&&e._shouldPrintDecoratorsBeforeExport(t)&&e.printJoin(t.declaration.decorators,t)}function IC(e){if(PC(this,e),this.word("export"),this.space(),e.declaration){var t=e.declaration;this.print(t,e),xC(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r,n,a=e.specifiers.slice(0),s=!1;;){var i=a[0];if(!mC(i)&&!yC(i))break;s=!0,this.print(a.shift(),e),a.length&&(this.tokenChar(44),this.space())}(a.length||!a.length&&!s)&&(this.tokenChar(123),a.length&&(this.space(),this.printList(a,e),this.space()),this.tokenChar(125)),e.source&&(this.space(),this.word("from"),this.space(),null!=(r=e.attributes)&&r.length||null!=(n=e.assertions)&&n.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e)),this.semicolon()}}function DC(e){PC(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space();var t=e.declaration;this.print(t,e),xC(t)||this.semicolon()}function OC(e){var t,r;this.word("import"),this.space();var n="type"===e.importKind||"typeof"===e.importKind;n?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());for(var a=e.specifiers.slice(0),s=!!a.length;s;){var i=a[0];if(!vC(i)&&!bC(i))break;this.print(a.shift(),e),a.length&&(this.tokenChar(44),this.space())}a.length?(this.tokenChar(123),this.space(),this.printList(a,e),this.space(),this.tokenChar(125)):n&&!s&&(this.tokenChar(123),this.tokenChar(125)),(s||n)&&(this.space(),this.word("from"),this.space()),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,e,!0),this.space(),this._printAttributes(e)):this.print(e.source,e),this.semicolon()}function NC(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function FC(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local,e)}function MC(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40),this.print(e.source,e),null!=e.options&&(this.tokenChar(44),this.space(),this.print(e.options,e)),this.tokenChar(41)}function LC(){if(AC)return jC;AC=1;var e={},t=e.hasOwnProperty,r=function(e,r){for(var n in e)t.call(e,n)&&r(n,e[n])},n=function(e,t){return t?(r(t,(function(t,r){e[t]=r})),e):e},a=function(e,t){for(var r=e.length,n=-1;++n=55296&&U<=56319&&L>M+1){var H=F.charCodeAt(M+1);if(H>=56320&&H<=57343){var G=(1024*(U-55296)+H-56320+65536).toString(16);w||(G=G.toUpperCase()),R+="\\u{"+G+"}",++M;continue}}}if(!s.escapeEverything){if(y.test(B)){R+=B;continue}if('"'==B){R+=E==B?'\\"':B;continue}if("`"==B){R+=E==B?"\\`":B;continue}if("'"==B){R+=E==B?"\\'":B;continue}}if("\0"!=B||x||m.test(F.charAt(M+1)))if(h.test(B))R+=g[B];else{var W=B.charCodeAt(0);if(s.minimal&&8232!=W&&8233!=W)R+=B;else{var K=W.toString(16);w||(K=K.toUpperCase());var q=K.length>2||x,z="\\"+(q?"u":"x")+("0000"+K).slice(q?-4:-2);R+=z}}else R+="\\0"}return s.wrap&&(R=E+R+E),"`"==E&&(R=R.replace(/\$\{/g,"\\${")),s.isScriptContext?R.replace(/<\/(script|style)/gi,"<\\/$1").replace(/\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n closingTag = true\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n marker = 3\n // To do:\n // tokenizer.concrete = true\n // To do: use `markdown-rs` style interrupt.\n // While we’re in an instruction instead of a declaration, we’re on a `?`\n // right now, so we do need to search for `>`, similar to declarations.\n return self.interrupt ? ok : continuationDeclarationInside\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer = String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n marker = 2\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n marker = 5\n index = 0\n return cdataOpenInside\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n marker = 4\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside\n }\n return nok(code)\n }\n\n /**\n * After ` | &<]]>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n if (index === value.length) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation\n }\n return cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * After ` | \n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer = String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * In tag name.\n *\n * ```markdown\n * > | \n * ^^\n * > | \n * ^^\n * ```\n *\n * @type {State}\n */\n function tagName(code) {\n if (\n code === null ||\n code === 47 ||\n code === 62 ||\n markdownLineEndingOrSpace(code)\n ) {\n const slash = code === 47\n const name = buffer.toLowerCase()\n if (!slash && !closingTag && htmlRawNames.includes(name)) {\n marker = 1\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code)\n }\n if (htmlBlockNames.includes(buffer.toLowerCase())) {\n marker = 6\n if (slash) {\n effects.consume(code)\n return basicSelfClosing\n }\n\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code)\n }\n marker = 7\n // Do not support complete HTML when interrupting.\n return self.interrupt && !self.parser.lazy[self.now().line]\n ? nok(code)\n : closingTag\n ? completeClosingTagAfter(code)\n : completeAttributeNameBefore(code)\n }\n\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n buffer += String.fromCharCode(code)\n return tagName\n }\n return nok(code)\n }\n\n /**\n * After closing slash of a basic tag name.\n *\n * ```markdown\n * > |
\n * ^\n * ```\n *\n * @type {State}\n */\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code)\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation\n }\n return nok(code)\n }\n\n /**\n * After closing slash of a complete tag name.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeClosingTagAfter\n }\n return completeEnd(code)\n }\n\n /**\n * At an attribute name.\n *\n * At first, this state is used after a complete tag name, after whitespace,\n * where it expects optional attributes or the end of the tag.\n * It is also reused after attributes, when expecting more optional\n * attributes.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code)\n return completeEnd\n }\n\n // ASCII alphanumerical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return completeAttributeName\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameBefore\n }\n return completeEnd(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeName(code) {\n // ASCII alphanumerical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return completeAttributeName\n }\n return completeAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, at an optional initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeNameAfter\n }\n return completeAttributeNameBefore(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n markerB = code\n return completeAttributeValueQuoted\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAttributeValueBefore\n }\n return completeAttributeValueUnquoted(code)\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuoted(code) {\n if (code === markerB) {\n effects.consume(code)\n markerB = null\n return completeAttributeValueQuotedAfter\n }\n if (code === null || markdownLineEnding(code)) {\n return nok(code)\n }\n effects.consume(code)\n return completeAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 47 ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96 ||\n markdownLineEndingOrSpace(code)\n ) {\n return completeAttributeNameAfter(code)\n }\n effects.consume(code)\n return completeAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the\n * end of the tag.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a complete tag where only an `>` is allowed.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code)\n return completeAfter\n }\n return nok(code)\n }\n\n /**\n * After `>` in a complete tag.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function completeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return continuation(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return completeAfter\n }\n return nok(code)\n }\n\n /**\n * In continuation of any HTML kind.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuation(code) {\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationCommentInside\n }\n if (code === 60 && marker === 1) {\n effects.consume(code)\n return continuationRawTagOpen\n }\n if (code === 62 && marker === 4) {\n effects.consume(code)\n return continuationClose\n }\n if (code === 63 && marker === 3) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n if (code === 93 && marker === 5) {\n effects.consume(code)\n return continuationCdataInside\n }\n if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {\n effects.exit('htmlFlowData')\n return effects.check(\n blankLineBefore,\n continuationAfter,\n continuationStart\n )(code)\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationStart(code)\n }\n effects.consume(code)\n return continuation\n }\n\n /**\n * In continuation, at eol.\n *\n * ```markdown\n * > | \n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStart(code) {\n return effects.check(\n nonLazyContinuationStart,\n continuationStartNonLazy,\n continuationAfter\n )(code)\n }\n\n /**\n * In continuation, at eol, before non-lazy content.\n *\n * ```markdown\n * > | \n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStartNonLazy(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return continuationBefore\n }\n\n /**\n * In continuation, before non-lazy content.\n *\n * ```markdown\n * | \n * > | asd\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return continuationStart(code)\n }\n effects.enter('htmlFlowData')\n return continuation(code)\n }\n\n /**\n * In comment continuation, after one `-`, expecting another.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after `<`, at `/`.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code)\n buffer = ''\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In raw continuation, after ` | \n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase()\n if (htmlRawNames.includes(name)) {\n effects.consume(code)\n return continuationClose\n }\n return continuation(code)\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n effects.consume(code)\n // @ts-expect-error: not null.\n buffer += String.fromCharCode(code)\n return continuationRawEndTag\n }\n return continuation(code)\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | \n * ^\n * > | &<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code)\n return continuationClose\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code)\n return continuationDeclarationInside\n }\n return continuation(code)\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('htmlFlowData')\n return continuationAfter(code)\n }\n effects.consume(code)\n return continuationClose\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | \n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit('htmlFlow')\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return after\n }\n return nok(code)\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > |
\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return effects.attempt(blankLine, ok, nok)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding, markdownSpace} from 'micromark-util-character'\n/** @type {Construct} */\nconst nonLazyContinuation = {\n tokenize: tokenizeNonLazyContinuation,\n partial: true\n}\n\n/** @type {Construct} */\nexport const codeFenced = {\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced,\n concrete: true\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this\n /** @type {Construct} */\n const closeStart = {\n tokenize: tokenizeCloseStart,\n partial: true\n }\n let initialPrefix = 0\n let sizeOpen = 0\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code)\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1]\n initialPrefix =\n tail && tail[1].type === 'linePrefix'\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n marker = code\n effects.enter('codeFenced')\n effects.enter('codeFencedFence')\n effects.enter('codeFencedFenceSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++\n effects.consume(code)\n return sequenceOpen\n }\n if (sizeOpen < 3) {\n return nok(code)\n }\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, infoBefore, 'whitespace')(code)\n : infoBefore(code)\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return self.interrupt\n ? ok(code)\n : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFencedFenceInfo')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return info(code)\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return infoBefore(code)\n }\n if (markdownSpace(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceInfo')\n return factorySpace(effects, metaBefore, 'whitespace')(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return info\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code)\n }\n effects.enter('codeFencedFenceMeta')\n effects.enter('chunkString', {\n contentType: 'string'\n })\n return meta(code)\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('chunkString')\n effects.exit('codeFencedFenceMeta')\n return infoBefore(code)\n }\n if (code === 96 && code === marker) {\n return nok(code)\n }\n effects.consume(code)\n return meta\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code)\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return contentStart\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code)\n ? factorySpace(\n effects,\n beforeContentChunk,\n 'linePrefix',\n initialPrefix + 1\n )(code)\n : beforeContentChunk(code)\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)\n }\n effects.enter('codeFlowValue')\n return contentChunk(code)\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFlowValue')\n return beforeContentChunk(code)\n }\n effects.consume(code)\n return contentChunk\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit('codeFenced')\n return ok(code)\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0\n return startBefore\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return start\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter('codeFencedFence')\n return markdownSpace(code)\n ? factorySpace(\n effects,\n beforeSequenceClose,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : beforeSequenceClose(code)\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter('codeFencedFenceSequence')\n return sequenceClose(code)\n }\n return nok(code)\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++\n effects.consume(code)\n return sequenceClose\n }\n if (size >= sizeOpen) {\n effects.exit('codeFencedFenceSequence')\n return markdownSpace(code)\n ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)\n : sequenceCloseAfter(code)\n }\n return nok(code)\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit('codeFencedFence')\n return ok(code)\n }\n return nok(code)\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this\n return start\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code)\n }\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineStart\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {\n asciiAlphanumeric,\n asciiDigit,\n asciiHexDigit\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this\n let size = 0\n /** @type {number} */\n let max\n /** @type {(code: Code) => boolean} */\n let test\n return start\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterReference')\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n return open\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter('characterReferenceMarkerNumeric')\n effects.consume(code)\n effects.exit('characterReferenceMarkerNumeric')\n return numeric\n }\n effects.enter('characterReferenceValue')\n max = 31\n test = asciiAlphanumeric\n return value(code)\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter('characterReferenceMarkerHexadecimal')\n effects.consume(code)\n effects.exit('characterReferenceMarkerHexadecimal')\n effects.enter('characterReferenceValue')\n max = 6\n test = asciiHexDigit\n return value\n }\n effects.enter('characterReferenceValue')\n max = 7\n test = asciiDigit\n return value(code)\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit('characterReferenceValue')\n if (\n test === asciiAlphanumeric &&\n !decodeNamedCharacterReference(self.sliceSerialize(token))\n ) {\n return nok(code)\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter('characterReferenceMarker')\n effects.consume(code)\n effects.exit('characterReferenceMarker')\n effects.exit('characterReference')\n return ok\n }\n if (test(code) && size++ < max) {\n effects.consume(code)\n return value\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {asciiPunctuation} from 'micromark-util-character'\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('characterEscape')\n effects.enter('escapeMarker')\n effects.consume(code)\n effects.exit('escapeMarker')\n return inside\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter('characterEscapeValue')\n effects.consume(code)\n effects.exit('characterEscapeValue')\n effects.exit('characterEscape')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start\n\n /** @type {State} */\n function start(code) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return factorySpace(effects, ok, 'linePrefix')\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factoryDestination} from 'micromark-factory-destination'\nimport {factoryLabel} from 'micromark-factory-label'\nimport {factoryTitle} from 'micromark-factory-title'\nimport {factoryWhitespace} from 'micromark-factory-whitespace'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {push, splice} from 'micromark-util-chunked'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n tokenize: tokenizeLabelEnd,\n resolveTo: resolveToLabelEnd,\n resolveAll: resolveAllLabelEnd\n}\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n}\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n}\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n}\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1\n while (++index < events.length) {\n const token = events[index][1]\n if (\n token.type === 'labelImage' ||\n token.type === 'labelLink' ||\n token.type === 'labelEnd'\n ) {\n // Remove the marker.\n events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)\n token.type = 'data'\n index++\n }\n }\n return events\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length\n let offset = 0\n /** @type {Token} */\n let token\n /** @type {number | undefined} */\n let open\n /** @type {number | undefined} */\n let close\n /** @type {Array} */\n let media\n\n // Find an opening.\n while (index--) {\n token = events[index][1]\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (\n token.type === 'link' ||\n (token.type === 'labelLink' && token._inactive)\n ) {\n break\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === 'labelLink') {\n token._inactive = true\n }\n } else if (close) {\n if (\n events[index][0] === 'enter' &&\n (token.type === 'labelImage' || token.type === 'labelLink') &&\n !token._balanced\n ) {\n open = index\n if (token.type !== 'labelLink') {\n offset = 2\n break\n }\n }\n } else if (token.type === 'labelEnd') {\n close = index\n }\n }\n const group = {\n type: events[open][1].type === 'labelLink' ? 'link' : 'image',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n const label = {\n type: 'label',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[close][1].end)\n }\n const text = {\n type: 'labelText',\n start: Object.assign({}, events[open + offset + 2][1].end),\n end: Object.assign({}, events[close - 2][1].start)\n }\n media = [\n ['enter', group, context],\n ['enter', label, context]\n ]\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3))\n\n // Text open.\n media = push(media, [['enter', text, context]])\n\n // Always populated by defaults.\n\n // Between.\n media = push(\n media,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + offset + 4, close - 3),\n context\n )\n )\n\n // Text close, marker close, label close.\n media = push(media, [\n ['exit', text, context],\n events[close - 2],\n events[close - 1],\n ['exit', label, context]\n ])\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1))\n\n // Media close.\n media = push(media, [['exit', group, context]])\n splice(events, open, events.length, media)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Token} */\n let labelStart\n /** @type {boolean} */\n let defined\n\n // Find an opening.\n while (index--) {\n if (\n (self.events[index][1].type === 'labelImage' ||\n self.events[index][1].type === 'labelLink') &&\n !self.events[index][1]._balanced\n ) {\n labelStart = self.events[index][1]\n break\n }\n }\n return start\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code)\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code)\n }\n defined = self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n )\n effects.enter('labelEnd')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelEnd')\n return after\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(\n resourceConstruct,\n labelEndOk,\n defined ? labelEndOk : labelEndNok\n )(code)\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(\n referenceFullConstruct,\n labelEndOk,\n defined ? referenceNotFull : labelEndNok\n )(code)\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code)\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(\n referenceCollapsedConstruct,\n labelEndOk,\n labelEndNok\n )(code)\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code)\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter('resource')\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n return resourceBefore\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceOpen)(code)\n : resourceOpen(code)\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code)\n }\n return factoryDestination(\n effects,\n resourceDestinationAfter,\n resourceDestinationMissing,\n 'resourceDestination',\n 'resourceDestinationLiteral',\n 'resourceDestinationLiteralMarker',\n 'resourceDestinationRaw',\n 'resourceDestinationString',\n 32\n )(code)\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceBetween)(code)\n : resourceEnd(code)\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code)\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(\n effects,\n resourceTitleAfter,\n nok,\n 'resourceTitle',\n 'resourceTitleMarker',\n 'resourceTitleString'\n )(code)\n }\n return resourceEnd(code)\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code)\n ? factoryWhitespace(effects, resourceEnd)(code)\n : resourceEnd(code)\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter('resourceMarker')\n effects.consume(code)\n effects.exit('resourceMarker')\n effects.exit('resource')\n return ok\n }\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this\n return referenceFull\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(\n self,\n effects,\n referenceFullAfter,\n referenceFullMissing,\n 'reference',\n 'referenceMarker',\n 'referenceString'\n )(code)\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(\n normalizeIdentifier(\n self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)\n )\n )\n ? ok(code)\n : nok(code)\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter('reference')\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n return referenceCollapsedOpen\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter('referenceMarker')\n effects.consume(code)\n effects.exit('referenceMarker')\n effects.exit('reference')\n return ok\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n tokenize: tokenizeLabelStartImage,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelImage')\n effects.enter('labelImageMarker')\n effects.consume(code)\n effects.exit('labelImageMarker')\n return open\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelImage')\n return after\n }\n return nok(code)\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * ![^a](b)\n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n *

!^a

\n *

!^a

\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return 1\n }\n if (unicodePunctuation(code)) {\n return 2\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {push, splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n tokenize: tokenizeAttention,\n resolveAll: resolveAllAttention\n}\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\nfunction resolveAllAttention(events, context) {\n let index = -1\n /** @type {number} */\n let open\n /** @type {Token} */\n let group\n /** @type {Token} */\n let text\n /** @type {Token} */\n let openingSequence\n /** @type {Token} */\n let closingSequence\n /** @type {number} */\n let use\n /** @type {Array} */\n let nextEvents\n /** @type {number} */\n let offset\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'attentionSequence' &&\n events[index][1]._close\n ) {\n open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'attentionSequence' &&\n events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) ===\n context.sliceSerialize(events[index][1]).charCodeAt(0)\n ) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if (\n (events[open][1]._close || events[index][1]._open) &&\n (events[index][1].end.offset - events[index][1].start.offset) % 3 &&\n !(\n (events[open][1].end.offset -\n events[open][1].start.offset +\n events[index][1].end.offset -\n events[index][1].start.offset) %\n 3\n )\n ) {\n continue\n }\n\n // Number of markers to use from the sequence.\n use =\n events[open][1].end.offset - events[open][1].start.offset > 1 &&\n events[index][1].end.offset - events[index][1].start.offset > 1\n ? 2\n : 1\n const start = Object.assign({}, events[open][1].end)\n const end = Object.assign({}, events[index][1].start)\n movePoint(start, -use)\n movePoint(end, use)\n openingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start,\n end: Object.assign({}, events[open][1].end)\n }\n closingSequence = {\n type: use > 1 ? 'strongSequence' : 'emphasisSequence',\n start: Object.assign({}, events[index][1].start),\n end\n }\n text = {\n type: use > 1 ? 'strongText' : 'emphasisText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n group = {\n type: use > 1 ? 'strong' : 'emphasis',\n start: Object.assign({}, openingSequence.start),\n end: Object.assign({}, closingSequence.end)\n }\n events[open][1].end = Object.assign({}, openingSequence.start)\n events[index][1].start = Object.assign({}, closingSequence.end)\n nextEvents = []\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [\n ['enter', events[open][1], context],\n ['exit', events[open][1], context]\n ])\n }\n\n // Opening.\n nextEvents = push(nextEvents, [\n ['enter', group, context],\n ['enter', openingSequence, context],\n ['exit', openingSequence, context],\n ['enter', text, context]\n ])\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(\n nextEvents,\n resolveAll(\n context.parser.constructs.insideSpan.null,\n events.slice(open + 1, index),\n context\n )\n )\n\n // Closing.\n nextEvents = push(nextEvents, [\n ['exit', text, context],\n ['enter', closingSequence, context],\n ['exit', closingSequence, context],\n ['exit', group, context]\n ])\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2\n nextEvents = push(nextEvents, [\n ['enter', events[index][1], context],\n ['exit', events[index][1], context]\n ])\n } else {\n offset = 0\n }\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - offset - 2\n break\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data'\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null\n const previous = this.previous\n const before = classifyCharacter(previous)\n\n /** @type {NonNullable} */\n let marker\n return start\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code\n effects.enter('attentionSequence')\n return inside(code)\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n const token = effects.exit('attentionSequence')\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code)\n\n // Always populated by defaults.\n\n const open =\n !after || (after === 2 && before) || attentionMarkers.includes(code)\n const close =\n !before || (before === 2 && after) || attentionMarkers.includes(previous)\n token._open = Boolean(marker === 42 ? open : open && (before || !close))\n token._close = Boolean(marker === 42 ? close : close && (after || !open))\n return ok(code)\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * @param {number} offset\n * @returns {void}\n */\nfunction movePoint(point, offset) {\n point.column += offset\n point.offset += offset\n point._bufferIndex += offset\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiAtext,\n asciiControl\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0\n return start\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('autolink')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.enter('autolinkProtocol')\n return open\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code)\n return schemeOrEmailAtext\n }\n return emailAtext(code)\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1\n return schemeInsideOrEmailAtext(code)\n }\n return emailAtext(code)\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | ab\n * ^\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code)\n size = 0\n return urlInside\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (\n (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&\n size++ < 32\n ) {\n effects.consume(code)\n return schemeInsideOrEmailAtext\n }\n size = 0\n return emailAtext(code)\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit('autolinkProtocol')\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code)\n }\n effects.consume(code)\n return urlInside\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code)\n return emailAtSignOrDot\n }\n if (asciiAtext(code)) {\n effects.consume(code)\n return emailAtext\n }\n return nok(code)\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | ab\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code)\n size = 0\n return emailAtSignOrDot\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit('autolinkProtocol').type = 'autolinkEmail'\n effects.enter('autolinkMarker')\n effects.consume(code)\n effects.exit('autolinkMarker')\n effects.exit('autolink')\n return ok\n }\n return emailValue(code)\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | ab\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel\n effects.consume(code)\n return next\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this\n /** @type {NonNullable | undefined} */\n let marker\n /** @type {number} */\n let index\n /** @type {State} */\n let returnState\n return start\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('htmlText')\n effects.enter('htmlTextData')\n effects.consume(code)\n return open\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a c\n * ^\n * > | a c\n * ^\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code)\n return declarationOpen\n }\n if (code === 47) {\n effects.consume(code)\n return tagCloseStart\n }\n if (code === 63) {\n effects.consume(code)\n return instruction\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagOpen\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * > | a c\n * ^\n * > | a &<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code)\n return commentOpenInside\n }\n if (code === 91) {\n effects.consume(code)\n index = 0\n return cdataOpenInside\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return declaration\n }\n return nok(code)\n }\n\n /**\n * In a comment, after ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return nok(code)\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 45) {\n effects.consume(code)\n return commentClose\n }\n if (markdownLineEnding(code)) {\n returnState = comment\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return comment\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code)\n return commentEnd\n }\n return comment(code)\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62\n ? end(code)\n : code === 45\n ? commentClose(code)\n : comment(code)\n }\n\n /**\n * After ` | a &<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = 'CDATA['\n if (code === value.charCodeAt(index++)) {\n effects.consume(code)\n return index === value.length ? cdata : cdataOpenInside\n }\n return nok(code)\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a &<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataClose\n }\n if (markdownLineEnding(code)) {\n returnState = cdata\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return cdata\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a &<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code)\n }\n if (code === 93) {\n effects.consume(code)\n return cdataEnd\n }\n return cdata(code)\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code)\n }\n if (markdownLineEnding(code)) {\n returnState = declaration\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return declaration\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code)\n }\n if (code === 63) {\n effects.consume(code)\n return instructionClose\n }\n if (markdownLineEnding(code)) {\n returnState = instruction\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return instruction\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code)\n return tagClose\n }\n return nok(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagClose\n }\n return tagCloseBetween(code)\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagCloseBetween\n }\n return end(code)\n }\n\n /**\n * After ` | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code)\n return tagOpen\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code)\n return end\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenBetween\n }\n return end(code)\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (\n code === 45 ||\n code === 46 ||\n code === 58 ||\n code === 95 ||\n asciiAlphanumeric(code)\n ) {\n effects.consume(code)\n return tagOpenAttributeName\n }\n return tagOpenAttributeNameAfter(code)\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeNameAfter\n }\n return tagOpenBetween(code)\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (\n code === null ||\n code === 60 ||\n code === 61 ||\n code === 62 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 34 || code === 39) {\n effects.consume(code)\n marker = code\n return tagOpenAttributeValueQuoted\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore\n return lineEndingBefore(code)\n }\n if (markdownSpace(code)) {\n effects.consume(code)\n return tagOpenAttributeValueBefore\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code)\n marker = undefined\n return tagOpenAttributeValueQuotedAfter\n }\n if (code === null) {\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted\n return lineEndingBefore(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueQuoted\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (\n code === null ||\n code === 34 ||\n code === 39 ||\n code === 60 ||\n code === 61 ||\n code === 96\n ) {\n return nok(code)\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n effects.consume(code)\n return tagOpenAttributeValueUnquoted\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code)\n }\n return nok(code)\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code)\n effects.exit('htmlTextData')\n effects.exit('htmlText')\n return ok\n }\n return nok(code)\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a \n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit('htmlTextData')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return lineEndingAfter\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code)\n ? factorySpace(\n effects,\n lineEndingAfterPrefix,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n : lineEndingAfterPrefix(code)\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a \n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter('htmlTextData')\n return returnState(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {labelEnd} from './label-end.js'\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n tokenize: tokenizeLabelStartLink,\n resolveAll: labelEnd.resolveAll\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this\n return start\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('labelLink')\n effects.enter('labelMarker')\n effects.consume(code)\n effects.exit('labelMarker')\n effects.exit('labelLink')\n return after\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs\n ? nok(code)\n : ok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('hardBreakEscape')\n effects.consume(code)\n return after\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit('hardBreakEscape')\n return ok(code)\n }\n return nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Construct} Construct\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {markdownLineEnding} from 'micromark-util-character'\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n tokenize: tokenizeCodeText,\n resolve: resolveCodeText,\n previous\n}\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4\n let headEnterIndex = 3\n /** @type {number} */\n let index\n /** @type {number | undefined} */\n let enter\n\n // If we start and end with an EOL or a space.\n if (\n (events[headEnterIndex][1].type === 'lineEnding' ||\n events[headEnterIndex][1].type === 'space') &&\n (events[tailExitIndex][1].type === 'lineEnding' ||\n events[tailExitIndex][1].type === 'space')\n ) {\n index = headEnterIndex\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === 'codeTextData') {\n // Then we have padding.\n events[headEnterIndex][1].type = 'codeTextPadding'\n events[tailExitIndex][1].type = 'codeTextPadding'\n headEnterIndex += 2\n tailExitIndex -= 2\n break\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1\n tailExitIndex++\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {\n enter = index\n }\n } else if (\n index === tailExitIndex ||\n events[index][1].type === 'lineEnding'\n ) {\n events[enter][1].type = 'codeTextData'\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end\n events.splice(enter + 2, index - enter - 2)\n tailExitIndex -= index - enter - 2\n index = enter + 2\n }\n enter = undefined\n }\n }\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return (\n code !== 96 ||\n this.events[this.events.length - 1][1].type === 'characterEscape'\n )\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this\n let sizeOpen = 0\n /** @type {number} */\n let size\n /** @type {Token} */\n let token\n return start\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('codeText')\n effects.enter('codeTextSequence')\n return sequenceOpen(code)\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code)\n sizeOpen++\n return sequenceOpen\n }\n effects.exit('codeTextSequence')\n return between(code)\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code)\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space')\n effects.consume(code)\n effects.exit('space')\n return between\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter('codeTextSequence')\n size = 0\n return sequenceClose(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return between\n }\n\n // Data.\n effects.enter('codeTextData')\n return data(code)\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (\n code === null ||\n code === 32 ||\n code === 96 ||\n markdownLineEnding(code)\n ) {\n effects.exit('codeTextData')\n return between(code)\n }\n effects.consume(code)\n return data\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code)\n size++\n return sequenceClose\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit('codeTextSequence')\n effects.exit('codeText')\n return ok(code)\n }\n\n // More or less accents: mark as data.\n token.type = 'codeTextData'\n return data(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n */\n\nimport {\n attention,\n autolink,\n blockQuote,\n characterEscape,\n characterReference,\n codeFenced,\n codeIndented,\n codeText,\n definition,\n hardBreakEscape,\n headingAtx,\n htmlFlow,\n htmlText,\n labelEnd,\n labelStartImage,\n labelStartLink,\n lineEnding,\n list,\n setextUnderline,\n thematicBreak\n} from 'micromark-core-commonmark'\nimport {resolver as resolveText} from './initialize/text.js'\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n}\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n}\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n}\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n}\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n}\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n}\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n}\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n}\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n}\n","/**\n * @typedef {import('micromark-util-types').Chunk} Chunk\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Value} Value\n */\n\n/**\n * @callback Preprocessor\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {boolean | null | undefined} [end=false]\n * @returns {Array}\n */\n\nconst search = /[\\0\\t\\n\\r]/g\n\n/**\n * @returns {Preprocessor}\n */\nexport function preprocess() {\n let column = 1\n let buffer = ''\n /** @type {boolean | undefined} */\n let start = true\n /** @type {boolean | undefined} */\n let atCarriageReturn\n return preprocessor\n\n /** @type {Preprocessor} */\n function preprocessor(value, encoding, end) {\n /** @type {Array} */\n const chunks = []\n /** @type {RegExpMatchArray | null} */\n let match\n /** @type {number} */\n let next\n /** @type {number} */\n let startPosition\n /** @type {number} */\n let endPosition\n /** @type {Code} */\n let code\n\n // @ts-expect-error `Buffer` does allow an encoding.\n value = buffer + value.toString(encoding)\n startPosition = 0\n buffer = ''\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++\n }\n start = undefined\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition\n match = search.exec(value)\n endPosition =\n match && match.index !== undefined ? match.index : value.length\n code = value.charCodeAt(endPosition)\n if (!match) {\n buffer = value.slice(startPosition)\n break\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3)\n atCarriageReturn = undefined\n } else {\n if (atCarriageReturn) {\n chunks.push(-5)\n atCarriageReturn = undefined\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition))\n column += endPosition - startPosition\n }\n switch (code) {\n case 0: {\n chunks.push(65533)\n column++\n break\n }\n case 9: {\n next = Math.ceil(column / 4) * 4\n chunks.push(-2)\n while (column++ < next) chunks.push(-1)\n break\n }\n case 10: {\n chunks.push(-4)\n column = 1\n break\n }\n default: {\n atCarriageReturn = true\n column = 1\n }\n }\n }\n startPosition = endPosition + 1\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5)\n if (buffer) chunks.push(buffer)\n chunks.push(null)\n }\n return chunks\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base)\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 ||\n code === 11 ||\n (code > 13 && code < 32) ||\n // Control character (DEL) of C0, and C1 controls.\n (code > 126 && code < 160) ||\n // Lone high surrogates and low surrogates.\n (code > 55295 && code < 57344) ||\n // Noncharacters.\n (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||\n (code & 65535) === 65535 ||\n (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||\n // Out of range\n code > 1114111\n ) {\n return '\\uFFFD'\n }\n return String.fromCharCode(code)\n}\n","import {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nconst characterEscapeOrReference =\n /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @param {string} $2\n * @returns {string}\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1\n }\n\n // Reference.\n const head = $2.charCodeAt(0)\n if (head === 35) {\n const head = $2.charCodeAt(1)\n const hex = head === 120 || head === 88\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)\n }\n return decodeNamedCharacterReference($2) || $0\n}\n","/**\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').HTML} HTML\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Root | Content} Node\n * @typedef {Extract} Parent\n *\n * @typedef {Omit & {type: 'fragment', children: Array}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | undefined | null | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {Record} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array} transforms\n * Tree transforms.\n *\n * @typedef {Partial} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array} stack\n * Stack of nodes.\n * @property {Array} tokenStack\n * Stack of tokens.\n * @property {(key: Key) => CompileData[Key]} getData\n * Get data from the key/value store.\n * @property {(key: Key, value?: CompileData[Key]) => void} setData\n * Set data into the key/value store.\n * @property {(this: CompileContext) => void} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter\n * Enter a token.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit\n * Exit a token.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\n */\n\n// To do: micromark: create a registry of tokens?\n// To do: next major: don’t return given `Node` from `enter`.\n// To do: next major: remove setter/getter.\n\nimport {toString} from 'mdast-util-to-string'\nimport {parse} from 'micromark/lib/parse.js'\nimport {preprocess} from 'micromark/lib/preprocess.js'\nimport {postprocess} from 'micromark/lib/postprocess.js'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {decodeString} from 'micromark-util-decode-string'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {stringifyPosition} from 'unist-util-stringify-position'\nconst own = {}.hasOwnProperty\n\n/**\n * @param value\n * Markdown to parse.\n * @param encoding\n * Character encoding for when `value` is `Buffer`.\n * @param options\n * Configuration.\n * @returns\n * mdast tree.\n */\nexport const fromMarkdown =\n /**\n * @type {(\n * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &\n * ((value: Value, options?: Options | null | undefined) => Root)\n * )}\n */\n\n /**\n * @param {Value} value\n * @param {Encoding | Options | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n */\n function (value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n return compiler(options)(\n postprocess(\n parse(options).document().write(preprocess()(value, encoding, true))\n )\n )\n }\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n }\n configure(config, (options || {}).mdastExtensions || [])\n\n /** @type {CompileData} */\n const data = {}\n return compile\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n }\n /** @type {Omit} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n setData,\n getData\n }\n /** @type {Array} */\n const listStack = []\n let index = -1\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n const tail = listStack.pop()\n index = prepareList(events, tail, index)\n }\n }\n }\n index = -1\n while (++index < events.length) {\n const handler = config[events[index][0]]\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n Object.assign(\n {\n sliceSerialize: events[index][2].sliceSerialize\n },\n context\n ),\n events[index][1]\n )\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1]\n const handler = tail[1] || defaultOnError\n handler.call(context, undefined, tail[0])\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length > 0\n ? events[0][1].start\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n ),\n end: point(\n events.length > 0\n ? events[events.length - 2][1].end\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n )\n }\n\n // Call transforms.\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n return tree\n }\n\n /**\n * @param {Array} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1\n let containerBalance = -1\n let listSpread = false\n /** @type {Token | undefined} */\n let listItem\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number | undefined} */\n let firstBlankLineIndex\n /** @type {boolean | undefined} */\n let atMarker\n while (++index <= length) {\n const event = events[index]\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n let tailIndex = index\n lineIndex = undefined\n while (tailIndex--) {\n const tailEvent = events[tailIndex]\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = Object.assign(\n {},\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])\n index++\n length++\n }\n\n // Create a new list item.\n if (event[1].type === 'listItemPrefix') {\n listItem = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n }\n // @ts-expect-error: `listItem` is most definitely defined, TS...\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n events[start][1]._spread = listSpread\n return length\n }\n\n /**\n * Set data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @param {CompileData[Key]} [value]\n * New value.\n * @returns {void}\n * Nothing.\n */\n function setData(key, value) {\n data[key] = value\n }\n\n /**\n * Get data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @returns {CompileData[Key]}\n * Value.\n */\n function getData(key) {\n return data[key]\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Node} create\n * Create a node.\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @returns {void}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n })\n }\n\n /**\n * @template {Node} Kind\n * Node type.\n * @this {CompileContext}\n * Context.\n * @param {Kind} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {Kind}\n * The given node.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1]\n // @ts-expect-error: Assume `Node` can exist as a child of `parent`.\n parent.children.push(node)\n this.stack.push(node)\n this.tokenStack.push([token, errorHandler])\n // @ts-expect-error: `end` will be patched later.\n node.position = {\n start: point(token.start)\n }\n return node\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {Node}\n * The closed node.\n */\n function exit(token, onExitError) {\n const node = this.stack.pop()\n const open = this.tokenStack.pop()\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({\n start: token.start,\n end: token.end\n }) +\n '): it’s not open'\n )\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0])\n } else {\n const handler = open[1] || defaultOnError\n handler.call(this, token, open[0])\n }\n }\n node.position.end = point(token.end)\n return node\n }\n\n /**\n * @this {CompileContext}\n * @returns {string}\n */\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n const ancestor = this.stack[this.stack.length - 2]\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)\n setData('expectingFirstListItemValue')\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.lang = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.meta = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n setData('flowCodeInside')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1]\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length\n node.depth = depth\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1]\n node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1]\n let tail = node.children[node.children.length - 1]\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n // @ts-expect-error: we’ll add `end` later.\n tail.position = {\n start: point(token.start)\n }\n // @ts-expect-error: Assume `parent` accepts `text`.\n node.children.push(tail)\n }\n this.stack.push(tail)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1]\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n const tail = context.children[context.children.length - 1]\n tail.position.end = point(token.end)\n setData('atHardBreak')\n return\n }\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.includes(context.type)\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token)\n const ancestor = this.stack[this.stack.length - 2]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string)\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1]\n const value = this.resume()\n const node = this.stack[this.stack.length - 1]\n // Assume a reference.\n setData('inReference', true)\n if (node.type === 'link') {\n /** @type {Array} */\n // @ts-expect-error: Assume static phrasing content.\n const children = fragment.children\n node.children = children\n } else {\n node.alt = value\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n setData('inReference')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token)\n const type = getData('characterReferenceType')\n /** @type {string} */\n let value\n if (type) {\n value = decodeNumericCharacterReference(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n setData('characterReferenceType')\n } else {\n const result = decodeNamedCharacterReference(data)\n value = result\n }\n const tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = this.sliceSerialize(token)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n }\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n }\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n }\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n }\n }\n\n /** @returns {Heading} */\n function heading() {\n // @ts-expect-error `depth` will be set later.\n return {\n type: 'heading',\n depth: undefined,\n children: []\n }\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n }\n }\n\n /** @returns {HTML} */\n function html() {\n return {\n type: 'html',\n value: ''\n }\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n }\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n }\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n }\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n }\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n }\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Array>} extensions\n * @returns {void}\n */\nfunction configure(combined, extensions) {\n let index = -1\n while (++index < extensions.length) {\n const value = extensions[index]\n if (Array.isArray(value)) {\n configure(combined, value)\n } else {\n extension(combined, value)\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {void}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key\n for (key in extension) {\n if (own.call(extension, key)) {\n if (key === 'canContainEols') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'transforms') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'enter' || key === 'exit') {\n const right = extension[key]\n if (right) {\n Object.assign(combined[key], right)\n }\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error(\n 'Cannot close `' +\n left.type +\n '` (' +\n stringifyPosition({\n start: left.start,\n end: left.end\n }) +\n '): a different token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is open'\n )\n } else {\n throw new Error(\n 'Cannot close document, a token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is still open'\n )\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\nimport {subtokenize} from 'micromark-util-subtokenize'\n\n/**\n * @param {Array} events\n * @returns {Array}\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events\n}\n","/**\n * @typedef {import('micromark-util-types').Create} Create\n * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension\n * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct\n * @typedef {import('micromark-util-types').ParseContext} ParseContext\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n */\n\nimport {combineExtensions} from 'micromark-util-combine-extensions'\nimport {content} from './initialize/content.js'\nimport {document} from './initialize/document.js'\nimport {flow} from './initialize/flow.js'\nimport {text, string} from './initialize/text.js'\nimport {createTokenizer} from './create-tokenizer.js'\nimport * as defaultConstructs from './constructs.js'\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * @returns {ParseContext}\n */\nexport function parse(options) {\n const settings = options || {}\n const constructs =\n /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])])\n\n /** @type {ParseContext} */\n const parser = {\n defined: [],\n lazy: {},\n constructs,\n content: create(content),\n document: create(document),\n flow: create(flow),\n string: create(string),\n text: create(text)\n }\n return parser\n\n /**\n * @param {InitialConstruct} initial\n */\n function create(initial) {\n return creator\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from)\n }\n }\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * @this {import('unified').Processor}\n * @type {import('unified').Plugin<[Options?] | void[], string, Root>}\n */\nexport default function remarkParse(options) {\n /** @type {import('unified').ParserFunction} */\n const parser = (doc) => {\n // Assume options.\n const settings = /** @type {Options} */ (this.data('settings'))\n\n return fromMarkdown(\n doc,\n Object.assign({}, settings, options, {\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: this.data('micromarkExtensions') || [],\n mdastExtensions: this.data('fromMarkdownExtensions') || []\n })\n )\n }\n\n Object.assign(this, {Parser: parser})\n}\n","import {asciiAlphanumeric} from 'micromark-util-character'\nimport {encode} from 'micromark-util-encode'\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''))\n if (!protocol) {\n return value\n }\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash > -1 && colon > slash) ||\n (questionMark > -1 && colon > questionMark) ||\n (numberSign > -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))\n ) {\n return value\n }\n return ''\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array} */\n const result = []\n let index = -1\n let start = 0\n let skip = 0\n while (++index < value.length) {\n const code = value.charCodeAt(index)\n /** @type {string} */\n let replace = ''\n\n // A correct percent encoded value.\n if (\n code === 37 &&\n asciiAlphanumeric(value.charCodeAt(index + 1)) &&\n asciiAlphanumeric(value.charCodeAt(index + 2))\n ) {\n skip = 2\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code)\n }\n }\n // Astral.\n else if (code > 55295 && code < 57344) {\n const next = value.charCodeAt(index + 1)\n\n // A correct surrogate pair.\n if (code < 56320 && next > 56319 && next < 57344) {\n replace = String.fromCharCode(code, next)\n skip = 1\n }\n // Lone surrogate.\n else {\n replace = '\\uFFFD'\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code)\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace))\n start = index + skip + 1\n replace = ''\n }\n if (skip) {\n index += skip\n skip = 0\n }\n }\n return result.join('') + value.slice(start)\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\n/**\n * @typedef {Record} Props\n * @typedef {null | undefined | string | Props | TestFunctionAnything | Array} Test\n * Check for an arbitrary node, unaware of TypeScript inferral.\n *\n * @callback TestFunctionAnything\n * Check if a node passes a test, unaware of TypeScript inferral.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | void}\n * Whether this node passes the test.\n */\n\n/**\n * @template {Node} Kind\n * Node type.\n * @typedef {Kind['type'] | Partial | TestFunctionPredicate | Array | TestFunctionPredicate>} PredicateTest\n * Check for a node that can be inferred by TypeScript.\n */\n\n/**\n * Check if a node passes a certain test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback TestFunctionPredicate\n * Complex test function for a node that can be inferred by TypeScript.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this node passes the test.\n */\n\n/**\n * @callback AssertAnything\n * Check that an arbitrary value is a node, unaware of TypeScript inferral.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if a node is a node and passes a certain node test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback AssertPredicate\n * Check that an arbitrary value is a specific node, aware of TypeScript.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @param test\n * A check for a specific node.\n * @param index\n * The node’s position in its parent.\n * @param parent\n * The node’s parent.\n * @returns\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n /**\n * @type {(\n * (() => false) &\n * ((node: unknown, test: PredicateTest, index: number, parent: Parent, context?: unknown) => node is Kind) &\n * ((node: unknown, test: PredicateTest, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) &\n * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) &\n * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function is(node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n // @ts-expect-error Looks like a node.\n return node && node.type && typeof node.type === 'string'\n ? Boolean(check.call(context, node, index, parent))\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns\n * An assertion.\n */\nexport const convert =\n /**\n * @type {(\n * ((test: PredicateTest) => AssertPredicate) &\n * ((test?: Test) => AssertAnything)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {AssertAnything}\n */\n function (test) {\n if (test === undefined || test === null) {\n return ok\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test) ? anyFactory(test) : propsFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array} tests\n * @returns {AssertAnything}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @param {Array} parameters\n * @returns {boolean}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].call(this, ...parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {AssertAnything}\n */\nfunction propsFactory(check) {\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n /** @type {string} */\n let key\n\n for (key in check) {\n // @ts-expect-error: hush, it sure works as an index.\n if (node[key] !== check[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {AssertAnything}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunctionAnything} check\n * @returns {AssertAnything}\n */\nfunction castFactory(check) {\n return assertion\n\n /**\n * @this {unknown}\n * @param {unknown} node\n * @param {Array} parameters\n * @returns {boolean}\n */\n function assertion(node, ...parameters) {\n return Boolean(\n node &&\n typeof node === 'object' &&\n 'type' in node &&\n // @ts-expect-error: fine.\n Boolean(check.call(this, node, ...parameters))\n )\n }\n}\n\nfunction ok() {\n return true\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n */\n\n/**\n * @typedef {boolean | 'skip'} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * Tree type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {Visitor, Check>, Extract, Parent>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from './color.js'\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visitParents =\n /**\n * @type {(\n * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) &\n * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n test = null\n }\n\n const is = convert(test)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {Node} node\n * @param {number | undefined} index\n * @param {Array} parents\n */\n function factory(node, index, parents) {\n /** @type {Record} */\n // @ts-expect-error: hush\n const value = node && typeof node === 'object' ? node : {}\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {ActionTuple} */\n let result = []\n /** @type {ActionTuple} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || null)) {\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n // @ts-expect-error looks like a parent.\n if (node.children && result[0] !== SKIP) {\n // @ts-expect-error looks like a parent.\n offset = (reverse ? node.children.length : -1) + step\n // @ts-expect-error looks like a parent.\n grandparents = parents.concat(node)\n\n // @ts-expect-error looks like a parent.\n while (offset > -1 && offset < node.children.length) {\n // @ts-expect-error looks like a parent.\n subresult = factory(node.children[offset], offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n\n return result\n }\n }\n }\n )\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {ActionTuple}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return [value]\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * Check if `Child` can be a child of `Ancestor`.\n *\n * Returns the ancestor when `Child` can be a child of `Ancestor`, or returns\n * `never`.\n *\n * @template {Node} Ancestor\n * Node type.\n * @template {Node} Child\n * Node type.\n * @typedef {(\n * Ancestor extends Parent\n * ? Child extends Ancestor['children'][number]\n * ? Ancestor\n * : never\n * : never\n * )} ParentsOf\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends Node ? number | null : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends Node ? Ancestor | null : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} Visited\n * Node type.\n * @template {Parent} Ancestor\n * Parent type.\n * @typedef {Visitor>} BuildVisitorFromMatch\n */\n\n/**\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n * @typedef {(\n * BuildVisitorFromMatch<\n * import('unist-util-visit-parents/complex-types.js').Matches,\n * Extract\n * >\n * )} BuildVisitorFromDescendants\n */\n\n/**\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n *\n * @template {Node} [Tree=Node]\n * Node type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {(\n * BuildVisitorFromDescendants<\n * import('unist-util-visit-parents/complex-types.js').InclusiveDescendant,\n * Check\n * >\n * )} BuildVisitor\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visit =\n /**\n * @type {(\n * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) &\n * ((tree: Tree, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n visitor = test\n test = null\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {Node} node\n * @param {Array} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n return visitor(\n node,\n parent ? parent.children.indexOf(node) : null,\n parent\n )\n }\n }\n )\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n","/**\n * @typedef {import('unist').Position} Position\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Get the starting point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointStart = point('start')\n\n/**\n * Get the ending point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointEnd = point('end')\n\n/**\n * Get the positional info of `node`.\n *\n * @param {NodeLike | Node | null | undefined} [node]\n * Node.\n * @returns {Position}\n * Position.\n */\nexport function position(node) {\n return {start: pointStart(node), end: pointEnd(node)}\n}\n\n/**\n * Get the positional info of `node`.\n *\n * @param {'start' | 'end'} type\n * Side.\n * @returns\n * Getter.\n */\nfunction point(type) {\n return point\n\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {NodeLike | Node | null | undefined} [node]\n * @returns {Point}\n */\n function point(node) {\n const point = (node && node.position && node.position[type]) || {}\n\n // To do: next major: don’t return points when invalid.\n return {\n // @ts-expect-error: in practice, null is allowed.\n line: point.line || null,\n // @ts-expect-error: in practice, null is allowed.\n column: point.column || null,\n // @ts-expect-error: in practice, null is allowed.\n offset: point.offset > -1 ? point.offset : null\n }\n }\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Definition} Definition\n */\n\n/**\n * @typedef {Root | Content} Node\n *\n * @callback GetDefinition\n * Get a definition by identifier.\n * @param {string | null | undefined} [identifier]\n * Identifier of definition.\n * @returns {Definition | null}\n * Definition corresponding to `identifier` or `null`.\n */\n\nimport {visit} from 'unist-util-visit'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Find definitions in `tree`.\n *\n * Uses CommonMark precedence, which means that earlier definitions are\n * preferred over duplicate later definitions.\n *\n * @param {Node} tree\n * Tree to check.\n * @returns {GetDefinition}\n * Getter.\n */\nexport function definitions(tree) {\n /** @type {Record} */\n const cache = Object.create(null)\n\n if (!tree || !tree.type) {\n throw new Error('mdast-util-definitions expected node')\n }\n\n visit(tree, 'definition', (definition) => {\n const id = clean(definition.identifier)\n if (id && !own.call(cache, id)) {\n cache[id] = definition\n }\n })\n\n return definition\n\n /** @type {GetDefinition} */\n function definition(identifier) {\n const id = clean(identifier)\n // To do: next major: return `undefined` when not found.\n return id && own.call(cache, id) ? cache[id] : null\n }\n}\n\n/**\n * @param {string | null | undefined} [value]\n * @returns {string}\n */\nfunction clean(value) {\n return String(value || '').toUpperCase()\n}\n","/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('hast').Element} Element\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {FootnoteReference} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function footnoteReference(state, node) {\n const id = String(node.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n const index = state.footnoteOrder.indexOf(id)\n /** @type {number} */\n let counter\n\n if (index === -1) {\n state.footnoteOrder.push(id)\n state.footnoteCounts[id] = 1\n counter = state.footnoteOrder.length\n } else {\n state.footnoteCounts[id]++\n counter = index + 1\n }\n\n const reuseCounter = state.footnoteCounts[id]\n\n /** @type {Element} */\n const link = {\n type: 'element',\n tagName: 'a',\n properties: {\n href: '#' + state.clobberPrefix + 'fn-' + safeId,\n id:\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (reuseCounter > 1 ? '-' + reuseCounter : ''),\n dataFootnoteRef: true,\n ariaDescribedBy: ['footnote-label']\n },\n children: [{type: 'text', value: String(counter)}]\n }\n state.patch(node, link)\n\n /** @type {Element} */\n const sup = {\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [link]\n }\n state.patch(node, sup)\n return state.applyData(node, sup)\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Reference} Reference\n * @typedef {import('mdast').Root} Root\n *\n * @typedef {import('./state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} References\n */\n\n// To do: next major: always return array.\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {References} node\n * Reference node (image, link).\n * @returns {ElementContent | Array}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return {type: 'text', value: '![' + node.alt + suffix}\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | null | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: .\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === undefined || spread === null\n ? node.children.length > 1\n : spread\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {footnote} from './footnote.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n footnote,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n // To do: next major: return `undefined`.\n return null\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').Break} Break\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Code} Code\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n // To do: next major, use `node.lang` w/o regex, the splitting’s been going\n // on for years in remark now.\n const lang = node.lang ? node.lang.match(/^[^ \\t]+(?=[ \\t]|$)/) : null\n /** @type {Properties} */\n const properties = {}\n\n if (lang) {\n properties.className = ['language-' + lang]\n }\n\n // Create ``.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `
`.\n  result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n  state.patch(node, result)\n  return result\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Delete} Delete\n * @typedef {import('../state.js').State} State\n\n */\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Delete} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strikethrough(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'del',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Emphasis} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function emphasis(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'em',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Footnote} Footnote\n * @typedef {import('../state.js').State} State\n */\n\nimport {footnoteReference} from './footnote-reference.js'\n\n// To do: when both:\n// * \n// * \n// …are archived, remove this (also from mdast).\n// These inline notes are not used in GFM.\n\n/**\n * Turn an mdast `footnote` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Footnote} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function footnote(state, node) {\n  const footnoteById = state.footnoteById\n  let no = 1\n\n  while (no in footnoteById) no++\n\n  const identifier = String(no)\n\n  footnoteById[identifier] = {\n    type: 'footnoteDefinition',\n    identifier,\n    children: [{type: 'paragraph', children: node.children}],\n    position: node.position\n  }\n\n  return footnoteReference(state, {\n    type: 'footnoteReference',\n    identifier,\n    position: node.position\n  })\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Heading} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function heading(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'h' + node.depth,\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').HTML} Html\n * @typedef {import('../state.js').State} State\n * @typedef {import('../../index.js').Raw} Raw\n */\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n *   Info passed around.\n * @param {Html} node\n *   mdast node.\n * @returns {Raw | Element | null}\n *   hast node.\n */\nexport function html(state, node) {\n  if (state.dangerous) {\n    /** @type {Raw} */\n    const result = {type: 'raw', value: node.value}\n    state.patch(node, result)\n    return state.applyData(node, result)\n  }\n\n  // To do: next major: return `undefined`.\n  return null\n}\n","/**\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ImageReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function imageReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(def.url || ''), alt: node.alt}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Image} Image\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Image} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function image(state, node) {\n  /** @type {Properties} */\n  const properties = {src: normalizeUri(node.url)}\n\n  if (node.alt !== null && node.alt !== undefined) {\n    properties.alt = node.alt\n  }\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {type: 'element', tagName: 'img', properties, children: []}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {InlineCode} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function inlineCode(state, node) {\n  /** @type {Text} */\n  const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n  state.patch(node, text)\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'code',\n    properties: {},\n    children: [text]\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {LinkReference} node\n *   mdast node.\n * @returns {ElementContent | Array}\n *   hast node.\n */\nexport function linkReference(state, node) {\n  const def = state.definition(node.identifier)\n\n  if (!def) {\n    return revert(state, node)\n  }\n\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(def.url || '')}\n\n  if (def.title !== null && def.title !== undefined) {\n    properties.title = def.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').Link} Link\n * @typedef {import('../state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Link} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function link(state, node) {\n  /** @type {Properties} */\n  const properties = {href: normalizeUri(node.url)}\n\n  if (node.title !== null && node.title !== undefined) {\n    properties.title = node.title\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'a',\n    properties,\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('mdast').List} List\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {List} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function list(state, node) {\n  /** @type {Properties} */\n  const properties = {}\n  const results = state.all(node)\n  let index = -1\n\n  if (typeof node.start === 'number' && node.start !== 1) {\n    properties.start = node.start\n  }\n\n  // Like GitHub, add a class for custom styling.\n  while (++index < results.length) {\n    const child = results[index]\n\n    if (\n      child.type === 'element' &&\n      child.tagName === 'li' &&\n      child.properties &&\n      Array.isArray(child.properties.className) &&\n      child.properties.className.includes('task-list-item')\n    ) {\n      properties.className = ['contains-task-list']\n      break\n    }\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: node.ordered ? 'ol' : 'ul',\n    properties,\n    children: state.wrap(results, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Paragraph} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function paragraph(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'p',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastRoot} node\n *   mdast node.\n * @returns {HastRoot | HastElement}\n *   hast node.\n */\nexport function root(state, node) {\n  /** @type {HastRoot} */\n  const result = {type: 'root', children: state.wrap(state.all(node))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Strong} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function strong(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'strong',\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').Table} Table\n * @typedef {import('../state.js').State} State\n */\n\nimport {pointStart, pointEnd} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {Table} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function table(state, node) {\n  const rows = state.all(node)\n  const firstRow = rows.shift()\n  /** @type {Array} */\n  const tableContent = []\n\n  if (firstRow) {\n    /** @type {Element} */\n    const head = {\n      type: 'element',\n      tagName: 'thead',\n      properties: {},\n      children: state.wrap([firstRow], true)\n    }\n    state.patch(node.children[0], head)\n    tableContent.push(head)\n  }\n\n  if (rows.length > 0) {\n    /** @type {Element} */\n    const body = {\n      type: 'element',\n      tagName: 'tbody',\n      properties: {},\n      children: state.wrap(rows, true)\n    }\n\n    const start = pointStart(node.children[1])\n    const end = pointEnd(node.children[node.children.length - 1])\n    if (start.line && end.line) body.position = {start, end}\n    tableContent.push(body)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'table',\n    properties: {},\n    children: state.wrap(tableContent, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableCell} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function tableCell(state, node) {\n  // Note: this function is normally not called: see `table-row` for how rows\n  // and their cells are compiled.\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'td', // Assume body cell.\n    properties: {},\n    children: state.all(node)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * @typedef {Root | Content} Nodes\n * @typedef {Extract} Parents\n */\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {TableRow} node\n *   mdast node.\n * @param {Parents | null | undefined} parent\n *   Parent of `node`.\n * @returns {Element}\n *   hast node.\n */\nexport function tableRow(state, node, parent) {\n  const siblings = parent ? parent.children : undefined\n  // Generate a body row when without parent.\n  const rowIndex = siblings ? siblings.indexOf(node) : 1\n  const tagName = rowIndex === 0 ? 'th' : 'td'\n  const align = parent && parent.type === 'table' ? parent.align : undefined\n  const length = align ? align.length : node.children.length\n  let cellIndex = -1\n  /** @type {Array} */\n  const cells = []\n\n  while (++cellIndex < length) {\n    // Note: can also be undefined.\n    const cell = node.children[cellIndex]\n    /** @type {Properties} */\n    const properties = {}\n    const alignValue = align ? align[cellIndex] : undefined\n\n    if (alignValue) {\n      properties.align = alignValue\n    }\n\n    /** @type {Element} */\n    let result = {type: 'element', tagName, properties, children: []}\n\n    if (cell) {\n      result.children = state.all(cell)\n      state.patch(cell, result)\n      result = state.applyData(node, result)\n    }\n\n    cells.push(result)\n  }\n\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'tr',\n    properties: {},\n    children: state.wrap(cells, true)\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').Text} HastText\n * @typedef {import('mdast').Text} MdastText\n * @typedef {import('../state.js').State} State\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastText} node\n *   mdast node.\n * @returns {HastText | HastElement}\n *   hast node.\n */\nexport function text(state, node) {\n  /** @type {HastText} */\n  const result = {type: 'text', value: trimLines(String(node.value))}\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('../state.js').State} State\n */\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n *   Info passed around.\n * @param {ThematicBreak} node\n *   mdast node.\n * @returns {Element}\n *   hast node.\n */\nexport function thematicBreak(state, node) {\n  /** @type {Element} */\n  const result = {\n    type: 'element',\n    tagName: 'hr',\n    properties: {},\n    children: []\n  }\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Parent} MdastParent\n * @typedef {import('mdast').Root} MdastRoot\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n * @typedef {Extract} MdastParents\n *\n * @typedef EmbeddedHastFields\n *   hast fields.\n * @property {string | null | undefined} [hName]\n *   Generate a specific element with this tag name instead.\n * @property {HastProperties | null | undefined} [hProperties]\n *   Generate an element with these properties instead.\n * @property {Array | null | undefined} [hChildren]\n *   Generate an element with this content instead.\n *\n * @typedef {Record & EmbeddedHastFields} MdastData\n *   mdast data with embedded hast fields.\n *\n * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData\n *   mdast node with embedded hast data.\n *\n * @typedef PointLike\n *   Point-like value.\n * @property {number | null | undefined} [line]\n *   Line.\n * @property {number | null | undefined} [column]\n *   Column.\n * @property {number | null | undefined} [offset]\n *   Offset.\n *\n * @typedef PositionLike\n *   Position-like value.\n * @property {PointLike | null | undefined} [start]\n *   Point-like value.\n * @property {PointLike | null | undefined} [end]\n *   Point-like value.\n *\n * @callback Handler\n *   Handle a node.\n * @param {State} state\n *   Info passed around.\n * @param {any} node\n *   mdast node to handle.\n * @param {MdastParents | null | undefined} parent\n *   Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n *   hast node.\n *\n * @callback HFunctionProps\n *   Signature of `state` for when props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n *   mdast node or unist position.\n * @param {string} tagName\n *   HTML tag name.\n * @param {HastProperties} props\n *   Properties.\n * @param {Array | null | undefined} [children]\n *   hast content.\n * @returns {HastElement}\n *   Compiled element.\n *\n * @callback HFunctionNoProps\n *   Signature of `state` for when no props are passed.\n * @param {MdastNodes | PositionLike | null | undefined} node\n *   mdast node or unist position.\n * @param {string} tagName\n *   HTML tag name.\n * @param {Array | null | undefined} [children]\n *   hast content.\n * @returns {HastElement}\n *   Compiled element.\n *\n * @typedef HFields\n *   Info on `state`.\n * @property {boolean} dangerous\n *   Whether HTML is allowed.\n * @property {string} clobberPrefix\n *   Prefix to use to prevent DOM clobbering.\n * @property {string} footnoteLabel\n *   Label to use to introduce the footnote section.\n * @property {string} footnoteLabelTagName\n *   HTML used for the footnote label.\n * @property {HastProperties} footnoteLabelProperties\n *   Properties on the HTML tag used for the footnote label.\n * @property {string} footnoteBackLabel\n *   Label to use from backreferences back to their footnote call.\n * @property {(identifier: string) => MdastDefinition | null} definition\n *   Definition cache.\n * @property {Record} footnoteById\n *   Footnote definitions by their identifier.\n * @property {Array} footnoteOrder\n *   Identifiers of order when footnote calls first appear in tree order.\n * @property {Record} footnoteCounts\n *   Counts for how often the same footnote was called.\n * @property {Handlers} handlers\n *   Applied handlers.\n * @property {Handler} unknownHandler\n *   Handler for any none not in `passThrough` or otherwise handled.\n * @property {(from: MdastNodes, node: HastNodes) => void} patch\n *   Copy a node’s positional info.\n * @property {(from: MdastNodes, to: Type) => Type | HastElement} applyData\n *   Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array | null | undefined} one\n *   Transform an mdast node to hast.\n * @property {(node: MdastNodes) => Array} all\n *   Transform the children of an mdast parent to hast.\n * @property {(nodes: Array, loose?: boolean | null | undefined) => Array} wrap\n *   Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment\n *   Like `state` but lower-level and usable on non-elements.\n *   Deprecated: use `patch` and `applyData`.\n * @property {Array} passThrough\n *   List of node types to pass through untouched (except for their children).\n *\n * @typedef Options\n *   Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n *   Whether to persist raw HTML in markdown in the hast tree.\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n *   Prefix to use before the `id` attribute on footnotes to prevent it from\n *   *clobbering*.\n * @property {string | null | undefined} [footnoteBackLabel='Back to content']\n *   Label to use from backreferences back to their footnote call (affects\n *   screen readers).\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n *   Label to use for the footnotes section (affects screen readers).\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n *   Properties to use on the footnote label (note that `id: 'footnote-label'`\n *   is always added as footnote calls use it with `aria-describedby` to\n *   provide an accessible label).\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n *   Tag name to use for the footnote label.\n * @property {Handlers | null | undefined} [handlers]\n *   Extra handlers for nodes.\n * @property {Array | null | undefined} [passThrough]\n *   List of custom mdast node types to pass through (keep) in hast (note that\n *   the node itself is passed, but eventual children are transformed).\n * @property {Handler | null | undefined} [unknownHandler]\n *   Handler for all unknown nodes.\n *\n * @typedef {Record} Handlers\n *   Handle nodes.\n *\n * @typedef {HFunctionProps & HFunctionNoProps & HFields} State\n *   Info passed around.\n */\n\nimport {visit} from 'unist-util-visit'\nimport {position, pointStart, pointEnd} from 'unist-util-position'\nimport {generated} from 'unist-util-generated'\nimport {definitions} from 'mdast-util-definitions'\nimport {handlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n *   mdast node to transform.\n * @param {Options | null | undefined} [options]\n *   Configuration.\n * @returns {State}\n *   `state` function.\n */\nexport function createState(tree, options) {\n  const settings = options || {}\n  const dangerous = settings.allowDangerousHtml || false\n  /** @type {Record} */\n  const footnoteById = {}\n\n  // To do: next major: add `options` to state, remove:\n  // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,\n  // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,\n  // `unknownHandler`.\n\n  // To do: next major: move to `state.options.allowDangerousHtml`.\n  state.dangerous = dangerous\n  // To do: next major: move to `state.options`.\n  state.clobberPrefix =\n    settings.clobberPrefix === undefined || settings.clobberPrefix === null\n      ? 'user-content-'\n      : settings.clobberPrefix\n  // To do: next major: move to `state.options`.\n  state.footnoteLabel = settings.footnoteLabel || 'Footnotes'\n  // To do: next major: move to `state.options`.\n  state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'\n  // To do: next major: move to `state.options`.\n  state.footnoteLabelProperties = settings.footnoteLabelProperties || {\n    className: ['sr-only']\n  }\n  // To do: next major: move to `state.options`.\n  state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'\n  // To do: next major: move to `state.options`.\n  state.unknownHandler = settings.unknownHandler\n  // To do: next major: move to `state.options`.\n  state.passThrough = settings.passThrough\n\n  state.handlers = {...handlers, ...settings.handlers}\n\n  // To do: next major: replace utility with `definitionById` object, so we\n  // only walk once (as we need footnotes too).\n  state.definition = definitions(tree)\n  state.footnoteById = footnoteById\n  /** @type {Array} */\n  state.footnoteOrder = []\n  /** @type {Record} */\n  state.footnoteCounts = {}\n\n  state.patch = patch\n  state.applyData = applyData\n  state.one = oneBound\n  state.all = allBound\n  state.wrap = wrap\n  // To do: next major: remove `augment`.\n  state.augment = augment\n\n  visit(tree, 'footnoteDefinition', (definition) => {\n    const id = String(definition.identifier).toUpperCase()\n\n    // Mimick CM behavior of link definitions.\n    // See: .\n    if (!own.call(footnoteById, id)) {\n      footnoteById[id] = definition\n    }\n  })\n\n  // @ts-expect-error Hush, it’s fine!\n  return state\n\n  /**\n   * Finalise the created `right`, a hast node, from `left`, an mdast node.\n   *\n   * @param {MdastNodeWithData | PositionLike | null | undefined} left\n   * @param {HastElementContent} right\n   * @returns {HastElementContent}\n   */\n  /* c8 ignore start */\n  // To do: next major: remove.\n  function augment(left, right) {\n    // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n    if (left && 'data' in left && left.data) {\n      /** @type {MdastData} */\n      const data = left.data\n\n      if (data.hName) {\n        if (right.type !== 'element') {\n          right = {\n            type: 'element',\n            tagName: '',\n            properties: {},\n            children: []\n          }\n        }\n\n        right.tagName = data.hName\n      }\n\n      if (right.type === 'element' && data.hProperties) {\n        right.properties = {...right.properties, ...data.hProperties}\n      }\n\n      if ('children' in right && right.children && data.hChildren) {\n        right.children = data.hChildren\n      }\n    }\n\n    if (left) {\n      const ctx = 'type' in left ? left : {position: left}\n\n      if (!generated(ctx)) {\n        // @ts-expect-error: fine.\n        right.position = {start: pointStart(ctx), end: pointEnd(ctx)}\n      }\n    }\n\n    return right\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Create an element for `node`.\n   *\n   * @type {HFunctionProps}\n   */\n  /* c8 ignore start */\n  // To do: next major: remove.\n  function state(node, tagName, props, children) {\n    if (Array.isArray(props)) {\n      children = props\n      props = {}\n    }\n\n    // @ts-expect-error augmenting an element yields an element.\n    return augment(node, {\n      type: 'element',\n      tagName,\n      properties: props || {},\n      children: children || []\n    })\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Transform an mdast node into a hast node.\n   *\n   * @param {MdastNodes} node\n   *   mdast node.\n   * @param {MdastParents | null | undefined} [parent]\n   *   Parent of `node`.\n   * @returns {HastElementContent | Array | null | undefined}\n   *   Resulting hast node.\n   */\n  function oneBound(node, parent) {\n    // @ts-expect-error: that’s a state :)\n    return one(state, node, parent)\n  }\n\n  /**\n   * Transform the children of an mdast node into hast nodes.\n   *\n   * @param {MdastNodes} parent\n   *   mdast node to compile\n   * @returns {Array}\n   *   Resulting hast nodes.\n   */\n  function allBound(parent) {\n    // @ts-expect-error: that’s a state :)\n    return all(state, parent)\n  }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n *   mdast node to copy from.\n * @param {HastNodes} to\n *   hast node to copy into.\n * @returns {void}\n *   Nothing.\n */\nfunction patch(from, to) {\n  if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n *   Node type.\n * @param {MdastNodes} from\n *   mdast node to use data from.\n * @param {Type} to\n *   hast node to change.\n * @returns {Type | HastElement}\n *   Nothing.\n */\nfunction applyData(from, to) {\n  /** @type {Type | HastElement} */\n  let result = to\n\n  // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n  if (from && from.data) {\n    const hName = from.data.hName\n    const hChildren = from.data.hChildren\n    const hProperties = from.data.hProperties\n\n    if (typeof hName === 'string') {\n      // Transforming the node resulted in an element with a different name\n      // than wanted:\n      if (result.type === 'element') {\n        result.tagName = hName\n      }\n      // Transforming the node resulted in a non-element, which happens for\n      // raw, text, and root nodes (unless custom handlers are passed).\n      // The intent is likely to keep the content around (otherwise: pass\n      // `hChildren`).\n      else {\n        result = {\n          type: 'element',\n          tagName: hName,\n          properties: {},\n          children: []\n        }\n\n        // To do: next major: take the children from the `root`, or inject the\n        // raw/text/comment or so into the element?\n        // if ('children' in node) {\n        //   // @ts-expect-error: assume `children` are allowed in elements.\n        //   result.children = node.children\n        // } else {\n        //   // @ts-expect-error: assume `node` is allowed in elements.\n        //   result.children.push(node)\n        // }\n      }\n    }\n\n    if (result.type === 'element' && hProperties) {\n      result.properties = {...result.properties, ...hProperties}\n    }\n\n    if (\n      'children' in result &&\n      result.children &&\n      hChildren !== null &&\n      hChildren !== undefined\n    ) {\n      // @ts-expect-error: assume valid children are defined.\n      result.children = hChildren\n    }\n  }\n\n  return result\n}\n\n/**\n * Transform an mdast node into a hast node.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} node\n *   mdast node.\n * @param {MdastParents | null | undefined} [parent]\n *   Parent of `node`.\n * @returns {HastElementContent | Array | null | undefined}\n *   Resulting hast node.\n */\n// To do: next major: do not expose, keep bound.\nexport function one(state, node, parent) {\n  const type = node && node.type\n\n  // Fail on non-nodes.\n  if (!type) {\n    throw new Error('Expected node, got `' + node + '`')\n  }\n\n  if (own.call(state.handlers, type)) {\n    return state.handlers[type](state, node, parent)\n  }\n\n  if (state.passThrough && state.passThrough.includes(type)) {\n    // To do: next major: deep clone.\n    // @ts-expect-error: types of passed through nodes are expected to be added manually.\n    return 'children' in node ? {...node, children: all(state, node)} : node\n  }\n\n  if (state.unknownHandler) {\n    return state.unknownHandler(state, node, parent)\n  }\n\n  return defaultUnknownHandler(state, node)\n}\n\n/**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} parent\n *   mdast node to compile\n * @returns {Array}\n *   Resulting hast nodes.\n */\n// To do: next major: do not expose, keep bound.\nexport function all(state, parent) {\n  /** @type {Array} */\n  const values = []\n\n  if ('children' in parent) {\n    const nodes = parent.children\n    let index = -1\n    while (++index < nodes.length) {\n      const result = one(state, nodes[index], parent)\n\n      // To do: see if we van clean this? Can we merge texts?\n      if (result) {\n        if (index && nodes[index - 1].type === 'break') {\n          if (!Array.isArray(result) && result.type === 'text') {\n            result.value = result.value.replace(/^\\s+/, '')\n          }\n\n          if (!Array.isArray(result) && result.type === 'element') {\n            const head = result.children[0]\n\n            if (head && head.type === 'text') {\n              head.value = head.value.replace(/^\\s+/, '')\n            }\n          }\n        }\n\n        if (Array.isArray(result)) {\n          values.push(...result)\n        } else {\n          values.push(result)\n        }\n      }\n    }\n  }\n\n  return values\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n *   Info passed around.\n * @param {MdastNodes} node\n *   Unknown mdast node.\n * @returns {HastText | HastElement}\n *   Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n  const data = node.data || {}\n  /** @type {HastText | HastElement} */\n  const result =\n    'value' in node &&\n    !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n      ? {type: 'text', value: node.value}\n      : {\n          type: 'element',\n          tagName: 'div',\n          properties: {},\n          children: all(state, node)\n        }\n\n  state.patch(node, result)\n  return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastContent} Type\n *   Node type.\n * @param {Array} nodes\n *   List of nodes to wrap.\n * @param {boolean | null | undefined} [loose=false]\n *   Whether to add line endings at start and end.\n * @returns {Array}\n *   Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n  /** @type {Array} */\n  const result = []\n  let index = -1\n\n  if (loose) {\n    result.push({type: 'text', value: '\\n'})\n  }\n\n  while (++index < nodes.length) {\n    if (index) result.push({type: 'text', value: '\\n'})\n    result.push(nodes[index])\n  }\n\n  if (loose && nodes.length > 0) {\n    result.push({type: 'text', value: '\\n'})\n  }\n\n  return result\n}\n","/**\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef NodeLike\n * @property {PositionLike | null | undefined} [position]\n */\n\n/**\n * Check if `node` is generated.\n *\n * @param {NodeLike | null | undefined} [node]\n *   Node to check.\n * @returns {boolean}\n *   Whether `node` is generated (does not have positional info).\n */\nexport function generated(node) {\n  return (\n    !node ||\n    !node.position ||\n    !node.position.start ||\n    !node.position.start.line ||\n    !node.position.start.column ||\n    !node.position.end ||\n    !node.position.end.line ||\n    !node.position.end.column\n  )\n}\n","/**\n * @typedef {import('hast').Content} HastContent\n * @typedef {import('hast').Root} HastRoot\n *\n * @typedef {import('mdast').Content} MdastContent\n * @typedef {import('mdast').Root} MdastRoot\n *\n * @typedef {import('./state.js').Options} Options\n */\n\n/**\n * @typedef {HastRoot | HastContent} HastNodes\n * @typedef {MdastRoot | MdastContent} MdastNodes\n */\n\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * *   `hast-util-to-html` also has an option `allowDangerousHtml` which will\n *     output the raw HTML.\n *     This is typically discouraged as noted by the option name but is useful\n *     if you completely trust authors\n * *   `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n *     into standard hast nodes (`element`, `text`, etc).\n *     This is a heavy task as it needs a full HTML parser, but it is the only\n *     way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n * 

\n * \n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `
` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {HastNodes | null | undefined}\n * hast tree.\n */\n// To do: next major: always return a single `root`.\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, null)\n const foot = footer(state)\n\n if (foot) {\n // @ts-expect-error If there’s a footer, there were definitions, meaning block\n // content.\n // So assume `node` is a parent node.\n node.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n // To do: next major: always return root?\n return Array.isArray(node) ? {type: 'root', children: node} : node\n}\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n *\n * @typedef {import('./state.js').State} State\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\nexport function footer(state) {\n /** @type {Array} */\n const listItems = []\n let index = -1\n\n while (++index < state.footnoteOrder.length) {\n const def = state.footnoteById[state.footnoteOrder[index]]\n\n if (!def) {\n continue\n }\n\n const content = state.all(def)\n const id = String(def.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let referenceIndex = 0\n /** @type {Array} */\n const backReferences = []\n\n while (++referenceIndex <= state.footnoteCounts[id]) {\n /** @type {Element} */\n const backReference = {\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n state.clobberPrefix +\n 'fnref-' +\n safeId +\n (referenceIndex > 1 ? '-' + referenceIndex : ''),\n dataFootnoteBackref: true,\n className: ['data-footnote-backref'],\n ariaLabel: state.footnoteBackLabel\n },\n children: [{type: 'text', value: '↩'}]\n }\n\n if (referenceIndex > 1) {\n backReference.children.push({\n type: 'element',\n tagName: 'sup',\n children: [{type: 'text', value: String(referenceIndex)}]\n })\n }\n\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n backReferences.push(backReference)\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: state.clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(def, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: state.footnoteLabelTagName,\n properties: {\n // To do: use structured clone.\n ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: state.footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @typedef {import('hast').Root} HastRoot\n * @typedef {import('mdast').Root} MdastRoot\n * @typedef {import('mdast-util-to-hast').Options} Options\n * @typedef {import('unified').Processor} Processor\n *\n * @typedef {import('mdast-util-to-hast')} DoNotTouchAsThisImportIncludesRawInTree\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n// Note: the `` overload doesn’t seem to work :'(\n\n/**\n * Plugin that turns markdown into HTML to support rehype.\n *\n * * If a destination processor is given, that processor runs with a new HTML\n * (hast) tree (bridge-mode).\n * As the given processor runs with a hast tree, and rehype plugins support\n * hast, that means rehype plugins can be used with the given processor.\n * The hast tree is discarded in the end.\n * It’s highly unlikely that you want to do this.\n * * The common case is to not pass a destination processor, in which case the\n * current processor continues running with a new HTML (hast) tree\n * (mutate-mode).\n * As the current processor continues with a hast tree, and rehype plugins\n * support hast, that means rehype plugins can be used after\n * `remark-rehype`.\n * It’s likely that this is what you want to do.\n *\n * @param destination\n * Optional unified processor.\n * @param options\n * Options passed to `mdast-util-to-hast`.\n */\nconst remarkRehype =\n /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */\n (\n function (destination, options) {\n return destination && 'run' in destination\n ? bridge(destination, options)\n : mutate(destination || options)\n }\n )\n\nexport default remarkRehype\n\n/**\n * Bridge-mode.\n * Runs the destination with the new hast tree.\n *\n * @type {import('unified').Plugin<[Processor, Options?], MdastRoot>}\n */\nfunction bridge(destination, options) {\n return (node, file, next) => {\n destination.run(toHast(node, options), file, (error) => {\n next(error)\n })\n }\n}\n\n/**\n * Mutate-mode.\n * Further plugins run on the hast tree.\n *\n * @type {import('unified').Plugin<[Options?]|void[], MdastRoot, HastRoot>}\n */\nfunction mutate(options) {\n // @ts-expect-error: assume a corresponding node is returned by `toHast`.\n return (node) => toHast(node, options)\n}\n","import {visit} from 'unist-util-visit'\n\n/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Element} Element\n *\n * @callback AllowElement\n * @param {Element} element\n * @param {number} index\n * @param {Element|Root} parent\n * @returns {boolean|undefined}\n *\n * @typedef Options\n * @property {Array} [allowedElements]\n * @property {Array} [disallowedElements=[]]\n * @property {AllowElement} [allowElement]\n * @property {boolean} [unwrapDisallowed=false]\n */\n\n/**\n * @type {import('unified').Plugin<[Options], Root>}\n */\nexport default function rehypeFilter(options) {\n if (options.allowedElements && options.disallowedElements) {\n throw new TypeError(\n 'Only one of `allowedElements` and `disallowedElements` should be defined'\n )\n }\n\n if (\n options.allowedElements ||\n options.disallowedElements ||\n options.allowElement\n ) {\n return (tree) => {\n visit(tree, 'element', (node, index, parent_) => {\n const parent = /** @type {Element|Root} */ (parent_)\n /** @type {boolean|undefined} */\n let remove\n\n if (options.allowedElements) {\n remove = !options.allowedElements.includes(node.tagName)\n } else if (options.disallowedElements) {\n remove = options.disallowedElements.includes(node.tagName)\n }\n\n if (!remove && options.allowElement && typeof index === 'number') {\n remove = !options.allowElement(node, index, parent)\n }\n\n if (remove && typeof index === 'number') {\n if (options.unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n\n return undefined\n })\n }\n }\n}\n","/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {unknown} thing\n * Thing to check (typically `Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`).\n * If a node is passed it must be a `Text` node, whose `value` field is\n * checked.\n */\nexport function whitespace(thing) {\n /** @type {string} */\n const value =\n // @ts-expect-error looks like a node.\n thing && typeof thing === 'object' && thing.type === 'text'\n ? // @ts-expect-error looks like a text.\n thing.value || ''\n : thing\n\n // HTML whitespace expression.\n // See .\n return typeof value === 'string' && value.replace(/[ \\t\\n\\f\\r]/g, '') === ''\n}\n","/**\n * `hast` is close to `React`, but differs in a couple of cases.\n *\n * To get a React property from a hast property, check if it is in\n * `hastToReact`, if it is, then use the corresponding value,\n * otherwise, use the hast property.\n *\n * @type {Record}\n */\nexport const hastToReact = {\n classId: 'classID',\n dataType: 'datatype',\n itemId: 'itemID',\n strokeDashArray: 'strokeDasharray',\n strokeDashOffset: 'strokeDashoffset',\n strokeLineCap: 'strokeLinecap',\n strokeLineJoin: 'strokeLinejoin',\n strokeMiterLimit: 'strokeMiterlimit',\n typeOf: 'typeof',\n xLinkActuate: 'xlinkActuate',\n xLinkArcRole: 'xlinkArcrole',\n xLinkHref: 'xlinkHref',\n xLinkRole: 'xlinkRole',\n xLinkShow: 'xlinkShow',\n xLinkTitle: 'xlinkTitle',\n xLinkType: 'xlinkType',\n xmlnsXLink: 'xmlnsXlink'\n}\n","import StyleToObject from './index.js';\n\nexport default StyleToObject;\n","const protocols = ['http', 'https', 'mailto', 'tel']\n\n/**\n * @param {string} uri\n * @returns {string}\n */\nexport function uriTransformer(uri) {\n const url = (uri || '').trim()\n const first = url.charAt(0)\n\n if (first === '#' || first === '/') {\n return url\n }\n\n const colon = url.indexOf(':')\n if (colon === -1) {\n return url\n }\n\n let index = -1\n\n while (++index < protocols.length) {\n const protocol = protocols[index]\n\n if (\n colon === protocol.length &&\n url.slice(0, protocol.length).toLowerCase() === protocol\n ) {\n return url\n }\n }\n\n index = url.indexOf('?')\n if (index !== -1 && colon > index) {\n return url\n }\n\n index = url.indexOf('#')\n if (index !== -1 && colon > index) {\n return url\n }\n\n // eslint-disable-next-line no-script-url\n return 'javascript:void(0)'\n}\n","/**\n * @template T\n * @typedef {import('react').ComponentType} ComponentType\n */\n\n/**\n * @template {import('react').ElementType} T\n * @typedef {import('react').ComponentPropsWithoutRef} ComponentPropsWithoutRef\n */\n\n/**\n * @typedef {import('react').ReactNode} ReactNode\n * @typedef {import('unist').Position} Position\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').ElementContent} ElementContent\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Text} Text\n * @typedef {import('hast').Comment} Comment\n * @typedef {import('hast').DocType} Doctype\n * @typedef {import('property-information').Info} Info\n * @typedef {import('property-information').Schema} Schema\n * @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps\n *\n * @typedef Raw\n * @property {'raw'} type\n * @property {string} value\n *\n * @typedef Context\n * @property {Options} options\n * @property {Schema} schema\n * @property {number} listDepth\n *\n * @callback TransformLink\n * @param {string} href\n * @param {Array} children\n * @param {string?} title\n * @returns {string}\n *\n * @callback TransformImage\n * @param {string} src\n * @param {string} alt\n * @param {string?} title\n * @returns {string}\n *\n * @typedef {import('react').HTMLAttributeAnchorTarget} TransformLinkTargetType\n *\n * @callback TransformLinkTarget\n * @param {string} href\n * @param {Array} children\n * @param {string?} title\n * @returns {TransformLinkTargetType|undefined}\n *\n * @typedef {keyof JSX.IntrinsicElements} ReactMarkdownNames\n *\n * To do: is `data-sourcepos` typeable?\n *\n * @typedef {ComponentPropsWithoutRef<'code'> & ReactMarkdownProps & {inline?: boolean}} CodeProps\n * @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps\n * @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps\n * @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps\n * @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record, isHeader: false}} TableDataCellProps\n * @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record, isHeader: true}} TableHeaderCellProps\n * @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps\n * @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps\n *\n * @typedef {ComponentType} CodeComponent\n * @typedef {ComponentType} HeadingComponent\n * @typedef {ComponentType} LiComponent\n * @typedef {ComponentType} OrderedListComponent\n * @typedef {ComponentType} TableDataCellComponent\n * @typedef {ComponentType} TableHeaderCellComponent\n * @typedef {ComponentType} TableRowComponent\n * @typedef {ComponentType} UnorderedListComponent\n *\n * @typedef SpecialComponents\n * @property {CodeComponent|ReactMarkdownNames} code\n * @property {HeadingComponent|ReactMarkdownNames} h1\n * @property {HeadingComponent|ReactMarkdownNames} h2\n * @property {HeadingComponent|ReactMarkdownNames} h3\n * @property {HeadingComponent|ReactMarkdownNames} h4\n * @property {HeadingComponent|ReactMarkdownNames} h5\n * @property {HeadingComponent|ReactMarkdownNames} h6\n * @property {LiComponent|ReactMarkdownNames} li\n * @property {OrderedListComponent|ReactMarkdownNames} ol\n * @property {TableDataCellComponent|ReactMarkdownNames} td\n * @property {TableHeaderCellComponent|ReactMarkdownNames} th\n * @property {TableRowComponent|ReactMarkdownNames} tr\n * @property {UnorderedListComponent|ReactMarkdownNames} ul\n *\n * @typedef {Partial & SpecialComponents>} Components\n *\n * @typedef Options\n * @property {boolean} [sourcePos=false]\n * @property {boolean} [rawSourcePos=false]\n * @property {boolean} [skipHtml=false]\n * @property {boolean} [includeElementIndex=false]\n * @property {null|false|TransformLink} [transformLinkUri]\n * @property {TransformImage} [transformImageUri]\n * @property {TransformLinkTargetType|TransformLinkTarget} [linkTarget]\n * @property {Components} [components]\n */\n\nimport React from 'react'\nimport ReactIs from 'react-is'\nimport {whitespace} from 'hast-util-whitespace'\nimport {svg, find, hastToReact} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {stringify as commas} from 'comma-separated-tokens'\nimport style from 'style-to-object'\nimport {uriTransformer} from './uri-transformer.js'\n\nconst own = {}.hasOwnProperty\n\n// The table-related elements that must not contain whitespace text according\n// to React.\nconst tableElements = new Set(['table', 'thead', 'tbody', 'tfoot', 'tr'])\n\n/**\n * @param {Context} context\n * @param {Element|Root} node\n */\nexport function childrenToReact(context, node) {\n /** @type {Array} */\n const children = []\n let childIndex = -1\n /** @type {Comment|Doctype|Element|Raw|Text} */\n let child\n\n while (++childIndex < node.children.length) {\n child = node.children[childIndex]\n\n if (child.type === 'element') {\n children.push(toReact(context, child, childIndex, node))\n } else if (child.type === 'text') {\n // Currently, a warning is triggered by react for *any* white space in\n // tables.\n // So we drop it.\n // See: .\n // See: .\n // See: .\n // See: .\n if (\n node.type !== 'element' ||\n !tableElements.has(node.tagName) ||\n !whitespace(child)\n ) {\n children.push(child.value)\n }\n } else if (child.type === 'raw' && !context.options.skipHtml) {\n // Default behavior is to show (encoded) HTML.\n children.push(child.value)\n }\n }\n\n return children\n}\n\n/**\n * @param {Context} context\n * @param {Element} node\n * @param {number} index\n * @param {Element|Root} parent\n */\nfunction toReact(context, node, index, parent) {\n const options = context.options\n const transform =\n options.transformLinkUri === undefined\n ? uriTransformer\n : options.transformLinkUri\n const parentSchema = context.schema\n /** @type {ReactMarkdownNames} */\n // @ts-expect-error assume a known HTML/SVG element.\n const name = node.tagName\n /** @type {Record} */\n const properties = {}\n let schema = parentSchema\n /** @type {string} */\n let property\n\n if (parentSchema.space === 'html' && name === 'svg') {\n schema = svg\n context.schema = schema\n }\n\n if (node.properties) {\n for (property in node.properties) {\n if (own.call(node.properties, property)) {\n addProperty(properties, property, node.properties[property], context)\n }\n }\n }\n\n if (name === 'ol' || name === 'ul') {\n context.listDepth++\n }\n\n const children = childrenToReact(context, node)\n\n if (name === 'ol' || name === 'ul') {\n context.listDepth--\n }\n\n // Restore parent schema.\n context.schema = parentSchema\n\n // Nodes created by plugins do not have positional info, in which case we use\n // an object that matches the position interface.\n const position = node.position || {\n start: {line: null, column: null, offset: null},\n end: {line: null, column: null, offset: null}\n }\n const component =\n options.components && own.call(options.components, name)\n ? options.components[name]\n : name\n const basic = typeof component === 'string' || component === React.Fragment\n\n if (!ReactIs.isValidElementType(component)) {\n throw new TypeError(\n `Component for name \\`${name}\\` not defined or is not renderable`\n )\n }\n\n properties.key = index\n\n if (name === 'a' && options.linkTarget) {\n properties.target =\n typeof options.linkTarget === 'function'\n ? options.linkTarget(\n String(properties.href || ''),\n node.children,\n typeof properties.title === 'string' ? properties.title : null\n )\n : options.linkTarget\n }\n\n if (name === 'a' && transform) {\n properties.href = transform(\n String(properties.href || ''),\n node.children,\n typeof properties.title === 'string' ? properties.title : null\n )\n }\n\n if (\n !basic &&\n name === 'code' &&\n parent.type === 'element' &&\n parent.tagName !== 'pre'\n ) {\n properties.inline = true\n }\n\n if (\n !basic &&\n (name === 'h1' ||\n name === 'h2' ||\n name === 'h3' ||\n name === 'h4' ||\n name === 'h5' ||\n name === 'h6')\n ) {\n properties.level = Number.parseInt(name.charAt(1), 10)\n }\n\n if (name === 'img' && options.transformImageUri) {\n properties.src = options.transformImageUri(\n String(properties.src || ''),\n String(properties.alt || ''),\n typeof properties.title === 'string' ? properties.title : null\n )\n }\n\n if (!basic && name === 'li' && parent.type === 'element') {\n const input = getInputElement(node)\n properties.checked =\n input && input.properties ? Boolean(input.properties.checked) : null\n properties.index = getElementsBeforeCount(parent, node)\n properties.ordered = parent.tagName === 'ol'\n }\n\n if (!basic && (name === 'ol' || name === 'ul')) {\n properties.ordered = name === 'ol'\n properties.depth = context.listDepth\n }\n\n if (name === 'td' || name === 'th') {\n if (properties.align) {\n if (!properties.style) properties.style = {}\n // @ts-expect-error assume `style` is an object\n properties.style.textAlign = properties.align\n delete properties.align\n }\n\n if (!basic) {\n properties.isHeader = name === 'th'\n }\n }\n\n if (!basic && name === 'tr' && parent.type === 'element') {\n properties.isHeader = Boolean(parent.tagName === 'thead')\n }\n\n // If `sourcePos` is given, pass source information (line/column info from markdown source).\n if (options.sourcePos) {\n properties['data-sourcepos'] = flattenPosition(position)\n }\n\n if (!basic && options.rawSourcePos) {\n properties.sourcePosition = node.position\n }\n\n // If `includeElementIndex` is given, pass node index info to components.\n if (!basic && options.includeElementIndex) {\n properties.index = getElementsBeforeCount(parent, node)\n properties.siblingCount = getElementsBeforeCount(parent)\n }\n\n if (!basic) {\n properties.node = node\n }\n\n // Ensure no React warnings are emitted for void elements w/ children.\n return children.length > 0\n ? React.createElement(component, properties, children)\n : React.createElement(component, properties)\n}\n\n/**\n * @param {Element|Root} node\n * @returns {Element?}\n */\nfunction getInputElement(node) {\n let index = -1\n\n while (++index < node.children.length) {\n const child = node.children[index]\n\n if (child.type === 'element' && child.tagName === 'input') {\n return child\n }\n }\n\n return null\n}\n\n/**\n * @param {Element|Root} parent\n * @param {Element} [node]\n * @returns {number}\n */\nfunction getElementsBeforeCount(parent, node) {\n let index = -1\n let count = 0\n\n while (++index < parent.children.length) {\n if (parent.children[index] === node) break\n if (parent.children[index].type === 'element') count++\n }\n\n return count\n}\n\n/**\n * @param {Record} props\n * @param {string} prop\n * @param {unknown} value\n * @param {Context} ctx\n */\nfunction addProperty(props, prop, value, ctx) {\n const info = find(ctx.schema, prop)\n let result = value\n\n // Ignore nullish and `NaN` values.\n // eslint-disable-next-line no-self-compare\n if (result === null || result === undefined || result !== result) {\n return\n }\n\n // Accept `array`.\n // Most props are space-separated.\n if (Array.isArray(result)) {\n result = info.commaSeparated ? commas(result) : spaces(result)\n }\n\n if (info.property === 'style' && typeof result === 'string') {\n result = parseStyle(result)\n }\n\n if (info.space && info.property) {\n props[\n own.call(hastToReact, info.property)\n ? hastToReact[info.property]\n : info.property\n ] = result\n } else if (info.attribute) {\n props[info.attribute] = result\n }\n}\n\n/**\n * @param {string} value\n * @returns {Record}\n */\nfunction parseStyle(value) {\n /** @type {Record} */\n const result = {}\n\n try {\n style(value, iterator)\n } catch {\n // Silent.\n }\n\n return result\n\n /**\n * @param {string} name\n * @param {string} v\n */\n function iterator(name, v) {\n const k = name.slice(0, 4) === '-ms-' ? `ms-${name.slice(4)}` : name\n result[k.replace(/-([a-z])/g, styleReplacer)] = v\n }\n}\n\n/**\n * @param {unknown} _\n * @param {string} $1\n */\nfunction styleReplacer(_, $1) {\n return $1.toUpperCase()\n}\n\n/**\n * @param {Position|{start: {line: null, column: null, offset: null}, end: {line: null, column: null, offset: null}}} pos\n * @returns {string}\n */\nfunction flattenPosition(pos) {\n return [\n pos.start.line,\n ':',\n pos.start.column,\n '-',\n pos.end.line,\n ':',\n pos.end.column\n ]\n .map(String)\n .join('')\n}\n","/**\n * @typedef {import('react').ReactNode} ReactNode\n * @typedef {import('react').ReactElement<{}>} ReactElement\n * @typedef {import('unified').PluggableList} PluggableList\n * @typedef {import('hast').Root} Root\n * @typedef {import('./rehype-filter.js').Options} FilterOptions\n * @typedef {import('./ast-to-react.js').Options} TransformOptions\n *\n * @typedef CoreOptions\n * @property {string} children\n *\n * @typedef PluginOptions\n * @property {PluggableList} [remarkPlugins=[]]\n * @property {PluggableList} [rehypePlugins=[]]\n * @property {import('remark-rehype').Options | undefined} [remarkRehypeOptions={}]\n *\n * @typedef LayoutOptions\n * @property {string} [className]\n *\n * @typedef {CoreOptions & PluginOptions & LayoutOptions & FilterOptions & TransformOptions} ReactMarkdownOptions\n *\n * @typedef Deprecation\n * @property {string} id\n * @property {string} [to]\n */\n\nimport React from 'react'\nimport {VFile} from 'vfile'\nimport {unified} from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport PropTypes from 'prop-types'\nimport {html} from 'property-information'\nimport rehypeFilter from './rehype-filter.js'\nimport {childrenToReact} from './ast-to-react.js'\n\nconst own = {}.hasOwnProperty\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {Record} */\nconst deprecated = {\n plugins: {to: 'remarkPlugins', id: 'change-plugins-to-remarkplugins'},\n renderers: {to: 'components', id: 'change-renderers-to-components'},\n astPlugins: {id: 'remove-buggy-html-in-markdown-parser'},\n allowDangerousHtml: {id: 'remove-buggy-html-in-markdown-parser'},\n escapeHtml: {id: 'remove-buggy-html-in-markdown-parser'},\n source: {to: 'children', id: 'change-source-to-children'},\n allowNode: {\n to: 'allowElement',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes'\n },\n allowedTypes: {\n to: 'allowedElements',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes'\n },\n disallowedTypes: {\n to: 'disallowedElements',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes'\n },\n includeNodeIndex: {\n to: 'includeElementIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n }\n}\n\n/**\n * React component to render markdown.\n *\n * @param {ReactMarkdownOptions} options\n * @returns {ReactElement}\n */\nexport function ReactMarkdown(options) {\n for (const key in deprecated) {\n if (own.call(deprecated, key) && own.call(options, key)) {\n const deprecation = deprecated[key]\n console.warn(\n `[react-markdown] Warning: please ${\n deprecation.to ? `use \\`${deprecation.to}\\` instead of` : 'remove'\n } \\`${key}\\` (see <${changelog}#${deprecation.id}> for more info)`\n )\n delete deprecated[key]\n }\n }\n\n const processor = unified()\n .use(remarkParse)\n .use(options.remarkPlugins || [])\n .use(remarkRehype, {\n ...options.remarkRehypeOptions,\n allowDangerousHtml: true\n })\n .use(options.rehypePlugins || [])\n .use(rehypeFilter, options)\n\n const file = new VFile()\n\n if (typeof options.children === 'string') {\n file.value = options.children\n } else if (options.children !== undefined && options.children !== null) {\n console.warn(\n `[react-markdown] Warning: please pass a string as \\`children\\` (not: \\`${options.children}\\`)`\n )\n }\n\n const hastNode = processor.runSync(processor.parse(file), file)\n\n if (hastNode.type !== 'root') {\n throw new TypeError('Expected a `root` node')\n }\n\n /** @type {ReactElement} */\n let result = React.createElement(\n React.Fragment,\n {},\n childrenToReact({options, schema: html, listDepth: 0}, hastNode)\n )\n\n if (options.className) {\n result = React.createElement('div', {className: options.className}, result)\n }\n\n return result\n}\n\nReactMarkdown.propTypes = {\n // Core options:\n children: PropTypes.string,\n // Layout options:\n className: PropTypes.string,\n // Filter options:\n allowElement: PropTypes.func,\n allowedElements: PropTypes.arrayOf(PropTypes.string),\n disallowedElements: PropTypes.arrayOf(PropTypes.string),\n unwrapDisallowed: PropTypes.bool,\n // Plugin options:\n remarkPlugins: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.func,\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.object,\n PropTypes.func,\n PropTypes.arrayOf(\n // prettier-ignore\n // type-coverage:ignore-next-line\n PropTypes.any\n )\n ])\n )\n ])\n ),\n rehypePlugins: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.object,\n PropTypes.func,\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.object,\n PropTypes.func,\n PropTypes.arrayOf(\n // prettier-ignore\n // type-coverage:ignore-next-line\n PropTypes.any\n )\n ])\n )\n ])\n ),\n // Transform options:\n sourcePos: PropTypes.bool,\n rawSourcePos: PropTypes.bool,\n skipHtml: PropTypes.bool,\n includeElementIndex: PropTypes.bool,\n transformLinkUri: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n linkTarget: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n transformImageUri: PropTypes.func,\n components: PropTypes.object\n}\n","/**\n * @typedef {import('micromark-util-types').Code} Code\n * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Previous} Previous\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {\n asciiAlpha,\n asciiAlphanumeric,\n asciiControl,\n markdownLineEndingOrSpace,\n unicodePunctuation,\n unicodeWhitespace\n} from 'micromark-util-character'\nconst wwwPrefix = {\n tokenize: tokenizeWwwPrefix,\n partial: true\n}\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n}\nconst path = {\n tokenize: tokenizePath,\n partial: true\n}\nconst trail = {\n tokenize: tokenizeTrail,\n partial: true\n}\nconst emailDomainDotTrail = {\n tokenize: tokenizeEmailDomainDotTrail,\n partial: true\n}\nconst wwwAutolink = {\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n}\nconst protocolAutolink = {\n tokenize: tokenizeProtocolAutolink,\n previous: previousProtocol\n}\nconst emailAutolink = {\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n}\n\n/** @type {ConstructRecord} */\nconst text = {}\n\n// To do: next major: expose functions that yields extension.\n\n/**\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * autolink literal syntax.\n *\n * @type {Extension}\n */\nexport const gfmAutolinkLiteral = {\n text\n}\n\n/** @type {Code} */\nlet code = 48\n\n// Add alphanumerics.\nwhile (code < 123) {\n text[code] = emailAutolink\n code++\n if (code === 58) code = 65\n else if (code === 91) code = 97\n}\ntext[43] = emailAutolink\ntext[45] = emailAutolink\ntext[46] = emailAutolink\ntext[95] = emailAutolink\ntext[72] = [emailAutolink, protocolAutolink]\ntext[104] = [emailAutolink, protocolAutolink]\ntext[87] = [emailAutolink, wwwAutolink]\ntext[119] = [emailAutolink, wwwAutolink]\n\n// To do: perform email autolink literals on events, afterwards.\n// That’s where `markdown-rs` and `cmark-gfm` perform it.\n// It should look for `@`, then for atext backwards, and then for a label\n// forwards.\n// To do: `mailto:`, `xmpp:` protocol as prefix.\n\n/**\n * Email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this\n /** @type {boolean | undefined} */\n let dot\n /** @type {boolean} */\n let data\n return start\n\n /**\n * Start of email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (\n !gfmAtext(code) ||\n !previousEmail.call(self, self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkEmail')\n return atext(code)\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code)\n return atext\n }\n if (code === 64) {\n effects.consume(code)\n return emailDomain\n }\n return nok(code)\n }\n\n /**\n * In email domain.\n *\n * The reference code is a bit overly complex as it handles the `@`, of which\n * there may be just one.\n * Source: \n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomain(code) {\n // Dot followed by alphanumerical (not `-` or `_`).\n if (code === 46) {\n return effects.check(\n emailDomainDotTrail,\n emailDomainAfter,\n emailDomainDot\n )(code)\n }\n\n // Alphanumerical, `-`, and `_`.\n if (code === 45 || code === 95 || asciiAlphanumeric(code)) {\n data = true\n effects.consume(code)\n return emailDomain\n }\n\n // To do: `/` if xmpp.\n\n // Note: normally we’d truncate trailing punctuation from the link.\n // However, email autolink literals cannot contain any of those markers,\n // except for `.`, but that can only occur if it isn’t trailing.\n // So we can ignore truncating!\n return emailDomainAfter(code)\n }\n\n /**\n * In email domain, on dot that is not a trail.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainDot(code) {\n effects.consume(code)\n dot = true\n return emailDomain\n }\n\n /**\n * After email domain.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainAfter(code) {\n // Domain must not be empty, must include a dot, and must end in alphabetical.\n // Source: .\n if (data && dot && asciiAlpha(self.previous)) {\n effects.exit('literalAutolinkEmail')\n effects.exit('literalAutolink')\n return ok(code)\n }\n return nok(code)\n }\n}\n\n/**\n * `www` autolink literal.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this\n return wwwStart\n\n /**\n * Start of www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwStart(code) {\n if (\n (code !== 87 && code !== 119) ||\n !previousWww.call(self, self.previous) ||\n previousUnbalanced(self.events)\n ) {\n return nok(code)\n }\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkWww')\n // Note: we *check*, so we can discard the `www.` we parsed.\n // If it worked, we consider it as a part of the domain.\n return effects.check(\n wwwPrefix,\n effects.attempt(domain, effects.attempt(path, wwwAfter), nok),\n nok\n )(code)\n }\n\n /**\n * After a www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwAfter(code) {\n effects.exit('literalAutolinkWww')\n effects.exit('literalAutolink')\n return ok(code)\n }\n}\n\n/**\n * Protocol autolink literal.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeProtocolAutolink(effects, ok, nok) {\n const self = this\n let buffer = ''\n let seen = false\n return protocolStart\n\n /**\n * Start of protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolStart(code) {\n if (\n (code === 72 || code === 104) &&\n previousProtocol.call(self, self.previous) &&\n !previousUnbalanced(self.events)\n ) {\n effects.enter('literalAutolink')\n effects.enter('literalAutolinkHttp')\n buffer += String.fromCodePoint(code)\n effects.consume(code)\n return protocolPrefixInside\n }\n return nok(code)\n }\n\n /**\n * In protocol.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^^^^\n * ```\n *\n * @type {State}\n */\n function protocolPrefixInside(code) {\n // `5` is size of `https`\n if (asciiAlpha(code) && buffer.length < 5) {\n // @ts-expect-error: definitely number.\n buffer += String.fromCodePoint(code)\n effects.consume(code)\n return protocolPrefixInside\n }\n if (code === 58) {\n const protocol = buffer.toLowerCase()\n if (protocol === 'http' || protocol === 'https') {\n effects.consume(code)\n return protocolSlashesInside\n }\n }\n return nok(code)\n }\n\n /**\n * In slashes.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^\n * ```\n *\n * @type {State}\n */\n function protocolSlashesInside(code) {\n if (code === 47) {\n effects.consume(code)\n if (seen) {\n return afterProtocol\n }\n seen = true\n return protocolSlashesInside\n }\n return nok(code)\n }\n\n /**\n * After protocol, before domain.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function afterProtocol(code) {\n // To do: this is different from `markdown-rs`:\n // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182\n return code === null ||\n asciiControl(code) ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)\n ? nok(code)\n : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code)\n }\n\n /**\n * After a protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolAfter(code) {\n effects.exit('literalAutolinkHttp')\n effects.exit('literalAutolink')\n return ok(code)\n }\n}\n\n/**\n * `www` prefix.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwPrefix(effects, ok, nok) {\n let size = 0\n return wwwPrefixInside\n\n /**\n * In www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixInside(code) {\n if ((code === 87 || code === 119) && size < 3) {\n size++\n effects.consume(code)\n return wwwPrefixInside\n }\n if (code === 46 && size === 3) {\n effects.consume(code)\n return wwwPrefixAfter\n }\n return nok(code)\n }\n\n /**\n * After www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixAfter(code) {\n // If there is *anything*, we can link.\n return code === null ? nok(code) : ok(code)\n }\n}\n\n/**\n * Domain.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean | undefined} */\n let underscoreInLastSegment\n /** @type {boolean | undefined} */\n let underscoreInLastLastSegment\n /** @type {boolean | undefined} */\n let seen\n return domainInside\n\n /**\n * In domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^^^^^^^^^^\n * ```\n *\n * @type {State}\n */\n function domainInside(code) {\n // Check whether this marker, which is a trailing punctuation\n // marker, optionally followed by more trailing markers, and then\n // followed by an end.\n if (code === 46 || code === 95) {\n return effects.check(trail, domainAfter, domainAtPunctuation)(code)\n }\n\n // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n // Source: .\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code) ||\n (code !== 45 && unicodePunctuation(code))\n ) {\n return domainAfter(code)\n }\n seen = true\n effects.consume(code)\n return domainInside\n }\n\n /**\n * In domain, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function domainAtPunctuation(code) {\n // There is an underscore in the last segment of the domain\n if (code === 95) {\n underscoreInLastSegment = true\n }\n // Otherwise, it’s a `.`: save the last segment underscore in the\n // penultimate segment slot.\n else {\n underscoreInLastLastSegment = underscoreInLastSegment\n underscoreInLastSegment = undefined\n }\n effects.consume(code)\n return domainInside\n }\n\n /**\n * After domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^\n * ```\n *\n * @type {State} */\n function domainAfter(code) {\n // Note: that’s GH says a dot is needed, but it’s not true:\n // \n if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n return nok(code)\n }\n return ok(code)\n }\n}\n\n/**\n * Path.\n *\n * ```markdown\n * > | a https://example.org/stuff b\n * ^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePath(effects, ok) {\n let sizeOpen = 0\n let sizeClose = 0\n return pathInside\n\n /**\n * In path.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^\n * ```\n *\n * @type {State}\n */\n function pathInside(code) {\n if (code === 40) {\n sizeOpen++\n effects.consume(code)\n return pathInside\n }\n\n // To do: `markdown-rs` also needs this.\n // If this is a paren, and there are less closings than openings,\n // we don’t check for a trail.\n if (code === 41 && sizeClose < sizeOpen) {\n return pathAtPunctuation(code)\n }\n\n // Check whether this trailing punctuation marker is optionally\n // followed by more trailing markers, and then followed\n // by an end.\n if (\n code === 33 ||\n code === 34 ||\n code === 38 ||\n code === 39 ||\n code === 41 ||\n code === 42 ||\n code === 44 ||\n code === 46 ||\n code === 58 ||\n code === 59 ||\n code === 60 ||\n code === 63 ||\n code === 93 ||\n code === 95 ||\n code === 126\n ) {\n return effects.check(trail, ok, pathAtPunctuation)(code)\n }\n if (\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return ok(code)\n }\n effects.consume(code)\n return pathInside\n }\n\n /**\n * In path, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com/a\"b\n * ^\n * ```\n *\n * @type {State}\n */\n function pathAtPunctuation(code) {\n // Count closing parens.\n if (code === 41) {\n sizeClose++\n }\n effects.consume(code)\n return pathInside\n }\n}\n\n/**\n * Trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the entire trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | https://example.com\").\n * ^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTrail(effects, ok, nok) {\n return trail\n\n /**\n * In trail of domain or path.\n *\n * ```markdown\n * > | https://example.com\").\n * ^\n * ```\n *\n * @type {State}\n */\n function trail(code) {\n // Regular trailing punctuation.\n if (\n code === 33 ||\n code === 34 ||\n code === 39 ||\n code === 41 ||\n code === 42 ||\n code === 44 ||\n code === 46 ||\n code === 58 ||\n code === 59 ||\n code === 63 ||\n code === 95 ||\n code === 126\n ) {\n effects.consume(code)\n return trail\n }\n\n // `&` followed by one or more alphabeticals and then a `;`, is\n // as a whole considered as trailing punctuation.\n // In all other cases, it is considered as continuation of the URL.\n if (code === 38) {\n effects.consume(code)\n return trailCharRefStart\n }\n\n // Needed because we allow literals after `[`, as we fix:\n // .\n // Check that it is not followed by `(` or `[`.\n if (code === 93) {\n effects.consume(code)\n return trailBracketAfter\n }\n if (\n // `<` is an end.\n code === 60 ||\n // So is whitespace.\n code === null ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return ok(code)\n }\n return nok(code)\n }\n\n /**\n * In trail, after `]`.\n *\n * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.\n * > See end of for more.\n *\n * ```markdown\n * > | https://example.com](\n * ^\n * ```\n *\n * @type {State}\n */\n function trailBracketAfter(code) {\n // Whitespace or something that could start a resource or reference is the end.\n // Switch back to trail otherwise.\n if (\n code === null ||\n code === 40 ||\n code === 91 ||\n markdownLineEndingOrSpace(code) ||\n unicodeWhitespace(code)\n ) {\n return ok(code)\n }\n return trail(code)\n }\n\n /**\n * In character-reference like trail, after `&`.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharRefStart(code) {\n // When non-alpha, it’s not a trail.\n return asciiAlpha(code) ? trailCharRefInside(code) : nok(code)\n }\n\n /**\n * In character-reference like trail.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharRefInside(code) {\n // Switch back to trail if this is well-formed.\n if (code === 59) {\n effects.consume(code)\n return trail\n }\n if (asciiAlpha(code)) {\n effects.consume(code)\n return trailCharRefInside\n }\n\n // It’s not a trail.\n return nok(code)\n }\n}\n\n/**\n * Dot in email domain trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | contact@example.org.\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailDomainDotTrail(effects, ok, nok) {\n return start\n\n /**\n * Dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Must be dot.\n effects.consume(code)\n return after\n }\n\n /**\n * After dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Not a trail if alphanumeric.\n return asciiAlphanumeric(code) ? nok(code) : ok(code)\n }\n}\n\n/**\n * See:\n * .\n *\n * @type {Previous}\n */\nfunction previousWww(code) {\n return (\n code === null ||\n code === 40 ||\n code === 42 ||\n code === 95 ||\n code === 91 ||\n code === 93 ||\n code === 126 ||\n markdownLineEndingOrSpace(code)\n )\n}\n\n/**\n * See:\n * .\n *\n * @type {Previous}\n */\nfunction previousProtocol(code) {\n return !asciiAlpha(code)\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previousEmail(code) {\n // Do not allow a slash “inside” atext.\n // The reference code is a bit weird, but that’s what it results in.\n // Source: .\n // Other than slash, every preceding character is allowed.\n return !(code === 47 || gfmAtext(code))\n}\n\n/**\n * @param {Code} code\n * @returns {boolean}\n */\nfunction gfmAtext(code) {\n return (\n code === 43 ||\n code === 45 ||\n code === 46 ||\n code === 95 ||\n asciiAlphanumeric(code)\n )\n}\n\n/**\n * @param {Array} events\n * @returns {boolean}\n */\nfunction previousUnbalanced(events) {\n let index = events.length\n let result = false\n while (index--) {\n const token = events[index][1]\n if (\n (token.type === 'labelLink' || token.type === 'labelImage') &&\n !token._balanced\n ) {\n result = true\n break\n }\n\n // If we’ve seen this token, and it was marked as not having any unbalanced\n // bracket before it, we can exit.\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false\n break\n }\n }\n if (events.length > 0 && !result) {\n // Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true\n }\n return result\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Exiter} Exiter\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {blankLine} from 'micromark-core-commonmark'\nimport {factorySpace} from 'micromark-factory-space'\nimport {markdownLineEndingOrSpace} from 'micromark-util-character'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nconst indent = {\n tokenize: tokenizeIndent,\n partial: true\n}\n\n// To do: micromark should support a `_hiddenGfmFootnoteSupport`, which only\n// affects label start (image).\n// That will let us drop `tokenizePotentialGfmFootnote*`.\n// It currently has a `_hiddenFootnoteSupport`, which affects that and more.\n// That can be removed when `micromark-extension-footnote` is archived.\n\n/**\n * Create an extension for `micromark` to enable GFM footnote syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to\n * enable GFM footnote syntax.\n */\nexport function gfmFootnote() {\n /** @type {Extension} */\n return {\n document: {\n [91]: {\n tokenize: tokenizeDefinitionStart,\n continuation: {\n tokenize: tokenizeDefinitionContinuation\n },\n exit: gfmFootnoteDefinitionEnd\n }\n },\n text: {\n [91]: {\n tokenize: tokenizeGfmFootnoteCall\n },\n [93]: {\n add: 'after',\n tokenize: tokenizePotentialGfmFootnoteCall,\n resolveTo: resolveToPotentialGfmFootnoteCall\n }\n }\n }\n}\n\n// To do: remove after micromark update.\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePotentialGfmFootnoteCall(effects, ok, nok) {\n const self = this\n let index = self.events.length\n /** @type {Array} */\n // @ts-expect-error It’s fine!\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n /** @type {Token} */\n let labelStart\n\n // Find an opening.\n while (index--) {\n const token = self.events[index][1]\n if (token.type === 'labelImage') {\n labelStart = token\n break\n }\n\n // Exit if we’ve walked far enough.\n if (\n token.type === 'gfmFootnoteCall' ||\n token.type === 'labelLink' ||\n token.type === 'label' ||\n token.type === 'image' ||\n token.type === 'link'\n ) {\n break\n }\n }\n return start\n\n /**\n * @type {State}\n */\n function start(code) {\n if (!labelStart || !labelStart._balanced) {\n return nok(code)\n }\n const id = normalizeIdentifier(\n self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })\n )\n if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {\n return nok(code)\n }\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n return ok(code)\n }\n}\n\n// To do: remove after micromark update.\n/** @type {Resolver} */\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n let index = events.length\n /** @type {Token | undefined} */\n let labelStart\n\n // Find an opening.\n while (index--) {\n if (\n events[index][1].type === 'labelImage' &&\n events[index][0] === 'enter'\n ) {\n labelStart = events[index][1]\n break\n }\n }\n // Change the `labelImageMarker` to a `data`.\n events[index + 1][1].type = 'data'\n events[index + 3][1].type = 'gfmFootnoteCallLabelMarker'\n\n // The whole (without `!`):\n /** @type {Token} */\n const call = {\n type: 'gfmFootnoteCall',\n start: Object.assign({}, events[index + 3][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n }\n // The `^` marker\n /** @type {Token} */\n const marker = {\n type: 'gfmFootnoteCallMarker',\n start: Object.assign({}, events[index + 3][1].end),\n end: Object.assign({}, events[index + 3][1].end)\n }\n // Increment the end 1 character.\n marker.end.column++\n marker.end.offset++\n marker.end._bufferIndex++\n /** @type {Token} */\n const string = {\n type: 'gfmFootnoteCallString',\n start: Object.assign({}, marker.end),\n end: Object.assign({}, events[events.length - 1][1].start)\n }\n /** @type {Token} */\n const chunk = {\n type: 'chunkString',\n contentType: 'string',\n start: Object.assign({}, string.start),\n end: Object.assign({}, string.end)\n }\n\n /** @type {Array} */\n const replacement = [\n // Take the `labelImageMarker` (now `data`, the `!`)\n events[index + 1],\n events[index + 2],\n ['enter', call, context],\n // The `[`\n events[index + 3],\n events[index + 4],\n // The `^`.\n ['enter', marker, context],\n ['exit', marker, context],\n // Everything in between.\n ['enter', string, context],\n ['enter', chunk, context],\n ['exit', chunk, context],\n ['exit', string, context],\n // The ending (`]`, properly parsed and labelled).\n events[events.length - 2],\n events[events.length - 1],\n ['exit', call, context]\n ]\n events.splice(index, events.length - index + 1, ...replacement)\n return events\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeGfmFootnoteCall(effects, ok, nok) {\n const self = this\n /** @type {Array} */\n // @ts-expect-error It’s fine!\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n let size = 0\n /** @type {boolean} */\n let data\n\n // Note: the implementation of `markdown-rs` is different, because it houses\n // core *and* extensions in one project.\n // Therefore, it can include footnote logic inside `label-end`.\n // We can’t do that, but luckily, we can parse footnotes in a simpler way than\n // needed for labels.\n return start\n\n /**\n * Start of footnote label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteCall')\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n return callStart\n }\n\n /**\n * After `[`, at `^`.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callStart(code) {\n if (code !== 94) return nok(code)\n effects.enter('gfmFootnoteCallMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallMarker')\n effects.enter('gfmFootnoteCallString')\n effects.enter('chunkString').contentType = 'string'\n return callData\n }\n\n /**\n * In label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callData(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n (code === 93 && !data) ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null ||\n code === 91 ||\n markdownLineEndingOrSpace(code)\n ) {\n return nok(code)\n }\n if (code === 93) {\n effects.exit('chunkString')\n const token = effects.exit('gfmFootnoteCallString')\n if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {\n return nok(code)\n }\n effects.enter('gfmFootnoteCallLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteCallLabelMarker')\n effects.exit('gfmFootnoteCall')\n return ok\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true\n }\n size++\n effects.consume(code)\n return code === 92 ? callEscape : callData\n }\n\n /**\n * On character after escape.\n *\n * ```markdown\n * > | a [^b\\c] d\n * ^\n * ```\n *\n * @type {State}\n */\n function callEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return callData\n }\n return callData(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionStart(effects, ok, nok) {\n const self = this\n /** @type {Array} */\n // @ts-expect-error It’s fine!\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = [])\n /** @type {string} */\n let identifier\n let size = 0\n /** @type {boolean | undefined} */\n let data\n return start\n\n /**\n * Start of GFM footnote definition.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteDefinition')._container = true\n effects.enter('gfmFootnoteDefinitionLabel')\n effects.enter('gfmFootnoteDefinitionLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionLabelMarker')\n return labelAtMarker\n }\n\n /**\n * In label, at caret.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAtMarker(code) {\n if (code === 94) {\n effects.enter('gfmFootnoteDefinitionMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionMarker')\n effects.enter('gfmFootnoteDefinitionLabelString')\n effects.enter('chunkString').contentType = 'string'\n return labelInside\n }\n return nok(code)\n }\n\n /**\n * In label.\n *\n * > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote\n * > definition labels.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n (code === 93 && !data) ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null ||\n code === 91 ||\n markdownLineEndingOrSpace(code)\n ) {\n return nok(code)\n }\n if (code === 93) {\n effects.exit('chunkString')\n const token = effects.exit('gfmFootnoteDefinitionLabelString')\n identifier = normalizeIdentifier(self.sliceSerialize(token))\n effects.enter('gfmFootnoteDefinitionLabelMarker')\n effects.consume(code)\n effects.exit('gfmFootnoteDefinitionLabelMarker')\n effects.exit('gfmFootnoteDefinitionLabel')\n return labelAfter\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true\n }\n size++\n effects.consume(code)\n return code === 92 ? labelEscape : labelInside\n }\n\n /**\n * After `\\`, at a special character.\n *\n * > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:\n * > \n *\n * ```markdown\n * > | [^a\\*b]: c\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code)\n size++\n return labelInside\n }\n return labelInside(code)\n }\n\n /**\n * After definition label.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n if (code === 58) {\n effects.enter('definitionMarker')\n effects.consume(code)\n effects.exit('definitionMarker')\n if (!defined.includes(identifier)) {\n defined.push(identifier)\n }\n\n // Any whitespace after the marker is eaten, forming indented code\n // is not possible.\n // No space is also fine, just like a block quote marker.\n return factorySpace(\n effects,\n whitespaceAfter,\n 'gfmFootnoteDefinitionWhitespace'\n )\n }\n return nok(code)\n }\n\n /**\n * After definition prefix.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function whitespaceAfter(code) {\n // `markdown-rs` has a wrapping token for the prefix that is closed here.\n return ok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionContinuation(effects, ok, nok) {\n /// Start of footnote definition continuation.\n ///\n /// ```markdown\n /// | [^a]: b\n /// > | c\n /// ^\n /// ```\n //\n // Either a blank line, which is okay, or an indented thing.\n return effects.check(blankLine, ok, effects.attempt(indent, ok, nok))\n}\n\n/** @type {Exiter} */\nfunction gfmFootnoteDefinitionEnd(effects) {\n effects.exit('gfmFootnoteDefinition')\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this\n return factorySpace(\n effects,\n afterPrefix,\n 'gfmFootnoteDefinitionIndent',\n 4 + 1\n )\n\n /**\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1]\n return tail &&\n tail[1].type === 'gfmFootnoteDefinitionIndent' &&\n tail[2].sliceSerialize(tail[1], true).length === 4\n ? ok(code)\n : nok(code)\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean} [singleTilde=true]\n * Whether to support strikethrough with a single tilde.\n *\n * Single tildes work on github.com, but are technically prohibited by the\n * GFM spec.\n */\n\nimport {splice} from 'micromark-util-chunked'\nimport {classifyCharacter} from 'micromark-util-classify-character'\nimport {resolveAll} from 'micromark-util-resolve-all'\n/**\n * Create an extension for `micromark` to enable GFM strikethrough syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM strikethrough syntax.\n */\nexport function gfmStrikethrough(options) {\n const options_ = options || {}\n let single = options_.singleTilde\n const tokenizer = {\n tokenize: tokenizeStrikethrough,\n resolveAll: resolveAllStrikethrough\n }\n if (single === null || single === undefined) {\n single = true\n }\n return {\n text: {\n [126]: tokenizer\n },\n insideSpan: {\n null: [tokenizer]\n },\n attentionMarkers: {\n null: [126]\n }\n }\n\n /**\n * Take events and resolve strikethrough.\n *\n * @type {Resolver}\n */\n function resolveAllStrikethrough(events, context) {\n let index = -1\n\n // Walk through all events.\n while (++index < events.length) {\n // Find a token that can close.\n if (\n events[index][0] === 'enter' &&\n events[index][1].type === 'strikethroughSequenceTemporary' &&\n events[index][1]._close\n ) {\n let open = index\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (\n events[open][0] === 'exit' &&\n events[open][1].type === 'strikethroughSequenceTemporary' &&\n events[open][1]._open &&\n // If the sizes are the same:\n events[index][1].end.offset - events[index][1].start.offset ===\n events[open][1].end.offset - events[open][1].start.offset\n ) {\n events[index][1].type = 'strikethroughSequence'\n events[open][1].type = 'strikethroughSequence'\n\n /** @type {Token} */\n const strikethrough = {\n type: 'strikethrough',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[index][1].end)\n }\n\n /** @type {Token} */\n const text = {\n type: 'strikethroughText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n }\n\n // Opening.\n /** @type {Array} */\n const nextEvents = [\n ['enter', strikethrough, context],\n ['enter', events[open][1], context],\n ['exit', events[open][1], context],\n ['enter', text, context]\n ]\n const insideSpan = context.parser.constructs.insideSpan.null\n if (insideSpan) {\n // Between.\n splice(\n nextEvents,\n nextEvents.length,\n 0,\n resolveAll(insideSpan, events.slice(open + 1, index), context)\n )\n }\n\n // Closing.\n splice(nextEvents, nextEvents.length, 0, [\n ['exit', text, context],\n ['enter', events[index][1], context],\n ['exit', events[index][1], context],\n ['exit', strikethrough, context]\n ])\n splice(events, open - 1, index - open + 3, nextEvents)\n index = open + nextEvents.length - 2\n break\n }\n }\n }\n }\n index = -1\n while (++index < events.length) {\n if (events[index][1].type === 'strikethroughSequenceTemporary') {\n events[index][1].type = 'data'\n }\n }\n return events\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeStrikethrough(effects, ok, nok) {\n const previous = this.previous\n const events = this.events\n let size = 0\n return start\n\n /** @type {State} */\n function start(code) {\n if (\n previous === 126 &&\n events[events.length - 1][1].type !== 'characterEscape'\n ) {\n return nok(code)\n }\n effects.enter('strikethroughSequenceTemporary')\n return more(code)\n }\n\n /** @type {State} */\n function more(code) {\n const before = classifyCharacter(previous)\n if (code === 126) {\n // If this is the third marker, exit.\n if (size > 1) return nok(code)\n effects.consume(code)\n size++\n return more\n }\n if (size < 2 && !single) return nok(code)\n const token = effects.exit('strikethroughSequenceTemporary')\n const after = classifyCharacter(code)\n token._open = !after || (after === 2 && Boolean(before))\n token._close = !before || (before === 2 && Boolean(after))\n return ok(code)\n }\n }\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\n// Port of `edit_map.rs` from `markdown-rs`.\n// This should move to `markdown-js` later.\n\n// Deal with several changes in events, batching them together.\n//\n// Preferably, changes should be kept to a minimum.\n// Sometimes, it’s needed to change the list of events, because parsing can be\n// messy, and it helps to expose a cleaner interface of events to the compiler\n// and other users.\n// It can also help to merge many adjacent similar events.\n// And, in other cases, it’s needed to parse subcontent: pass some events\n// through another tokenizer and inject the result.\n\n/**\n * @typedef {[number, number, Array]} Change\n * @typedef {[number, number, number]} Jump\n */\n\n/**\n * Tracks a bunch of edits.\n */\nexport class EditMap {\n /**\n * Create a new edit map.\n */\n constructor() {\n /**\n * Record of changes.\n *\n * @type {Array}\n */\n this.map = []\n }\n\n /**\n * Create an edit: a remove and/or add at a certain place.\n *\n * @param {number} index\n * @param {number} remove\n * @param {Array} add\n * @returns {void}\n */\n add(index, remove, add) {\n addImpl(this, index, remove, add)\n }\n\n // To do: not used here.\n // /**\n // * Create an edit: but insert `add` before existing additions.\n // *\n // * @param {number} index\n // * @param {number} remove\n // * @param {Array} add\n // * @returns {void}\n // */\n // addBefore(index, remove, add) {\n // addImpl(this, index, remove, add, true)\n // }\n\n /**\n * Done, change the events.\n *\n * @param {Array} events\n * @returns {void}\n */\n consume(events) {\n this.map.sort((a, b) => a[0] - b[0])\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (this.map.length === 0) {\n return\n }\n\n // To do: if links are added in events, like they are in `markdown-rs`,\n // this is needed.\n // // Calculate jumps: where items in the current list move to.\n // /** @type {Array} */\n // const jumps = []\n // let index = 0\n // let addAcc = 0\n // let removeAcc = 0\n // while (index < this.map.length) {\n // const [at, remove, add] = this.map[index]\n // removeAcc += remove\n // addAcc += add.length\n // jumps.push([at, removeAcc, addAcc])\n // index += 1\n // }\n //\n // . shiftLinks(events, jumps)\n\n let index = this.map.length\n /** @type {Array>} */\n const vecs = []\n while (index > 0) {\n index -= 1\n vecs.push(events.slice(this.map[index][0] + this.map[index][1]))\n // eslint-disable-next-line unicorn/no-array-push-push\n vecs.push(this.map[index][2])\n\n // Truncate rest.\n events.length = this.map[index][0]\n }\n vecs.push([...events])\n events.length = 0\n let slice = vecs.pop()\n while (slice) {\n events.push(...slice)\n slice = vecs.pop()\n }\n\n // Truncate everything.\n this.map.length = 0\n }\n}\n\n/**\n * Create an edit.\n *\n * @param {EditMap} editMap\n * @param {number} at\n * @param {number} remove\n * @param {Array} add\n * @returns {void}\n */\nfunction addImpl(editMap, at, remove, add) {\n let index = 0\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (remove === 0 && add.length === 0) {\n return\n }\n while (index < editMap.map.length) {\n if (editMap.map[index][0] === at) {\n editMap.map[index][1] += remove\n\n // To do: before not used.\n // if (before) {\n // add.push(...editMap.map[index][2])\n // editMap.map[index][2] = add\n // } else {\n editMap.map[index][2].push(...add)\n // }\n\n return\n }\n index += 1\n }\n editMap.map.push([at, remove, add])\n}\n\n// /**\n// * Shift `previous` and `next` links according to `jumps`.\n// *\n// * This fixes links in case there are events removed or added between them.\n// *\n// * @param {Array} events\n// * @param {Array} jumps\n// */\n// function shiftLinks(events, jumps) {\n// let jumpIndex = 0\n// let index = 0\n// let add = 0\n// let rm = 0\n\n// while (index < events.length) {\n// const rmCurr = rm\n\n// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {\n// add = jumps[jumpIndex][2]\n// rm = jumps[jumpIndex][1]\n// jumpIndex += 1\n// }\n\n// // Ignore items that will be removed.\n// if (rm > rmCurr) {\n// index += rm - rmCurr\n// } else {\n// console.log('to do: links?', add, rmCurr)\n// // ?\n// // if let Some(link) = &events[index].link {\n// // if let Some(next) = link.next {\n// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);\n// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {\n// // add = jumps[jumpIndex].2;\n// // rm = jumps[jumpIndex].1;\n// // jumpIndex += 1;\n// // }\n// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);\n// // index = next;\n// // continue;\n// // }\n// // }\n// index += 1\n// }\n// }\n// }\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n */\n\n/**\n * @typedef {'left' | 'center' | 'right' | 'none'} Align\n */\n\n/**\n * Figure out the alignment of a GFM table.\n *\n * @param {Array} events\n * @param {number} index\n * @returns {Array}\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false\n /** @type {Array} */\n const align = []\n while (index < events.length) {\n const event = events[index]\n if (inDelimiterRow) {\n if (event[0] === 'enter') {\n // Start of alignment value: set a new column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n if (event[1].type === 'tableContent') {\n align.push(\n events[index + 1][1].type === 'tableDelimiterMarker'\n ? 'left'\n : 'none'\n )\n }\n }\n // Exits:\n // End of alignment value: change the column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n else if (event[1].type === 'tableContent') {\n if (events[index - 1][1].type === 'tableDelimiterMarker') {\n const alignIndex = align.length - 1\n align[alignIndex] = align[alignIndex] === 'left' ? 'center' : 'right'\n }\n }\n // Done!\n else if (event[1].type === 'tableDelimiterRow') {\n break\n }\n } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') {\n inDelimiterRow = true\n }\n index += 1\n }\n return align\n}\n","/**\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').Point} Point\n * @typedef {import('micromark-util-types').Resolver} Resolver\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\n/**\n * @typedef {[number, number, number, number]} Range\n * Cell info.\n *\n * @typedef {0 | 1 | 2 | 3} RowKind\n * Where we are: `1` for head row, `2` for delimiter row, `3` for body row.\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEnding,\n markdownLineEndingOrSpace,\n markdownSpace\n} from 'micromark-util-character'\nimport {EditMap} from './edit-map.js'\nimport {gfmTableAlign} from './infer.js'\n\n// To do: next major: expose functions.\n\n/**\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * table syntax.\n *\n * @type {Extension}\n */\nexport const gfmTable = {\n flow: {\n null: {\n tokenize: tokenizeTable,\n resolveAll: resolveTable\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTable(effects, ok, nok) {\n const self = this\n let size = 0\n let sizeB = 0\n /** @type {boolean | undefined} */\n let seen\n return start\n\n /**\n * Start of a GFM table.\n *\n * If there is a valid table row or table head before, then we try to parse\n * another row.\n * Otherwise, we try to parse a head.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * > | | b |\n * ^\n * ```\n * @type {State}\n */\n function start(code) {\n let index = self.events.length - 1\n while (index > -1) {\n const type = self.events[index][1].type\n if (\n type === 'lineEnding' ||\n // Note: markdown-rs uses `whitespace` instead of `linePrefix`\n type === 'linePrefix'\n )\n index--\n else break\n }\n const tail = index > -1 ? self.events[index][1].type : null\n const next =\n tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore\n\n // Don’t allow lazy body rows.\n if (next === bodyRowStart && self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n return next(code)\n }\n\n /**\n * Before table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBefore(code) {\n effects.enter('tableHead')\n effects.enter('tableRow')\n return headRowStart(code)\n }\n\n /**\n * Before table head row, after whitespace.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowStart(code) {\n if (code === 124) {\n return headRowBreak(code)\n }\n\n // To do: micromark-js should let us parse our own whitespace in extensions,\n // like `markdown-rs`:\n //\n // ```js\n // // 4+ spaces.\n // if (markdownSpace(code)) {\n // return nok(code)\n // }\n // ```\n\n seen = true\n // Count the first character, that isn’t a pipe, double.\n sizeB += 1\n return headRowBreak(code)\n }\n\n /**\n * At break in table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * ^\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBreak(code) {\n if (code === null) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n if (markdownLineEnding(code)) {\n // If anything other than one pipe (ignoring whitespace) was used, it’s fine.\n if (sizeB > 1) {\n sizeB = 0\n // To do: check if this works.\n // Feel free to interrupt:\n self.interrupt = true\n effects.exit('tableRow')\n effects.enter('lineEnding')\n effects.consume(code)\n effects.exit('lineEnding')\n return headDelimiterStart\n }\n\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n if (markdownSpace(code)) {\n // To do: check if this is fine.\n // effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)\n // State::Retry(space_or_tab(tokenizer))\n return factorySpace(effects, headRowBreak, 'whitespace')(code)\n }\n sizeB += 1\n if (seen) {\n seen = false\n // Header cell count.\n size += 1\n }\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n // Whether a delimiter was seen.\n seen = true\n return headRowBreak\n }\n\n // Anything else is cell data.\n effects.enter('data')\n return headRowData(code)\n }\n\n /**\n * In table head row data.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('data')\n return headRowBreak(code)\n }\n effects.consume(code)\n return code === 92 ? headRowEscape : headRowData\n }\n\n /**\n * In table head row escape.\n *\n * ```markdown\n * > | | a\\-b |\n * ^\n * | | ---- |\n * | | c |\n * ```\n *\n * @type {State}\n */\n function headRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return headRowData\n }\n return headRowData(code)\n }\n\n /**\n * Before delimiter row.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterStart(code) {\n // Reset `interrupt`.\n self.interrupt = false\n\n // Note: in `markdown-rs`, we need to handle piercing here too.\n if (self.parser.lazy[self.now().line]) {\n return nok(code)\n }\n effects.enter('tableDelimiterRow')\n // Track if we’ve seen a `:` or `|`.\n seen = false\n if (markdownSpace(code)) {\n return factorySpace(\n effects,\n headDelimiterBefore,\n 'linePrefix',\n self.parser.constructs.disable.null.includes('codeIndented')\n ? undefined\n : 4\n )(code)\n }\n return headDelimiterBefore(code)\n }\n\n /**\n * Before delimiter row, after optional whitespace.\n *\n * Reused when a `|` is found later, to parse another cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterBefore(code) {\n if (code === 45 || code === 58) {\n return headDelimiterValueBefore(code)\n }\n if (code === 124) {\n seen = true\n // If we start with a pipe, we open a cell marker.\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return headDelimiterCellBefore\n }\n\n // More whitespace / empty row not allowed at start.\n return headDelimiterNok(code)\n }\n\n /**\n * After `|`, before delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellBefore(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterValueBefore, 'whitespace')(code)\n }\n return headDelimiterValueBefore(code)\n }\n\n /**\n * Before delimiter cell value.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterValueBefore(code) {\n // Align: left.\n if (code === 58) {\n sizeB += 1\n seen = true\n effects.enter('tableDelimiterMarker')\n effects.consume(code)\n effects.exit('tableDelimiterMarker')\n return headDelimiterLeftAlignmentAfter\n }\n\n // Align: none.\n if (code === 45) {\n sizeB += 1\n // To do: seems weird that this *isn’t* left aligned, but that state is used?\n return headDelimiterLeftAlignmentAfter(code)\n }\n if (code === null || markdownLineEnding(code)) {\n return headDelimiterCellAfter(code)\n }\n return headDelimiterNok(code)\n }\n\n /**\n * After delimiter cell left alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | :- |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterLeftAlignmentAfter(code) {\n if (code === 45) {\n effects.enter('tableDelimiterFiller')\n return headDelimiterFiller(code)\n }\n\n // Anything else is not ok after the left-align colon.\n return headDelimiterNok(code)\n }\n\n /**\n * In delimiter cell filler.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterFiller(code) {\n if (code === 45) {\n effects.consume(code)\n return headDelimiterFiller\n }\n\n // Align is `center` if it was `left`, `right` otherwise.\n if (code === 58) {\n seen = true\n effects.exit('tableDelimiterFiller')\n effects.enter('tableDelimiterMarker')\n effects.consume(code)\n effects.exit('tableDelimiterMarker')\n return headDelimiterRightAlignmentAfter\n }\n effects.exit('tableDelimiterFiller')\n return headDelimiterRightAlignmentAfter(code)\n }\n\n /**\n * After delimiter cell right alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterRightAlignmentAfter(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterCellAfter, 'whitespace')(code)\n }\n return headDelimiterCellAfter(code)\n }\n\n /**\n * After delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellAfter(code) {\n if (code === 124) {\n return headDelimiterBefore(code)\n }\n if (code === null || markdownLineEnding(code)) {\n // Exit when:\n // * there was no `:` or `|` at all (it’s a thematic break or setext\n // underline instead)\n // * the header cell count is not the delimiter cell count\n if (!seen || size !== sizeB) {\n return headDelimiterNok(code)\n }\n\n // Note: in markdown-rs`, a reset is needed here.\n effects.exit('tableDelimiterRow')\n effects.exit('tableHead')\n // To do: in `markdown-rs`, resolvers need to be registered manually.\n // effects.register_resolver(ResolveName::GfmTable)\n return ok(code)\n }\n return headDelimiterNok(code)\n }\n\n /**\n * In delimiter row, at a disallowed byte.\n *\n * ```markdown\n * | | a |\n * > | | x |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterNok(code) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code)\n }\n\n /**\n * Before table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowStart(code) {\n // Note: in `markdown-rs` we need to manually take care of a prefix,\n // but in `micromark-js` that is done for us, so if we’re here, we’re\n // never at whitespace.\n effects.enter('tableRow')\n return bodyRowBreak(code)\n }\n\n /**\n * At break in table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ^\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowBreak(code) {\n if (code === 124) {\n effects.enter('tableCellDivider')\n effects.consume(code)\n effects.exit('tableCellDivider')\n return bodyRowBreak\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('tableRow')\n return ok(code)\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, bodyRowBreak, 'whitespace')(code)\n }\n\n // Anything else is cell content.\n effects.enter('data')\n return bodyRowData(code)\n }\n\n /**\n * In table body row data.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit('data')\n return bodyRowBreak(code)\n }\n effects.consume(code)\n return code === 92 ? bodyRowEscape : bodyRowData\n }\n\n /**\n * In table body row escape.\n *\n * ```markdown\n * | | a |\n * | | ---- |\n * > | | b\\-c |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code)\n return bodyRowData\n }\n return bodyRowData(code)\n }\n}\n\n/** @type {Resolver} */\n// eslint-disable-next-line complexity\nfunction resolveTable(events, context) {\n let index = -1\n let inFirstCellAwaitingPipe = true\n /** @type {RowKind} */\n let rowKind = 0\n /** @type {Range} */\n let lastCell = [0, 0, 0, 0]\n /** @type {Range} */\n let cell = [0, 0, 0, 0]\n let afterHeadAwaitingFirstBodyRow = false\n let lastTableEnd = 0\n /** @type {Token | undefined} */\n let currentTable\n /** @type {Token | undefined} */\n let currentBody\n /** @type {Token | undefined} */\n let currentCell\n const map = new EditMap()\n while (++index < events.length) {\n const event = events[index]\n const token = event[1]\n if (event[0] === 'enter') {\n // Start of head.\n if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = false\n\n // Inject previous (body end and) table end.\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)\n currentBody = undefined\n lastTableEnd = 0\n }\n\n // Inject table start.\n currentTable = {\n type: 'table',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n }\n map.add(index, 0, [['enter', currentTable, context]])\n } else if (\n token.type === 'tableRow' ||\n token.type === 'tableDelimiterRow'\n ) {\n inFirstCellAwaitingPipe = true\n currentCell = undefined\n lastCell = [0, 0, 0, 0]\n cell = [0, index + 1, 0, 0]\n\n // Inject table body start.\n if (afterHeadAwaitingFirstBodyRow) {\n afterHeadAwaitingFirstBodyRow = false\n currentBody = {\n type: 'tableBody',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n }\n map.add(index, 0, [['enter', currentBody, context]])\n }\n rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1\n }\n // Cell data.\n else if (\n rowKind &&\n (token.type === 'data' ||\n token.type === 'tableDelimiterMarker' ||\n token.type === 'tableDelimiterFiller')\n ) {\n inFirstCellAwaitingPipe = false\n\n // First value in cell.\n if (cell[2] === 0) {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n undefined,\n currentCell\n )\n lastCell = [0, 0, 0, 0]\n }\n cell[2] = index\n }\n } else if (token.type === 'tableCellDivider') {\n if (inFirstCellAwaitingPipe) {\n inFirstCellAwaitingPipe = false\n } else {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n undefined,\n currentCell\n )\n }\n lastCell = cell\n cell = [lastCell[1], index, 0, 0]\n }\n }\n }\n // Exit events.\n else if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = true\n lastTableEnd = index\n } else if (\n token.type === 'tableRow' ||\n token.type === 'tableDelimiterRow'\n ) {\n lastTableEnd = index\n if (lastCell[1] !== 0) {\n cell[0] = cell[1]\n currentCell = flushCell(\n map,\n context,\n lastCell,\n rowKind,\n index,\n currentCell\n )\n } else if (cell[1] !== 0) {\n currentCell = flushCell(map, context, cell, rowKind, index, currentCell)\n }\n rowKind = 0\n } else if (\n rowKind &&\n (token.type === 'data' ||\n token.type === 'tableDelimiterMarker' ||\n token.type === 'tableDelimiterFiller')\n ) {\n cell[3] = index\n }\n }\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody)\n }\n map.consume(context.events)\n\n // To do: move this into `html`, when events are exposed there.\n // That’s what `markdown-rs` does.\n // That needs updates to `mdast-util-gfm-table`.\n index = -1\n while (++index < context.events.length) {\n const event = context.events[index]\n if (event[0] === 'enter' && event[1].type === 'table') {\n event[1]._align = gfmTableAlign(context.events, index)\n }\n }\n return events\n}\n\n/// Generate a cell.\n/**\n *\n * @param {EditMap} map\n * @param {TokenizeContext} context\n * @param {Range} range\n * @param {RowKind} rowKind\n * @param {number | undefined} rowEnd\n * @param {Token | undefined} previousCell\n * @returns {Token | undefined}\n */\n// eslint-disable-next-line max-params\nfunction flushCell(map, context, range, rowKind, rowEnd, previousCell) {\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'\n const groupName =\n rowKind === 1\n ? 'tableHeader'\n : rowKind === 2\n ? 'tableDelimiter'\n : 'tableData'\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'\n const valueName = 'tableContent'\n\n // Insert an exit for the previous cell, if there is one.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[0] !== 0) {\n previousCell.end = Object.assign({}, getPoint(context.events, range[0]))\n map.add(range[0], 0, [['exit', previousCell, context]])\n }\n\n // Insert enter of this cell.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^^^^-- this cell\n // ```\n const now = getPoint(context.events, range[1])\n previousCell = {\n type: groupName,\n start: Object.assign({}, now),\n // Note: correct end is set later.\n end: Object.assign({}, now)\n }\n map.add(range[1], 0, [['enter', previousCell, context]])\n\n // Insert text start at first data start and end at last data end, and\n // remove events between.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[2] !== 0) {\n const relatedStart = getPoint(context.events, range[2])\n const relatedEnd = getPoint(context.events, range[3])\n /** @type {Token} */\n const valueToken = {\n type: valueName,\n start: Object.assign({}, relatedStart),\n end: Object.assign({}, relatedEnd)\n }\n map.add(range[2], 0, [['enter', valueToken, context]])\n if (rowKind !== 2) {\n // Fix positional info on remaining events\n const start = context.events[range[2]]\n const end = context.events[range[3]]\n start[1].end = Object.assign({}, end[1].end)\n start[1].type = 'chunkText'\n start[1].contentType = 'text'\n\n // Remove if needed.\n if (range[3] > range[2] + 1) {\n const a = range[2] + 1\n const b = range[3] - range[2] - 1\n map.add(a, b, [])\n }\n }\n map.add(range[3] + 1, 0, [['exit', valueToken, context]])\n }\n\n // Insert an exit for the last cell, if at the row end.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^^^-- this cell (the last one contains two “between” parts)\n // ```\n if (rowEnd !== undefined) {\n previousCell.end = Object.assign({}, getPoint(context.events, rowEnd))\n map.add(rowEnd, 0, [['exit', previousCell, context]])\n previousCell = undefined\n }\n return previousCell\n}\n\n/**\n * Generate table end (and table body end).\n *\n * @param {EditMap} map\n * @param {TokenizeContext} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array} */\n const exits = []\n const related = getPoint(context.events, index)\n if (tableBody) {\n tableBody.end = Object.assign({}, related)\n exits.push(['exit', tableBody, context])\n }\n table.end = Object.assign({}, related)\n exits.push(['exit', table, context])\n map.add(index + 1, 0, exits)\n}\n\n/**\n * @param {Array} events\n * @param {number} index\n * @returns {readonly Point}\n */\nfunction getPoint(events, index) {\n const event = events[index]\n const side = event[0] === 'enter' ? 'start' : 'end'\n return event[1][side]\n}\n","/**\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').State} State\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Tokenizer} Tokenizer\n */\n\nimport {factorySpace} from 'micromark-factory-space'\nimport {\n markdownLineEndingOrSpace,\n markdownLineEnding,\n markdownSpace\n} from 'micromark-util-character'\nconst tasklistCheck = {\n tokenize: tokenizeTasklistCheck\n}\n\n// To do: next major: expose function to make extension.\n\n/**\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM task list items syntax.\n *\n * @type {Extension}\n */\nexport const gfmTaskListItem = {\n text: {\n [91]: tasklistCheck\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTasklistCheck(effects, ok, nok) {\n const self = this\n return open\n\n /**\n * At start of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (\n // Exit if there’s stuff before.\n self.previous !== null ||\n // Exit if not in the first content that is the first child of a list\n // item.\n !self._gfmTasklistFirstContentOfListItem\n ) {\n return nok(code)\n }\n effects.enter('taskListCheck')\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n return inside\n }\n\n /**\n * In task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // Currently we match how GH works in files.\n // To match how GH works in comments, use `markdownSpace` (`[\\t ]`) instead\n // of `markdownLineEndingOrSpace` (`[\\t\\n\\r ]`).\n if (markdownLineEndingOrSpace(code)) {\n effects.enter('taskListCheckValueUnchecked')\n effects.consume(code)\n effects.exit('taskListCheckValueUnchecked')\n return close\n }\n if (code === 88 || code === 120) {\n effects.enter('taskListCheckValueChecked')\n effects.consume(code)\n effects.exit('taskListCheckValueChecked')\n return close\n }\n return nok(code)\n }\n\n /**\n * At close of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function close(code) {\n if (code === 93) {\n effects.enter('taskListCheckMarker')\n effects.consume(code)\n effects.exit('taskListCheckMarker')\n effects.exit('taskListCheck')\n return after\n }\n return nok(code)\n }\n\n /**\n * @type {State}\n */\n function after(code) {\n // EOL in paragraph means there must be something else after it.\n if (markdownLineEnding(code)) {\n return ok(code)\n }\n\n // Space or tab?\n // Check what comes after.\n if (markdownSpace(code)) {\n return effects.check(\n {\n tokenize: spaceThenNonSpace\n },\n ok,\n nok\n )(code)\n }\n\n // EOF, or non-whitespace, both wrong.\n return nok(code)\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction spaceThenNonSpace(effects, ok, nok) {\n return factorySpace(effects, after, 'whitespace')\n\n /**\n * After whitespace, after task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // EOF means there was nothing, so bad.\n // EOL means there’s content after it, so good.\n // Impossible to have more spaces.\n // Anything else is good.\n return code === null ? nok(code) : ok(code)\n }\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","/**\n * @typedef {import('mdast').Parent} MdastParent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').Text} Text\n * @typedef {import('unist-util-visit-parents').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * @typedef {Content | Root} Node\n * @typedef {Extract} Parent\n * @typedef {Exclude} ContentParent\n *\n * @typedef RegExpMatchObject\n * Info on the match.\n * @property {number} index\n * The index of the search at which the result was found.\n * @property {string} input\n * A copy of the search string in the text node.\n * @property {[Root, ...Array, Text]} stack\n * All ancestors of the text node, where the last node is the text itself.\n *\n * @callback ReplaceFunction\n * Callback called when a search matches.\n * @param {...any} parameters\n * The parameters are the result of corresponding search expression:\n *\n * * `value` (`string`) — whole match\n * * `...capture` (`Array`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array | PhrasingContent | string | false | undefined | null}\n * Thing to replace with.\n *\n * * when `null`, `undefined`, `''`, remove the match\n * * …or when `false`, do not replace at all\n * * …or when `string`, replace with a text node of that value\n * * …or when `Node` or `Array`, replace with those nodes\n *\n * @typedef {string | RegExp} Find\n * Pattern to find.\n *\n * Strings are escaped and then turned into global expressions.\n *\n * @typedef {Array} FindAndReplaceList\n * Several find and replaces, in array form.\n * @typedef {Record} FindAndReplaceSchema\n * Several find and replaces, in object form.\n * @typedef {[Find, Replace]} FindAndReplaceTuple\n * Find and replace in tuple form.\n * @typedef {string | ReplaceFunction} Replace\n * Thing to replace with.\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n * @typedef {Array} Pairs\n * All find and replaced.\n *\n * @typedef Options\n * Configuration.\n * @property {Test | null | undefined} [ignore]\n * Test for which nodes to ignore.\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Find patterns in a tree and replace them.\n *\n * The algorithm searches the tree in *preorder* for complete values in `Text`\n * nodes.\n * Partial matches are not supported.\n *\n * @param tree\n * Tree to change.\n * @param find\n * Patterns to find.\n * @param replace\n * Things to replace with (when `find` is `Find`) or configuration.\n * @param options\n * Configuration (when `find` is not `Find`).\n * @returns\n * Given, modified, tree.\n */\n// To do: next major: remove `find` & `replace` combo, remove schema.\nexport const findAndReplace =\n /**\n * @type {(\n * ((tree: Tree, find: Find, replace?: Replace | null | undefined, options?: Options | null | undefined) => Tree) &\n * ((tree: Tree, schema: FindAndReplaceSchema | FindAndReplaceList, options?: Options | null | undefined) => Tree)\n * )}\n **/\n (\n /**\n * @template {Node} Tree\n * @param {Tree} tree\n * @param {Find | FindAndReplaceSchema | FindAndReplaceList} find\n * @param {Replace | Options | null | undefined} [replace]\n * @param {Options | null | undefined} [options]\n * @returns {Tree}\n */\n function (tree, find, replace, options) {\n /** @type {Options | null | undefined} */\n let settings\n /** @type {FindAndReplaceSchema|FindAndReplaceList} */\n let schema\n\n if (typeof find === 'string' || find instanceof RegExp) {\n // @ts-expect-error don’t expect options twice.\n schema = [[find, replace]]\n settings = options\n } else {\n schema = find\n // @ts-expect-error don’t expect replace twice.\n settings = replace\n }\n\n if (!settings) {\n settings = {}\n }\n\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(schema)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n // To do next major: don’t return the given tree.\n return tree\n\n /** @type {import('unist-util-visit-parents/complex-types.js').BuildVisitor} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parent | undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = parents[index]\n\n if (\n ignored(\n parent,\n // @ts-expect-error: TS doesn’t understand but it’s perfect.\n grandparent ? grandparent.children.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, parents)\n }\n }\n\n /**\n * Handle a text node which is not in an ignored parent.\n *\n * @param {Text} node\n * Text node.\n * @param {Array} parents\n * Parents.\n * @returns {VisitorResult}\n * Result.\n */\n function handler(node, parents) {\n const parent = parents[parents.length - 1]\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n // @ts-expect-error: TS is wrong, some of these children can be text.\n const index = parent.children.indexOf(node)\n let change = false\n /** @type {Array} */\n let nodes = []\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n const position = match.index\n /** @type {RegExpMatchObject} */\n const matchObject = {\n index: match.index,\n input: match.input,\n // @ts-expect-error: stack is fine.\n stack: [...parents, node]\n }\n let value = replace(...match, matchObject)\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n // It wasn’t a match after all.\n if (value !== false) {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n change = true\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (change) {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n } else {\n nodes = [node]\n }\n\n return index + nodes.length\n }\n }\n )\n\n/**\n * Turn a schema into pairs.\n *\n * @param {FindAndReplaceSchema | FindAndReplaceList} schema\n * Schema.\n * @returns {Pairs}\n * Clean pairs.\n */\nfunction toPairs(schema) {\n /** @type {Pairs} */\n const result = []\n\n if (typeof schema !== 'object') {\n throw new TypeError('Expected array or object as schema')\n }\n\n if (Array.isArray(schema)) {\n let index = -1\n\n while (++index < schema.length) {\n result.push([\n toExpression(schema[index][0]),\n toFunction(schema[index][1])\n ])\n }\n } else {\n /** @type {string} */\n let key\n\n for (key in schema) {\n if (own.call(schema, key)) {\n result.push([toExpression(key), toFunction(schema[key])])\n }\n }\n }\n\n return result\n}\n\n/**\n * Turn a find into an expression.\n *\n * @param {Find} find\n * Find.\n * @returns {RegExp}\n * Expression.\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * Turn a replace into a function.\n *\n * @param {Replace} replace\n * Replace.\n * @returns {ReplaceFunction}\n * Function.\n */\nfunction toFunction(replace) {\n return typeof replace === 'function' ? replace : () => replace\n}\n","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","/**\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-from-markdown').Transform} FromMarkdownTransform\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n *\n * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction\n * @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject\n */\n\nimport {ccount} from 'ccount'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n// To do: next major: expose functions instead of extensions.\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM autolink literals.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmAutolinkLiteralFromMarkdown = {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n}\n\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n *\n * @type {ToMarkdownExtension}\n */\nexport const gfmAutolinkLiteralToMarkdown = {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {character: ':', before: '[ps]', after: '\\\\/', inConstruct, notInConstruct}\n ]\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = /** @type {Link} */ (this.stack[this.stack.length - 1])\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/g, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Link | Array | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n (!email || code !== 47)\n )\n}\n","/**\n * @typedef {import('../types.js').AssociationId} AssociationId\n */\n\nimport {decodeString} from 'micromark-util-decode-string'\n\n/**\n * Get an identifier from an association to match it to others.\n *\n * Associations are nodes that match to something else through an ID:\n * .\n *\n * The `label` of an association is the string value: character escapes and\n * references work, and casing is intact.\n * The `identifier` is used to match one association to another:\n * controversially, character escapes and references don’t work in this\n * matching: `©` does not match `©`, and `\\+` does not match `+`.\n *\n * But casing is ignored (and whitespace) is trimmed and collapsed: ` A\\nb`\n * matches `a b`.\n * So, we do prefer the label when figuring out how we’re going to serialize:\n * it has whitespace, casing, and we can ignore most useless character\n * escapes and all character references.\n *\n * @type {AssociationId}\n */\nexport function association(node) {\n if (node.label || !node.identifier) {\n return node.label || ''\n }\n\n return decodeString(node.identifier)\n}\n","/**\n * @typedef {import('../types.js').FlowContent} FlowContent\n * @typedef {import('../types.js').Node} Node\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').TrackFields} TrackFields\n */\n\n/**\n * @param {Parent & {children: Array}} parent\n * Parent of flow nodes.\n * @param {State} state\n * Info passed around about the current state.\n * @param {TrackFields} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined by (blank) lines.\n */\nexport function containerFlow(parent, state, info) {\n const indexStack = state.indexStack\n const children = parent.children || []\n const tracker = state.createTracker(info)\n /** @type {Array} */\n const results = []\n let index = -1\n\n indexStack.push(-1)\n\n while (++index < children.length) {\n const child = children[index]\n\n indexStack[indexStack.length - 1] = index\n\n results.push(\n tracker.move(\n state.handle(child, parent, state, {\n before: '\\n',\n after: '\\n',\n ...tracker.current()\n })\n )\n )\n\n if (child.type !== 'list') {\n state.bulletLastUsed = undefined\n }\n\n if (index < children.length - 1) {\n results.push(\n tracker.move(between(child, children[index + 1], parent, state))\n )\n }\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n\n/**\n * @param {Node} left\n * @param {Node} right\n * @param {Parent} parent\n * @param {State} state\n * @returns {string}\n */\nfunction between(left, right, parent, state) {\n let index = state.join.length\n\n while (index--) {\n const result = state.join[index](left, right, parent, state)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return '\\n'.repeat(1 + result)\n }\n\n if (result === false) {\n return '\\n\\n\\n\\n'\n }\n }\n\n return '\\n\\n'\n}\n","/**\n * @typedef {import('../types.js').IndentLines} IndentLines\n */\n\nconst eol = /\\r?\\n|\\r/g\n\n/**\n * @type {IndentLines}\n */\nexport function indentLines(value, map) {\n /** @type {Array} */\n const result = []\n let start = 0\n let line = 0\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = eol.exec(value))) {\n one(value.slice(start, match.index))\n result.push(match[0])\n start = match.index + match[0].length\n line++\n }\n\n one(value.slice(start))\n\n return result.join('')\n\n /**\n * @param {string} value\n */\n function one(value) {\n result.push(map(value, line, !value))\n }\n}\n","/**\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Unsafe} pattern\n * @returns {RegExp}\n */\nexport function patternCompile(pattern) {\n if (!pattern._compiled) {\n const before =\n (pattern.atBreak ? '[\\\\r\\\\n][\\\\t ]*' : '') +\n (pattern.before ? '(?:' + pattern.before + ')' : '')\n\n pattern._compiled = new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (pattern.after ? '(?:' + pattern.after + ')' : ''),\n 'g'\n )\n }\n\n return pattern._compiled\n}\n","/**\n * @typedef {import('../types.js').Unsafe} Unsafe\n * @typedef {import('../types.js').ConstructName} ConstructName\n */\n\n/**\n * @param {Array} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n","/**\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').SafeConfig} SafeConfig\n */\n\nimport {patternCompile} from './pattern-compile.js'\nimport {patternInScope} from './pattern-in-scope.js'\n\n/**\n * Make a string safe for embedding in markdown constructs.\n *\n * In markdown, almost all punctuation characters can, in certain cases,\n * result in something.\n * Whether they do is highly subjective to where they happen and in what\n * they happen.\n *\n * To solve this, `mdast-util-to-markdown` tracks:\n *\n * * Characters before and after something;\n * * What “constructs” we are in.\n *\n * This information is then used by this function to escape or encode\n * special characters.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {string | null | undefined} input\n * Raw value to make safe.\n * @param {SafeConfig} config\n * Configuration.\n * @returns {string}\n * Serialized markdown safe for embedding.\n */\nexport function safe(state, input, config) {\n const value = (config.before || '') + (input || '') + (config.after || '')\n /** @type {Array} */\n const positions = []\n /** @type {Array} */\n const result = []\n /** @type {Record} */\n const infos = {}\n let index = -1\n\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n\n if (!patternInScope(state.stack, pattern)) {\n continue\n }\n\n const expression = patternCompile(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = expression.exec(value))) {\n const before = 'before' in pattern || Boolean(pattern.atBreak)\n const after = 'after' in pattern\n const position = match.index + (before ? match[1].length : 0)\n\n if (positions.includes(position)) {\n if (infos[position].before && !before) {\n infos[position].before = false\n }\n\n if (infos[position].after && !after) {\n infos[position].after = false\n }\n } else {\n positions.push(position)\n infos[position] = {before, after}\n }\n }\n }\n\n positions.sort(numerical)\n\n let start = config.before ? config.before.length : 0\n const end = value.length - (config.after ? config.after.length : 0)\n index = -1\n\n while (++index < positions.length) {\n const position = positions[index]\n\n // Character before or after matched:\n if (position < start || position >= end) {\n continue\n }\n\n // If this character is supposed to be escaped because it has a condition on\n // the next character, and the next character is definitly being escaped,\n // then skip this escape.\n if (\n (position + 1 < end &&\n positions[index + 1] === position + 1 &&\n infos[position].after &&\n !infos[position + 1].before &&\n !infos[position + 1].after) ||\n (positions[index - 1] === position - 1 &&\n infos[position].before &&\n !infos[position - 1].before &&\n !infos[position - 1].after)\n ) {\n continue\n }\n\n if (start !== position) {\n // If we have to use a character reference, an ampersand would be more\n // correct, but as backslashes only care about punctuation, either will\n // do the trick\n result.push(escapeBackslashes(value.slice(start, position), '\\\\'))\n }\n\n start = position\n\n if (\n /[!-/:-@[-`{-~]/.test(value.charAt(position)) &&\n (!config.encode || !config.encode.includes(value.charAt(position)))\n ) {\n // Character escape.\n result.push('\\\\')\n } else {\n // Character reference.\n result.push(\n '&#x' + value.charCodeAt(position).toString(16).toUpperCase() + ';'\n )\n start++\n }\n }\n\n result.push(escapeBackslashes(value.slice(start, end), config.after))\n\n return result.join('')\n}\n\n/**\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction numerical(a, b) {\n return a - b\n}\n\n/**\n * @param {string} value\n * @param {string} after\n * @returns {string}\n */\nfunction escapeBackslashes(value, after) {\n const expression = /\\\\(?=[!-/:-@[-`{-~])/g\n /** @type {Array} */\n const positions = []\n /** @type {Array} */\n const results = []\n const whole = value + after\n let index = -1\n let start = 0\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = expression.exec(whole))) {\n positions.push(match.index)\n }\n\n while (++index < positions.length) {\n if (start !== positions[index]) {\n results.push(value.slice(start, positions[index]))\n }\n\n results.push('\\\\')\n start = positions[index]\n }\n\n results.push(value.slice(start))\n\n return results.join('')\n}\n","/**\n * @typedef {import('../types.js').CreateTracker} CreateTracker\n * @typedef {import('../types.js').TrackCurrent} TrackCurrent\n * @typedef {import('../types.js').TrackMove} TrackMove\n * @typedef {import('../types.js').TrackShift} TrackShift\n */\n\n/**\n * Track positional info in the output.\n *\n * @type {CreateTracker}\n */\nexport function track(config) {\n // Defaults are used to prevent crashes when older utilities somehow activate\n // this code.\n /* c8 ignore next 5 */\n const options = config || {}\n const now = options.now || {}\n let lineShift = options.lineShift || 0\n let line = now.line || 1\n let column = now.column || 1\n\n return {move, current, shift}\n\n /**\n * Get the current tracked info.\n *\n * @type {TrackCurrent}\n */\n function current() {\n return {now: {line, column}, lineShift}\n }\n\n /**\n * Define an increased line shift (the typical indent for lines).\n *\n * @type {TrackShift}\n */\n function shift(value) {\n lineShift += value\n }\n\n /**\n * Move past some generated markdown.\n *\n * @type {TrackMove}\n */\n function move(input) {\n // eslint-disable-next-line unicorn/prefer-default-parameters\n const value = input || ''\n const chunks = value.split(/\\r?\\n|\\r/g)\n const tail = chunks[chunks.length - 1]\n line += chunks.length - 1\n column =\n chunks.length === 1 ? column + tail.length : 1 + tail.length + lineShift\n return value\n }\n}\n","/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Map} Map\n */\n\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {association} from 'mdast-util-to-markdown/lib/util/association.js'\nimport {containerFlow} from 'mdast-util-to-markdown/lib/util/container-flow.js'\nimport {indentLines} from 'mdast-util-to-markdown/lib/util/indent-lines.js'\nimport {safe} from 'mdast-util-to-markdown/lib/util/safe.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\nfootnoteReference.peek = footnoteReferencePeek\n\n// To do: next major: rename `context` -> `state`, `safeOptions` to `info`, use\n// utilities on `state`.\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteDefinition: enterFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteCallString: enterFootnoteCallString\n },\n exit: {\n gfmFootnoteDefinition: exitFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteCallString: exitFootnoteCallString\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown() {\n return {\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],\n handlers: {footnoteDefinition, footnoteReference}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinitionLabelString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = /** @type {FootnoteDefinition} */ (\n this.stack[this.stack.length - 1]\n )\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCallString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCallString(token) {\n const label = this.resume()\n const node = /** @type {FootnoteDefinition} */ (\n this.stack[this.stack.length - 1]\n )\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\nfunction footnoteReference(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n let value = tracker.move('[^')\n const exit = context.enter('footnoteReference')\n const subexit = context.enter('reference')\n value += tracker.move(\n safe(context, association(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\nfunction footnoteDefinition(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n let value = tracker.move('[^')\n const exit = context.enter('footnoteDefinition')\n const subexit = context.enter('label')\n value += tracker.move(\n safe(context, association(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n value += tracker.move(\n ']:' + (node.children && node.children.length > 0 ? ' ' : '')\n )\n tracker.shift(4)\n value += tracker.move(\n indentLines(containerFlow(node, context, tracker.current()), map)\n )\n exit()\n\n return value\n}\n\n/** @type {Map} */\nfunction map(line, index, blank) {\n if (index === 0) {\n return line\n }\n\n return (blank ? '' : ' ') + line\n}\n","/**\n * @typedef {import('../types.js').Handle} Handle\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').PhrasingContent} PhrasingContent\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * Serialize the children of a parent that contains phrasing children.\n *\n * These children will be joined flush together.\n *\n * @param {Parent & {children: Array}} parent\n * Parent of flow nodes.\n * @param {State} state\n * Info passed around about the current state.\n * @param {Info} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined together.\n */\nexport function containerPhrasing(parent, state, info) {\n const indexStack = state.indexStack\n const children = parent.children || []\n /** @type {Array} */\n const results = []\n let index = -1\n let before = info.before\n\n indexStack.push(-1)\n let tracker = state.createTracker(info)\n\n while (++index < children.length) {\n const child = children[index]\n /** @type {string} */\n let after\n\n indexStack[indexStack.length - 1] = index\n\n if (index + 1 < children.length) {\n /** @type {Handle} */\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n let handle = state.handle.handlers[children[index + 1].type]\n /** @type {Handle} */\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, state, {\n before: '',\n after: '',\n ...tracker.current()\n }).charAt(0)\n : ''\n } else {\n after = info.after\n }\n\n // In some cases, html (text) can be found in phrasing right after an eol.\n // When we’d serialize that, in most cases that would be seen as html\n // (flow).\n // As we can’t escape or so to prevent it from happening, we take a somewhat\n // reasonable approach: replace that eol with a space.\n // See: \n if (\n results.length > 0 &&\n (before === '\\r' || before === '\\n') &&\n child.type === 'html'\n ) {\n results[results.length - 1] = results[results.length - 1].replace(\n /(\\r?\\n|\\r)$/,\n ' '\n )\n before = ' '\n\n // To do: does this work to reset tracker?\n tracker = state.createTracker(info)\n tracker.move(results.join(''))\n }\n\n results.push(\n tracker.move(\n state.handle(child, parent, state, {\n ...tracker.current(),\n before,\n after\n })\n )\n )\n\n before = results[results.length - 1].slice(-1)\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n","/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {containerPhrasing} from 'mdast-util-to-markdown/lib/util/container-phrasing.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n// To do: next major: expose functions.\n// To do: next major: use `state`, state utilities.\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: \n *\n * @type {Array}\n */\nconst constructsWithoutStrikethrough = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\nhandleDelete.peek = peekDelete\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmStrikethroughFromMarkdown = {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n}\n\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n *\n * @type {ToMarkdownExtension}\n */\nexport const gfmStrikethroughToMarkdown = {\n unsafe: [\n {\n character: '~',\n inConstruct: 'phrasing',\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {delete: handleDelete}\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n const exit = context.enter('strikethrough')\n let value = tracker.move('~~')\n value += containerPhrasing(node, context, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n","/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').State} State\n */\n\nimport {patternCompile} from '../util/pattern-compile.js'\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @param {InlineCode} node\n * @param {Parent | undefined} _\n * @param {State} state\n * @returns {string}\n */\nexport function inlineCode(node, _, state) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n const expression = patternCompile(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @returns {string}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n","/**\n * @typedef Options\n * Configuration (optional).\n * @property {string|null|ReadonlyArray} [align]\n * One style for all columns, or styles for their respective columns.\n * Each style is either `'l'` (left), `'r'` (right), or `'c'` (center).\n * Other values are treated as `''`, which doesn’t place the colon in the\n * alignment row but does align left.\n * *Only the lowercased first character is used, so `Right` is fine.*\n * @property {boolean} [padding=true]\n * Whether to add a space of padding between delimiters and cells.\n *\n * When `true`, there is padding:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there is no padding:\n *\n * ```markdown\n * |Alpha|B |\n * |-----|-----|\n * |C |Delta|\n * ```\n * @property {boolean} [delimiterStart=true]\n * Whether to begin each row with the delimiter.\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are starting delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no starting delimiters:\n *\n * ```markdown\n * Alpha | B |\n * ----- | ----- |\n * C | Delta |\n * ```\n * @property {boolean} [delimiterEnd=true]\n * Whether to end each row with the delimiter.\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are ending delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no ending delimiters:\n *\n * ```markdown\n * | Alpha | B\n * | ----- | -----\n * | C | Delta\n * ```\n * @property {boolean} [alignDelimiters=true]\n * Whether to align the delimiters.\n * By default, they are aligned:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * Pass `false` to make them staggered:\n *\n * ```markdown\n * | Alpha | B |\n * | - | - |\n * | C | Delta |\n * ```\n * @property {(value: string) => number} [stringLength]\n * Function to detect the length of table cell content.\n * This is used when aligning the delimiters (`|`) between table cells.\n * Full-width characters and emoji mess up delimiter alignment when viewing\n * the markdown source.\n * To fix this, you can pass this function, which receives the cell content\n * and returns its “visible” size.\n * Note that what is and isn’t visible depends on where the text is displayed.\n *\n * Without such a function, the following:\n *\n * ```js\n * markdownTable([\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ])\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | - | - |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n *\n * With [`string-width`](https://github.com/sindresorhus/string-width):\n *\n * ```js\n * import stringWidth from 'string-width'\n *\n * markdownTable(\n * [\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩‍❤️‍👩', 'Delta']\n * ],\n * {stringLength: stringWidth}\n * )\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | ----- | ------- |\n * | 中文 | Charlie |\n * | 👩‍❤️‍👩 | Delta |\n * ```\n */\n\n/**\n * @typedef {Options} MarkdownTableOptions\n * @todo\n * Remove next major.\n */\n\n/**\n * Generate a markdown ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables)) table..\n *\n * @param {ReadonlyArray>} table\n * Table data (matrix of strings).\n * @param {Options} [options]\n * Configuration (optional).\n * @returns {string}\n */\nexport function markdownTable(table, options = {}) {\n const align = (options.align || []).concat()\n const stringLength = options.stringLength || defaultStringLength\n /** @type {Array} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array>} Cells per row. */\n const cellMatrix = []\n /** @type {Array>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array} */\n const longestCellByColumn = []\n let mostCellsPerRow = 0\n let rowIndex = -1\n\n // This is a superfluous loop if we don’t align delimiters, but otherwise we’d\n // do superfluous work when aligning, so optimize for aligning.\n while (++rowIndex < table.length) {\n /** @type {Array} */\n const row = []\n /** @type {Array} */\n const sizes = []\n let columnIndex = -1\n\n if (table[rowIndex].length > mostCellsPerRow) {\n mostCellsPerRow = table[rowIndex].length\n }\n\n while (++columnIndex < table[rowIndex].length) {\n const cell = serialize(table[rowIndex][columnIndex])\n\n if (options.alignDelimiters !== false) {\n const size = stringLength(cell)\n sizes[columnIndex] = size\n\n if (\n longestCellByColumn[columnIndex] === undefined ||\n size > longestCellByColumn[columnIndex]\n ) {\n longestCellByColumn[columnIndex] = size\n }\n }\n\n row.push(cell)\n }\n\n cellMatrix[rowIndex] = row\n sizeMatrix[rowIndex] = sizes\n }\n\n // Figure out which alignments to use.\n let columnIndex = -1\n\n if (typeof align === 'object' && 'length' in align) {\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = toAlignment(align[columnIndex])\n }\n } else {\n const code = toAlignment(align)\n\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = code\n }\n }\n\n // Inject the alignment row.\n columnIndex = -1\n /** @type {Array} */\n const row = []\n /** @type {Array} */\n const sizes = []\n\n while (++columnIndex < mostCellsPerRow) {\n const code = alignments[columnIndex]\n let before = ''\n let after = ''\n\n if (code === 99 /* `c` */) {\n before = ':'\n after = ':'\n } else if (code === 108 /* `l` */) {\n before = ':'\n } else if (code === 114 /* `r` */) {\n after = ':'\n }\n\n // There *must* be at least one hyphen-minus in each alignment cell.\n let size =\n options.alignDelimiters === false\n ? 1\n : Math.max(\n 1,\n longestCellByColumn[columnIndex] - before.length - after.length\n )\n\n const cell = before + '-'.repeat(size) + after\n\n if (options.alignDelimiters !== false) {\n size = before.length + size + after.length\n\n if (size > longestCellByColumn[columnIndex]) {\n longestCellByColumn[columnIndex] = size\n }\n\n sizes[columnIndex] = size\n }\n\n row[columnIndex] = cell\n }\n\n // Inject the alignment row.\n cellMatrix.splice(1, 0, row)\n sizeMatrix.splice(1, 0, sizes)\n\n rowIndex = -1\n /** @type {Array} */\n const lines = []\n\n while (++rowIndex < cellMatrix.length) {\n const row = cellMatrix[rowIndex]\n const sizes = sizeMatrix[rowIndex]\n columnIndex = -1\n /** @type {Array} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (options.alignDelimiters !== false) {\n const size =\n longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)\n const code = alignments[columnIndex]\n\n if (code === 114 /* `r` */) {\n before = ' '.repeat(size)\n } else if (code === 99 /* `c` */) {\n if (size % 2) {\n before = ' '.repeat(size / 2 + 0.5)\n after = ' '.repeat(size / 2 - 0.5)\n } else {\n before = ' '.repeat(size / 2)\n after = before\n }\n } else {\n after = ' '.repeat(size)\n }\n }\n\n if (options.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n options.padding !== false &&\n // Don’t add the opening space if we’re not aligning and the cell is\n // empty: there will be a closing space.\n !(options.alignDelimiters === false && cell === '') &&\n (options.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (options.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (options.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (options.padding !== false) {\n line.push(' ')\n }\n\n if (\n options.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n options.delimiterEnd === false\n ? line.join('').replace(/ +$/, '')\n : line.join('')\n )\n }\n\n return lines.join('\\n')\n}\n\n/**\n * @param {string|null|undefined} [value]\n * @returns {string}\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string} value\n * @returns {number}\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * @param {string|null|undefined} value\n * @returns {number}\n */\nfunction toAlignment(value) {\n const code = typeof value === 'string' ? value.codePointAt(0) : 0\n\n return code === 67 /* `C` */ || code === 99 /* `c` */\n ? 99 /* `c` */\n : code === 76 /* `L` */ || code === 108 /* `l` */\n ? 108 /* `l` */\n : code === 82 /* `R` */ || code === 114 /* `r` */\n ? 114 /* `r` */\n : 0\n}\n","/**\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').InlineCode} InlineCode\n *\n * @typedef {import('markdown-table').MarkdownTableOptions} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Context} ToMarkdownContext\n * @typedef {import('mdast-util-to-markdown').SafeOptions} SafeOptions\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells.\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters.\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells\n */\n\nimport {containerPhrasing} from 'mdast-util-to-markdown/lib/util/container-phrasing.js'\nimport {inlineCode} from 'mdast-util-to-markdown/lib/handle/inline-code.js'\nimport {markdownTable} from 'markdown-table'\n\n// To do: next major: use `state` and `state` utilities from `mdast-util-to-markdown`.\n// To do: next major: use `defaultHandlers.inlineCode`.\n// To do: next major: expose functions.\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmTableFromMarkdown = {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n /** @type {Array<'left' | 'right' | 'center' | 'none'>} */\n // @ts-expect-error: `align` is custom.\n const align = token._align\n this.enter(\n {\n type: 'table',\n align: align.map((d) => (d === 'none' ? null : d)),\n children: []\n },\n token\n )\n this.setData('inTable', true)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.setData('inTable')\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.getData('inTable')) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = /** @type {InlineCode} */ (this.stack[this.stack.length - 1])\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // \n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n table: handleTable,\n tableRow: handleTableRow,\n tableCell: handleTableCell,\n inlineCode: inlineCodeWithTable\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, context, safeOptions) {\n return serializeData(\n handleTableAsData(node, context, safeOptions),\n node.align\n )\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, context, safeOptions) {\n const row = handleTableRowAsData(node, context, safeOptions)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, context, safeOptions) {\n const exit = context.enter('tableCell')\n const subexit = context.enter('phrasing')\n const value = containerPhrasing(node, context, {\n ...safeOptions,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array>} matrix\n * @param {Array | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {ToMarkdownContext} context\n * @param {SafeOptions} safeOptions\n */\n function handleTableAsData(node, context, safeOptions) {\n const children = node.children\n let index = -1\n /** @type {Array>} */\n const result = []\n const subexit = context.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(\n children[index],\n context,\n safeOptions\n )\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {ToMarkdownContext} context\n * @param {SafeOptions} safeOptions\n */\n function handleTableRowAsData(node, context, safeOptions) {\n const children = node.children\n let index = -1\n /** @type {Array} */\n const result = []\n const subexit = context.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(\n children[index],\n node,\n context,\n safeOptions\n )\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, context) {\n let value = inlineCode(node, parent, context)\n\n if (context.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n","/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').Info} Info\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\n\n/**\n * @param {ListItem} node\n * @param {Parent | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function listItem(node, parent, state, info) {\n const listItemIndent = checkListItemIndent(state)\n let bullet = state.bulletCurrent || checkBullet(state)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (state.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = state.createTracker(info)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = state.enter('listItem')\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n","/**\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').Options} Options\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkListItemIndent(state) {\n const style = state.options.listItemIndent || 'tab'\n\n // To do: remove in a major.\n // @ts-expect-error: deprecated.\n if (style === 1 || style === '1') {\n return 'one'\n }\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n","/**\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').Options} Options\n */\n\n/**\n * @param {State} state\n * @returns {Exclude}\n */\nexport function checkBullet(state) {\n const marker = state.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n","/**\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\n/**\n * @typedef {Extract} Parents\n */\n\nimport {listItem} from 'mdast-util-to-markdown/lib/handle/list-item.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n// To do: next major: rename `context` -> `state`, `safeOptions` -> `info`, use\n// `track` from `state`.\n// To do: next major: replace exports with functions.\n// To do: next major: use `defaulthandlers.listItem`.\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM task list items.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmTaskListItemFromMarkdown = {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n}\n\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM task list items.\n *\n * @type {ToMarkdownExtension}\n */\nexport const gfmTaskListItemToMarkdown = {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCheck(token) {\n const node = /** @type {ListItem} */ (this.stack[this.stack.length - 2])\n // We’re always in a paragraph, in a list item.\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = /** @type {Parents} */ (this.stack[this.stack.length - 2])\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean'\n ) {\n const node = /** @type {Paragraph} */ (this.stack[this.stack.length - 1])\n const head = node.children[0]\n\n if (head && head.type === 'text') {\n const siblings = parent.children\n let index = -1\n /** @type {Paragraph | undefined} */\n let firstParaghraph\n\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, context, safeOptions) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = track(safeOptions)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = listItem(node, parent, context, {\n ...safeOptions,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('micromark-extension-gfm').Options & import('mdast-util-gfm').Options} Options\n */\n\nimport {gfm} from 'micromark-extension-gfm'\nimport {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'\n\n/**\n * Plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists).\n *\n * @type {import('unified').Plugin<[Options?]|void[], Root>}\n */\nexport default function remarkGfm(options = {}) {\n const data = this.data()\n\n add('micromarkExtensions', gfm(options))\n add('fromMarkdownExtensions', gfmFromMarkdown())\n add('toMarkdownExtensions', gfmToMarkdown(options))\n\n /**\n * @param {string} field\n * @param {unknown} value\n */\n function add(field, value) {\n const list = /** @type {unknown[]} */ (\n // Other extensions\n /* c8 ignore next 2 */\n data[field] ? data[field] : (data[field] = [])\n )\n\n list.push(value)\n }\n}\n","/**\n * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions\n * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\nimport {\n combineExtensions,\n combineHtmlExtensions\n} from 'micromark-util-combine-extensions'\nimport {\n gfmAutolinkLiteral,\n gfmAutolinkLiteralHtml\n} from 'micromark-extension-gfm-autolink-literal'\nimport {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'\nimport {\n gfmStrikethrough,\n gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\nimport {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'\nimport {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'\nimport {\n gfmTaskListItem,\n gfmTaskListItemHtml\n} from 'micromark-extension-gfm-task-list-item'\n\n/**\n * Create an extension for `micromark` to enable GFM syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-strikethrough`.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * syntax.\n */\nexport function gfm(options) {\n return combineExtensions([\n gfmAutolinkLiteral,\n gfmFootnote(),\n gfmStrikethrough(options),\n gfmTable,\n gfmTaskListItem\n ])\n}\n\n/**\n * Create an extension for `micromark` to support GFM when serializing to HTML.\n *\n * @param {HtmlOptions | null | undefined} [options]\n * Configuration.\n *\n * Passed to `micromark-extens-gfm-footnote`.\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM when serializing to HTML.\n */\nexport function gfmHtml(options) {\n return combineHtmlExtensions([\n gfmAutolinkLiteralHtml,\n gfmFootnoteHtml(options),\n gfmStrikethroughHtml,\n gfmTableHtml,\n gfmTagfilterHtml,\n gfmTaskListItemHtml\n ])\n}\n","/**\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * @typedef {import('mdast-util-gfm-table').Options} Options\n * Configuration.\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @returns {Array}\n * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown,\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown,\n gfmTableFromMarkdown,\n gfmTaskListItemFromMarkdown\n ]\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown,\n gfmFootnoteToMarkdown(),\n gfmStrikethroughToMarkdown,\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown\n ]\n }\n}\n","/**\n * @typedef {import('./core.js').HChild} Child\n * Acceptable child value.\n * @typedef {import('./core.js').HProperties} Properties\n * Acceptable value for element properties.\n * @typedef {import('./core.js').HResult} Result\n * Result from a `h` (or `s`) call.\n *\n * @typedef {import('./jsx-classic.js').Element} s.JSX.Element\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} s.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} s.JSX.IntrinsicElements\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} s.JSX.ElementChildrenAttribute\n */\n\nimport {svg} from 'property-information'\nimport {core} from './core.js'\nimport {svgCaseSensitiveTagNames} from './svg-case-sensitive-tag-names.js'\n\nexport const s = core(svg, 'g', svgCaseSensitiveTagNames)\n","export const svgCaseSensitiveTagNames = [\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'solidColor',\n 'textArea',\n 'textPath'\n]\n","/**\n * Map of web namespaces.\n *\n * @type {Record}\n */\nexport const webNamespaces = {\n html: 'http://www.w3.org/1999/xhtml',\n mathml: 'http://www.w3.org/1998/Math/MathML',\n svg: 'http://www.w3.org/2000/svg',\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace',\n xmlns: 'http://www.w3.org/2000/xmlns/'\n}\n","/**\n * @typedef {import('vfile').VFile} VFile\n * @typedef {import('property-information').Schema} Schema\n * @typedef {import('unist').Position} Position\n * @typedef {import('unist').Point} Point\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Content} Content\n * @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap\n * @typedef {import('parse5').Token.ElementLocation} P5ElementLocation\n * @typedef {import('parse5').Token.Location} P5Location\n */\n\n/**\n * @typedef {Content | Root} Node\n * @typedef {DefaultTreeAdapterMap['document']} P5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} P5DocumentFragment\n * @typedef {DefaultTreeAdapterMap['documentType']} P5DocumentType\n * @typedef {DefaultTreeAdapterMap['commentNode']} P5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} P5Text\n * @typedef {DefaultTreeAdapterMap['element']} P5Element\n * @typedef {DefaultTreeAdapterMap['node']} P5Node\n * @typedef {DefaultTreeAdapterMap['template']} P5Template\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in.\n *\n * When an `` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n * @property {VFile | null | undefined} [file]\n * File used to add positional info to nodes.\n *\n * If given, the file should represent the original HTML source.\n * @property {boolean} [verbose=false]\n * Whether to add extra positional info about starting tags, closing tags,\n * and attributes to elements.\n *\n * > 👉 **Note**: only used when `file` is given.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {Schema} schema\n * Current schema.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n * @property {boolean} location\n * Whether location info was found.\n */\n\nimport {h, s} from 'hastscript'\nimport {html, svg, find} from 'property-information'\nimport {location} from 'vfile-location'\nimport {webNamespaces} from 'web-namespaces'\n\nconst own = {}.hasOwnProperty\n/** @type {unknown} */\n// type-coverage:ignore-next-line\nconst proto = Object.prototype\n\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {P5Node} tree\n * `parse5` tree to transform.\n * @param {Options | VFile | null | undefined} [options]\n * Configuration.\n * @returns {Node}\n * hast tree.\n */\nexport function fromParse5(tree, options) {\n const options_ = options || {}\n /** @type {Options} */\n let settings\n /** @type {VFile | undefined} */\n let file\n\n if (isFile(options_)) {\n file = options_\n settings = {}\n } else {\n file = options_.file || undefined\n settings = options_\n }\n\n return one(\n {\n schema: settings.space === 'svg' ? svg : html,\n file,\n verbose: settings.verbose,\n location: false\n },\n tree\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} node\n * p5 node.\n * @returns {Node}\n * hast node.\n */\nfunction one(state, node) {\n /** @type {Node} */\n let result\n\n switch (node.nodeName) {\n case '#comment': {\n const reference = /** @type {P5Comment} */ (node)\n result = {type: 'comment', value: reference.data}\n patch(state, reference, result)\n return result\n }\n\n case '#document':\n case '#document-fragment': {\n const reference = /** @type {P5Document | P5DocumentFragment} */ (node)\n const quirksMode =\n 'mode' in reference\n ? reference.mode === 'quirks' || reference.mode === 'limited-quirks'\n : false\n\n result = {\n type: 'root',\n children: all(state, node.childNodes),\n data: {quirksMode}\n }\n\n if (state.file && state.location) {\n const doc = String(state.file)\n const loc = location(doc)\n const start = loc.toPoint(0)\n const end = loc.toPoint(doc.length)\n // @ts-expect-error: always defined as we give valid input.\n result.position = {start, end}\n }\n\n return result\n }\n\n case '#documentType': {\n const reference = /** @type {P5DocumentType} */ (node)\n // @ts-expect-error Types are out of date.\n result = {type: 'doctype'}\n patch(state, reference, result)\n return result\n }\n\n case '#text': {\n const reference = /** @type {P5Text} */ (node)\n result = {type: 'text', value: reference.value}\n patch(state, reference, result)\n return result\n }\n\n // Element.\n default: {\n const reference = /** @type {P5Element} */ (node)\n result = element(state, reference)\n return result\n }\n }\n}\n\n/**\n * Transform children.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Array} nodes\n * Nodes.\n * @returns {Array}\n * hast nodes.\n */\nfunction all(state, nodes) {\n let index = -1\n /** @type {Array} */\n const result = []\n\n while (++index < nodes.length) {\n // @ts-expect-error Assume no roots in `nodes`.\n result[index] = one(state, nodes[index])\n }\n\n return result\n}\n\n/**\n * Transform an element.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Element} node\n * `parse5` node to transform.\n * @returns {Element}\n * hast node.\n */\nfunction element(state, node) {\n const schema = state.schema\n\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html\n\n // Props.\n let index = -1\n /** @type {Record} */\n const props = {}\n\n while (++index < node.attrs.length) {\n const attribute = node.attrs[index]\n const name =\n (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n if (!own.call(proto, name)) {\n props[name] = attribute.value\n }\n }\n\n // Build.\n const fn = state.schema.space === 'svg' ? s : h\n const result = fn(node.tagName, props, all(state, node.childNodes))\n patch(state, node, result)\n\n // Switch content.\n if (result.tagName === 'template') {\n const reference = /** @type {P5Template} */ (node)\n const pos = reference.sourceCodeLocation\n const startTag = pos && pos.startTag && position(pos.startTag)\n const endTag = pos && pos.endTag && position(pos.endTag)\n\n /** @type {Root} */\n // @ts-expect-error Types are wrong.\n const content = one(state, reference.content)\n\n if (startTag && endTag && state.file) {\n content.position = {start: startTag.end, end: endTag.start}\n }\n\n result.content = content\n }\n\n state.schema = schema\n\n return result\n}\n\n/**\n * Patch positional info from `from` onto `to`.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {P5Node} from\n * p5 node.\n * @param {Node} to\n * hast node.\n * @returns {void}\n * Nothing.\n */\nfunction patch(state, from, to) {\n if ('sourceCodeLocation' in from && from.sourceCodeLocation && state.file) {\n const position = createLocation(state, to, from.sourceCodeLocation)\n\n if (position) {\n state.location = true\n to.position = position\n }\n }\n}\n\n/**\n * Create clean positional information.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Node} node\n * hast node.\n * @param {P5ElementLocation} location\n * p5 location info.\n * @returns {Position | undefined}\n * Position, or nothing.\n */\nfunction createLocation(state, node, location) {\n const result = position(location)\n\n if (node.type === 'element') {\n const tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: .\n if (\n result &&\n !location.endTag &&\n tail &&\n tail.position &&\n tail.position.end\n ) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (state.verbose) {\n /** @type {Record} */\n const props = {}\n /** @type {string} */\n let key\n\n if (location.attrs) {\n for (key in location.attrs) {\n if (own.call(location.attrs, key)) {\n props[find(state.schema, key).property] = position(\n location.attrs[key]\n )\n }\n }\n }\n\n node.data = {\n position: {\n // @ts-expect-error: assume not `undefined`.\n opening: position(location.startTag),\n closing: location.endTag ? position(location.endTag) : null,\n properties: props\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * Turn a p5 location into a position.\n *\n * @param {P5Location} loc\n * Location.\n * @returns {Position | undefined}\n * Position or nothing.\n */\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n // @ts-expect-error `undefined` is fine.\n return start || end ? {start, end} : undefined\n}\n\n/**\n * Filter out invalid points.\n *\n * @param {Point} point\n * Point with potentially `undefined` values.\n * @returns {Point | undefined}\n * Point or nothing.\n */\nfunction point(point) {\n return point.line && point.column ? point : undefined\n}\n\n/**\n * Check if something is a file.\n *\n * @param {VFile | Options} value\n * File or options.\n * @returns {value is VFile}\n * Whether `value` is a file.\n */\nfunction isFile(value) {\n return 'messages' in value\n}\n","/**\n * @typedef {import('vfile').VFile} VFile\n * @typedef {import('vfile').Value} Value\n */\n\n/**\n * @typedef Point\n * unist point, where `line` and `column` can be `undefined`.\n * @property {number | undefined} line\n * Line.\n * @property {number | undefined} column\n * Column.\n * @property {number | undefined} [offset]\n * Offset.\n *\n * @typedef PointLike\n * unist point, allowed as input.\n * @property {number | null | undefined} [line]\n * Line.\n * @property {number | null | undefined} [column]\n * Column.\n * @property {number | null | undefined} [offset]\n * Offset.\n *\n * @callback ToPoint\n * Get a line/column-based `point` from `offset`.\n * @param {number | null | undefined} [offset]\n * Something that should be an `offset.\n * @returns {Point}\n * Point, line/column are undefined for invalid or out of bounds input.\n *\n * @callback ToOffset\n * Get an offset from a line/column-based `point`.\n * @param {Point | null | undefined} [point]\n * Something that should be a `point.\n * @returns {number}\n * Offset or `-1` for invalid or out of bounds input.\n *\n * @typedef Location\n * Accessors for index.\n * @property {ToPoint} toPoint\n * Get a line/column-based `point` from `offset`.\n * @property {ToOffset} toOffset\n * Get an offset from a line/column-based `point`.\n */\n\n/**\n * Index the given document so you can translate between line/column and offset\n * based positional info.\n *\n * @param {VFile | Value} file\n * File to index.\n * @returns {Location}\n * Accessors for index.\n */\nexport function location(file) {\n const value = String(file)\n /** @type {Array} */\n const indices = []\n const search = /\\r?\\n|\\r/g\n\n while (search.test(value)) {\n indices.push(search.lastIndex)\n }\n\n indices.push(value.length + 1)\n\n return {toPoint, toOffset}\n\n /** @type {ToPoint} */\n function toPoint(offset) {\n let index = -1\n\n if (\n typeof offset === 'number' &&\n offset > -1 &&\n offset < indices[indices.length - 1]\n ) {\n while (++index < indices.length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (index > 0 ? indices[index - 1] : 0) + 1,\n offset\n }\n }\n }\n }\n\n return {line: undefined, column: undefined, offset: undefined}\n }\n\n /** @type {ToOffset} */\n function toOffset(point) {\n const line = point && point.line\n const column = point && point.column\n\n if (\n typeof line === 'number' &&\n typeof column === 'number' &&\n !Number.isNaN(line) &&\n !Number.isNaN(column) &&\n line - 1 in indices\n ) {\n const offset = (indices[line - 2] || 0) + column - 1 || 0\n\n if (offset > -1 && offset < indices[indices.length - 1]) {\n return offset\n }\n }\n\n return -1\n }\n}\n","/**\n * @callback Handler\n * Handle a value, with a certain ID field set to a certain value.\n * The ID field is passed to `zwitch`, and it’s value is this function’s\n * place on the `handlers` record.\n * @param {...any} parameters\n * Arbitrary parameters passed to the zwitch.\n * The first will be an object with a certain ID field set to a certain value.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback UnknownHandler\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @param {unknown} value\n * An object with a certain ID field set to an unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback InvalidHandler\n * Handle values that do not have a certain ID field.\n * @param {unknown} value\n * Any unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {void|null|undefined|never}\n * This should crash or return nothing.\n */\n\n/**\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record} [Handlers=Record]\n * @typedef Options\n * Configuration (required).\n * @property {Invalid} [invalid]\n * Handler to use for invalid values.\n * @property {Unknown} [unknown]\n * Handler to use for unknown values.\n * @property {Handlers} [handlers]\n * Handlers to use.\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Handle values based on a field.\n *\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record} [Handlers=Record]\n * @param {string} key\n * Field to switch on.\n * @param {Options} [options]\n * Configuration (required).\n * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters): ReturnType, (...parameters: Parameters): ReturnType}}\n */\nexport function zwitch(key, options) {\n const settings = options || {}\n\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one.invalid\n const handlers = one.handlers\n\n if (value && own.call(value, key)) {\n // @ts-expect-error Indexable.\n const id = String(value[key])\n // @ts-expect-error Indexable.\n fn = own.call(handlers, id) ? handlers[id] : one.unknown\n }\n\n if (fn) {\n return fn.call(this, value, ...parameters)\n }\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n // @ts-expect-error: matches!\n return one\n}\n","/**\n * @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap\n * @typedef {DefaultTreeAdapterMap['document']} P5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} P5Fragment\n * @typedef {DefaultTreeAdapterMap['element']} P5Element\n * @typedef {DefaultTreeAdapterMap['node']} P5Node\n * @typedef {DefaultTreeAdapterMap['documentType']} P5Doctype\n * @typedef {DefaultTreeAdapterMap['commentNode']} P5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} P5Text\n * @typedef {DefaultTreeAdapterMap['parentNode']} P5Parent\n * @typedef {import('parse5').Token.Attribute} P5Attribute\n * @typedef {Exclude} P5Child\n * @typedef {import('property-information').Schema} Schema\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').DocType} Doctype\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('hast').Comment} Comment\n * @typedef {import('hast').Content} Content\n */\n\n/**\n * @typedef {Content | Root} Node\n * @typedef {'html' | 'svg'} Space\n *\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in.\n *\n * When an `` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {html, svg, find} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {webNamespaces} from 'web-namespaces'\nimport {zwitch} from 'zwitch'\n\nconst own = {}.hasOwnProperty\n\n/** @type {(from: Node, schema: Schema) => P5Node} */\nconst one = zwitch('type', {handlers: {root, element, text, comment, doctype}})\n\n/**\n * Transform a hast tree to Parse5’s AST.\n *\n * @param {Node} tree\n * Tree to transform.\n * @param {Options | Space | null | undefined} [options]\n * Configuration.\n * @returns {P5Node}\n * `parse5` node.\n */\nexport function toParse5(tree, options) {\n const space = options && typeof options === 'object' ? options.space : options\n return one(tree, space === 'svg' ? svg : html)\n}\n\n/**\n * @param {Root} node\n * @param {Schema} schema\n * Current schema.\n * @returns {P5Document}\n */\nfunction root(node, schema) {\n /** @type {P5Document} */\n const result = {\n nodeName: '#document',\n // @ts-expect-error: `parse5` uses enums, which are actually strings.\n mode: (node.data || {}).quirksMode ? 'quirks' : 'no-quirks',\n childNodes: []\n }\n result.childNodes = all(node.children, result, schema)\n patch(node, result)\n return result\n}\n\n/**\n * @param {Root} node\n * @param {Schema} schema\n * Current schema.\n * @returns {P5Fragment}\n */\nfunction fragment(node, schema) {\n /** @type {P5Fragment} */\n const result = {nodeName: '#document-fragment', childNodes: []}\n result.childNodes = all(node.children, result, schema)\n patch(node, result)\n return result\n}\n\n/**\n * @param {Doctype} node\n * @returns {P5Doctype}\n */\nfunction doctype(node) {\n /** @type {P5Doctype} */\n const result = {\n nodeName: '#documentType',\n name: 'html',\n publicId: '',\n systemId: '',\n // @ts-expect-error: change to `null` in a major?\n parentNode: undefined\n }\n\n patch(node, result)\n return result\n}\n\n/**\n * @param {Text} node\n * @returns {P5Text}\n */\nfunction text(node) {\n /** @type {P5Text} */\n const result = {\n nodeName: '#text',\n value: node.value,\n // @ts-expect-error: no `parentNode`\n parentNode: undefined\n }\n patch(node, result)\n return result\n}\n\n/**\n * @param {Comment} node\n * @returns {P5Comment}\n */\nfunction comment(node) {\n /** @type {P5Comment} */\n const result = {\n nodeName: '#comment',\n data: node.value,\n // @ts-expect-error: no `parentNode`\n parentNode: undefined\n }\n\n patch(node, result)\n\n return result\n}\n\n/**\n * @param {Element} node\n * @param {Schema} schema\n * Current schema.\n * @returns {P5Element}\n * `parse5` node.\n */\nfunction element(node, schema) {\n const parentSchema = schema\n let currentSchema = parentSchema\n\n if (\n node.type === 'element' &&\n node.tagName.toLowerCase() === 'svg' &&\n parentSchema.space === 'html'\n ) {\n currentSchema = svg\n }\n\n /** @type {Array} */\n const attrs = []\n /** @type {string} */\n let prop\n\n if (node.properties) {\n for (prop in node.properties) {\n if (prop !== 'children' && own.call(node.properties, prop)) {\n const result = createProperty(\n currentSchema,\n prop,\n node.properties[prop]\n )\n\n if (result) {\n attrs.push(result)\n }\n }\n }\n }\n\n /** @type {P5Element} */\n const result = {\n nodeName: node.tagName,\n tagName: node.tagName,\n attrs,\n // @ts-expect-error: html and svg both have a space.\n namespaceURI: webNamespaces[currentSchema.space],\n childNodes: [],\n // @ts-expect-error: no `parentNode`\n parentNode: undefined\n }\n result.childNodes = all(node.children, result, currentSchema)\n patch(node, result)\n\n if (node.tagName === 'template' && node.content) {\n // @ts-expect-error: `parse5` types are wrong.\n result.content = fragment(node.content, currentSchema)\n }\n\n return result\n}\n\n/**\n * Handle a property.\n *\n * @param {Schema} schema\n * Current schema.\n * @param {string} prop\n * Key.\n * @param {Array | string | number | boolean | null | undefined} value\n * hast property value.\n * @returns {P5Attribute | void}\n * Field for runtime, optional.\n */\nfunction createProperty(schema, prop, value) {\n const info = find(schema, prop)\n\n // Ignore nullish and `NaN` values.\n if (\n value === undefined ||\n value === null ||\n value === false ||\n (typeof value === 'number' && Number.isNaN(value)) ||\n (!value && info.boolean)\n ) {\n return\n }\n\n if (Array.isArray(value)) {\n // Accept `array`.\n // Most props are space-separated.\n value = info.commaSeparated ? commas(value) : spaces(value)\n }\n\n /** @type {P5Attribute} */\n const attribute = {\n name: info.attribute,\n value: value === true ? '' : String(value)\n }\n\n if (info.space && info.space !== 'html' && info.space !== 'svg') {\n const index = attribute.name.indexOf(':')\n\n if (index < 0) {\n attribute.prefix = ''\n } else {\n attribute.name = attribute.name.slice(index + 1)\n attribute.prefix = info.attribute.slice(0, index)\n }\n\n attribute.namespace = webNamespaces[info.space]\n }\n\n return attribute\n}\n\n/**\n * Transform all hast nodes.\n *\n * @param {Array} children\n * List of children.\n * @param {P5Parent} parentNode\n * `parse5` parent node.\n * @param {Schema} schema\n * Current schema.\n * @returns {Array}\n * Transformed children.\n */\nfunction all(children, parentNode, schema) {\n let index = -1\n /** @type {Array} */\n const results = []\n\n if (children) {\n while (++index < children.length) {\n /** @type {P5Child} */\n // @ts-expect-error assume no document.\n const child = one(children[index], schema)\n\n child.parentNode = parentNode\n\n results.push(child)\n }\n }\n\n return results\n}\n\n/**\n * Add position info from `from` to `to`.\n *\n * @param {Node} from\n * hast node.\n * @param {P5Node} to\n * `parse5` node.\n * @returns {void}\n * Nothing.\n */\nfunction patch(from, to) {\n const position = from.position\n\n if (position && position.start && position.end) {\n to.sourceCodeLocation = {\n startLine: position.start.line,\n startCol: position.start.column,\n // @ts-expect-error assume this is set.\n startOffset: position.start.offset,\n endLine: position.end.line,\n endCol: position.end.column,\n // @ts-expect-error assume this is set.\n endOffset: position.end.offset\n }\n }\n}\n","/**\n * List of HTML void tag names.\n *\n * @type {Array}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'isindex',\n 'keygen',\n 'link',\n 'menuitem',\n 'meta',\n 'nextid',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n","/**\n * @typedef {import('vfile').VFile} VFile\n * @typedef {import('parse5').Document} P5Document\n * @typedef {import('parse5').DocumentFragment} P5Fragment\n * @typedef {Omit} P5Element\n * @typedef {import('parse5').Attribute} P5Attribute\n * @typedef {Omit & {startOffset: number|undefined, endOffset: number|undefined}} P5Location\n * @typedef {import('parse5').ParserOptions} P5ParserOptions\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').DocType} Doctype\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Text} Text\n * @typedef {import('hast').Comment} Comment\n * @typedef {import('hast').Content} Content\n * @typedef {Root|Content} Node\n * @typedef {import('../complex-types').Raw} Raw\n *\n * @typedef {Omit & {value: {stitch: Node}}} Stitch\n *\n * @typedef Options\n * @property {Array} [passThrough]\n * List of custom hast node types to pass through (keep) in hast.\n * If the passed through nodes have children, those children are expected to\n * be hast and will be handled.\n *\n * @typedef HiddenTokenizer\n * @property {Array} __mixins\n * Way too simple, but works for us.\n * @property {HiddenPreprocessor} preprocessor\n * @property {(value: string) => void} write\n * @property {() => number} _consume\n * @property {Array} tokenQueue\n * @property {string} state\n * @property {string} returnState\n * @property {number} charRefCode\n * @property {Array} tempBuff\n * @property {Function} _flushCodePointsConsumedAsCharacterReference\n * @property {string} lastStartTagName\n * @property {number} consumedAfterSnapshot\n * @property {boolean} active\n * @property {HiddenToken|undefined} currentCharacterToken\n * @property {HiddenToken|undefined} currentToken\n * @property {unknown} currentAttr\n * @property {Function} NAMED_CHARACTER_REFERENCE_STATE\n * @property {Function} NUMERIC_CHARACTER_REFERENCE_END_STATE\n *\n * @typedef {Record & {location: P5Location}} HiddenToken\n *\n * @typedef HiddenPreprocessor\n * @property {string|undefined} html\n * @property {number} pos\n * @property {number} lastGapPos\n * @property {number} lastCharPos\n * @property {Array} gapStack\n * @property {boolean} skipNextNewLine\n * @property {boolean} lastChunkWritten\n * @property {boolean} endOfChunkHit\n *\n * @typedef HiddenLocationTracker\n * @property {P5Location|undefined} currentAttrLocation\n * @property {P5Location} ctLoc\n * @property {HiddenPosTracker} posTracker\n *\n * @typedef HiddenPosTracker\n * @property {boolean} isEol\n * @property {number} lineStartPos\n * @property {number} droppedBufferSize\n * @property {number} offset\n * @property {number} col\n * @property {number} line\n */\n\n// @ts-expect-error: untyped.\nimport Parser from 'parse5/lib/parser/index.js'\nimport {pointStart, pointEnd} from 'unist-util-position'\nimport {visit} from 'unist-util-visit'\nimport {fromParse5} from 'hast-util-from-parse5'\nimport {toParse5} from 'hast-util-to-parse5'\nimport {htmlVoidElements} from 'html-void-elements'\nimport {webNamespaces} from 'web-namespaces'\nimport {zwitch} from 'zwitch'\n\nconst inTemplateMode = 'IN_TEMPLATE_MODE'\nconst dataState = 'DATA_STATE'\nconst characterToken = 'CHARACTER_TOKEN'\nconst startTagToken = 'START_TAG_TOKEN'\nconst endTagToken = 'END_TAG_TOKEN'\nconst commentToken = 'COMMENT_TOKEN'\nconst doctypeToken = 'DOCTYPE_TOKEN'\n\n/** @type {P5ParserOptions} */\nconst parseOptions = {sourceCodeLocationInfo: true, scriptingEnabled: false}\n\n/**\n * Given a hast tree and an optional vfile (for positional info), return a new\n * parsed-again hast tree.\n *\n * @param tree\n * Original hast tree.\n * @param file\n * Virtual file for positional info, optional.\n * @param options\n * Configuration.\n */\nexport const raw =\n /**\n * @type {(\n * ((tree: Node, file: VFile|undefined, options?: Options) => Node) &\n * ((tree: Node, options?: Options) => Node)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {VFile} [file]\n * @param {Options} [options]\n */\n function (tree, file, options) {\n let index = -1\n const parser = new Parser(parseOptions)\n const one = zwitch('type', {\n handlers: {root, element, text, comment, doctype, raw: handleRaw},\n // @ts-expect-error: hush.\n unknown\n })\n /** @type {boolean|undefined} */\n let stitches\n /** @type {HiddenTokenizer|undefined} */\n let tokenizer\n /** @type {HiddenPreprocessor|undefined} */\n let preprocessor\n /** @type {HiddenPosTracker|undefined} */\n let posTracker\n /** @type {HiddenLocationTracker|undefined} */\n let locationTracker\n\n if (isOptions(file)) {\n options = file\n file = undefined\n }\n\n if (options && options.passThrough) {\n while (++index < options.passThrough.length) {\n // @ts-expect-error: hush.\n one.handlers[options.passThrough[index]] = stitch\n }\n }\n\n const result = fromParse5(\n documentMode(tree) ? document() : fragment(),\n file\n )\n\n if (stitches) {\n visit(result, 'comment', (node, index, parent) => {\n const stitch = /** @type {Stitch} */ (/** @type {unknown} */ (node))\n if (stitch.value.stitch && parent !== null && index !== null) {\n // @ts-expect-error: assume the stitch is allowed.\n parent.children[index] = stitch.value.stitch\n return index\n }\n })\n }\n\n // Unpack if possible and when not given a `root`.\n if (\n tree.type !== 'root' &&\n result.type === 'root' &&\n result.children.length === 1\n ) {\n return result.children[0]\n }\n\n return result\n\n /**\n * @returns {P5Fragment}\n */\n function fragment() {\n /** @type {P5Element} */\n const context = {\n nodeName: 'template',\n tagName: 'template',\n attrs: [],\n namespaceURI: webNamespaces.html,\n childNodes: []\n }\n /** @type {P5Element} */\n const mock = {\n nodeName: 'documentmock',\n tagName: 'documentmock',\n attrs: [],\n namespaceURI: webNamespaces.html,\n childNodes: []\n }\n /** @type {P5Fragment} */\n const doc = {nodeName: '#document-fragment', childNodes: []}\n\n parser._bootstrap(mock, context)\n parser._pushTmplInsertionMode(inTemplateMode)\n parser._initTokenizerForFragmentParsing()\n parser._insertFakeRootElement()\n parser._resetInsertionMode()\n parser._findFormInFragmentContext()\n\n tokenizer = parser.tokenizer\n /* c8 ignore next */\n if (!tokenizer) throw new Error('Expected `tokenizer`')\n preprocessor = tokenizer.preprocessor\n locationTracker = tokenizer.__mixins[0]\n posTracker = locationTracker.posTracker\n\n one(tree)\n\n resetTokenizer()\n\n parser._adoptNodes(mock.childNodes[0], doc)\n\n return doc\n }\n\n /**\n * @returns {P5Document}\n */\n function document() {\n /** @type {P5Document} */\n const doc = parser.treeAdapter.createDocument()\n\n parser._bootstrap(doc, undefined)\n tokenizer = parser.tokenizer\n /* c8 ignore next */\n if (!tokenizer) throw new Error('Expected `tokenizer`')\n preprocessor = tokenizer.preprocessor\n locationTracker = tokenizer.__mixins[0]\n posTracker = locationTracker.posTracker\n\n one(tree)\n\n resetTokenizer()\n\n return doc\n }\n\n /**\n * @param {Array} nodes\n * @returns {void}\n */\n function all(nodes) {\n let index = -1\n\n /* istanbul ignore else - invalid nodes, see rehypejs/rehype-raw#7. */\n if (nodes) {\n while (++index < nodes.length) {\n one(nodes[index])\n }\n }\n }\n\n /**\n * @param {Root} node\n * @returns {void}\n */\n function root(node) {\n all(node.children)\n }\n\n /**\n * @param {Element} node\n * @returns {void}\n */\n function element(node) {\n resetTokenizer()\n parser._processInputToken(startTag(node))\n\n all(node.children)\n\n if (!htmlVoidElements.includes(node.tagName)) {\n resetTokenizer()\n parser._processInputToken(endTag(node))\n }\n }\n\n /**\n * @param {Text} node\n * @returns {void}\n */\n function text(node) {\n resetTokenizer()\n parser._processInputToken({\n type: characterToken,\n chars: node.value,\n location: createParse5Location(node)\n })\n }\n\n /**\n * @param {Doctype} node\n * @returns {void}\n */\n function doctype(node) {\n resetTokenizer()\n parser._processInputToken({\n type: doctypeToken,\n name: 'html',\n forceQuirks: false,\n publicId: '',\n systemId: '',\n location: createParse5Location(node)\n })\n }\n\n /**\n * @param {Comment|Stitch} node\n * @returns {void}\n */\n function comment(node) {\n resetTokenizer()\n parser._processInputToken({\n type: commentToken,\n data: node.value,\n location: createParse5Location(node)\n })\n }\n\n /**\n * @param {Raw} node\n * @returns {void}\n */\n function handleRaw(node) {\n const start = pointStart(node)\n const line = start.line || 1\n const column = start.column || 1\n const offset = start.offset || 0\n\n /* c8 ignore next 4 */\n if (!preprocessor) throw new Error('Expected `preprocessor`')\n if (!tokenizer) throw new Error('Expected `tokenizer`')\n if (!posTracker) throw new Error('Expected `posTracker`')\n if (!locationTracker) throw new Error('Expected `locationTracker`')\n\n // Reset preprocessor:\n // See: .\n preprocessor.html = undefined\n preprocessor.pos = -1\n preprocessor.lastGapPos = -1\n preprocessor.lastCharPos = -1\n preprocessor.gapStack = []\n preprocessor.skipNextNewLine = false\n preprocessor.lastChunkWritten = false\n preprocessor.endOfChunkHit = false\n\n // Reset preprocessor mixin:\n // See: .\n posTracker.isEol = false\n posTracker.lineStartPos = -column + 1 // Looks weird, but ensures we get correct positional info.\n posTracker.droppedBufferSize = offset\n posTracker.offset = 0\n posTracker.col = 1\n posTracker.line = line\n\n // Reset location tracker:\n // See: .\n locationTracker.currentAttrLocation = undefined\n locationTracker.ctLoc = createParse5Location(node)\n\n // See the code for `parse` and `parseFragment`:\n // See: .\n tokenizer.write(node.value)\n parser._runParsingLoop(null)\n\n // Character references hang, so if we ended there, we need to flush\n // those too.\n // We reset the preprocessor as if the document ends here.\n // Then one single call to the relevant state does the trick, parse5\n // consumes the whole token.\n if (\n tokenizer.state === 'NAMED_CHARACTER_REFERENCE_STATE' ||\n tokenizer.state === 'NUMERIC_CHARACTER_REFERENCE_END_STATE'\n ) {\n preprocessor.lastChunkWritten = true\n tokenizer[tokenizer.state](tokenizer._consume())\n }\n }\n\n /**\n * @param {Node} node\n */\n function stitch(node) {\n stitches = true\n\n /** @type {Node} */\n let clone\n\n // Recurse, because to somewhat handle `[]` (where `[]` denotes the\n // passed through node).\n if ('children' in node) {\n clone = {\n ...node,\n children: raw(\n {type: 'root', children: node.children},\n file,\n options\n // @ts-expect-error Assume a given parent yields a parent.\n ).children\n }\n } else {\n clone = {...node}\n }\n\n // Hack: `value` is supposed to be a string, but as none of the tools\n // (`parse5` or `hast-util-from-parse5`) looks at it, we can pass nodes\n // through.\n comment({type: 'comment', value: {stitch: clone}})\n }\n\n function resetTokenizer() {\n /* c8 ignore next 2 */\n if (!tokenizer) throw new Error('Expected `tokenizer`')\n if (!posTracker) throw new Error('Expected `posTracker`')\n\n // Process final characters if they’re still there after hibernating.\n // Similar to:\n // See: .\n const token = tokenizer.currentCharacterToken\n\n if (token) {\n token.location.endLine = posTracker.line\n token.location.endCol = posTracker.col + 1\n token.location.endOffset = posTracker.offset + 1\n parser._processInputToken(token)\n }\n\n // Reset tokenizer:\n // See: .\n // Especially putting it back in the `data` state is useful: some elements,\n // like textareas and iframes, change the state.\n // See GH-7.\n // But also if broken HTML is in `raw`, and then a correct element is given.\n // See GH-11.\n tokenizer.tokenQueue = []\n tokenizer.state = dataState\n tokenizer.returnState = ''\n tokenizer.charRefCode = -1\n tokenizer.tempBuff = []\n tokenizer.lastStartTagName = ''\n tokenizer.consumedAfterSnapshot = -1\n tokenizer.active = false\n tokenizer.currentCharacterToken = undefined\n tokenizer.currentToken = undefined\n tokenizer.currentAttr = undefined\n }\n }\n )\n/**\n * @param {Element} node\n * @returns {HiddenToken}\n */\nfunction startTag(node) {\n /** @type {P5Location} */\n const location = Object.assign(createParse5Location(node))\n // @ts-expect-error extra positional info.\n location.startTag = Object.assign({}, location)\n\n // Untyped token.\n return {\n type: startTagToken,\n tagName: node.tagName,\n selfClosing: false,\n attrs: attributes(node),\n location\n }\n}\n\n/**\n * @param {Element} node\n * @returns {Array}\n */\nfunction attributes(node) {\n return toParse5({\n tagName: node.tagName,\n type: 'element',\n properties: node.properties,\n children: []\n // @ts-expect-error Assume element.\n }).attrs\n}\n\n/**\n * @param {Element} node\n * @returns {HiddenToken}\n */\nfunction endTag(node) {\n /** @type {P5Location} */\n const location = Object.assign(createParse5Location(node))\n // @ts-expect-error extra positional info.\n location.startTag = Object.assign({}, location)\n\n // Untyped token.\n return {\n type: endTagToken,\n tagName: node.tagName,\n attrs: [],\n location\n }\n}\n\n/**\n * @param {Node} node\n */\nfunction unknown(node) {\n throw new Error('Cannot compile `' + node.type + '` node')\n}\n\n/**\n * @param {Node} node\n * @returns {boolean}\n */\nfunction documentMode(node) {\n const head = node.type === 'root' ? node.children[0] : node\n return Boolean(\n head &&\n (head.type === 'doctype' ||\n (head.type === 'element' && head.tagName === 'html'))\n )\n}\n\n/**\n * @param {Node|Stitch} node\n * @returns {P5Location}\n */\nfunction createParse5Location(node) {\n const start = pointStart(node)\n const end = pointEnd(node)\n\n return {\n startLine: start.line,\n startCol: start.column,\n startOffset: start.offset,\n endLine: end.line,\n endCol: end.column,\n endOffset: end.offset\n }\n}\n\n/**\n * @param {VFile|Options|undefined} value\n * @return {value is Options}\n */\nfunction isOptions(value) {\n return Boolean(value && !('message' in value && 'messages' in value))\n}\n","/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast-util-raw').Options} Options\n * @typedef {import('hast-util-raw')} DoNotTouchAsThisImportIncludesRawInTree\n */\n\nimport {raw} from 'hast-util-raw'\n\n/**\n * Plugin to parse the tree again (and raw nodes).\n * Keeping positional info OK. 🙌\n *\n * @type {import('unified').Plugin<[Options?] | Array, Root>}\n */\nexport default function rehypeRaw(options = {}) {\n return (tree, file) => {\n // Assume that when a root was given, it’s also returned.\n const result = /** @type {Root} */ (raw(tree, file, options))\n return result\n }\n}\n","// This module is generated by `script/`.\n/* eslint-disable no-control-regex, no-misleading-character-class, no-useless-escape */\nexport const regex = /[\\0-\\x1F!-,\\.\\/:-@\\[-\\^`\\{-\\xA9\\xAB-\\xB4\\xB6-\\xB9\\xBB-\\xBF\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0378\\u0379\\u037E\\u0380-\\u0385\\u0387\\u038B\\u038D\\u03A2\\u03F6\\u0482\\u0530\\u0557\\u0558\\u055A-\\u055F\\u0589-\\u0590\\u05BE\\u05C0\\u05C3\\u05C6\\u05C8-\\u05CF\\u05EB-\\u05EE\\u05F3-\\u060F\\u061B-\\u061F\\u066A-\\u066D\\u06D4\\u06DD\\u06DE\\u06E9\\u06FD\\u06FE\\u0700-\\u070F\\u074B\\u074C\\u07B2-\\u07BF\\u07F6-\\u07F9\\u07FB\\u07FC\\u07FE\\u07FF\\u082E-\\u083F\\u085C-\\u085F\\u086B-\\u089F\\u08B5\\u08C8-\\u08D2\\u08E2\\u0964\\u0965\\u0970\\u0984\\u098D\\u098E\\u0991\\u0992\\u09A9\\u09B1\\u09B3-\\u09B5\\u09BA\\u09BB\\u09C5\\u09C6\\u09C9\\u09CA\\u09CF-\\u09D6\\u09D8-\\u09DB\\u09DE\\u09E4\\u09E5\\u09F2-\\u09FB\\u09FD\\u09FF\\u0A00\\u0A04\\u0A0B-\\u0A0E\\u0A11\\u0A12\\u0A29\\u0A31\\u0A34\\u0A37\\u0A3A\\u0A3B\\u0A3D\\u0A43-\\u0A46\\u0A49\\u0A4A\\u0A4E-\\u0A50\\u0A52-\\u0A58\\u0A5D\\u0A5F-\\u0A65\\u0A76-\\u0A80\\u0A84\\u0A8E\\u0A92\\u0AA9\\u0AB1\\u0AB4\\u0ABA\\u0ABB\\u0AC6\\u0ACA\\u0ACE\\u0ACF\\u0AD1-\\u0ADF\\u0AE4\\u0AE5\\u0AF0-\\u0AF8\\u0B00\\u0B04\\u0B0D\\u0B0E\\u0B11\\u0B12\\u0B29\\u0B31\\u0B34\\u0B3A\\u0B3B\\u0B45\\u0B46\\u0B49\\u0B4A\\u0B4E-\\u0B54\\u0B58-\\u0B5B\\u0B5E\\u0B64\\u0B65\\u0B70\\u0B72-\\u0B81\\u0B84\\u0B8B-\\u0B8D\\u0B91\\u0B96-\\u0B98\\u0B9B\\u0B9D\\u0BA0-\\u0BA2\\u0BA5-\\u0BA7\\u0BAB-\\u0BAD\\u0BBA-\\u0BBD\\u0BC3-\\u0BC5\\u0BC9\\u0BCE\\u0BCF\\u0BD1-\\u0BD6\\u0BD8-\\u0BE5\\u0BF0-\\u0BFF\\u0C0D\\u0C11\\u0C29\\u0C3A-\\u0C3C\\u0C45\\u0C49\\u0C4E-\\u0C54\\u0C57\\u0C5B-\\u0C5F\\u0C64\\u0C65\\u0C70-\\u0C7F\\u0C84\\u0C8D\\u0C91\\u0CA9\\u0CB4\\u0CBA\\u0CBB\\u0CC5\\u0CC9\\u0CCE-\\u0CD4\\u0CD7-\\u0CDD\\u0CDF\\u0CE4\\u0CE5\\u0CF0\\u0CF3-\\u0CFF\\u0D0D\\u0D11\\u0D45\\u0D49\\u0D4F-\\u0D53\\u0D58-\\u0D5E\\u0D64\\u0D65\\u0D70-\\u0D79\\u0D80\\u0D84\\u0D97-\\u0D99\\u0DB2\\u0DBC\\u0DBE\\u0DBF\\u0DC7-\\u0DC9\\u0DCB-\\u0DCE\\u0DD5\\u0DD7\\u0DE0-\\u0DE5\\u0DF0\\u0DF1\\u0DF4-\\u0E00\\u0E3B-\\u0E3F\\u0E4F\\u0E5A-\\u0E80\\u0E83\\u0E85\\u0E8B\\u0EA4\\u0EA6\\u0EBE\\u0EBF\\u0EC5\\u0EC7\\u0ECE\\u0ECF\\u0EDA\\u0EDB\\u0EE0-\\u0EFF\\u0F01-\\u0F17\\u0F1A-\\u0F1F\\u0F2A-\\u0F34\\u0F36\\u0F38\\u0F3A-\\u0F3D\\u0F48\\u0F6D-\\u0F70\\u0F85\\u0F98\\u0FBD-\\u0FC5\\u0FC7-\\u0FFF\\u104A-\\u104F\\u109E\\u109F\\u10C6\\u10C8-\\u10CC\\u10CE\\u10CF\\u10FB\\u1249\\u124E\\u124F\\u1257\\u1259\\u125E\\u125F\\u1289\\u128E\\u128F\\u12B1\\u12B6\\u12B7\\u12BF\\u12C1\\u12C6\\u12C7\\u12D7\\u1311\\u1316\\u1317\\u135B\\u135C\\u1360-\\u137F\\u1390-\\u139F\\u13F6\\u13F7\\u13FE-\\u1400\\u166D\\u166E\\u1680\\u169B-\\u169F\\u16EB-\\u16ED\\u16F9-\\u16FF\\u170D\\u1715-\\u171F\\u1735-\\u173F\\u1754-\\u175F\\u176D\\u1771\\u1774-\\u177F\\u17D4-\\u17D6\\u17D8-\\u17DB\\u17DE\\u17DF\\u17EA-\\u180A\\u180E\\u180F\\u181A-\\u181F\\u1879-\\u187F\\u18AB-\\u18AF\\u18F6-\\u18FF\\u191F\\u192C-\\u192F\\u193C-\\u1945\\u196E\\u196F\\u1975-\\u197F\\u19AC-\\u19AF\\u19CA-\\u19CF\\u19DA-\\u19FF\\u1A1C-\\u1A1F\\u1A5F\\u1A7D\\u1A7E\\u1A8A-\\u1A8F\\u1A9A-\\u1AA6\\u1AA8-\\u1AAF\\u1AC1-\\u1AFF\\u1B4C-\\u1B4F\\u1B5A-\\u1B6A\\u1B74-\\u1B7F\\u1BF4-\\u1BFF\\u1C38-\\u1C3F\\u1C4A-\\u1C4C\\u1C7E\\u1C7F\\u1C89-\\u1C8F\\u1CBB\\u1CBC\\u1CC0-\\u1CCF\\u1CD3\\u1CFB-\\u1CFF\\u1DFA\\u1F16\\u1F17\\u1F1E\\u1F1F\\u1F46\\u1F47\\u1F4E\\u1F4F\\u1F58\\u1F5A\\u1F5C\\u1F5E\\u1F7E\\u1F7F\\u1FB5\\u1FBD\\u1FBF-\\u1FC1\\u1FC5\\u1FCD-\\u1FCF\\u1FD4\\u1FD5\\u1FDC-\\u1FDF\\u1FED-\\u1FF1\\u1FF5\\u1FFD-\\u203E\\u2041-\\u2053\\u2055-\\u2070\\u2072-\\u207E\\u2080-\\u208F\\u209D-\\u20CF\\u20F1-\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F-\\u215F\\u2189-\\u24B5\\u24EA-\\u2BFF\\u2C2F\\u2C5F\\u2CE5-\\u2CEA\\u2CF4-\\u2CFF\\u2D26\\u2D28-\\u2D2C\\u2D2E\\u2D2F\\u2D68-\\u2D6E\\u2D70-\\u2D7E\\u2D97-\\u2D9F\\u2DA7\\u2DAF\\u2DB7\\u2DBF\\u2DC7\\u2DCF\\u2DD7\\u2DDF\\u2E00-\\u2E2E\\u2E30-\\u3004\\u3008-\\u3020\\u3030\\u3036\\u3037\\u303D-\\u3040\\u3097\\u3098\\u309B\\u309C\\u30A0\\u30FB\\u3100-\\u3104\\u3130\\u318F-\\u319F\\u31C0-\\u31EF\\u3200-\\u33FF\\u4DC0-\\u4DFF\\u9FFD-\\u9FFF\\uA48D-\\uA4CF\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA62C-\\uA63F\\uA673\\uA67E\\uA6F2-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA7C0\\uA7C1\\uA7CB-\\uA7F4\\uA828-\\uA82B\\uA82D-\\uA83F\\uA874-\\uA87F\\uA8C6-\\uA8CF\\uA8DA-\\uA8DF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA954-\\uA95F\\uA97D-\\uA97F\\uA9C1-\\uA9CE\\uA9DA-\\uA9DF\\uA9FF\\uAA37-\\uAA3F\\uAA4E\\uAA4F\\uAA5A-\\uAA5F\\uAA77-\\uAA79\\uAAC3-\\uAADA\\uAADE\\uAADF\\uAAF0\\uAAF1\\uAAF7-\\uAB00\\uAB07\\uAB08\\uAB0F\\uAB10\\uAB17-\\uAB1F\\uAB27\\uAB2F\\uAB5B\\uAB6A-\\uAB6F\\uABEB\\uABEE\\uABEF\\uABFA-\\uABFF\\uD7A4-\\uD7AF\\uD7C7-\\uD7CA\\uD7FC-\\uD7FF\\uE000-\\uF8FF\\uFA6E\\uFA6F\\uFADA-\\uFAFF\\uFB07-\\uFB12\\uFB18-\\uFB1C\\uFB29\\uFB37\\uFB3D\\uFB3F\\uFB42\\uFB45\\uFBB2-\\uFBD2\\uFD3E-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDEF\\uFDFC-\\uFDFF\\uFE10-\\uFE1F\\uFE30-\\uFE32\\uFE35-\\uFE4C\\uFE50-\\uFE6F\\uFE75\\uFEFD-\\uFF0F\\uFF1A-\\uFF20\\uFF3B-\\uFF3E\\uFF40\\uFF5B-\\uFF65\\uFFBF-\\uFFC1\\uFFC8\\uFFC9\\uFFD0\\uFFD1\\uFFD8\\uFFD9\\uFFDD-\\uFFFF]|\\uD800[\\uDC0C\\uDC27\\uDC3B\\uDC3E\\uDC4E\\uDC4F\\uDC5E-\\uDC7F\\uDCFB-\\uDD3F\\uDD75-\\uDDFC\\uDDFE-\\uDE7F\\uDE9D-\\uDE9F\\uDED1-\\uDEDF\\uDEE1-\\uDEFF\\uDF20-\\uDF2C\\uDF4B-\\uDF4F\\uDF7B-\\uDF7F\\uDF9E\\uDF9F\\uDFC4-\\uDFC7\\uDFD0\\uDFD6-\\uDFFF]|\\uD801[\\uDC9E\\uDC9F\\uDCAA-\\uDCAF\\uDCD4-\\uDCD7\\uDCFC-\\uDCFF\\uDD28-\\uDD2F\\uDD64-\\uDDFF\\uDF37-\\uDF3F\\uDF56-\\uDF5F\\uDF68-\\uDFFF]|\\uD802[\\uDC06\\uDC07\\uDC09\\uDC36\\uDC39-\\uDC3B\\uDC3D\\uDC3E\\uDC56-\\uDC5F\\uDC77-\\uDC7F\\uDC9F-\\uDCDF\\uDCF3\\uDCF6-\\uDCFF\\uDD16-\\uDD1F\\uDD3A-\\uDD7F\\uDDB8-\\uDDBD\\uDDC0-\\uDDFF\\uDE04\\uDE07-\\uDE0B\\uDE14\\uDE18\\uDE36\\uDE37\\uDE3B-\\uDE3E\\uDE40-\\uDE5F\\uDE7D-\\uDE7F\\uDE9D-\\uDEBF\\uDEC8\\uDEE7-\\uDEFF\\uDF36-\\uDF3F\\uDF56-\\uDF5F\\uDF73-\\uDF7F\\uDF92-\\uDFFF]|\\uD803[\\uDC49-\\uDC7F\\uDCB3-\\uDCBF\\uDCF3-\\uDCFF\\uDD28-\\uDD2F\\uDD3A-\\uDE7F\\uDEAA\\uDEAD-\\uDEAF\\uDEB2-\\uDEFF\\uDF1D-\\uDF26\\uDF28-\\uDF2F\\uDF51-\\uDFAF\\uDFC5-\\uDFDF\\uDFF7-\\uDFFF]|\\uD804[\\uDC47-\\uDC65\\uDC70-\\uDC7E\\uDCBB-\\uDCCF\\uDCE9-\\uDCEF\\uDCFA-\\uDCFF\\uDD35\\uDD40-\\uDD43\\uDD48-\\uDD4F\\uDD74\\uDD75\\uDD77-\\uDD7F\\uDDC5-\\uDDC8\\uDDCD\\uDDDB\\uDDDD-\\uDDFF\\uDE12\\uDE38-\\uDE3D\\uDE3F-\\uDE7F\\uDE87\\uDE89\\uDE8E\\uDE9E\\uDEA9-\\uDEAF\\uDEEB-\\uDEEF\\uDEFA-\\uDEFF\\uDF04\\uDF0D\\uDF0E\\uDF11\\uDF12\\uDF29\\uDF31\\uDF34\\uDF3A\\uDF45\\uDF46\\uDF49\\uDF4A\\uDF4E\\uDF4F\\uDF51-\\uDF56\\uDF58-\\uDF5C\\uDF64\\uDF65\\uDF6D-\\uDF6F\\uDF75-\\uDFFF]|\\uD805[\\uDC4B-\\uDC4F\\uDC5A-\\uDC5D\\uDC62-\\uDC7F\\uDCC6\\uDCC8-\\uDCCF\\uDCDA-\\uDD7F\\uDDB6\\uDDB7\\uDDC1-\\uDDD7\\uDDDE-\\uDDFF\\uDE41-\\uDE43\\uDE45-\\uDE4F\\uDE5A-\\uDE7F\\uDEB9-\\uDEBF\\uDECA-\\uDEFF\\uDF1B\\uDF1C\\uDF2C-\\uDF2F\\uDF3A-\\uDFFF]|\\uD806[\\uDC3B-\\uDC9F\\uDCEA-\\uDCFE\\uDD07\\uDD08\\uDD0A\\uDD0B\\uDD14\\uDD17\\uDD36\\uDD39\\uDD3A\\uDD44-\\uDD4F\\uDD5A-\\uDD9F\\uDDA8\\uDDA9\\uDDD8\\uDDD9\\uDDE2\\uDDE5-\\uDDFF\\uDE3F-\\uDE46\\uDE48-\\uDE4F\\uDE9A-\\uDE9C\\uDE9E-\\uDEBF\\uDEF9-\\uDFFF]|\\uD807[\\uDC09\\uDC37\\uDC41-\\uDC4F\\uDC5A-\\uDC71\\uDC90\\uDC91\\uDCA8\\uDCB7-\\uDCFF\\uDD07\\uDD0A\\uDD37-\\uDD39\\uDD3B\\uDD3E\\uDD48-\\uDD4F\\uDD5A-\\uDD5F\\uDD66\\uDD69\\uDD8F\\uDD92\\uDD99-\\uDD9F\\uDDAA-\\uDEDF\\uDEF7-\\uDFAF\\uDFB1-\\uDFFF]|\\uD808[\\uDF9A-\\uDFFF]|\\uD809[\\uDC6F-\\uDC7F\\uDD44-\\uDFFF]|[\\uD80A\\uD80B\\uD80E-\\uD810\\uD812-\\uD819\\uD824-\\uD82B\\uD82D\\uD82E\\uD830-\\uD833\\uD837\\uD839\\uD83D\\uD83F\\uD87B-\\uD87D\\uD87F\\uD885-\\uDB3F\\uDB41-\\uDBFF][\\uDC00-\\uDFFF]|\\uD80D[\\uDC2F-\\uDFFF]|\\uD811[\\uDE47-\\uDFFF]|\\uD81A[\\uDE39-\\uDE3F\\uDE5F\\uDE6A-\\uDECF\\uDEEE\\uDEEF\\uDEF5-\\uDEFF\\uDF37-\\uDF3F\\uDF44-\\uDF4F\\uDF5A-\\uDF62\\uDF78-\\uDF7C\\uDF90-\\uDFFF]|\\uD81B[\\uDC00-\\uDE3F\\uDE80-\\uDEFF\\uDF4B-\\uDF4E\\uDF88-\\uDF8E\\uDFA0-\\uDFDF\\uDFE2\\uDFE5-\\uDFEF\\uDFF2-\\uDFFF]|\\uD821[\\uDFF8-\\uDFFF]|\\uD823[\\uDCD6-\\uDCFF\\uDD09-\\uDFFF]|\\uD82C[\\uDD1F-\\uDD4F\\uDD53-\\uDD63\\uDD68-\\uDD6F\\uDEFC-\\uDFFF]|\\uD82F[\\uDC6B-\\uDC6F\\uDC7D-\\uDC7F\\uDC89-\\uDC8F\\uDC9A-\\uDC9C\\uDC9F-\\uDFFF]|\\uD834[\\uDC00-\\uDD64\\uDD6A-\\uDD6C\\uDD73-\\uDD7A\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDE41\\uDE45-\\uDFFF]|\\uD835[\\uDC55\\uDC9D\\uDCA0\\uDCA1\\uDCA3\\uDCA4\\uDCA7\\uDCA8\\uDCAD\\uDCBA\\uDCBC\\uDCC4\\uDD06\\uDD0B\\uDD0C\\uDD15\\uDD1D\\uDD3A\\uDD3F\\uDD45\\uDD47-\\uDD49\\uDD51\\uDEA6\\uDEA7\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3\\uDFCC\\uDFCD]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85-\\uDE9A\\uDEA0\\uDEB0-\\uDFFF]|\\uD838[\\uDC07\\uDC19\\uDC1A\\uDC22\\uDC25\\uDC2B-\\uDCFF\\uDD2D-\\uDD2F\\uDD3E\\uDD3F\\uDD4A-\\uDD4D\\uDD4F-\\uDEBF\\uDEFA-\\uDFFF]|\\uD83A[\\uDCC5-\\uDCCF\\uDCD7-\\uDCFF\\uDD4C-\\uDD4F\\uDD5A-\\uDFFF]|\\uD83B[\\uDC00-\\uDDFF\\uDE04\\uDE20\\uDE23\\uDE25\\uDE26\\uDE28\\uDE33\\uDE38\\uDE3A\\uDE3C-\\uDE41\\uDE43-\\uDE46\\uDE48\\uDE4A\\uDE4C\\uDE50\\uDE53\\uDE55\\uDE56\\uDE58\\uDE5A\\uDE5C\\uDE5E\\uDE60\\uDE63\\uDE65\\uDE66\\uDE6B\\uDE73\\uDE78\\uDE7D\\uDE7F\\uDE8A\\uDE9C-\\uDEA0\\uDEA4\\uDEAA\\uDEBC-\\uDFFF]|\\uD83C[\\uDC00-\\uDD2F\\uDD4A-\\uDD4F\\uDD6A-\\uDD6F\\uDD8A-\\uDFFF]|\\uD83E[\\uDC00-\\uDFEF\\uDFFA-\\uDFFF]|\\uD869[\\uDEDE-\\uDEFF]|\\uD86D[\\uDF35-\\uDF3F]|\\uD86E[\\uDC1E\\uDC1F]|\\uD873[\\uDEA2-\\uDEAF]|\\uD87A[\\uDFE1-\\uDFFF]|\\uD87E[\\uDE1E-\\uDFFF]|\\uD884[\\uDF4B-\\uDFFF]|\\uDB40[\\uDC00-\\uDCFF\\uDDF0-\\uDFFF]/g\n","import { regex } from './regex.js'\n\nconst own = Object.hasOwnProperty\n\n/**\n * Slugger.\n */\nexport default class BananaSlug {\n /**\n * Create a new slug class.\n */\n constructor () {\n /** @type {Record} */\n // eslint-disable-next-line no-unused-expressions\n this.occurrences\n\n this.reset()\n }\n\n /**\n * Generate a unique slug.\n *\n * Tracks previously generated slugs: repeated calls with the same value\n * will result in different slugs.\n * Use the `slug` function to get same slugs.\n *\n * @param {string} value\n * String of text to slugify\n * @param {boolean} [maintainCase=false]\n * Keep the current case, otherwise make all lowercase\n * @return {string}\n * A unique slug string\n */\n slug (value, maintainCase) {\n const self = this\n let result = slug(value, maintainCase === true)\n const originalSlug = result\n\n while (own.call(self.occurrences, result)) {\n self.occurrences[originalSlug]++\n result = originalSlug + '-' + self.occurrences[originalSlug]\n }\n\n self.occurrences[result] = 0\n\n return result\n }\n\n /**\n * Reset - Forget all previous slugs\n *\n * @return void\n */\n reset () {\n this.occurrences = Object.create(null)\n }\n}\n\n/**\n * Generate a slug.\n *\n * Does not track previously generated slugs: repeated calls with the same value\n * will result in the exact same slug.\n * Use the `GithubSlugger` class to get unique slugs.\n *\n * @param {string} value\n * String of text to slugify\n * @param {boolean} [maintainCase=false]\n * Keep the current case, otherwise make all lowercase\n * @return {string}\n * A unique slug string\n */\nexport function slug (value, maintainCase) {\n if (typeof value !== 'string') return ''\n if (!maintainCase) value = value.toLowerCase()\n return value.replace(regex, '').replace(/ /g, '-')\n}\n","/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Content} Content\n */\n\n/**\n * @typedef {Root | Content} Node\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Check if `node`is an element and has a `field` property.\n *\n * @param {unknown} node\n * Thing to check (typically `Element`).\n * @param {unknown} field\n * Field name to check (typically `string`).\n * @returns {boolean}\n * Whether `node` is an element that has a `field` property.\n */\nexport function hasProperty(node, field) {\n const value =\n typeof field === 'string' &&\n isNode(node) &&\n node.type === 'element' &&\n node.properties &&\n own.call(node.properties, field) &&\n node.properties[field]\n\n return value !== null && value !== undefined && value !== false\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction isNode(value) {\n return Boolean(value && typeof value === 'object' && 'type' in value)\n}\n","/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Content} Content\n */\n\n/**\n * @typedef {Root | Content} Node\n */\n\n// To do next major: return `undefined`.\n/**\n * Get the rank (`1` to `6`) of headings (`h1` to `h6`).\n *\n * @param {Node} node\n * Node to check.\n * @returns {number | null}\n * Rank of the heading or `null` if not a heading.\n */\nexport function headingRank(node) {\n const name =\n (node && node.type === 'element' && node.tagName.toLowerCase()) || ''\n const code =\n name.length === 2 && name.charCodeAt(0) === 104 /* `h` */\n ? name.charCodeAt(1)\n : 0\n return code > 48 /* `0` */ && code < 55 /* `7` */ ? code - 48 /* `0` */ : null\n}\n","/**\n * @fileoverview\n * Get the plain-text value of a hast node.\n * @longdescription\n * ## Use\n *\n * ```js\n * import {h} from 'hastscript'\n * import {toString} from 'hast-util-to-string'\n *\n * toString(h('p', 'Alpha'))\n * //=> 'Alpha'\n * toString(h('div', [h('b', 'Bold'), ' and ', h('i', 'italic'), '.']))\n * //=> 'Bold and italic.'\n * ```\n *\n * ## API\n *\n * ### `toString(node)`\n *\n * Transform a node to a string.\n */\n\n/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Element} Element\n * @typedef {Root|Root['children'][number]} Node\n */\n\n/**\n * Get the plain-text value of a hast node.\n *\n * @param {Node} node\n * @returns {string}\n */\nexport function toString(node) {\n // “The concatenation of data of all the Text node descendants of the context\n // object, in tree order.”\n if ('children' in node) {\n return all(node)\n }\n\n // “Context object’s data.”\n return 'value' in node ? node.value : ''\n}\n\n/**\n * @param {Node} node\n * @returns {string}\n */\nfunction one(node) {\n if (node.type === 'text') {\n return node.value\n }\n\n return 'children' in node ? all(node) : ''\n}\n\n/**\n * @param {Root|Element} node\n * @returns {string}\n */\nfunction all(node) {\n let index = -1\n /** @type {string[]} */\n const result = []\n\n while (++index < node.children.length) {\n result[index] = one(node.children[index])\n }\n\n return result.join('')\n}\n","/**\n * @typedef {import('hast').Root} Root\n */\n\n/**\n * @typedef Options\n * Configuration (optional).\n * @property {string} [prefix='']\n * Prefix to add in front of `id`s.\n */\n\nimport Slugger from 'github-slugger'\nimport {hasProperty} from 'hast-util-has-property'\nimport {headingRank} from 'hast-util-heading-rank'\nimport {toString} from 'hast-util-to-string'\nimport {visit} from 'unist-util-visit'\n\nconst slugs = new Slugger()\n\n/**\n * Plugin to add `id`s to headings.\n *\n * @type {import('unified').Plugin<[Options?]|Array, Root>}\n */\nexport default function rehypeSlug(options = {}) {\n const prefix = options.prefix || ''\n\n return (tree) => {\n slugs.reset()\n\n visit(tree, 'element', (node) => {\n if (headingRank(node) && node.properties && !hasProperty(node, 'id')) {\n node.properties.id = prefix + slugs.slug(toString(node))\n }\n })\n }\n}\n","/**\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('hast').Element} Element\n */\n\n/**\n * @typedef {null | undefined | string | TestFunctionAnything | Array} Test\n * Check for an arbitrary element, unaware of TypeScript inferral.\n *\n * @callback TestFunctionAnything\n * Check if an element passes a test, unaware of TypeScript inferral.\n * @param {Element} element\n * An element.\n * @param {number | null | undefined} [index]\n * The element’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The element’s parent.\n * @returns {boolean | void}\n * Whether this element passes the test.\n */\n\n/**\n * @template {Element} T\n * Element type.\n * @typedef {T['tagName'] | TestFunctionPredicate | Array>} PredicateTest\n * Check for an element that can be inferred by TypeScript.\n */\n\n/**\n * Check if an element passes a certain node test.\n *\n * @template {Element} T\n * Element type.\n * @callback TestFunctionPredicate\n * Complex test function for an element that can be inferred by TypeScript.\n * @param {Element} element\n * An element.\n * @param {number | null | undefined} [index]\n * The element’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The element’s parent.\n * @returns {element is T}\n * Whether this element passes the test.\n */\n\n/**\n * @callback AssertAnything\n * Check that an arbitrary value is an element, unaware of TypeScript inferral.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is an element and passes a test.\n */\n\n/**\n * Check if a node is an element and passes a certain node test\n *\n * @template {Element} T\n * Element type.\n * @callback AssertPredicate\n * Check that an arbitrary value is a specific element, aware of TypeScript.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is T}\n * Whether this is an element and passes a test.\n */\n\n/**\n * Check if `node` is an `Element` and whether it passes the given test.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @param test\n * A check for a specific element.\n * @param index\n * The node’s position in its parent.\n * @param parent\n * The node’s parent.\n * @returns\n * Whether `node` is an element and passes a test.\n */\nexport const isElement =\n /**\n * @type {(\n * (() => false) &\n * ((node: unknown, test?: PredicateTest, index?: number, parent?: Parent, context?: unknown) => node is T) &\n * ((node: unknown, test: Test, index?: number, parent?: Parent, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test | undefined} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convertElement(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index for child node')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!parent.type || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n // @ts-expect-error Looks like a node.\n if (!node || !node.type || typeof node.type !== 'string') {\n return false\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return check.call(context, node, index, parent)\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param test\n * * When nullish, checks if `node` is an `Element`.\n * * When `string`, works like passing `(element) => element.tagName === test`.\n * * When `function` checks if function passed the element is true.\n * * When `array`, checks any one of the subtests pass.\n * @returns\n * An assertion.\n */\nexport const convertElement =\n /**\n * @type {(\n * ((test: T['tagName'] | TestFunctionPredicate) => AssertPredicate) &\n * ((test?: Test) => AssertAnything)\n * )}\n */\n (\n /**\n * @param {Test | null | undefined} [test]\n * @returns {AssertAnything}\n */\n function (test) {\n if (test === undefined || test === null) {\n return element\n }\n\n if (typeof test === 'string') {\n return tagNameFactory(test)\n }\n\n if (typeof test === 'object') {\n return anyFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or array as test')\n }\n )\n\n/**\n * Handle multiple tests.\n *\n * @param {Array} tests\n * @returns {AssertAnything}\n */\nfunction anyFactory(tests) {\n /** @type {Array} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convertElement(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @param {Array} parameters\n * @returns {boolean}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].call(this, ...parameters)) {\n return true\n }\n }\n\n return false\n }\n}\n\n/**\n * Turn a string into a test for an element with a certain tag name.\n *\n * @param {string} check\n * @returns {AssertAnything}\n */\nfunction tagNameFactory(check) {\n return tagName\n\n /**\n * @param {unknown} node\n * @returns {boolean}\n */\n function tagName(node) {\n return element(node) && node.tagName === check\n }\n}\n\n/**\n * Turn a custom test into a test for an element that passes that test.\n *\n * @param {TestFunctionAnything} check\n * @returns {AssertAnything}\n */\nfunction castFactory(check) {\n return assertion\n\n /**\n * @this {unknown}\n * @param {unknown} node\n * @param {Array} parameters\n * @returns {boolean}\n */\n function assertion(node, ...parameters) {\n // @ts-expect-error: fine.\n return element(node) && Boolean(check.call(this, node, ...parameters))\n }\n}\n\n/**\n * Make sure something is an element.\n *\n * @param {unknown} node\n * @returns {node is Element}\n */\nfunction element(node) {\n return Boolean(\n node &&\n typeof node === 'object' &&\n // @ts-expect-error Looks like a node.\n node.type === 'element' &&\n // @ts-expect-error Looks like an element.\n typeof node.tagName === 'string'\n )\n}\n","/**\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Parent} Parent\n * @typedef {import('hast').Element} Element\n * @typedef {Element['children'][number]} ElementChild\n * @typedef {import('hast').Properties} Properties\n * @typedef {import('hast-util-is-element').Test} Test\n *\n * @typedef {'prepend'|'append'|'wrap'|'before'|'after'} Behavior\n *\n * @callback Build\n * @param {Element} node\n * @returns {ElementChild|ElementChild[]}\n *\n * @typedef Options\n * Configuration.\n * @property {Behavior} [behavior='prepend']\n * How to create links.\n * @property {Behavior} [behaviour]\n * Please use `behavior` instead\n * @property {Properties} [properties]\n * Extra properties to set on the link when injecting.\n * Defaults to `{ariaHidden: true, tabIndex: -1}` when `'prepend'` or\n * `'append'`.\n * @property {ElementChild|ElementChild[]|Build} [content={type: 'element', tagName: 'span', properties: {className: ['icon', 'icon-link']}, children: []}]\n * hast nodes to insert in the link.\n * @property {ElementChild|ElementChild[]|Build} [group]\n * hast node to wrap the heading and link with, if `behavior` is `'before'` or\n * `'after'`.\n * There is no default.\n * @property {Test} [test]\n * Test to define which heading elements are linked.\n * Any test that can be given to `hast-util-is-element` is supported.\n * The default (no test) is to link all headings.\n * Can be used to link only h1-h3, or for example all except h1.\n */\n\nimport extend from 'extend'\nimport {hasProperty} from 'hast-util-has-property'\nimport {headingRank} from 'hast-util-heading-rank'\nimport {convertElement} from 'hast-util-is-element'\nimport {visit, SKIP} from 'unist-util-visit'\n\n/** @type {Element} */\nconst contentDefaults = {\n type: 'element',\n tagName: 'span',\n properties: {className: ['icon', 'icon-link']},\n children: []\n}\n\n/**\n * Plugin to automatically add links to headings (h1-h6).\n *\n * @type {import('unified').Plugin<[Options?]|void[], Root>}\n */\nexport default function rehypeAutolinkHeadings(options = {}) {\n let props = options.properties\n const behavior = options.behaviour || options.behavior || 'prepend'\n const content = options.content || contentDefaults\n const group = options.group\n const is = convertElement(options.test)\n\n /** @type {import('unist-util-visit/complex-types').Visitor} */\n let method\n\n if (behavior === 'wrap') {\n method = wrap\n } else if (behavior === 'before' || behavior === 'after') {\n method = around\n } else {\n if (!props) {\n props = {ariaHidden: 'true', tabIndex: -1}\n }\n\n method = inject\n }\n\n return (tree) => {\n visit(tree, 'element', (node, index, parent) => {\n if (\n headingRank(node) &&\n hasProperty(node, 'id') &&\n is(node, index, parent)\n ) {\n return method(node, index, parent)\n }\n })\n }\n\n /** @type {import('unist-util-visit/complex-types').Visitor} */\n function inject(node) {\n node.children[behavior === 'prepend' ? 'unshift' : 'push'](\n create(node, extend(true, {}, props), toChildren(content, node))\n )\n\n return [SKIP]\n }\n\n /** @type {import('unist-util-visit/complex-types').Visitor} */\n function around(node, index, parent) {\n // Uncommon.\n /* c8 ignore next */\n if (typeof index !== 'number' || !parent) return\n\n const link = create(\n node,\n extend(true, {}, props),\n toChildren(content, node)\n )\n let nodes = behavior === 'before' ? [link, node] : [node, link]\n\n if (group) {\n const grouping = toNode(group, node)\n\n if (grouping && !Array.isArray(grouping) && grouping.type === 'element') {\n grouping.children = nodes\n nodes = [grouping]\n }\n }\n\n parent.children.splice(index, 1, ...nodes)\n\n return [SKIP, index + nodes.length]\n }\n\n /** @type {import('unist-util-visit/complex-types').Visitor} */\n function wrap(node) {\n node.children = [create(node, extend(true, {}, props), node.children)]\n return [SKIP]\n }\n\n /**\n * @param {ElementChild|ElementChild[]|Build} value\n * @param {Element} node\n * @returns {ElementChild[]}\n */\n function toChildren(value, node) {\n const result = toNode(value, node)\n return Array.isArray(result) ? result : [result]\n }\n\n /**\n * @param {ElementChild|ElementChild[]|Build} value\n * @param {Element} node\n * @returns {ElementChild|ElementChild[]}\n */\n function toNode(value, node) {\n if (typeof value === 'function') return value(node)\n return extend(true, Array.isArray(value) ? [] : {}, value)\n }\n\n /**\n * @param {Element} node\n * @param {Properties} props\n * @param {ElementChild[]} children\n * @returns {Element}\n */\n function create(node, props, children) {\n return {\n type: 'element',\n tagName: 'a',\n properties: Object.assign({}, props, {\n // Fix hast types and make them required.\n /* c8 ignore next */\n href: '#' + (node.properties || {}).id\n }),\n children\n }\n }\n}\n","import { Element, Comment, Literal, ElementContent, RootContent, Properties } from 'hast';\nimport { RehypeAttrsOptions } from './';\n\nexport const getURLParameters = (url: string = '') =>\n ((url.match(/([^?=&]+)(=([^&]*))/g) || []) as string[]).reduce(\n (a: Record, v: string) => (\n (a[v.slice(0, v.indexOf('=')) as keyof typeof a] = v.slice(v.indexOf('=') + 1)), a\n ),\n {}\n )\n\nexport const prevChild = (data: Literal[] = [], index: number): Comment | undefined => {\n let i = index;\n while (i > -1) {\n i--;\n if (!data[i]) return\n if ((data[i] && data[i].value && (data[i].value as string).replace(/(\\n|\\s)/g, '') !== '') || data[i].type !== 'text') {\n if (!/^rehype:/.test(data[i].value as string) || (data[i].type as string) !== 'comment') return;\n return data[i] as unknown as Comment;\n }\n }\n return;\n}\n\nexport const nextChild = (data: RootContent[] | ElementContent[] = [], index: number, tagName?: string, codeBlockParames?: boolean): ElementContent | undefined => {\n let i = index;\n while (i < data.length) {\n i++;\n if (tagName) {\n const element = data[i] as Literal & Element;\n if (element && element.value && (element.value as string).replace(/(\\n|\\s)/g, '') !== '' || data[i] && (data[i].type as string) === 'element') {\n return element.tagName === tagName ? element : undefined\n }\n } else {\n const element = data[i] as ElementContent & Literal;\n if (!element || element.type === 'element') return;\n if (element.type === 'text' && element.value.replace(/(\\n|\\s)/g, '') !== '') return;\n if (element.type && /^(comment|raw)$/ig.test(element.type)) {\n if (element.value && !/^rehype:/.test(element.value.replace(/^(\\s+)?/, '$2') || '')) {\n return\n };\n if (codeBlockParames) {\n const nextNode = nextChild(data, i, 'pre', codeBlockParames)\n if (nextNode) return;\n element.value = (element.value || '').replace(/^(\\n|\\s)+/, '')\n return element;\n } else {\n element.value = (element.value || '').replace(/^(\\n|\\s)+/, '')\n return element;\n }\n }\n }\n }\n return\n}\n\n/**\n * 获取代码注视的位置\n * @param data 数据\n * @param index 当前数据所在的位置\n * @returns 返回 当前参数数据 Object,`{}`\n */\nexport const getCommentObject = ({ value = '' }: Comment): Properties => {\n const param = getURLParameters(value.replace(/^/, '$1').replace(/^rehype:/, ''));\n Object.keys(param).forEach((keyName: string) => {\n if (param[keyName] === 'true') {\n param[keyName] = true;\n }\n if (param[keyName] === 'false') {\n param[keyName] = false;\n }\n if (typeof param[keyName] === 'string' && !/^0/.test(param[keyName] as string) && !isNaN(+param[keyName])) {\n param[keyName] = +param[keyName];\n }\n })\n return param;\n}\n\nexport type DataConfig = {\n 'data-config': Properties\n}\n\nexport const propertiesHandle = (defaultAttrs?: Properties | null, attrs?: Properties, type?: RehypeAttrsOptions['properties']): Properties | DataConfig => {\n if (type === 'string') {\n return { ...defaultAttrs, 'data-config': JSON.stringify({ ...attrs, rehyp: true })}\n } else if (type === 'attr') {\n return { ...defaultAttrs, ...attrs}\n }\n return { ...defaultAttrs, 'data-config': { ...attrs, rehyp: true }}\n}","import { Plugin } from 'unified';\nimport { Root, Element, Comment, Properties, Literal } from 'hast';\nimport { visit } from 'unist-util-visit';\nimport { propertiesHandle, nextChild, prevChild, getCommentObject } from './utils';\n\nexport type RehypeAttrsOptions = {\n /**\n * ## `data`\n * \n * ```markdown\n * text\n * \n * ```\n * 👇👇👇👇👇\n * ```html\n *

text

\n * ```\n * \n * ## `string`\n * \n * ```markdown\n * text\n * \n * ```\n * \n * 👇👇👇👇👇\n * \n * ```html\n *

text

\n * ```\n * \n * ## attr\n * \n * ```markdown\n * text\n * \n * ```\n * 👇👇👇👇👇\n * ```html\n *

text

\n * ```\n * @default `data`\n */\n properties?: 'data' | 'string' | 'attr';\n /**\n * Code block passing parameters\n */\n codeBlockParames?: boolean;\n}\n\nconst rehypeAttrs: Plugin<[RehypeAttrsOptions?], Root> = (options = {}) => {\n const { properties = 'data', codeBlockParames = true } = options;\n return (tree) => {\n visit(tree, 'element', (node, index, parent) => {\n if (codeBlockParames && node.tagName === 'pre' && node && Array.isArray(node.children) && parent && Array.isArray(parent.children) && parent.children.length > 1) {\n const firstChild = node.children[0] as Element;\n if (firstChild && firstChild.tagName === 'code' && typeof index === 'number') {\n const child = prevChild(parent.children as Literal[], index);\n if (child) {\n const attr = getCommentObject(child);\n if (Object.keys(attr).length > 0) {\n node.properties = { ...node.properties, ...{ 'data-type': 'rehyp' } }\n firstChild.properties = propertiesHandle(firstChild.properties, attr, properties) as Properties\n }\n }\n }\n }\n\n if (/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(node.tagName) && parent && Array.isArray(parent.children) && typeof index === 'number') {\n const child = nextChild(parent.children, index, '', codeBlockParames)\n if (child) {\n const attr = getCommentObject(child as Comment)\n if (Object.keys(attr).length > 0) {\n node.properties = propertiesHandle(node.properties, attr, properties) as Properties\n }\n }\n }\n });\n }\n}\n\n\nexport default rehypeAttrs\n","import type { Plugin } from 'unified';\nimport type { Root, RootContent, Literal } from 'hast';\nimport { visit } from 'unist-util-visit';\n\n/**\n * Raw string of HTML embedded into HTML AST.\n */\nexport interface Raw extends Literal {\n /**\n * Node type.\n */\n type: 'raw'\n}\n\n// Register nodes in content.\ndeclare module 'hast' {\n interface RootContentMap {\n /**\n * Raw string of HTML embedded into HTML AST.\n */\n raw: Raw\n }\n interface ElementContentMap {\n /**\n * Raw string of HTML embedded into HTML AST.\n */\n raw: Raw\n }\n}\n\n\nexport type RehypeIgnoreOptions = {\n /**\n * Character to use for opening delimiter, by default `rehype:ignore:start`\n */\n openDelimiter?: string;\n /**\n * Character to use for closing delimiter, by default `rehype:ignore:end`\n */\n closeDelimiter?: string;\n}\n\nconst rehypeIgnore: Plugin<[RehypeIgnoreOptions?], Root> = (options = {}) => {\n const { openDelimiter = 'rehype:ignore:start', closeDelimiter = 'rehype:ignore:end' } = options;\n return (tree) => {\n visit(tree, (node: Root | RootContent, index, parent) => {\n if (node.type === 'element' || node.type === 'root') {\n // const start = node.children.findIndex((item) => item.type === 'comment' && item.value === openDelimiter);\n // const end = node.children.findIndex((item) => item.type === 'comment' && item.value === closeDelimiter);\n // if (start > -1 && end > -1) {\n // node.children = node.children.filter((_, idx) => idx < start || idx > end);\n // }\n let start = false;\n node.children = node.children.filter((item) => {\n if (item.type === 'raw' || item.type === 'comment') {\n let str = (item.value || '').trim();\n str = str.replace(/^/, '$1')\n if (str === openDelimiter) {\n start = true;\n return false;\n }\n if (str === closeDelimiter) {\n start = false;\n return false;\n }\n }\n \n return !start;\n })\n }\n });\n }\n}\n\nexport default rehypeIgnore;\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [cascade=true]\n * Whether to drop parent nodes if they had children, but all their children\n * were filtered out.\n */\n\nimport {convert} from 'unist-util-is'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Create a new `tree` of copies of all nodes that pass `test`.\n *\n * The tree is walked in *preorder* (NLR), visiting the node itself, then its\n * head, etc.\n *\n * @param tree\n * Tree to filter.\n * @param options\n * Configuration (optional).\n * @param test\n * `unist-util-is` compatible test.\n * @returns\n * New filtered tree.\n *\n * `null` is returned if `tree` itself didn’t pass the test, or is cascaded\n * away.\n */\nexport const filter =\n /**\n * @type {(\n * ((node: Tree, options: Options | null | undefined, test: Check | null | undefined) => import('./complex-types.js').Matches) &\n * ((node: Tree, test: Check) => import('./complex-types.js').Matches) &\n * ((node: Tree, options?: Options | null | undefined) => Tree)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Options | Test | null | undefined} [options]\n * @param {Test | null | undefined} [test]\n * @returns {Node | null}\n */\n function (tree, options, test) {\n const is = convert(test || options)\n /** @type {boolean | null | undefined} */\n const cascadeRaw =\n options && typeof options === 'object' && 'cascade' in options\n ? /** @type {boolean | null | undefined} */ (options.cascade)\n : undefined\n const cascade =\n cascadeRaw === undefined || cascadeRaw === null ? true : cascadeRaw\n\n return preorder(tree)\n\n /**\n * @param {Node} node\n * Current node.\n * @param {number | undefined} [index]\n * Index of `node` in `parent`.\n * @param {Parent | undefined} [parent]\n * Parent node.\n * @returns {Node | null}\n * Shallow copy of `node`.\n */\n function preorder(node, index, parent) {\n /** @type {Array} */\n const children = []\n\n if (!is(node, index, parent)) return null\n\n // @ts-expect-error: Looks like a parent.\n if (node.children) {\n let childIndex = -1\n\n // @ts-expect-error Looks like a parent.\n while (++childIndex < node.children.length) {\n // @ts-expect-error Looks like a parent.\n const result = preorder(node.children[childIndex], childIndex, node)\n\n if (result) {\n children.push(result)\n }\n }\n\n // @ts-expect-error Looks like a parent.\n if (cascade && node.children.length > 0 && children.length === 0)\n return null\n }\n\n // Create a shallow clone, using the new children.\n /** @type {typeof node} */\n // @ts-expect-error all the fields will be copied over.\n const next = {}\n /** @type {string} */\n let key\n\n for (key in node) {\n if (own.call(node, key)) {\n // @ts-expect-error: Looks like a record.\n next[key] = key === 'children' ? children : node[key]\n }\n }\n\n return next\n }\n }\n )\n","/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Root} Root\n * @typedef Options options\n * Configuration.\n * @property {boolean} [showLineNumbers]\n * Set `showLineNumbers` to `true` to always display line number\n * @property {boolean} [ignoreMissing]\n * Set `ignoreMissing` to `true` to ignore unsupported languages and line highlighting when no language is specified\n * @property {string} [defaultLanguage]\n * Uses the specified language as the default if none is specified. Takes precedence over `ignoreMissing`.\n * Note: The language must be registered with refractor.\n */\n\nimport { visit } from 'unist-util-visit'\nimport { toString } from 'hast-util-to-string'\nimport { filter } from 'unist-util-filter'\nimport rangeParser from 'parse-numeric-range'\n\nconst getLanguage = (node) => {\n const className = node.properties.className\n //@ts-ignore\n for (const classListItem of className) {\n if (classListItem.slice(0, 9) === 'language-') {\n return classListItem.slice(9).toLowerCase()\n }\n }\n return null\n}\n\n/**\n * @param {import('refractor/lib/core').Refractor} refractor\n * @param {string} defaultLanguage\n * @return {void}\n */\nconst checkIfLanguageIsRegistered = (refractor, defaultLanguage) => {\n if (defaultLanguage && !refractor.registered(defaultLanguage)) {\n throw new Error(`The default language \"${defaultLanguage}\" is not registered with refractor.`)\n }\n}\n\n/**\n * Create a closure that determines if we have to highlight the given index\n *\n * @param {string} meta\n * @return { (index:number) => boolean }\n */\nconst calculateLinesToHighlight = (meta) => {\n const RE = /{([\\d,-]+)}/\n // Remove space between {} e.g. {1, 3}\n const parsedMeta = meta\n .split(',')\n .map((str) => str.trim())\n .join()\n if (RE.test(parsedMeta)) {\n const strlineNumbers = RE.exec(parsedMeta)[1]\n const lineNumbers = rangeParser(strlineNumbers)\n return (index) => lineNumbers.includes(index + 1)\n } else {\n return () => false\n }\n}\n\n/**\n * Check if we want to start the line numbering from a given number or 1\n * showLineNumbers=5, will start the numbering from 5\n * @param {string} meta\n * @returns {number}\n */\nconst calculateStartingLine = (meta) => {\n const RE = /showLineNumbers=(?\\d+)/i\n // pick the line number after = using a named capturing group\n if (RE.test(meta)) {\n const {\n groups: { lines },\n } = RE.exec(meta)\n return Number(lines)\n }\n return 1\n}\n\n/**\n * Create container AST for node lines\n *\n * @param {number} number\n * @return {Element[]}\n */\nconst createLineNodes = (number) => {\n const a = new Array(number)\n for (let i = 0; i < number; i++) {\n a[i] = {\n type: 'element',\n tagName: 'span',\n properties: { className: [] },\n children: [],\n }\n }\n return a\n}\n\n/**\n * Split multiline text nodes into individual nodes with positioning\n * Add a node start and end line position information for each text node\n *\n * @return { (ast:Element['children']) => Element['children'] }\n *\n */\nconst addNodePositionClosure = () => {\n let startLineNum = 1\n /**\n * @param {Element['children']} ast\n * @return {Element['children']}\n */\n const addNodePosition = (ast) => {\n return ast.reduce((result, node) => {\n if (node.type === 'text') {\n const value = /** @type {string} */ (node.value)\n const numLines = (value.match(/\\n/g) || '').length\n if (numLines === 0) {\n node.position = {\n // column: 1 is needed to avoid error with @next/mdx\n // https://github.com/timlrx/rehype-prism-plus/issues/44\n start: { line: startLineNum, column: 1 },\n end: { line: startLineNum, column: 1 },\n }\n result.push(node)\n } else {\n const lines = value.split('\\n')\n for (const [i, line] of lines.entries()) {\n result.push({\n type: 'text',\n value: i === lines.length - 1 ? line : line + '\\n',\n position: {\n start: { line: startLineNum + i, column: 1 },\n end: { line: startLineNum + i, column: 1 },\n },\n })\n }\n }\n startLineNum = startLineNum + numLines\n\n return result\n }\n\n if (Object.prototype.hasOwnProperty.call(node, 'children')) {\n const initialLineNum = startLineNum\n // @ts-ignore\n node.children = addNodePosition(node.children, startLineNum)\n result.push(node)\n node.position = {\n start: { line: initialLineNum, column: 1 },\n end: { line: startLineNum, column: 1 },\n }\n return result\n }\n\n result.push(node)\n return result\n }, [])\n }\n return addNodePosition\n}\n\n/**\n * Rehype prism plugin generator that highlights code blocks with refractor (prismjs)\n *\n * Pass in your own refractor object with the required languages registered:\n * https://github.com/wooorm/refractor#refractorregistersyntax\n *\n * @param {import('refractor/lib/core').Refractor} refractor\n * @return {import('unified').Plugin<[Options?], Root>}\n */\nconst rehypePrismGenerator = (refractor) => {\n return (options = {}) => {\n checkIfLanguageIsRegistered(refractor, options.defaultLanguage)\n return (tree) => {\n visit(tree, 'element', visitor)\n }\n\n /**\n * @param {Element} node\n * @param {number} index\n * @param {Element} parent\n */\n function visitor(node, index, parent) {\n if (!parent || parent.tagName !== 'pre' || node.tagName !== 'code') {\n return\n }\n\n let meta = /** @type {string} */ (node?.data?.meta || node?.properties?.metastring || '')\n // Coerce className to array\n if (node.properties.className) {\n if (typeof node.properties.className === 'boolean') {\n node.properties.className = []\n } else if (!Array.isArray(node.properties.className)) {\n node.properties.className = [node.properties.className]\n }\n } else {\n node.properties.className = []\n }\n\n let lang = getLanguage(node)\n // If no language is set on the code block, use defaultLanguage if specified\n if (!lang && options.defaultLanguage) {\n lang = options.defaultLanguage\n node.properties.className.push(`language-${lang}`)\n }\n node.properties.className.push('code-highlight')\n\n /** @type {Element} */\n let refractorRoot\n\n // Syntax highlight\n if (lang) {\n try {\n let rootLang\n if (lang?.includes('diff-')) {\n rootLang = lang.split('-')[1]\n } else {\n rootLang = lang\n }\n // @ts-ignore\n refractorRoot = refractor.highlight(toString(node), rootLang)\n // @ts-ignore className is already an array\n parent.properties.className = (parent.properties.className || []).concat(\n 'language-' + rootLang\n )\n } catch (err) {\n if (options.ignoreMissing && /Unknown language/.test(err.message)) {\n refractorRoot = node\n } else {\n throw err\n }\n }\n } else {\n refractorRoot = node\n }\n\n refractorRoot.children = addNodePositionClosure()(refractorRoot.children)\n\n // Add position info to root\n if (refractorRoot.children.length > 0) {\n refractorRoot.position = {\n start: { line: refractorRoot.children[0].position.start.line, column: 0 },\n end: {\n line: refractorRoot.children[refractorRoot.children.length - 1].position.end.line,\n column: 0,\n },\n }\n } else {\n refractorRoot.position = {\n start: { line: 0, column: 0 },\n end: { line: 0, column: 0 },\n }\n }\n\n const shouldHighlightLine = calculateLinesToHighlight(meta)\n const startingLineNumber = calculateStartingLine(meta)\n const codeLineArray = createLineNodes(refractorRoot.position.end.line)\n\n const falseShowLineNumbersStr = [\n 'showlinenumbers=false',\n 'showlinenumbers=\"false\"',\n 'showlinenumbers={false}',\n ]\n for (const [i, line] of codeLineArray.entries()) {\n // Default class name for each line\n line.properties.className = ['code-line']\n\n // Syntax highlight\n const treeExtract = filter(\n refractorRoot,\n (node) => node.position.start.line <= i + 1 && node.position.end.line >= i + 1\n )\n line.children = treeExtract.children\n\n // Line number\n if (\n (meta.toLowerCase().includes('showLineNumbers'.toLowerCase()) ||\n options.showLineNumbers) &&\n !falseShowLineNumbersStr.some((str) => meta.toLowerCase().includes(str))\n ) {\n line.properties.line = [(i + startingLineNumber).toString()]\n line.properties.className.push('line-number')\n }\n\n // Line highlight\n if (shouldHighlightLine(i)) {\n line.properties.className.push('highlight-line')\n }\n\n // Diff classes\n if (\n (lang === 'diff' || lang?.includes('diff-')) &&\n toString(line).substring(0, 1) === '-'\n ) {\n line.properties.className.push('deleted')\n } else if (\n (lang === 'diff' || lang?.includes('diff-')) &&\n toString(line).substring(0, 1) === '+'\n ) {\n line.properties.className.push('inserted')\n }\n }\n\n // Remove possible trailing line when splitting by \\n which results in empty array\n if (\n codeLineArray.length > 0 &&\n toString(codeLineArray[codeLineArray.length - 1]).trim() === ''\n ) {\n codeLineArray.pop()\n }\n\n node.children = codeLineArray\n }\n }\n}\n\nexport default rehypePrismGenerator\n","import { refractor as refractorAll } from 'refractor/lib/all.js'\nimport rehypePrismGenerator from './generator.js'\n\n/**\n * Rehype prism plugin that highlights code blocks with refractor (prismjs)\n * This supports all the languages and should be used on the server side.\n *\n * Consider using rehypePrismCommon or rehypePrismGenerator to generate a plugin\n * that supports your required languages.\n */\nconst rehypePrismAll = rehypePrismGenerator(refractorAll)\n\nexport default rehypePrismAll\n","import { refractor as refractorCommon } from 'refractor/lib/common.js'\nimport rehypePrismGenerator from './generator.js'\n\n/**\n * Rehype prism plugin that highlights code blocks with refractor (prismjs)\n * Supported languages: https://github.com/wooorm/refractor#data\n *\n * Consider using rehypePrismGenerator to generate a plugin\n * that supports your required languages.\n */\nconst rehypePrismCommon = rehypePrismGenerator(refractorCommon)\n\nexport default rehypePrismCommon\n","const rtlRange = '\\u0591-\\u07FF\\uFB1D-\\uFDFD\\uFE70-\\uFEFC'\nconst ltrRange =\n 'A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6' +\n '\\u00F8-\\u02B8\\u0300-\\u0590\\u0800-\\u1FFF\\u200E\\u2C00-\\uFB1C' +\n '\\uFE00-\\uFE6F\\uFEFD-\\uFFFF'\n\n/* eslint-disable no-misleading-character-class */\nconst rtl = new RegExp('^[^' + ltrRange + ']*[' + rtlRange + ']')\nconst ltr = new RegExp('^[^' + rtlRange + ']*[' + ltrRange + ']')\n/* eslint-enable no-misleading-character-class */\n\n/**\n * Detect the direction of text: left-to-right, right-to-left, or neutral\n *\n * @param {string} value\n * @returns {'rtl'|'ltr'|'neutral'}\n */\nexport function direction(value) {\n const source = String(value || '')\n return rtl.test(source) ? 'rtl' : ltr.test(source) ? 'ltr' : 'neutral'\n}\n","/**\n * @typedef {import('./types.js').SelectState} SelectState\n * @typedef {import('./types.js').Node} Node\n * @typedef {import('./types.js').ElementChild} ElementChild\n * @typedef {import('./types.js').Direction} Direction\n * @typedef {import('unist-util-visit/complex-types.js').Visitor} Visitor\n */\n\nimport {direction} from 'direction'\nimport {toString} from 'hast-util-to-string'\nimport {svg} from 'property-information'\nimport {visit, EXIT, SKIP} from 'unist-util-visit'\n\n/**\n * Enter a node.\n *\n * The caller is responsible for calling the return value `exit`.\n *\n * @param {SelectState} state\n * Current state.\n *\n * Will be mutated: `exit` undos the changes.\n * @param {Node} node\n * Node to enter.\n * @returns {() => void}\n * Call to exit.\n */\n// eslint-disable-next-line complexity\nexport function enterState(state, node) {\n const schema = state.schema\n const language = state.language\n const currentDirection = state.direction\n const editableOrEditingHost = state.editableOrEditingHost\n /** @type {Direction | undefined} */\n let dirInferred\n\n if (node.type === 'element' && node.properties) {\n const lang = node.properties.xmlLang || node.properties.lang\n const type = node.properties.type || 'text'\n const dir = dirProperty(node)\n\n if (lang !== undefined && lang !== null) {\n state.language = String(lang)\n }\n\n if (schema && schema.space === 'html') {\n if (node.properties.contentEditable === 'true') {\n state.editableOrEditingHost = true\n }\n\n if (node.tagName === 'svg') {\n state.schema = svg\n }\n\n // See: .\n // Explicit `[dir=rtl]`.\n if (dir === 'rtl') {\n dirInferred = dir\n } else if (\n // Explicit `[dir=ltr]`.\n dir === 'ltr' ||\n // HTML with an invalid or no `[dir]`.\n (dir !== 'auto' && node.tagName === 'html') ||\n // `input[type=tel]` with an invalid or no `[dir]`.\n (dir !== 'auto' && node.tagName === 'input' && type === 'tel')\n ) {\n dirInferred = 'ltr'\n // `[dir=auto]` or `bdi` with an invalid or no `[dir]`.\n } else if (dir === 'auto' || node.tagName === 'bdi') {\n if (node.tagName === 'textarea') {\n // Check contents of `