ns-chatbot-widget 1.0.0-beta.12 → 1.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,29 +1,29 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),le=require("react");class sn extends Error{constructor(t,n){super(n),this.status=t}}function qn(e,t,n){return{Authorization:`Bearer ${e}`,"Content-Type":"application/json",...t?{"X-Merchant-Id":String(t)}:{},...n?{"X-Timezone":n}:{}}}async function vi(e,t,n,r){const i=await fetch(`${e}/chat/init`,{headers:qn(t,n,r)});if(!i.ok)throw new sn(i.status,await i.text());return i.json()}async function Pi(e,t,n,r,i){const o=await fetch(`${e}/chat`,{method:"POST",headers:qn(t,r,i),body:JSON.stringify({message:n})});if(!o.ok)throw new sn(o.status,await o.text());return o.json()}async function Li(e,t,n,r){const i=await fetch(`${e}/chat`,{method:"DELETE",headers:qn(t,n,r)});if(!i.ok)throw new sn(i.status,await i.text());return i.json()}const dn=()=>Math.random().toString(36).slice(2);function fr(e,t,n,r){const[i,o]=le.useState([]),[l,a]=le.useState([]),[u,s]=le.useState(!1),[f,c]=le.useState(null);return{messages:i,suggestedReplies:l,loading:u,error:f,init:async()=>{if(!(u||i.length>0)){s(!0);try{const y=await vi(t,e,n,r),C=y.existingSession?y.messages??[]:y.reply?[{role:"assistant",content:y.reply}]:[];o(C.map(k=>({...k,id:dn(),timestamp:new Date}))),a(y.suggestedReplies)}catch(y){c(y instanceof sn&&y.status===401?"The login session is invalid.":"Unable to connect to the chatbot.")}finally{s(!1)}}},send:async y=>{if(!y.trim()||u)return;const C={id:dn(),role:"user",content:y.trim(),timestamp:new Date};o(k=>[...k,C]),a([]),c(null),s(!0);try{const k=await Pi(t,e,y.trim(),n,r);o(A=>[...A,{id:dn(),role:"assistant",content:k.reply,timestamp:new Date,usage:k.usage}]),a(k.suggestedReplies)}catch{c("Unable to send the message. Please try again.")}finally{s(!1)}},clear:async()=>{if(!u){s(!0);try{await Li(t,e,n,r),o([]),a([]),c(null)}catch{c("Unable to clear the session. Please try again.")}finally{s(!1)}}}}}function Di(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ri={};function dt(e,t){return(Ri.jsx?Fi:zi).test(e)}const _i=/[ \t\n\f\r]/g;function Oi(e){return typeof e=="object"?e.type==="text"?yt(e.value):!1:yt(e)}function yt(e){return e.replace(_i,"")===""}class Xe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Xe.prototype.normal={};Xe.prototype.property={};Xe.prototype.space=void 0;function hr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Xe(n,r,t)}function Fn(e){return e.toLowerCase()}class ne{constructor(t,n){this.attribute=n,this.property=t}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let Mi=0;const D=ve(),X=ve(),Rn=ve(),S=ve(),V=ve(),Ae=ve(),re=ve();function ve(){return 2**++Mi}const _n=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:X,commaOrSpaceSeparated:re,commaSeparated:Ae,number:S,overloadedBoolean:Rn,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),yn=Object.keys(_n);class Wn extends ne{constructor(t,n,r,i){let o=-1;if(super(t,n),kt(this,"space",i),typeof r=="number")for(;++o<yn.length;){const l=yn[o];kt(this,yn[o],(r&_n[l])===_n[l])}}}Wn.prototype.defined=!0;function kt(e,t,n){n&&(e[t]=n)}function _e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Wn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Fn(r)]=r,n[Fn(o.attribute)]=r}return new Xe(t,n,e.space)}const pr=_e({properties:{ariaActiveDescendant:null,ariaAtomic:X,ariaAutoComplete:null,ariaBusy:X,ariaChecked:X,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:X,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:X,ariaFlowTo:V,ariaGrabbed:X,ariaHasPopup:null,ariaHidden:X,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:S,ariaLive:null,ariaModal:X,ariaMultiLine:X,ariaMultiSelectable:X,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:X,ariaReadOnly:X,ariaRelevant:null,ariaRequired:X,ariaRoleDescription:V,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:X,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function mr(e,t){return t in e?e[t]:t}function gr(e,t){return mr(e,t.toLowerCase())}const Ni=_e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ae,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alpha:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:V,autoFocus:D,autoPlay:D,blocking:V,capture:null,charSet:null,checked:D,cite:null,className:V,closedBy:null,colorSpace:null,cols:S,colSpan:S,command:null,commandFor:null,content:null,contentEditable:X,controls:D,controlsList:V,coords:S|Ae,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:Rn,draggable:X,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:V,height:S,hidden:Rn,high:S,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:V,itemRef:V,itemScope:D,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:D,optimum:S,pattern:null,ping:V,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:V,required:D,reversed:D,rows:S,rowSpan:S,sandbox:V,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootCustomElementRegistry:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shadowRootSerializable:D,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:X,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:X,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:X,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:D,disablePictureInPicture:D,disableRemotePlayback:D,exportParts:Ae,part:V,prefix:null,property:null,results:S,security:null,unselectable:null},space:"html",transform:gr}),ji=_e({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:V,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ae,g2:Ae,glyphName:Ae,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:mr}),dr=_e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),yr=_e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gr}),kr=_e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bi={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"},Hi=/[A-Z]/g,xt=/-[a-z]/g,Ui=/^data[-\w.:]+$/i;function Vi(e,t){const n=Fn(t);let r=t,i=ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ui.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(xt,qi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!xt.test(o)){let l=o.replace(Hi,$i);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Wn}return new i(r,t)}function $i(e){return"-"+e.toLowerCase()}function qi(e){return e.charAt(1).toUpperCase()}const Wi=hr([pr,Ni,dr,yr,kr],"html"),Xn=hr([pr,ji,dr,yr,kr],"svg");function Xi(e){return e.join(" ").trim()}var rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yn={},bt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Yi=/\n/g,Qi=/^\s*/,Gi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ki=/^:\s*/,Ji=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Zi=/^[;\s]*/,el=/^\s+|\s+$/g,nl=`
2
- `,wt="/",St="*",Ie="",tl="comment",rl="declaration";function il(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(d){var y=d.match(Yi);y&&(n+=y.length);var C=d.lastIndexOf(nl);r=~C?d.length-C:r+d.length}function o(){var d={line:n,column:r};return function(y){return y.position=new l(d),s(),y}}function l(d){this.start=d,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(d){var y=new Error(t.source+":"+n+":"+r+": "+d);if(y.reason=d,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function u(d){var y=d.exec(e);if(y){var C=y[0];return i(C),e=e.slice(C.length),y}}function s(){u(Qi)}function f(d){var y;for(d=d||[];y=c();)y!==!1&&d.push(y);return d}function c(){var d=o();if(!(wt!=e.charAt(0)||St!=e.charAt(1))){for(var y=2;Ie!=e.charAt(y)&&(St!=e.charAt(y)||wt!=e.charAt(y+1));)++y;if(y+=2,Ie===e.charAt(y-1))return a("End of comment missing");var C=e.slice(2,y-2);return r+=2,i(C),e=e.slice(y),r+=2,d({type:tl,comment:C})}}function p(){var d=o(),y=u(Gi);if(y){if(c(),!u(Ki))return a("property missing ':'");var C=u(Ji),k=d({type:rl,property:Ct(y[0].replace(bt,Ie)),value:C?Ct(C[0].replace(bt,Ie)):Ie});return u(Zi),k}}function h(){var d=[];f(d);for(var y;y=p();)y!==!1&&(d.push(y),f(d));return d}return s(),h()}function Ct(e){return e?e.replace(el,Ie):Ie}var ll=il,ol=rn&&rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.default=ul;const al=ol(ll);function ul(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,al.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?t(l,a,o):a&&(n=n||{},n[l]=a)}),n}var cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.camelCase=void 0;var sl=/^--[a-zA-Z0-9_-]+$/,cl=/-([a-z])/g,fl=/^[^-]+$/,hl=/^-(webkit|moz|ms|o|khtml)-/,pl=/^-(ms)-/,ml=function(e){return!e||fl.test(e)||sl.test(e)},gl=function(e,t){return t.toUpperCase()},Et=function(e,t){return"".concat(t,"-")},dl=function(e,t){return t===void 0&&(t={}),ml(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(pl,Et):e=e.replace(hl,Et),e.replace(cl,gl))};cn.camelCase=dl;var yl=rn&&rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kl=yl(Yn),xl=cn;function On(e,t){var n={};return!e||typeof e!="string"||(0,kl.default)(e,function(r,i){r&&i&&(n[(0,xl.camelCase)(r,t)]=i)}),n}On.default=On;var bl=On;const wl=xr(bl),br=wr("end"),Qn=wr("start");function wr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Sl(e){const t=Qn(e),n=br(e);if(t&&n)return{start:t,end:n}}function Ue(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?It(e.position):"start"in e||"end"in e?It(e):"line"in e||"column"in e?Mn(e):""}function Mn(e){return At(e&&e.line)+":"+At(e&&e.column)}function It(e){return Mn(e&&e.start)+"-"+Mn(e&&e.end)}function At(e){return e&&typeof e=="number"?e:1}class J extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ue(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const Gn={}.hasOwnProperty,Cl=new Map,El=/[A-Z]/g,Il=new Set(["table","tbody","thead","tfoot","tr"]),Al=new Set(["td","th"]),Sr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=_l(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Rl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Xn:Wi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Cr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Cr(e,t,n){if(t.type==="element")return vl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Pl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Dl(e,t,n);if(t.type==="mdxjsEsm")return Ll(e,t);if(t.type==="root")return zl(e,t,n);if(t.type==="text")return Fl(e,t)}function vl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Xn,e.schema=i),e.ancestors.push(t);const o=Ir(e,t.tagName,!1),l=Ol(e,t);let a=Jn(e,t);return Il.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Oi(u):!0})),Er(e,l,o,t),Kn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Pl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}qe(e,t.position)}function Ll(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qe(e,t.position)}function Dl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Xn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ir(e,t.name,!0),l=Ml(e,t),a=Jn(e,t);return Er(e,l,o,t),Kn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function zl(e,t,n){const r={};return Kn(r,Jn(e,t)),e.create(t,e.Fragment,r,n)}function Fl(e,t){return t.value}function Er(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Rl(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function _l(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=Qn(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Ol(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Gn.call(t.properties,i)){const o=Nl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Al.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ml(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else qe(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else qe(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Jn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Cl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=i.get(u)||0;l=u+"-"+s,i.set(u,s+1)}}const a=Cr(e,o,l);a!==void 0&&n.push(a)}return n}function Nl(e,t,n){const r=Vi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Di(n):Xi(n)),r.property==="style"){let i=typeof n=="object"?n:jl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Bl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Bi[r.property]||r.property:r.attribute,n]}}function jl(e,t){try{return wl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new J("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Sr+"#cannot-parse-style-attribute",i}}function Ir(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=dt(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=dt(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Gn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);qe(e)}function qe(e,t){const n=new J("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Sr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Bl(e){const t={};let n;for(n in e)Gn.call(e,n)&&(t[Hl(n)]=e[n]);return t}function Hl(e){let t=e.replace(El,Ul);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ul(e){return"-"+e.toLowerCase()}const kn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Vl={};function Zn(e,t){const n=Vl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ar(e,r,i)}function Ar(e,t,n){if($l(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Tt(e.children,t,n)}return Array.isArray(e)?Tt(e,t,n):""}function Tt(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ar(e[i],t,n);return r.join("")}function $l(e){return!!(e&&typeof e=="object")}const vt=document.createElement("i");function et(e){const t="&"+e+";";vt.innerHTML=t;const n=vt.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function oe(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const Pt={}.hasOwnProperty;function Tr(e){const t={};let n=-1;for(;++n<e.length;)ql(t,e[n]);return t}function ql(e,t){let n;for(n in t){const i=(Pt.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Pt.call(i,l)||(i[l]=[]);const a=o[l];Wl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Wl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ie(e,0,0,r)}function vr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=we(/[A-Za-z]/),K=we(/[\dA-Za-z]/),Xl=we(/[#-'*+\--9=?A-Z^-~]/);function ln(e){return e!==null&&(e<32||e===127)}const Nn=we(/\d/),Yl=we(/[\dA-Fa-f]/),Ql=we(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function $(e){return e!==null&&(e<0||e===32)}function _(e){return e===-2||e===-1||e===32}const fn=we(new RegExp("\\p{P}|\\p{S}","u")),Te=we(/\s/);function we(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Oe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function M(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return _(u)?(e.enter(n),a(u)):t(u)}function a(u){return _(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const Gl={tokenize:Kl};function Kl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),M(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return L(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Jl={tokenize:Zl},Lt={tokenize:eo};function Zl(e){const t=this,n=[];let r=0,i,o,l;return a;function a(E){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,s)(E)}return s(E)}function u(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const F=t.events.length;let R=F,w;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){w=t.events[R][1].end;break}k(r);let N=F;for(;N<t.events.length;)t.events[N][1].end={...w},N++;return ie(t.events,R+1,0,t.events.slice(F)),t.events.length=N,s(E)}return a(E)}function s(E){if(r===n.length){if(!i)return p(E);if(i.currentConstruct&&i.currentConstruct.concrete)return d(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lt,f,c)(E)}function f(E){return i&&A(),k(r),p(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,d(E)}function p(E){return t.containerState={},e.attempt(Lt,h,d)(E)}function h(E){return r++,n.push([t.currentConstruct,t.containerState]),p(E)}function d(E){if(E===null){i&&A(),k(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(E)}function y(E){if(E===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(E);return}return L(E)?(e.consume(E),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(E),y)}function C(E,F){const R=t.sliceStream(E);if(F&&R.push(null),E.previous=o,o&&(o.next=E),o=E,i.defineSkip(E.start),i.write(R),t.parser.lazy[E.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const N=t.events.length;let q=N,B,x;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(B){x=t.events[q][1].end;break}B=!0}for(k(r),w=N;w<t.events.length;)t.events[w][1].end={...x},w++;ie(t.events,q+1,0,t.events.slice(N)),t.events.length=w}}function k(E){let F=n.length;for(;F-- >E;){const R=n[F];t.containerState=R[1],R[0].exit.call(t,e)}n.length=E}function A(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function eo(e,t,n){return M(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Re(e){if(e===null||$(e)||Te(e))return 1;if(fn(e))return 2}function hn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const jn={name:"attention",resolveAll:no,tokenize:to};function no(e,t){let n=-1,r,i,o,l,a,u,s,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};Dt(c,-u),Dt(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=oe(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=oe(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=oe(s,hn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=oe(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=oe(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function to(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Re(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=Re(u),c=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),t(u)}}function Dt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ro={name:"autolink",tokenize:io};function io(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Z(h)?(e.consume(h),l):h===64?n(h):s(h)}function l(h){return h===43||h===45||h===46||K(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||K(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ln(h)?n(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):Xl(h)?(e.consume(h),s):n(h)}function f(h){return K(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||K(h))&&r++<63){const d=h===45?p:c;return e.consume(h),d}return n(h)}}const Ye={partial:!0,tokenize:lo};function lo(e,t,n){return r;function r(o){return _(o)?M(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||L(o)?t(o):n(o)}}const Pr={continuation:{tokenize:ao},exit:uo,name:"blockQuote",tokenize:oo};function oo(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return _(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ao(e,t,n){const r=this;return i;function i(l){return _(l)?M(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Pr,t,n)(l)}}function uo(e){e.exit("blockQuote")}const Lr={name:"characterEscape",tokenize:so};function so(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ql(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Dr={name:"characterReference",tokenize:co};function co(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=K,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Yl,f):(e.enter("characterReferenceValue"),o=7,l=Nn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===K&&!et(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const zt={partial:!0,tokenize:ho},Ft={concrete:!0,name:"codeFenced",tokenize:fo};function fo(e,t,n){const r=this,i={partial:!0,tokenize:R};let o=0,l=0,a;return u;function u(w){return s(w)}function s(w){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(l++,e.consume(w),f):l<3?n(w):(e.exit("codeFencedFenceSequence"),_(w)?M(e,c,"whitespace")(w):c(w))}function c(w){return w===null||L(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(zt,y,F)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||L(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):_(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),M(e,h,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),p)}function h(w){return w===null||L(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(w))}function d(w){return w===null||L(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),d)}function y(w){return e.attempt(i,F,C)(w)}function C(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),k}function k(w){return o>0&&_(w)?M(e,A,"linePrefix",o+1)(w):A(w)}function A(w){return w===null||L(w)?e.check(zt,y,F)(w):(e.enter("codeFlowValue"),E(w))}function E(w){return w===null||L(w)?(e.exit("codeFlowValue"),A(w)):(e.consume(w),E)}function F(w){return e.exit("codeFenced"),t(w)}function R(w,N,q){let B=0;return x;function x(j){return w.enter("lineEnding"),w.consume(j),w.exit("lineEnding"),T}function T(j){return w.enter("codeFencedFence"),_(j)?M(w,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):v(j)}function v(j){return j===a?(w.enter("codeFencedFenceSequence"),H(j)):q(j)}function H(j){return j===a?(B++,w.consume(j),H):B>=l?(w.exit("codeFencedFenceSequence"),_(j)?M(w,W,"whitespace")(j):W(j)):q(j)}function W(j){return j===null||L(j)?(w.exit("codeFencedFence"),N(j)):q(j)}}}function ho(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const xn={name:"codeIndented",tokenize:mo},po={partial:!0,tokenize:go};function mo(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),M(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):L(s)?e.attempt(po,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||L(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function go(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):L(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):M(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):L(l)?i(l):n(l)}}const yo={name:"codeText",previous:xo,resolve:ko,tokenize:bo};function ko(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function xo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bo(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):L(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||L(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",s(c))}}class wo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Be(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Be(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Be(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Be(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Be(this.left,n.reverse())}}}function Be(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function zr(e){const t={};let n=-1,r,i,o,l,a,u,s;const f=new wo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,So(f,n)),n=t[n],s=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function So(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=n,d=0,y=0;const C=[y];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,C.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):C.pop(),p=C.length;p--;){const k=a.slice(C[p],C[p+1]),A=o.pop();u.push([A,A+k.length-1]),e.splice(A,2,k)}for(u.reverse(),p=-1;++p<u.length;)s[d+u[p][0]]=d+u[p][1],d+=u[p][1]-u[p][0]-1;return s}const Co={resolve:Io,tokenize:Ao},Eo={partial:!0,tokenize:To};function Io(e){return zr(e),e}function Ao(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):L(a)?e.check(Eo,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function To(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),M(e,o,"linePrefix")}function o(l){if(l===null||L(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Fr(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),p):k===null||k===32||k===41||ln(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(k))}function p(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===62?(e.exit("chunkString"),e.exit(a),p(k)):k===null||k===60||L(k)?n(k):(e.consume(k),k===92?d:h)}function d(k){return k===60||k===62||k===92?(e.consume(k),h):h(k)}function y(k){return!f&&(k===null||k===41||$(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):f<s&&k===40?(e.consume(k),f++,y):k===41?(e.consume(k),f--,y):k===null||k===32||k===40||ln(k)?n(k):(e.consume(k),k===92?C:y)}function C(k){return k===40||k===41||k===92?(e.consume(k),y):y(k)}}function Rr(e,t,n,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):L(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||L(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!_(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function _r(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):L(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),M(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||L(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Ve(e,t){let n;return r;function r(i){return L(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_(i)?M(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const vo={name:"definition",tokenize:Lo},Po={partial:!0,tokenize:Do};function Lo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Rr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return $(h)?Ve(e,s)(h):s(h)}function s(h){return Fr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Po,c,c)(h)}function c(h){return _(h)?M(e,p,"whitespace")(h):p(h)}function p(h){return h===null||L(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Do(e,t,n){return r;function r(a){return $(a)?Ve(e,i)(a):n(a)}function i(a){return _r(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return _(a)?M(e,l,"whitespace")(a):l(a)}function l(a){return a===null||L(a)?t(a):n(a)}}const zo={name:"hardBreakEscape",tokenize:Fo};function Fo(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return L(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ro={name:"headingAtx",resolve:_o,tokenize:Oo};function _o(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Oo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||$(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||L(f)?(e.exit("atxHeading"),t(f)):_(f)?M(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||$(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const Mo=["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"],Rt=["pre","script","style","textarea"],No={concrete:!0,name:"htmlFlow",resolveTo:Ho,tokenize:Uo},jo={partial:!0,tokenize:$o},Bo={partial:!0,tokenize:Vo};function Ho(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Uo(e,t,n){const r=this;let i,o,l,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,y):g===63?(e.consume(g),i=3,r.interrupt?t:m):Z(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,d):Z(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const se="CDATA[";return g===se.charCodeAt(a++)?(e.consume(g),a===se.length?r.interrupt?t:v:d):n(g)}function y(g){return Z(g)?(e.consume(g),l=String.fromCharCode(g),C):n(g)}function C(g){if(g===null||g===47||g===62||$(g)){const se=g===47,Se=l.toLowerCase();return!se&&!o&&Rt.includes(Se)?(i=1,r.interrupt?t(g):v(g)):Mo.includes(l.toLowerCase())?(i=6,se?(e.consume(g),k):r.interrupt?t(g):v(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?A(g):E(g))}return g===45||K(g)?(e.consume(g),l+=String.fromCharCode(g),C):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:v):n(g)}function A(g){return _(g)?(e.consume(g),A):x(g)}function E(g){return g===47?(e.consume(g),x):g===58||g===95||Z(g)?(e.consume(g),F):_(g)?(e.consume(g),E):x(g)}function F(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),F):R(g)}function R(g){return g===61?(e.consume(g),w):_(g)?(e.consume(g),R):E(g)}function w(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,N):_(g)?(e.consume(g),w):q(g)}function N(g){return g===u?(e.consume(g),u=null,B):g===null||L(g)?n(g):(e.consume(g),N)}function q(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||$(g)?R(g):(e.consume(g),q)}function B(g){return g===47||g===62||_(g)?E(g):n(g)}function x(g){return g===62?(e.consume(g),T):n(g)}function T(g){return g===null||L(g)?v(g):_(g)?(e.consume(g),T):n(g)}function v(g){return g===45&&i===2?(e.consume(g),G):g===60&&i===1?(e.consume(g),Y):g===62&&i===4?(e.consume(g),ue):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),me):L(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(jo,ge,H)(g)):g===null||L(g)?(e.exit("htmlFlowData"),H(g)):(e.consume(g),v)}function H(g){return e.check(Bo,W,ge)(g)}function W(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),j}function j(g){return g===null||L(g)?H(g):(e.enter("htmlFlowData"),v(g))}function G(g){return g===45?(e.consume(g),m):v(g)}function Y(g){return g===47?(e.consume(g),l="",ae):v(g)}function ae(g){if(g===62){const se=l.toLowerCase();return Rt.includes(se)?(e.consume(g),ue):v(g)}return Z(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ae):v(g)}function me(g){return g===93?(e.consume(g),m):v(g)}function m(g){return g===62?(e.consume(g),ue):g===45&&i===2?(e.consume(g),m):v(g)}function ue(g){return g===null||L(g)?(e.exit("htmlFlowData"),ge(g)):(e.consume(g),ue)}function ge(g){return e.exit("htmlFlow"),t(g)}}function Vo(e,t,n){const r=this;return i;function i(l){return L(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function $o(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ye,t,n)}}const qo={name:"htmlText",tokenize:Wo};function Wo(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),R):m===63?(e.consume(m),E):Z(m)?(e.consume(m),q):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):Z(m)?(e.consume(m),A):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):L(m)?(l=c,Y(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?G(m):m===45?p(m):c(m)}function d(m){const ue="CDATA[";return m===ue.charCodeAt(o++)?(e.consume(m),o===ue.length?y:d):n(m)}function y(m){return m===null?n(m):m===93?(e.consume(m),C):L(m)?(l=y,Y(m)):(e.consume(m),y)}function C(m){return m===93?(e.consume(m),k):y(m)}function k(m){return m===62?G(m):m===93?(e.consume(m),k):y(m)}function A(m){return m===null||m===62?G(m):L(m)?(l=A,Y(m)):(e.consume(m),A)}function E(m){return m===null?n(m):m===63?(e.consume(m),F):L(m)?(l=E,Y(m)):(e.consume(m),E)}function F(m){return m===62?G(m):E(m)}function R(m){return Z(m)?(e.consume(m),w):n(m)}function w(m){return m===45||K(m)?(e.consume(m),w):N(m)}function N(m){return L(m)?(l=N,Y(m)):_(m)?(e.consume(m),N):G(m)}function q(m){return m===45||K(m)?(e.consume(m),q):m===47||m===62||$(m)?B(m):n(m)}function B(m){return m===47?(e.consume(m),G):m===58||m===95||Z(m)?(e.consume(m),x):L(m)?(l=B,Y(m)):_(m)?(e.consume(m),B):G(m)}function x(m){return m===45||m===46||m===58||m===95||K(m)?(e.consume(m),x):T(m)}function T(m){return m===61?(e.consume(m),v):L(m)?(l=T,Y(m)):_(m)?(e.consume(m),T):B(m)}function v(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,H):L(m)?(l=v,Y(m)):_(m)?(e.consume(m),v):(e.consume(m),W)}function H(m){return m===i?(e.consume(m),i=void 0,j):m===null?n(m):L(m)?(l=H,Y(m)):(e.consume(m),H)}function W(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||$(m)?B(m):(e.consume(m),W)}function j(m){return m===47||m===62||$(m)?B(m):n(m)}function G(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Y(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ae}function ae(m){return _(m)?M(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):me(m)}function me(m){return e.enter("htmlTextData"),l(m)}}const nt={name:"labelEnd",resolveAll:Go,resolveTo:Ko,tokenize:Jo},Xo={tokenize:Zo},Yo={tokenize:ea},Qo={tokenize:na};function Go(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ie(e,0,e.length,n),e}function Ko(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",s,t]],a=oe(a,e.slice(o+1,o+r+3)),a=oe(a,[["enter",f,t]]),a=oe(a,hn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=oe(a,[["exit",f,t],e[l-2],e[l-1],["exit",s,t]]),a=oe(a,e.slice(l+1)),a=oe(a,[["exit",u,t]]),ie(e,o,e.length,a),e}function Jo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(fe(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(Xo,f,l?f:c)(p):p===91?e.attempt(Yo,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(Qo,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function Zo(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return $(c)?Ve(e,o)(c):o(c)}function o(c){return c===41?f(c):Fr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return $(c)?Ve(e,u)(c):f(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?_r(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return $(c)?Ve(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function ea(e,t,n){const r=this;return i;function i(a){return Rr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function na(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ta={name:"labelStartImage",resolveAll:nt.resolveAll,tokenize:ra};function ra(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ia={name:"labelStartLink",resolveAll:nt.resolveAll,tokenize:la};function la(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const bn={name:"lineEnding",tokenize:oa};function oa(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),M(e,t,"linePrefix")}}const nn={name:"thematicBreak",tokenize:aa};function aa(e,t,n){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||L(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),_(s)?M(e,a,"whitespace")(s):a(s))}}const ee={continuation:{tokenize:fa},exit:pa,name:"list",tokenize:ca},ua={partial:!0,tokenize:ma},sa={partial:!0,tokenize:ha};function ca(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Nn(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(nn,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return Nn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ye,r.interrupt?n:f,e.attempt(ua,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return _(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function fa(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ye,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!_(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(sa,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ha(e,t,n){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function pa(e){e.exit(this.containerState.type)}function ma(e,t,n){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!_(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const _t={name:"setextUnderline",resolveTo:ga,tokenize:da};function ga(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function da(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),_(s)?M(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||L(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const ya={tokenize:ka};function ka(e){const t=this,n=e.attempt(Ye,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Co,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const xa={resolveAll:Mr()},ba=Or("string"),wa=Or("text");function Or(e){return{resolveAll:Mr(e==="text"?Sa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Mr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Sa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const s={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}const Ca={42:ee,43:ee,45:ee,48:ee,49:ee,50:ee,51:ee,52:ee,53:ee,54:ee,55:ee,56:ee,57:ee,62:Pr},Ea={91:vo},Ia={[-2]:xn,[-1]:xn,32:xn},Aa={35:Ro,42:nn,45:[_t,nn],60:No,61:_t,95:nn,96:Ft,126:Ft},Ta={38:Dr,92:Lr},va={[-5]:bn,[-4]:bn,[-3]:bn,33:ta,38:Dr,42:jn,60:[ro,qo],91:ia,92:[zo,Lr],93:nt,95:jn,96:yo},Pa={null:[jn,xa]},La={null:[42,95]},Da={null:[]},za=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:La,contentInitial:Ea,disable:Da,document:Ca,flow:Aa,flowInitial:Ia,insideSpan:Pa,string:Ta,text:va},Symbol.toStringTag,{value:"Module"}));function Fa(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:N(R),check:N(w),consume:A,enter:E,exit:F,interrupt:N(w,{interrupt:!0})},s={code:null,containerState:{},defineSkip:y,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function c(T){return l=oe(l,T),C(),l[l.length-1]!==null?[]:(q(t,0),s.events=hn(o,s.events,s),s.events)}function p(T,v){return _a(h(T),v)}function h(T){return Ra(l,T)}function d(){const{_bufferIndex:T,_index:v,line:H,column:W,offset:j}=r;return{_bufferIndex:T,_index:v,line:H,column:W,offset:j}}function y(T){i[T.line]=T.column,x()}function C(){let T;for(;r._index<l.length;){const v=l[r._index];if(typeof v=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<v.length;)k(v.charCodeAt(r._bufferIndex));else k(v)}}function k(T){f=f(T)}function A(T){L(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,x()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function E(T,v){const H=v||{};return H.type=T,H.start=d(),s.events.push(["enter",H,s]),a.push(H),H}function F(T){const v=a.pop();return v.end=d(),s.events.push(["exit",v,s]),v}function R(T,v){q(T,v.from)}function w(T,v){v.restore()}function N(T,v){return H;function H(W,j,G){let Y,ae,me,m;return Array.isArray(W)?ge(W):"tokenize"in W?ge([W]):ue(W);function ue(Q){return Me;function Me(xe){const Pe=xe!==null&&Q[xe],Le=xe!==null&&Q.null,Ge=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return ge(Ge)(xe)}}function ge(Q){return Y=Q,ae=0,Q.length===0?G:g(Q[ae])}function g(Q){return Me;function Me(xe){return m=B(),me=Q,Q.partial||(s.currentConstruct=Q),Q.name&&s.parser.constructs.disable.null.includes(Q.name)?Se():Q.tokenize.call(v?Object.assign(Object.create(s),v):s,u,se,Se)(xe)}}function se(Q){return T(me,m),j}function Se(Q){return m.restore(),++ae<Y.length?g(Y[ae]):G}}}function q(T,v){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&ie(s.events,v,s.events.length-v,T.resolve(s.events.slice(v),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function B(){const T=d(),v=s.previous,H=s.currentConstruct,W=s.events.length,j=Array.from(a);return{from:W,restore:G};function G(){r=T,s.previous=v,s.currentConstruct=H,s.events.length=W,a=j,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Ra(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function _a(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react/jsx-runtime"),ie=require("react");class sn extends Error{constructor(t,n){super(n),this.status=t}}function qn(e,t,n){return{Authorization:`Bearer ${e}`,"Content-Type":"application/json",...t?{"X-Merchant-Id":String(t)}:{},...n?{"X-Timezone":n}:{}}}async function Pi(e,t,n,r){const i=await fetch(`${e}/chat/init`,{headers:qn(t,n,r)});if(!i.ok)throw new sn(i.status,await i.text());return i.json()}async function Li(e,t,n,r,i){const o=await fetch(`${e}/chat`,{method:"POST",headers:qn(t,r,i),body:JSON.stringify({message:n})});if(!o.ok)throw new sn(o.status,await o.text());return o.json()}async function Di(e,t,n,r){const i=await fetch(`${e}/chat`,{method:"DELETE",headers:qn(t,n,r)});if(!i.ok)throw new sn(i.status,await i.text());return i.json()}const gn=()=>Math.random().toString(36).slice(2);function hr(e,t,n,r){const[i,o]=ie.useState([]),[l,a]=ie.useState([]),[u,s]=ie.useState(!1),[f,c]=ie.useState(null);return{messages:i,suggestedReplies:l,loading:u,error:f,init:async()=>{if(!(u||i.length>0)){s(!0);try{const y=await Pi(t,e,n,r),b=y.existingSession?y.messages??[]:y.reply?[{role:"assistant",content:y.reply}]:[];o(b.map(x=>({...x,id:gn(),timestamp:new Date}))),a(y.suggestedReplies)}catch(y){c(y instanceof sn&&y.status===401?"The login session is invalid.":"Unable to connect to the chatbot.")}finally{s(!1)}}},send:async y=>{if(!y.trim()||u)return;const b={id:gn(),role:"user",content:y.trim(),timestamp:new Date};o(x=>[...x,b]),a([]),c(null),s(!0);try{const x=await Li(t,e,y.trim(),n,r);o(v=>[...v,{id:gn(),role:"assistant",content:x.reply,timestamp:new Date,usage:x.usage}]),a(x.suggestedReplies)}catch{c("Unable to send the message. Please try again.")}finally{s(!1)}},clear:async()=>{if(!u){s(!0);try{await Di(t,e,n,r),o([]),a([]),c(null)}catch{c("Unable to clear the session. Please try again.")}finally{s(!1)}}}}}function zi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Fi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ri=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_i={};function gt(e,t){return(_i.jsx?Ri:Fi).test(e)}const Oi=/[ \t\n\f\r]/g;function Mi(e){return typeof e=="object"?e.type==="text"?yt(e.value):!1:yt(e)}function yt(e){return e.replace(Oi,"")===""}class Xe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Xe.prototype.normal={};Xe.prototype.property={};Xe.prototype.space=void 0;function pr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Xe(n,r,t)}function Fn(e){return e.toLowerCase()}class ne{constructor(t,n){this.attribute=n,this.property=t}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let ji=0;const D=Te(),X=Te(),Rn=Te(),C=Te(),$=Te(),Ae=Te(),re=Te();function Te(){return 2**++ji}const _n=Object.freeze(Object.defineProperty({__proto__:null,boolean:D,booleanish:X,commaOrSpaceSeparated:re,commaSeparated:Ae,number:C,overloadedBoolean:Rn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),yn=Object.keys(_n);class Wn extends ne{constructor(t,n,r,i){let o=-1;if(super(t,n),xt(this,"space",i),typeof r=="number")for(;++o<yn.length;){const l=yn[o];xt(this,yn[o],(r&_n[l])===_n[l])}}}Wn.prototype.defined=!0;function xt(e,t,n){n&&(e[t]=n)}function _e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Wn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Fn(r)]=r,n[Fn(o.attribute)]=r}return new Xe(t,n,e.space)}const mr=_e({properties:{ariaActiveDescendant:null,ariaAtomic:X,ariaAutoComplete:null,ariaBusy:X,ariaChecked:X,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:X,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:X,ariaFlowTo:$,ariaGrabbed:X,ariaHasPopup:null,ariaHidden:X,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:C,ariaLive:null,ariaModal:X,ariaMultiLine:X,ariaMultiSelectable:X,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:X,ariaReadOnly:X,ariaRelevant:null,ariaRequired:X,ariaRoleDescription:$,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:X,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function dr(e,t){return t in e?e[t]:t}function gr(e,t){return dr(e,t.toLowerCase())}const Ni=_e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ae,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:D,allowPaymentRequest:D,allowUserMedia:D,alpha:D,alt:null,as:null,async:D,autoCapitalize:null,autoComplete:$,autoFocus:D,autoPlay:D,blocking:$,capture:null,charSet:null,checked:D,cite:null,className:$,closedBy:null,colorSpace:null,cols:C,colSpan:C,command:null,commandFor:null,content:null,contentEditable:X,controls:D,controlsList:$,coords:C|Ae,crossOrigin:null,data:null,dateTime:null,decoding:null,default:D,defer:D,dir:null,dirName:null,disabled:D,download:Rn,draggable:X,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:D,formTarget:null,headers:$,height:C,hidden:Rn,high:C,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:D,inputMode:null,integrity:null,is:null,isMap:D,itemId:null,itemProp:$,itemRef:$,itemScope:D,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:D,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:D,muted:D,name:null,nonce:null,noModule:D,noValidate:D,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:D,optimum:C,pattern:null,ping:$,placeholder:null,playsInline:D,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:D,referrerPolicy:null,rel:$,required:D,reversed:D,rows:C,rowSpan:C,sandbox:$,scope:null,scoped:D,seamless:D,selected:D,shadowRootClonable:D,shadowRootCustomElementRegistry:D,shadowRootDelegatesFocus:D,shadowRootMode:null,shadowRootSerializable:D,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:X,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:D,useMap:null,value:X,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:D,declare:D,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:D,noHref:D,noShade:D,noWrap:D,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:X,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:D,disablePictureInPicture:D,disableRemotePlayback:D,exportParts:Ae,part:$,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:gr}),Bi=_e({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:$,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:D,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ae,g2:Ae,glyphName:Ae,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:dr}),yr=_e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xr=_e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gr}),kr=_e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hi={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"},Ui=/[A-Z]/g,kt=/-[a-z]/g,$i=/^data[-\w.:]+$/i;function Vi(e,t){const n=Fn(t);let r=t,i=ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$i.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(kt,Wi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!kt.test(o)){let l=o.replace(Ui,qi);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Wn}return new i(r,t)}function qi(e){return"-"+e.toLowerCase()}function Wi(e){return e.charAt(1).toUpperCase()}const Xi=pr([mr,Ni,yr,xr,kr],"html"),Xn=pr([mr,Bi,yr,xr,kr],"svg");function Yi(e){return e.join(" ").trim()}var rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yn={},bt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Qi=/\n/g,Gi=/^\s*/,Ki=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ji=/^:\s*/,Zi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,el=/^[;\s]*/,nl=/^\s+|\s+$/g,tl=`
2
+ `,wt="/",St="*",Ie="",rl="comment",il="declaration";function ll(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var y=g.match(Qi);y&&(n+=y.length);var b=g.lastIndexOf(tl);r=~b?g.length-b:r+g.length}function o(){var g={line:n,column:r};return function(y){return y.position=new l(g),s(),y}}function l(g){this.start=g,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(g){var y=new Error(t.source+":"+n+":"+r+": "+g);if(y.reason=g,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function u(g){var y=g.exec(e);if(y){var b=y[0];return i(b),e=e.slice(b.length),y}}function s(){u(Gi)}function f(g){var y;for(g=g||[];y=c();)y!==!1&&g.push(y);return g}function c(){var g=o();if(!(wt!=e.charAt(0)||St!=e.charAt(1))){for(var y=2;Ie!=e.charAt(y)&&(St!=e.charAt(y)||wt!=e.charAt(y+1));)++y;if(y+=2,Ie===e.charAt(y-1))return a("End of comment missing");var b=e.slice(2,y-2);return r+=2,i(b),e=e.slice(y),r+=2,g({type:rl,comment:b})}}function p(){var g=o(),y=u(Ki);if(y){if(c(),!u(Ji))return a("property missing ':'");var b=u(Zi),x=g({type:il,property:Ct(y[0].replace(bt,Ie)),value:b?Ct(b[0].replace(bt,Ie)):Ie});return u(el),x}}function h(){var g=[];f(g);for(var y;y=p();)y!==!1&&(g.push(y),f(g));return g}return s(),h()}function Ct(e){return e?e.replace(nl,Ie):Ie}var ol=ll,al=rn&&rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.default=sl;const ul=al(ol);function sl(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,ul.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?t(l,a,o):a&&(n=n||{},n[l]=a)}),n}var cn={};Object.defineProperty(cn,"__esModule",{value:!0});cn.camelCase=void 0;var cl=/^--[a-zA-Z0-9_-]+$/,fl=/-([a-z])/g,hl=/^[^-]+$/,pl=/^-(webkit|moz|ms|o|khtml)-/,ml=/^-(ms)-/,dl=function(e){return!e||hl.test(e)||cl.test(e)},gl=function(e,t){return t.toUpperCase()},Et=function(e,t){return"".concat(t,"-")},yl=function(e,t){return t===void 0&&(t={}),dl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(ml,Et):e=e.replace(pl,Et),e.replace(fl,gl))};cn.camelCase=yl;var xl=rn&&rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kl=xl(Yn),bl=cn;function On(e,t){var n={};return!e||typeof e!="string"||(0,kl.default)(e,function(r,i){r&&i&&(n[(0,bl.camelCase)(r,t)]=i)}),n}On.default=On;var wl=On;const Sl=br(wl),wr=Sr("end"),Qn=Sr("start");function Sr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Cl(e){const t=Qn(e),n=wr(e);if(t&&n)return{start:t,end:n}}function Ue(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?It(e.position):"start"in e||"end"in e?It(e):"line"in e||"column"in e?Mn(e):""}function Mn(e){return At(e&&e.line)+":"+At(e&&e.column)}function It(e){return Mn(e&&e.start)+"-"+Mn(e&&e.end)}function At(e){return e&&typeof e=="number"?e:1}class J extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ue(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const Gn={}.hasOwnProperty,El=new Map,Il=/[A-Z]/g,Al=new Set(["table","tbody","thead","tfoot","tr"]),vl=new Set(["td","th"]),Cr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ol(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=_l(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Xn:Xi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Er(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Er(e,t,n){if(t.type==="element")return Pl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ll(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return zl(e,t,n);if(t.type==="mdxjsEsm")return Dl(e,t);if(t.type==="root")return Fl(e,t,n);if(t.type==="text")return Rl(e,t)}function Pl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Xn,e.schema=i),e.ancestors.push(t);const o=Ar(e,t.tagName,!1),l=Ml(e,t);let a=Jn(e,t);return Al.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Mi(u):!0})),Ir(e,l,o,t),Kn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ll(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}qe(e,t.position)}function Dl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qe(e,t.position)}function zl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Xn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ar(e,t.name,!0),l=jl(e,t),a=Jn(e,t);return Ir(e,l,o,t),Kn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Fl(e,t,n){const r={};return Kn(r,Jn(e,t)),e.create(t,e.Fragment,r,n)}function Rl(e,t){return t.value}function Ir(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function _l(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function Ol(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=Qn(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Ml(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Gn.call(t.properties,i)){const o=Nl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&vl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function jl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else qe(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else qe(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Jn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:El;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=i.get(u)||0;l=u+"-"+s,i.set(u,s+1)}}const a=Er(e,o,l);a!==void 0&&n.push(a)}return n}function Nl(e,t,n){const r=Vi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zi(n):Yi(n)),r.property==="style"){let i=typeof n=="object"?n:Bl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Hl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Hi[r.property]||r.property:r.attribute,n]}}function Bl(e,t){try{return Sl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new J("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Cr+"#cannot-parse-style-attribute",i}}function Ar(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=gt(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=gt(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Gn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);qe(e)}function qe(e,t){const n=new J("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Cr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hl(e){const t={};let n;for(n in e)Gn.call(e,n)&&(t[Ul(n)]=e[n]);return t}function Ul(e){let t=e.replace(Il,$l);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $l(e){return"-"+e.toLowerCase()}const xn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Vl={};function Zn(e,t){const n=Vl,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return vr(e,r,i)}function vr(e,t,n){if(ql(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vt(e.children,t,n)}return Array.isArray(e)?vt(e,t,n):""}function vt(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=vr(e[i],t,n);return r.join("")}function ql(e){return!!(e&&typeof e=="object")}const Tt=document.createElement("i");function et(e){const t="&"+e+";";Tt.innerHTML=t;const n=Tt.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function le(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function oe(e,t){return e.length>0?(le(e,e.length,0,t),e):t}const Pt={}.hasOwnProperty;function Tr(e){const t={};let n=-1;for(;++n<e.length;)Wl(t,e[n]);return t}function Wl(e,t){let n;for(n in t){const i=(Pt.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Pt.call(i,l)||(i[l]=[]);const a=o[l];Xl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Xl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);le(e,0,0,r)}function Pr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=we(/[A-Za-z]/),K=we(/[\dA-Za-z]/),Yl=we(/[#-'*+\--9=?A-Z^-~]/);function ln(e){return e!==null&&(e<32||e===127)}const jn=we(/\d/),Ql=we(/[\dA-Fa-f]/),Gl=we(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function _(e){return e===-2||e===-1||e===32}const fn=we(new RegExp("\\p{P}|\\p{S}","u")),ve=we(/\s/);function we(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Oe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function M(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return _(u)?(e.enter(n),a(u)):t(u)}function a(u){return _(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const Kl={tokenize:Jl};function Jl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),M(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return L(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Zl={tokenize:eo},Lt={tokenize:no};function eo(e){const t=this,n=[];let r=0,i,o,l;return a;function a(E){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,s)(E)}return s(E)}function u(E){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const F=t.events.length;let R=F,S;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){S=t.events[R][1].end;break}x(r);let j=F;for(;j<t.events.length;)t.events[j][1].end={...S},j++;return le(t.events,R+1,0,t.events.slice(F)),t.events.length=j,s(E)}return a(E)}function s(E){if(r===n.length){if(!i)return p(E);if(i.currentConstruct&&i.currentConstruct.concrete)return g(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lt,f,c)(E)}function f(E){return i&&v(),x(r),p(E)}function c(E){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(E)}function p(E){return t.containerState={},e.attempt(Lt,h,g)(E)}function h(E){return r++,n.push([t.currentConstruct,t.containerState]),p(E)}function g(E){if(E===null){i&&v(),x(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(E)}function y(E){if(E===null){b(e.exit("chunkFlow"),!0),x(0),e.consume(E);return}return L(E)?(e.consume(E),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(E),y)}function b(E,F){const R=t.sliceStream(E);if(F&&R.push(null),E.previous=o,o&&(o.next=E),o=E,i.defineSkip(E.start),i.write(R),t.parser.lazy[E.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<l&&(!i.events[S][1].end||i.events[S][1].end.offset>l))return;const j=t.events.length;let q=j,B,k;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(B){k=t.events[q][1].end;break}B=!0}for(x(r),S=j;S<t.events.length;)t.events[S][1].end={...k},S++;le(t.events,q+1,0,t.events.slice(j)),t.events.length=S}}function x(E){let F=n.length;for(;F-- >E;){const R=n[F];t.containerState=R[1],R[0].exit.call(t,e)}n.length=E}function v(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function no(e,t,n){return M(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Re(e){if(e===null||V(e)||ve(e))return 1;if(fn(e))return 2}function hn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Nn={name:"attention",resolveAll:to,tokenize:ro};function to(e,t){let n=-1,r,i,o,l,a,u,s,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};Dt(c,-u),Dt(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=oe(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=oe(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=oe(s,hn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=oe(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=oe(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,le(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ro(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Re(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=Re(u),c=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),t(u)}}function Dt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const io={name:"autolink",tokenize:lo};function lo(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Z(h)?(e.consume(h),l):h===64?n(h):s(h)}function l(h){return h===43||h===45||h===46||K(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||K(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ln(h)?n(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):Yl(h)?(e.consume(h),s):n(h)}function f(h){return K(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||K(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return n(h)}}const Ye={partial:!0,tokenize:oo};function oo(e,t,n){return r;function r(o){return _(o)?M(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||L(o)?t(o):n(o)}}const Lr={continuation:{tokenize:uo},exit:so,name:"blockQuote",tokenize:ao};function ao(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return _(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function uo(e,t,n){const r=this;return i;function i(l){return _(l)?M(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Lr,t,n)(l)}}function so(e){e.exit("blockQuote")}const Dr={name:"characterEscape",tokenize:co};function co(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Gl(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const zr={name:"characterReference",tokenize:fo};function fo(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=K,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Ql,f):(e.enter("characterReferenceValue"),o=7,l=jn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===K&&!et(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const zt={partial:!0,tokenize:po},Ft={concrete:!0,name:"codeFenced",tokenize:ho};function ho(e,t,n){const r=this,i={partial:!0,tokenize:R};let o=0,l=0,a;return u;function u(S){return s(S)}function s(S){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===a?(l++,e.consume(S),f):l<3?n(S):(e.exit("codeFencedFenceSequence"),_(S)?M(e,c,"whitespace")(S):c(S))}function c(S){return S===null||L(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(zt,y,F)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||L(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(S)):_(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),M(e,h,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),p)}function h(S){return S===null||L(S)?c(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||L(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(S)):S===96&&S===a?n(S):(e.consume(S),g)}function y(S){return e.attempt(i,F,b)(S)}function b(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),x}function x(S){return o>0&&_(S)?M(e,v,"linePrefix",o+1)(S):v(S)}function v(S){return S===null||L(S)?e.check(zt,y,F)(S):(e.enter("codeFlowValue"),E(S))}function E(S){return S===null||L(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),E)}function F(S){return e.exit("codeFenced"),t(S)}function R(S,j,q){let B=0;return k;function k(N){return S.enter("lineEnding"),S.consume(N),S.exit("lineEnding"),T}function T(N){return S.enter("codeFencedFence"),_(N)?M(S,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):P(N)}function P(N){return N===a?(S.enter("codeFencedFenceSequence"),H(N)):q(N)}function H(N){return N===a?(B++,S.consume(N),H):B>=l?(S.exit("codeFencedFenceSequence"),_(N)?M(S,W,"whitespace")(N):W(N)):q(N)}function W(N){return N===null||L(N)?(S.exit("codeFencedFence"),j(N)):q(N)}}}function po(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const kn={name:"codeIndented",tokenize:go},mo={partial:!0,tokenize:yo};function go(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),M(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):L(s)?e.attempt(mo,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||L(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function yo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):L(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):M(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):L(l)?i(l):n(l)}}const xo={name:"codeText",previous:bo,resolve:ko,tokenize:wo};function ko(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function bo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wo(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):L(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||L(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",s(c))}}class So{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Be(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Be(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Be(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Be(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Be(this.left,n.reverse())}}}function Be(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Fr(e){const t={};let n=-1,r,i,o,l,a,u,s;const f=new So(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Co(f,n)),n=t[n],s=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return le(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function Co(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=n,g=0,y=0;const b=[y];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,b.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),p=b.length;p--;){const x=a.slice(b[p],b[p+1]),v=o.pop();u.push([v,v+x.length-1]),e.splice(v,2,x)}for(u.reverse(),p=-1;++p<u.length;)s[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return s}const Eo={resolve:Ao,tokenize:vo},Io={partial:!0,tokenize:To};function Ao(e){return Fr(e),e}function vo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):L(a)?e.check(Io,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function To(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),M(e,o,"linePrefix")}function o(l){if(l===null||L(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Rr(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||ln(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||L(x)?n(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function y(x){return!f&&(x===null||x===41||V(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<s&&x===40?(e.consume(x),f++,y):x===41?(e.consume(x),f--,y):x===null||x===32||x===40||ln(x)?n(x):(e.consume(x),x===92?b:y)}function b(x){return x===40||x===41||x===92?(e.consume(x),y):y(x)}}function _r(e,t,n,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):L(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||L(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!_(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Or(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):L(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),M(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||L(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function $e(e,t){let n;return r;function r(i){return L(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_(i)?M(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Po={name:"definition",tokenize:Do},Lo={partial:!0,tokenize:zo};function Do(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return _r.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return V(h)?$e(e,s)(h):s(h)}function s(h){return Rr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Lo,c,c)(h)}function c(h){return _(h)?M(e,p,"whitespace")(h):p(h)}function p(h){return h===null||L(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function zo(e,t,n){return r;function r(a){return V(a)?$e(e,i)(a):n(a)}function i(a){return Or(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return _(a)?M(e,l,"whitespace")(a):l(a)}function l(a){return a===null||L(a)?t(a):n(a)}}const Fo={name:"hardBreakEscape",tokenize:Ro};function Ro(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return L(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const _o={name:"headingAtx",resolve:Oo,tokenize:Mo};function Oo(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},le(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Mo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||V(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||L(f)?(e.exit("atxHeading"),t(f)):_(f)?M(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||V(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const jo=["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"],Rt=["pre","script","style","textarea"],No={concrete:!0,name:"htmlFlow",resolveTo:Uo,tokenize:$o},Bo={partial:!0,tokenize:qo},Ho={partial:!0,tokenize:Vo};function Uo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $o(e,t,n){const r=this;let i,o,l,a,u;return s;function s(d){return f(d)}function f(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),p):d===47?(e.consume(d),o=!0,y):d===63?(e.consume(d),i=3,r.interrupt?t:m):Z(d)?(e.consume(d),l=String.fromCharCode(d),b):n(d)}function p(d){return d===45?(e.consume(d),i=2,h):d===91?(e.consume(d),i=5,a=0,g):Z(d)?(e.consume(d),i=4,r.interrupt?t:m):n(d)}function h(d){return d===45?(e.consume(d),r.interrupt?t:m):n(d)}function g(d){const se="CDATA[";return d===se.charCodeAt(a++)?(e.consume(d),a===se.length?r.interrupt?t:P:g):n(d)}function y(d){return Z(d)?(e.consume(d),l=String.fromCharCode(d),b):n(d)}function b(d){if(d===null||d===47||d===62||V(d)){const se=d===47,Se=l.toLowerCase();return!se&&!o&&Rt.includes(Se)?(i=1,r.interrupt?t(d):P(d)):jo.includes(l.toLowerCase())?(i=6,se?(e.consume(d),x):r.interrupt?t(d):P(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(d):o?v(d):E(d))}return d===45||K(d)?(e.consume(d),l+=String.fromCharCode(d),b):n(d)}function x(d){return d===62?(e.consume(d),r.interrupt?t:P):n(d)}function v(d){return _(d)?(e.consume(d),v):k(d)}function E(d){return d===47?(e.consume(d),k):d===58||d===95||Z(d)?(e.consume(d),F):_(d)?(e.consume(d),E):k(d)}function F(d){return d===45||d===46||d===58||d===95||K(d)?(e.consume(d),F):R(d)}function R(d){return d===61?(e.consume(d),S):_(d)?(e.consume(d),R):E(d)}function S(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),u=d,j):_(d)?(e.consume(d),S):q(d)}function j(d){return d===u?(e.consume(d),u=null,B):d===null||L(d)?n(d):(e.consume(d),j)}function q(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||V(d)?R(d):(e.consume(d),q)}function B(d){return d===47||d===62||_(d)?E(d):n(d)}function k(d){return d===62?(e.consume(d),T):n(d)}function T(d){return d===null||L(d)?P(d):_(d)?(e.consume(d),T):n(d)}function P(d){return d===45&&i===2?(e.consume(d),G):d===60&&i===1?(e.consume(d),Y):d===62&&i===4?(e.consume(d),ue):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),me):L(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Bo,de,H)(d)):d===null||L(d)?(e.exit("htmlFlowData"),H(d)):(e.consume(d),P)}function H(d){return e.check(Ho,W,de)(d)}function W(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),N}function N(d){return d===null||L(d)?H(d):(e.enter("htmlFlowData"),P(d))}function G(d){return d===45?(e.consume(d),m):P(d)}function Y(d){return d===47?(e.consume(d),l="",ae):P(d)}function ae(d){if(d===62){const se=l.toLowerCase();return Rt.includes(se)?(e.consume(d),ue):P(d)}return Z(d)&&l.length<8?(e.consume(d),l+=String.fromCharCode(d),ae):P(d)}function me(d){return d===93?(e.consume(d),m):P(d)}function m(d){return d===62?(e.consume(d),ue):d===45&&i===2?(e.consume(d),m):P(d)}function ue(d){return d===null||L(d)?(e.exit("htmlFlowData"),de(d)):(e.consume(d),ue)}function de(d){return e.exit("htmlFlow"),t(d)}}function Vo(e,t,n){const r=this;return i;function i(l){return L(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function qo(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ye,t,n)}}const Wo={name:"htmlText",tokenize:Xo};function Xo(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),R):m===63?(e.consume(m),E):Z(m)?(e.consume(m),q):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,g):Z(m)?(e.consume(m),v):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):L(m)?(l=c,Y(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?G(m):m===45?p(m):c(m)}function g(m){const ue="CDATA[";return m===ue.charCodeAt(o++)?(e.consume(m),o===ue.length?y:g):n(m)}function y(m){return m===null?n(m):m===93?(e.consume(m),b):L(m)?(l=y,Y(m)):(e.consume(m),y)}function b(m){return m===93?(e.consume(m),x):y(m)}function x(m){return m===62?G(m):m===93?(e.consume(m),x):y(m)}function v(m){return m===null||m===62?G(m):L(m)?(l=v,Y(m)):(e.consume(m),v)}function E(m){return m===null?n(m):m===63?(e.consume(m),F):L(m)?(l=E,Y(m)):(e.consume(m),E)}function F(m){return m===62?G(m):E(m)}function R(m){return Z(m)?(e.consume(m),S):n(m)}function S(m){return m===45||K(m)?(e.consume(m),S):j(m)}function j(m){return L(m)?(l=j,Y(m)):_(m)?(e.consume(m),j):G(m)}function q(m){return m===45||K(m)?(e.consume(m),q):m===47||m===62||V(m)?B(m):n(m)}function B(m){return m===47?(e.consume(m),G):m===58||m===95||Z(m)?(e.consume(m),k):L(m)?(l=B,Y(m)):_(m)?(e.consume(m),B):G(m)}function k(m){return m===45||m===46||m===58||m===95||K(m)?(e.consume(m),k):T(m)}function T(m){return m===61?(e.consume(m),P):L(m)?(l=T,Y(m)):_(m)?(e.consume(m),T):B(m)}function P(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,H):L(m)?(l=P,Y(m)):_(m)?(e.consume(m),P):(e.consume(m),W)}function H(m){return m===i?(e.consume(m),i=void 0,N):m===null?n(m):L(m)?(l=H,Y(m)):(e.consume(m),H)}function W(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||V(m)?B(m):(e.consume(m),W)}function N(m){return m===47||m===62||V(m)?B(m):n(m)}function G(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Y(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ae}function ae(m){return _(m)?M(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):me(m)}function me(m){return e.enter("htmlTextData"),l(m)}}const nt={name:"labelEnd",resolveAll:Ko,resolveTo:Jo,tokenize:Zo},Yo={tokenize:ea},Qo={tokenize:na},Go={tokenize:ta};function Ko(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&le(e,0,e.length,n),e}function Jo(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",s,t]],a=oe(a,e.slice(o+1,o+r+3)),a=oe(a,[["enter",f,t]]),a=oe(a,hn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=oe(a,[["exit",f,t],e[l-2],e[l-1],["exit",s,t]]),a=oe(a,e.slice(l+1)),a=oe(a,[["exit",u,t]]),le(e,o,e.length,a),e}function Zo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(fe(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(Yo,f,l?f:c)(p):p===91?e.attempt(Qo,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(Go,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function ea(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return V(c)?$e(e,o)(c):o(c)}function o(c){return c===41?f(c):Rr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return V(c)?$e(e,u)(c):f(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?Or(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return V(c)?$e(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function na(e,t,n){const r=this;return i;function i(a){return _r.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(fe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function ta(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ra={name:"labelStartImage",resolveAll:nt.resolveAll,tokenize:ia};function ia(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const la={name:"labelStartLink",resolveAll:nt.resolveAll,tokenize:oa};function oa(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const bn={name:"lineEnding",tokenize:aa};function aa(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),M(e,t,"linePrefix")}}const nn={name:"thematicBreak",tokenize:ua};function ua(e,t,n){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||L(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),_(s)?M(e,a,"whitespace")(s):a(s))}}const ee={continuation:{tokenize:ha},exit:ma,name:"list",tokenize:fa},sa={partial:!0,tokenize:da},ca={partial:!0,tokenize:pa};function fa(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:jn(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(nn,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return jn(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ye,r.interrupt?n:f,e.attempt(sa,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return _(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ha(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ye,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!_(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ca,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function pa(e,t,n){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ma(e){e.exit(this.containerState.type)}function da(e,t,n){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!_(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const _t={name:"setextUnderline",resolveTo:ga,tokenize:ya};function ga(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function ya(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),_(s)?M(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||L(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const xa={tokenize:ka};function ka(e){const t=this,n=e.attempt(Ye,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Eo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ba={resolveAll:jr()},wa=Mr("string"),Sa=Mr("text");function Mr(e){return{resolveAll:jr(e==="text"?Ca:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function jr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Ca(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const s={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}const Ea={42:ee,43:ee,45:ee,48:ee,49:ee,50:ee,51:ee,52:ee,53:ee,54:ee,55:ee,56:ee,57:ee,62:Lr},Ia={91:Po},Aa={[-2]:kn,[-1]:kn,32:kn},va={35:_o,42:nn,45:[_t,nn],60:No,61:_t,95:nn,96:Ft,126:Ft},Ta={38:zr,92:Dr},Pa={[-5]:bn,[-4]:bn,[-3]:bn,33:ra,38:zr,42:Nn,60:[io,Wo],91:la,92:[Fo,Dr],93:nt,95:Nn,96:xo},La={null:[Nn,ba]},Da={null:[42,95]},za={null:[]},Fa=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Da,contentInitial:Ia,disable:za,document:Ea,flow:va,flowInitial:Aa,insideSpan:La,string:Ta,text:Pa},Symbol.toStringTag,{value:"Module"}));function Ra(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:j(R),check:j(S),consume:v,enter:E,exit:F,interrupt:j(S,{interrupt:!0})},s={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function c(T){return l=oe(l,T),b(),l[l.length-1]!==null?[]:(q(t,0),s.events=hn(o,s.events,s),s.events)}function p(T,P){return Oa(h(T),P)}function h(T){return _a(l,T)}function g(){const{_bufferIndex:T,_index:P,line:H,column:W,offset:N}=r;return{_bufferIndex:T,_index:P,line:H,column:W,offset:N}}function y(T){i[T.line]=T.column,k()}function b(){let T;for(;r._index<l.length;){const P=l[r._index];if(typeof P=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<P.length;)x(P.charCodeAt(r._bufferIndex));else x(P)}}function x(T){f=f(T)}function v(T){L(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,k()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=T}function E(T,P){const H=P||{};return H.type=T,H.start=g(),s.events.push(["enter",H,s]),a.push(H),H}function F(T){const P=a.pop();return P.end=g(),s.events.push(["exit",P,s]),P}function R(T,P){q(T,P.from)}function S(T,P){P.restore()}function j(T,P){return H;function H(W,N,G){let Y,ae,me,m;return Array.isArray(W)?de(W):"tokenize"in W?de([W]):ue(W);function ue(Q){return Me;function Me(ke){const Pe=ke!==null&&Q[ke],Le=ke!==null&&Q.null,Ge=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return de(Ge)(ke)}}function de(Q){return Y=Q,ae=0,Q.length===0?G:d(Q[ae])}function d(Q){return Me;function Me(ke){return m=B(),me=Q,Q.partial||(s.currentConstruct=Q),Q.name&&s.parser.constructs.disable.null.includes(Q.name)?Se():Q.tokenize.call(P?Object.assign(Object.create(s),P):s,u,se,Se)(ke)}}function se(Q){return T(me,m),N}function Se(Q){return m.restore(),++ae<Y.length?d(Y[ae]):G}}}function q(T,P){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&le(s.events,P,s.events.length-P,T.resolve(s.events.slice(P),s)),T.resolveTo&&(s.events=T.resolveTo(s.events,s))}function B(){const T=g(),P=s.previous,H=s.currentConstruct,W=s.events.length,N=Array.from(a);return{from:W,restore:G};function G(){r=T,s.previous=P,s.currentConstruct=H,s.events.length=W,a=N,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function _a(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Oa(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
3
  `;break}case-3:{l=`\r
4
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Oa(e){const r={constructs:Tr([za,...(e||{}).extensions||[]]),content:i(Gl),defined:[],document:i(Jl),flow:i(ya),lazy:{},string:i(ba),text:i(wa)};return r;function i(o){return l;function l(a){return Fa(r,o,a)}}}function Ma(e){for(;!zr(e););return e}const Ot=/[\0\t\n\r]/g;function Na(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Ot.lastIndex=c,s=Ot.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){t=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const ja=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ba(e){return e.replace(ja,Ha)}function Ha(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return vr(n.slice(o?2:1),o?16:10)}return et(n)||e}const Nr={}.hasOwnProperty;function Ua(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Va(n)(Ma(Oa(n).document().write(Na()(e,t,!0))))}function Va(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(mt),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(ft),blockQuote:o(Le),characterEscape:B,characterReference:B,codeFenced:o(Ge),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ge,l),codeText:o(xi,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(bi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(wi),hardBreakEscape:o(ht),hardBreakTrailing:o(ht),htmlFlow:o(pt,l),htmlFlowData:B,htmlText:o(pt,l),htmlTextData:B,image:o(Si),label:l,link:o(mt),listItem:o(Ci),listItemValue:p,listOrdered:o(gt,c),listUnordered:o(gt),paragraph:o(Ei),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ft),strong:o(Ii),thematicBreak:o(Ti)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:Pe,autolinkProtocol:xe,blockQuote:u(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:Q,characterReference:Me,codeFenced:u(C),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:x,codeIndented:u(k),codeText:u(j),codeTextData:x,data:x,definition:u(),definitionDestinationString:F,definitionLabelString:A,definitionTitleString:E,emphasis:u(),hardBreakEscape:u(v),hardBreakTrailing:u(v),htmlFlow:u(H),htmlFlowData:x,htmlText:u(W),htmlTextData:x,image:u(Y),label:me,labelText:ae,lineEnding:T,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:se,resourceDestinationString:m,resourceTitleString:ue,resource:ge,setextHeading:u(q),setextHeadingLineSequence:N,setextHeadingText:w,strong:u(),thematicBreak:u()}};jr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(b){let I={type:"root",children:[]};const z={stack:[I],tokenStack:[],config:t,enter:a,exit:s,buffer:l,resume:f,data:n},O=[];let U=-1;for(;++U<b.length;)if(b[U][1].type==="listOrdered"||b[U][1].type==="listUnordered")if(b[U][0]==="enter")O.push(U);else{const ce=O.pop();U=i(b,ce,U)}for(U=-1;++U<b.length;){const ce=t[b[U][0]];Nr.call(ce,b[U][1].type)&&ce[b[U][1].type].call(Object.assign({sliceSerialize:b[U][2].sliceSerialize},z),b[U][1])}if(z.tokenStack.length>0){const ce=z.tokenStack[z.tokenStack.length-1];(ce[1]||Mt).call(z,void 0,ce[0])}for(I.position={start:be(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:be(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)I=t.transforms[U](I)||I;return I}function i(b,I,z){let O=I-1,U=-1,ce=!1,Ce,de,Ne,je;for(;++O<=z;){const te=b[O];switch(te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{te[0]==="enter"?U++:U--,je=void 0;break}case"lineEndingBlank":{te[0]==="enter"&&(Ce&&!je&&!U&&!Ne&&(Ne=O),je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!U&&te[0]==="enter"&&te[1].type==="listItemPrefix"||U===-1&&te[0]==="exit"&&(te[1].type==="listUnordered"||te[1].type==="listOrdered")){if(Ce){let De=O;for(de=void 0;De--;){const ye=b[De];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;de&&(b[de][1].type="lineEndingBlank",ce=!0),ye[1].type="lineEnding",de=De}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}Ne&&(!de||Ne<de)&&(Ce._spread=!0),Ce.end=Object.assign({},de?b[de][1].start:te[1].end),b.splice(de||O,0,["exit",Ce,te[2]]),O++,z++}if(te[1].type==="listItemPrefix"){const De={type:"listItem",_spread:!1,start:Object.assign({},te[1].start),end:void 0};Ce=De,b.splice(O,0,["enter",De,te[2]]),O++,z++,Ne=void 0,je=!0}}}return b[I][1]._spread=ce,z}function o(b,I){return z;function z(O){a.call(this,b(O),O),I&&I.call(this,O)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(b,I,z){this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([I,z||void 0]),b.position={start:be(I.start),end:void 0}}function u(b){return I;function I(z){b&&b.call(this,z),s.call(this,z)}}function s(b,I){const z=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==b.type&&(I?I.call(this,b,O[0]):(O[1]||Mt).call(this,b,O[0]));else throw new Error("Cannot close `"+b.type+"` ("+Ue({start:b.start,end:b.end})+"): it’s not open");z.position.end=be(b.end)}function f(){return Zn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(b){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(b),10),this.data.expectingFirstListItemValue=void 0}}function h(){const b=this.resume(),I=this.stack[this.stack.length-1];I.lang=b}function d(){const b=this.resume(),I=this.stack[this.stack.length-1];I.meta=b}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b.replace(/(\r?\n|\r)$/g,"")}function A(b){const I=this.resume(),z=this.stack[this.stack.length-1];z.label=I,z.identifier=fe(this.sliceSerialize(b)).toLowerCase()}function E(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function F(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function R(b){const I=this.stack[this.stack.length-1];if(!I.depth){const z=this.sliceSerialize(b).length;I.depth=z}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function N(b){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(b).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function B(b){const z=this.stack[this.stack.length-1].children;let O=z[z.length-1];(!O||O.type!=="text")&&(O=Ai(),O.position={start:be(b.start),end:void 0},z.push(O)),this.stack.push(O)}function x(b){const I=this.stack.pop();I.value+=this.sliceSerialize(b),I.position.end=be(b.end)}function T(b){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=I.children[I.children.length-1];z.position.end=be(b.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(B.call(this,b),x.call(this,b))}function v(){this.data.atHardBreak=!0}function H(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function W(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function j(){const b=this.resume(),I=this.stack[this.stack.length-1];I.value=b}function G(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function Y(){const b=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";b.type+="Reference",b.referenceType=I,delete b.url,delete b.title}else delete b.identifier,delete b.label;this.data.referenceType=void 0}function ae(b){const I=this.sliceSerialize(b),z=this.stack[this.stack.length-2];z.label=Ba(I),z.identifier=fe(I).toLowerCase()}function me(){const b=this.stack[this.stack.length-1],I=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const O=b.children;z.children=O}else z.alt=I}function m(){const b=this.resume(),I=this.stack[this.stack.length-1];I.url=b}function ue(){const b=this.resume(),I=this.stack[this.stack.length-1];I.title=b}function ge(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function se(b){const I=this.resume(),z=this.stack[this.stack.length-1];z.label=I,z.identifier=fe(this.sliceSerialize(b)).toLowerCase(),this.data.referenceType="full"}function Se(b){this.data.characterReferenceType=b.type}function Q(b){const I=this.sliceSerialize(b),z=this.data.characterReferenceType;let O;z?(O=vr(I,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=et(I);const U=this.stack[this.stack.length-1];U.value+=O}function Me(b){const I=this.stack.pop();I.position.end=be(b.end)}function xe(b){x.call(this,b);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(b)}function Pe(b){x.call(this,b);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(b)}function Le(){return{type:"blockquote",children:[]}}function Ge(){return{type:"code",lang:null,meta:null,value:""}}function xi(){return{type:"inlineCode",value:""}}function bi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wi(){return{type:"emphasis",children:[]}}function ft(){return{type:"heading",depth:0,children:[]}}function ht(){return{type:"break"}}function pt(){return{type:"html",value:""}}function Si(){return{type:"image",title:null,url:"",alt:null}}function mt(){return{type:"link",title:null,url:"",children:[]}}function gt(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function Ci(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function Ei(){return{type:"paragraph",children:[]}}function Ii(){return{type:"strong",children:[]}}function Ai(){return{type:"text",value:""}}function Ti(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function jr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jr(e,r):$a(e,r)}}function $a(e,t){let n;for(n in t)if(Nr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Mt(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ue({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ue({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ue({start:t.start,end:t.end})+") is still open")}function qa(e){const t=this;t.parser=n;function n(r){return Ua(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Wa(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Xa(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function Ya(e,t){const n=t.value?t.value+`
6
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Qa(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ga(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ka(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Oe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)}function Ja(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Za(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Br(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function eu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Br(e,t);const i={src:Oe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function nu(e,t){const n={src:Oe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function tu(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ru(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Br(e,t);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function iu(e,t){const n={href:Oe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lu(e,t,n){const r=e.all(t),i=n?ou(n):Hr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
4
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Ma(e){const r={constructs:Tr([Fa,...(e||{}).extensions||[]]),content:i(Kl),defined:[],document:i(Zl),flow:i(xa),lazy:{},string:i(wa),text:i(Sa)};return r;function i(o){return l;function l(a){return Ra(r,o,a)}}}function ja(e){for(;!Fr(e););return e}const Ot=/[\0\t\n\r]/g;function Na(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Ot.lastIndex=c,s=Ot.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){t=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ba=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ha(e){return e.replace(Ba,Ua)}function Ua(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Pr(n.slice(o?2:1),o?16:10)}return et(n)||e}const Nr={}.hasOwnProperty;function $a(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Va(n)(ja(Ma(n).document().write(Na()(e,t,!0))))}function Va(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(mt),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(ft),blockQuote:o(Le),characterEscape:B,characterReference:B,codeFenced:o(Ge),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ge,l),codeText:o(bi,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(wi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Si),hardBreakEscape:o(ht),hardBreakTrailing:o(ht),htmlFlow:o(pt,l),htmlFlowData:B,htmlText:o(pt,l),htmlTextData:B,image:o(Ci),label:l,link:o(mt),listItem:o(Ei),listItemValue:p,listOrdered:o(dt,c),listUnordered:o(dt),paragraph:o(Ii),reference:d,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ft),strong:o(Ai),thematicBreak:o(Ti)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:Pe,autolinkProtocol:ke,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:Q,characterReference:Me,codeFenced:u(b),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:u(x),codeText:u(N),codeTextData:k,data:k,definition:u(),definitionDestinationString:F,definitionLabelString:v,definitionTitleString:E,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(H),htmlFlowData:k,htmlText:u(W),htmlTextData:k,image:u(Y),label:me,labelText:ae,lineEnding:T,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:se,resourceDestinationString:m,resourceTitleString:ue,resource:de,setextHeading:u(q),setextHeadingLineSequence:j,setextHeadingText:S,strong:u(),thematicBreak:u()}};Br(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let A={type:"root",children:[]};const z={stack:[A],tokenStack:[],config:t,enter:a,exit:s,buffer:l,resume:f,data:n},O=[];let U=-1;for(;++U<w.length;)if(w[U][1].type==="listOrdered"||w[U][1].type==="listUnordered")if(w[U][0]==="enter")O.push(U);else{const ce=O.pop();U=i(w,ce,U)}for(U=-1;++U<w.length;){const ce=t[w[U][0]];Nr.call(ce,w[U][1].type)&&ce[w[U][1].type].call(Object.assign({sliceSerialize:w[U][2].sliceSerialize},z),w[U][1])}if(z.tokenStack.length>0){const ce=z.tokenStack[z.tokenStack.length-1];(ce[1]||Mt).call(z,void 0,ce[0])}for(A.position={start:be(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:be(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)A=t.transforms[U](A)||A;return A}function i(w,A,z){let O=A-1,U=-1,ce=!1,Ce,ge,je,Ne;for(;++O<=z;){const te=w[O];switch(te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{te[0]==="enter"?U++:U--,Ne=void 0;break}case"lineEndingBlank":{te[0]==="enter"&&(Ce&&!Ne&&!U&&!je&&(je=O),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!U&&te[0]==="enter"&&te[1].type==="listItemPrefix"||U===-1&&te[0]==="exit"&&(te[1].type==="listUnordered"||te[1].type==="listOrdered")){if(Ce){let De=O;for(ge=void 0;De--;){const ye=w[De];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;ge&&(w[ge][1].type="lineEndingBlank",ce=!0),ye[1].type="lineEnding",ge=De}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}je&&(!ge||je<ge)&&(Ce._spread=!0),Ce.end=Object.assign({},ge?w[ge][1].start:te[1].end),w.splice(ge||O,0,["exit",Ce,te[2]]),O++,z++}if(te[1].type==="listItemPrefix"){const De={type:"listItem",_spread:!1,start:Object.assign({},te[1].start),end:void 0};Ce=De,w.splice(O,0,["enter",De,te[2]]),O++,z++,je=void 0,Ne=!0}}}return w[A][1]._spread=ce,z}function o(w,A){return z;function z(O){a.call(this,w(O),O),A&&A.call(this,O)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,A,z){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([A,z||void 0]),w.position={start:be(A.start),end:void 0}}function u(w){return A;function A(z){w&&w.call(this,z),s.call(this,z)}}function s(w,A){const z=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==w.type&&(A?A.call(this,w,O[0]):(O[1]||Mt).call(this,w,O[0]));else throw new Error("Cannot close `"+w.type+"` ("+Ue({start:w.start,end:w.end})+"): it’s not open");z.position.end=be(w.end)}function f(){return Zn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(w){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function h(){const w=this.resume(),A=this.stack[this.stack.length-1];A.lang=w}function g(){const w=this.resume(),A=this.stack[this.stack.length-1];A.meta=w}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w.replace(/(\r?\n|\r)$/g,"")}function v(w){const A=this.resume(),z=this.stack[this.stack.length-1];z.label=A,z.identifier=fe(this.sliceSerialize(w)).toLowerCase()}function E(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function F(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function R(w){const A=this.stack[this.stack.length-1];if(!A.depth){const z=this.sliceSerialize(w).length;A.depth=z}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function j(w){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function B(w){const z=this.stack[this.stack.length-1].children;let O=z[z.length-1];(!O||O.type!=="text")&&(O=vi(),O.position={start:be(w.start),end:void 0},z.push(O)),this.stack.push(O)}function k(w){const A=this.stack.pop();A.value+=this.sliceSerialize(w),A.position.end=be(w.end)}function T(w){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=A.children[A.children.length-1];z.position.end=be(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(B.call(this,w),k.call(this,w))}function P(){this.data.atHardBreak=!0}function H(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function W(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function N(){const w=this.resume(),A=this.stack[this.stack.length-1];A.value=w}function G(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Y(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=A,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function ae(w){const A=this.sliceSerialize(w),z=this.stack[this.stack.length-2];z.label=Ha(A),z.identifier=fe(A).toLowerCase()}function me(){const w=this.stack[this.stack.length-1],A=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const O=w.children;z.children=O}else z.alt=A}function m(){const w=this.resume(),A=this.stack[this.stack.length-1];A.url=w}function ue(){const w=this.resume(),A=this.stack[this.stack.length-1];A.title=w}function de(){this.data.inReference=void 0}function d(){this.data.referenceType="collapsed"}function se(w){const A=this.resume(),z=this.stack[this.stack.length-1];z.label=A,z.identifier=fe(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Se(w){this.data.characterReferenceType=w.type}function Q(w){const A=this.sliceSerialize(w),z=this.data.characterReferenceType;let O;z?(O=Pr(A,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=et(A);const U=this.stack[this.stack.length-1];U.value+=O}function Me(w){const A=this.stack.pop();A.position.end=be(w.end)}function ke(w){k.call(this,w);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(w)}function Pe(w){k.call(this,w);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(w)}function Le(){return{type:"blockquote",children:[]}}function Ge(){return{type:"code",lang:null,meta:null,value:""}}function bi(){return{type:"inlineCode",value:""}}function wi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Si(){return{type:"emphasis",children:[]}}function ft(){return{type:"heading",depth:0,children:[]}}function ht(){return{type:"break"}}function pt(){return{type:"html",value:""}}function Ci(){return{type:"image",title:null,url:"",alt:null}}function mt(){return{type:"link",title:null,url:"",children:[]}}function dt(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Ei(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Ii(){return{type:"paragraph",children:[]}}function Ai(){return{type:"strong",children:[]}}function vi(){return{type:"text",value:""}}function Ti(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function Br(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Br(e,r):qa(e,r)}}function qa(e,t){let n;for(n in t)if(Nr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Mt(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ue({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ue({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ue({start:t.start,end:t.end})+") is still open")}function Wa(e){const t=this;t.parser=n;function n(r){return $a(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Xa(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ya(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function Qa(e,t){const n=t.value?t.value+`
6
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Ga(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ka(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ja(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Oe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)}function Za(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eu(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Hr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function nu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hr(e,t);const i={src:Oe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function tu(e,t){const n={src:Oe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ru(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iu(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hr(e,t);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function lu(e,t){const n={href:Oe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ou(e,t,n){const r=e.all(t),i=n?au(n):Ur(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
7
7
  `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
8
- `});const s={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,s),e.applyData(t,s)}function ou(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Hr(n[r])}return t}function Hr(e){const t=e.spread;return t??e.children.length>1}function au(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function uu(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function su(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function cu(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Qn(t.children[1]),u=br(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function hu(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const s=[];for(;++u<a;){const c=t.children[u],p={},h=l?l[u]:void 0;h&&(p.align=h);let d={type:"element",tagName:o,properties:p,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),s.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,f),e.applyData(t,f)}function pu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Nt=9,jt=32;function mu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Bt(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Bt(t.slice(i),i>0,!1)),o.join("")}function Bt(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Nt||o===jt;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Nt||o===jt;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function gu(e,t){const n={type:"text",value:mu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function du(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const yu={blockquote:Wa,break:Xa,code:Ya,delete:Qa,emphasis:Ga,footnoteReference:Ka,heading:Ja,html:Za,imageReference:eu,image:nu,inlineCode:tu,linkReference:ru,link:iu,listItem:lu,list:au,paragraph:uu,root:su,strong:cu,table:fu,tableCell:pu,tableRow:hu,text:gu,thematicBreak:du,toml:Ke,yaml:Ke,definition:Ke,footnoteDefinition:Ke};function Ke(){}const Ur=-1,pn=0,$e=1,on=2,tt=3,rt=4,it=5,lt=6,Vr=7,$r=8,ku=typeof self=="object"?self:globalThis,Ht=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ku[e](t)},xu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case pn:case Ur:return n(l,i);case $e:{const a=n([],i);for(const u of l)a.push(r(u));return a}case on:{const a=n({},i);for(const[u,s]of l)a[r(u)]=r(s);return a}case tt:return n(new Date(l),i);case rt:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case it:{const a=n(new Map,i);for(const[u,s]of l)a.set(r(u),r(s));return a}case lt:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case Vr:{const{name:a,message:u}=l;return n(Ht(a,u),i)}case $r:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(Ht(o,l),i)};return r},Ut=e=>xu(new Map,e)(0),ze="",{toString:bu}={},{keys:wu}=Object,He=e=>{const t=typeof e;if(t!=="object"||!e)return[pn,t];const n=bu.call(e).slice(8,-1);switch(n){case"Array":return[$e,ze];case"Object":return[on,ze];case"Date":return[tt,ze];case"RegExp":return[rt,ze];case"Map":return[it,ze];case"Set":return[lt,ze];case"DataView":return[$e,n]}return n.includes("Array")?[$e,n]:n.includes("Error")?[Vr,n]:[on,n]},Je=([e,t])=>e===pn&&(t==="function"||t==="symbol"),Su=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=He(l);switch(a){case pn:{let f=l;switch(u){case"bigint":a=$r,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Ur],l)}return i([a,f],l)}case $e:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),i([u,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case on:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of wu(l))(e||!Je(He(l[p])))&&f.push([o(p),o(l[p])]);return c}case tt:return i([a,l.toISOString()],l);case rt:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case it:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(Je(He(p))||Je(He(h))))&&f.push([o(p),o(h)]);return c}case lt:{const f=[],c=i([a,f],l);for(const p of l)(e||!Je(He(p)))&&f.push(o(p));return c}}const{message:s}=l;return i([a,{name:u,message:s}],l)};return o},Vt=(e,{json:t,lossy:n}={})=>{const r=[];return Su(!(t||n),!!t,new Map,r)(e),r},an=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ut(Vt(e,t)):structuredClone(e):(e,t)=>Ut(Vt(e,t));function Cu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Eu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Iu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Cu,r=e.options.footnoteBackLabel||Eu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[u]);if(!s)continue;const f=e.all(s),c=String(s.identifier).toUpperCase(),p=Oe(c.toLowerCase());let h=0;const d=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++h<=y;){d.length>0&&d.push({type:"text",value:" "});let A=typeof n=="string"?n:n(u,h);typeof A=="string"&&(A={type:"text",value:A}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const A=C.children[C.children.length-1];A&&A.type==="text"?A.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...d)}else f.push(...d);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(s,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...an(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
8
+ `});const s={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,s),e.applyData(t,s)}function au(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ur(n[r])}return t}function Ur(e){const t=e.spread;return t??e.children.length>1}function uu(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function su(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cu(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fu(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hu(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Qn(t.children[1]),u=wr(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function pu(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const s=[];for(;++u<a;){const c=t.children[u],p={},h=l?l[u]:void 0;h&&(p.align=h);let g={type:"element",tagName:o,properties:p,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),s.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,f),e.applyData(t,f)}function mu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const jt=9,Nt=32;function du(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Bt(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Bt(t.slice(i),i>0,!1)),o.join("")}function Bt(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===jt||o===Nt;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===jt||o===Nt;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function gu(e,t){const n={type:"text",value:du(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xu={blockquote:Xa,break:Ya,code:Qa,delete:Ga,emphasis:Ka,footnoteReference:Ja,heading:Za,html:eu,imageReference:nu,image:tu,inlineCode:ru,linkReference:iu,link:lu,listItem:ou,list:uu,paragraph:su,root:cu,strong:fu,table:hu,tableCell:mu,tableRow:pu,text:gu,thematicBreak:yu,toml:Ke,yaml:Ke,definition:Ke,footnoteDefinition:Ke};function Ke(){}const $r=-1,pn=0,Ve=1,on=2,tt=3,rt=4,it=5,lt=6,Vr=7,qr=8,ku=typeof self=="object"?self:globalThis,Ht=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ku[e](t)},bu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case pn:case $r:return n(l,i);case Ve:{const a=n([],i);for(const u of l)a.push(r(u));return a}case on:{const a=n({},i);for(const[u,s]of l)a[r(u)]=r(s);return a}case tt:return n(new Date(l),i);case rt:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case it:{const a=n(new Map,i);for(const[u,s]of l)a.set(r(u),r(s));return a}case lt:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case Vr:{const{name:a,message:u}=l;return n(Ht(a,u),i)}case qr:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(Ht(o,l),i)};return r},Ut=e=>bu(new Map,e)(0),ze="",{toString:wu}={},{keys:Su}=Object,He=e=>{const t=typeof e;if(t!=="object"||!e)return[pn,t];const n=wu.call(e).slice(8,-1);switch(n){case"Array":return[Ve,ze];case"Object":return[on,ze];case"Date":return[tt,ze];case"RegExp":return[rt,ze];case"Map":return[it,ze];case"Set":return[lt,ze];case"DataView":return[Ve,n]}return n.includes("Array")?[Ve,n]:n.includes("Error")?[Vr,n]:[on,n]},Je=([e,t])=>e===pn&&(t==="function"||t==="symbol"),Cu=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=He(l);switch(a){case pn:{let f=l;switch(u){case"bigint":a=qr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([$r],l)}return i([a,f],l)}case Ve:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),i([u,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case on:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of Su(l))(e||!Je(He(l[p])))&&f.push([o(p),o(l[p])]);return c}case tt:return i([a,l.toISOString()],l);case rt:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case it:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(Je(He(p))||Je(He(h))))&&f.push([o(p),o(h)]);return c}case lt:{const f=[],c=i([a,f],l);for(const p of l)(e||!Je(He(p)))&&f.push(o(p));return c}}const{message:s}=l;return i([a,{name:u,message:s}],l)};return o},$t=(e,{json:t,lossy:n}={})=>{const r=[];return Cu(!(t||n),!!t,new Map,r)(e),r},an=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ut($t(e,t)):structuredClone(e):(e,t)=>Ut($t(e,t));function Eu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Iu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Au(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Eu,r=e.options.footnoteBackLabel||Iu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[u]);if(!s)continue;const f=e.all(s),c=String(s.identifier).toUpperCase(),p=Oe(c.toLowerCase());let h=0;const g=[],y=e.footnoteCounts.get(c);for(;y!==void 0&&++h<=y;){g.length>0&&g.push({type:"text",value:" "});let v=typeof n=="string"?n:n(u,h);typeof v=="string"&&(v={type:"text",value:v}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const b=f[f.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const v=b.children[b.children.length-1];v&&v.type==="text"?v.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...g)}else f.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(s,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...an(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
9
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
- `}]}}const mn=function(e){if(e==null)return Pu;if(typeof e=="function")return gn(e);if(typeof e=="object")return Array.isArray(e)?Au(e):Tu(e);if(typeof e=="string")return vu(e);throw new Error("Expected function, string, or object as test")};function Au(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mn(e[n]);return gn(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Tu(e){const t=e;return gn(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function vu(e){return gn(t);function t(n){return n&&n.type===e}}function gn(e){return t;function t(n,r,i){return!!(Lu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Pu(){return!0}function Lu(e){return e!==null&&typeof e=="object"&&"type"in e}const qr=[],Du=!0,Bn=!1,zu="skip";function Wr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=mn(i),l=r?-1:1;a(e,void 0,[])();function a(u,s,f){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=qr,d,y,C;if((!t||o(u,s,f[f.length-1]||void 0))&&(h=Fu(n(u,f)),h[0]===Bn))return h;if("children"in u&&u.children){const k=u;if(k.children&&h[0]!==zu)for(y=(r?k.children.length:-1)+l,C=f.concat(k);y>-1&&y<k.children.length;){const A=k.children[y];if(d=a(A,y,C)(),d[0]===Bn)return d;y=typeof d[1]=="number"?d[1]:y+l}}return h}}}function Fu(e){return Array.isArray(e)?e:typeof e=="number"?[Du,e]:e==null?qr:[e]}function ot(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Wr(e,o,a,i);function a(u,s){const f=s[s.length-1],c=f?f.children.indexOf(u):void 0;return l(u,c,f)}}const Hn={}.hasOwnProperty,Ru={};function _u(e,t){const n=t||Ru,r=new Map,i=new Map,o=new Map,l={...yu,...n.handlers},a={all:s,applyData:Mu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:Ou,wrap:ju};return ot(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function u(f,c){const p=f.type,h=a.handlers[p];if(Hn.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:y,...C}=f,k=an(C);return k.children=a.all(f),k}return an(f)}return(a.options.unknownHandler||Nu)(a,f,c)}function s(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const d=a.one(p[h],f);if(d){if(h&&p[h-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=$t(d.value)),!Array.isArray(d)&&d.type==="element")){const y=d.children[0];y&&y.type==="text"&&(y.value=$t(y.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function Ou(e,t){e.position&&(t.position=Sl(e))}function Mu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,an(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Nu(e,t){const n=t.data||{},r="value"in t&&!(Hn.call(n,"hProperties")||Hn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ju(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
10
+ `}]}}const mn=function(e){if(e==null)return Lu;if(typeof e=="function")return dn(e);if(typeof e=="object")return Array.isArray(e)?vu(e):Tu(e);if(typeof e=="string")return Pu(e);throw new Error("Expected function, string, or object as test")};function vu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mn(e[n]);return dn(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Tu(e){const t=e;return dn(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Pu(e){return dn(t);function t(n){return n&&n.type===e}}function dn(e){return t;function t(n,r,i){return!!(Du(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Lu(){return!0}function Du(e){return e!==null&&typeof e=="object"&&"type"in e}const Wr=[],zu=!0,Bn=!1,Fu="skip";function Xr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=mn(i),l=r?-1:1;a(e,void 0,[])();function a(u,s,f){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Wr,g,y,b;if((!t||o(u,s,f[f.length-1]||void 0))&&(h=Ru(n(u,f)),h[0]===Bn))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==Fu)for(y=(r?x.children.length:-1)+l,b=f.concat(x);y>-1&&y<x.children.length;){const v=x.children[y];if(g=a(v,y,b)(),g[0]===Bn)return g;y=typeof g[1]=="number"?g[1]:y+l}}return h}}}function Ru(e){return Array.isArray(e)?e:typeof e=="number"?[zu,e]:e==null?Wr:[e]}function ot(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Xr(e,o,a,i);function a(u,s){const f=s[s.length-1],c=f?f.children.indexOf(u):void 0;return l(u,c,f)}}const Hn={}.hasOwnProperty,_u={};function Ou(e,t){const n=t||_u,r=new Map,i=new Map,o=new Map,l={...xu,...n.handlers},a={all:s,applyData:ju,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:Mu,wrap:Bu};return ot(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function u(f,c){const p=f.type,h=a.handlers[p];if(Hn.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:y,...b}=f,x=an(b);return x.children=a.all(f),x}return an(f)}return(a.options.unknownHandler||Nu)(a,f,c)}function s(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const g=a.one(p[h],f);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Vt(g.value)),!Array.isArray(g)&&g.type==="element")){const y=g.children[0];y&&y.type==="text"&&(y.value=Vt(y.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function Mu(e,t){e.position&&(t.position=Cl(e))}function ju(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,an(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Nu(e,t){const n=t.data||{},r="value"in t&&!(Hn.call(n,"hProperties")||Hn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Bu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
11
  `});++r<e.length;)r&&n.push({type:"text",value:`
12
12
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
- `}),n}function $t(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qt(e,t){const n=_u(e,t),r=n.one(e,void 0),i=Iu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
- `},i),o}function Bu(e,t){return e&&"run"in e?async function(n,r){const i=qt(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qt(n,{file:r,...e||t})}}function Wt(e){if(e)throw e}var tn=Object.prototype.hasOwnProperty,Xr=Object.prototype.toString,Xt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Qt=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Xr.call(t)==="[object Array]"},Gt=function(t){if(!t||Xr.call(t)!=="[object Object]")return!1;var n=tn.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&tn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||tn.call(t,i)},Kt=function(t,n){Xt&&n.name==="__proto__"?Xt(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Jt=function(t,n){if(n==="__proto__")if(tn.call(t,n)){if(Yt)return Yt(t,n).value}else return;return t[n]},Hu=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,s=arguments.length,f=!1;for(typeof a=="boolean"&&(f=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<s;++u)if(t=arguments[u],t!=null)for(n in t)r=Jt(a,n),i=Jt(t,n),a!==i&&(f&&i&&(Gt(i)||(o=Qt(i)))?(o?(o=!1,l=r&&Qt(r)?r:[]):l=r&&Gt(r)?r:{},Kt(a,{name:n,newValue:e(f,l,i)})):typeof i<"u"&&Kt(a,{name:n,newValue:i}));return a};const wn=xr(Hu);function Un(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Uu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...s){const f=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?Vu(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Vu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&n)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const he={basename:$u,dirname:qu,extname:Wu,join:Xu,sep:"/"};function $u(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qe(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function qu(e){if(Qe(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Wu(e){Qe(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Xu(...e){let t=-1,n;for(;++t<e.length;)Qe(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Yu(n)}function Yu(e){Qe(e);const t=e.codePointAt(0)===47;let n=Qu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Qu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gu={cwd:Ku};function Ku(){return"/"}function Vn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ju(e){if(typeof e=="string")e=new URL(e);else if(!Vn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Zu(e)}function Zu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Sn=["history","path","basename","stem","extname","dirname"];class Yr{constructor(t){let n;t?Vn(t)?n={path:t}:typeof t=="string"||es(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Gu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Sn.length;){const o=Sn[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Sn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?he.basename(this.path):void 0}set basename(t){En(t,"basename"),Cn(t,"basename"),this.path=he.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?he.dirname(this.path):void 0}set dirname(t){Zt(this.basename,"dirname"),this.path=he.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?he.extname(this.path):void 0}set extname(t){if(Cn(t,"extname"),Zt(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=he.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vn(t)&&(t=Ju(t)),En(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?he.basename(this.path,this.extname):void 0}set stem(t){En(t,"stem"),Cn(t,"stem"),this.path=he.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new J(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Cn(e,t){if(e&&e.includes(he.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+he.sep+"`")}function En(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Zt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function es(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ns=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},ts={}.hasOwnProperty;class at extends ns{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Uu()}copy(){const t=new at;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(wn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Tn("data",this.frozen),this.namespace[t]=n,this):ts.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Tn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ze(t),r=this.parser||this.Parser;return In("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),In("process",this.parser||this.Parser),An("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=Ze(t),u=r.parse(a);r.run(u,a,function(f,c,p){if(f||!c||!p)return s(f);const h=c,d=r.stringify(h,p);ls(d)?p.value=d:p.result=d,s(f,p)});function s(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),In("processSync",this.parser||this.Parser),An("processSync",this.compiler||this.Compiler),this.process(t,i),nr("processSync","process",n),r;function i(o,l){n=!0,Wt(o),r=l}}run(t,n,r){er(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Ze(n);i.run(t,u,s);function s(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),nr("runSync","run",r),i;function o(l,a){Wt(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=Ze(n),i=this.compiler||this.Compiler;return An("stringify",i),er(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Tn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...c]=s;u(f,c)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(s.plugins),s.settings&&(i.settings=wn(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const c=s[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===s){p=c;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...d]=f;const y=r[p][1];Un(y)&&Un(h)&&(h=wn(!0,y,h)),r[p]=[s,h,...d]}}}}const rs=new at().freeze();function In(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function An(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Tn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function er(e){if(!Un(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ze(e){return is(e)?e:new Yr(e)}function is(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ls(e){return typeof e=="string"||os(e)}function os(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const as="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tr=[],rr={allowDangerousHtml:!0},us=/^(https?|ircs?|mailto|xmpp)$/i,ss=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function cs(e){const t=fs(e),n=hs(e);return ps(t.runSync(t.parse(n),n),e)}function fs(e){const t=e.rehypePlugins||tr,n=e.remarkPlugins||tr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rr}:rr;return rs().use(qa).use(n).use(Bu,r).use(t)}function hs(e){const t=e.children||"",n=new Yr;return typeof t=="string"&&(n.value=t),n}function ps(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||ms;for(const f of ss)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+as+f.id,void 0);return ot(e,s),Tl(e,{Fragment:P.Fragment,components:i,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function s(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in kn)if(Object.hasOwn(kn,h)&&Object.hasOwn(f.properties,h)){const d=f.properties[h],y=kn[h];(y===null||y.includes(f.tagName))&&(f.properties[h]=u(String(d||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function ms(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||us.test(e.slice(0,t))?e:""}function gs(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Qr(e,t,n){const i=mn((n||{}).ignore||[]),o=ds(t);let l=-1;for(;++l<o.length;)Wr(e,"text",a);function a(s,f){let c=-1,p;for(;++c<f.length;){const h=f[c],d=p?p.children:void 0;if(i(h,d?d.indexOf(h):void 0,p))return;p=h}if(p)return u(s,f)}function u(s,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let d=0;const C=c.children.indexOf(s);let k=!1,A=[];p.lastIndex=0;let E=p.exec(s.value);for(;E;){const F=E.index,R={index:E.index,input:E.input,stack:[...f,s]};let w=h(...E,R);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?p.lastIndex=F+1:(d!==F&&A.push({type:"text",value:s.value.slice(d,F)}),Array.isArray(w)?A.push(...w):w&&A.push(w),d=F+E[0].length,k=!0),!p.global)break;E=p.exec(s.value)}return k?(d<s.value.length&&A.push({type:"text",value:s.value.slice(d)}),c.children.splice(C,1,...A)):A=[s],C+A.length}}function ds(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([ys(i[0]),ks(i[1])])}return t}function ys(e){return typeof e=="string"?new RegExp(gs(e),"g"):e}function ks(e){return typeof e=="function"?e:function(){return e}}function xs(e){Qr(e,[/\r?\n|\r/g,bs])}function bs(){return{type:"break"}}function ws(){return function(e){xs(e)}}function ir(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const vn="phrasing",Pn=["autolink","link","image","label"];function Ss(){return{transforms:[Ps],enter:{literalAutolink:Es,literalAutolinkEmail:Ln,literalAutolinkHttp:Ln,literalAutolinkWww:Ln},exit:{literalAutolink:vs,literalAutolinkEmail:Ts,literalAutolinkHttp:Is,literalAutolinkWww:As}}}function Cs(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vn,notInConstruct:Pn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vn,notInConstruct:Pn},{character:":",before:"[ps]",after:"\\/",inConstruct:vn,notInConstruct:Pn}]}}function Es(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ln(e){this.config.enter.autolinkProtocol.call(this,e)}function Is(e){this.config.exit.autolinkProtocol.call(this,e)}function As(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ts(e){this.config.exit.autolinkEmail.call(this,e)}function vs(e){this.exit(e)}function Ps(e){Qr(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ls],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ds]],{ignore:["link","linkReference"]})}function Ls(e,t,n,r,i){let o="";if(!Gr(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!zs(n)))return!1;const l=Fs(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Ds(e,t,n,r){return!Gr(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function zs(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Fs(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ir(e,"(");let o=ir(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Gr(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Te(n)||fn(n))&&(!t||n!==47)}Kr.peek=Us;function Rs(){this.buffer()}function _s(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Os(){this.buffer()}function Ms(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ns(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function js(e){this.exit(e)}function Bs(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hs(e){this.exit(e)}function Us(){return"["}function Kr(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Vs(){return{enter:{gfmFootnoteCallString:Rs,gfmFootnoteCall:_s,gfmFootnoteDefinitionLabelString:Os,gfmFootnoteDefinition:Ms},exit:{gfmFootnoteCallString:Ns,gfmFootnoteCall:js,gfmFootnoteDefinitionLabelString:Bs,gfmFootnoteDefinition:Hs}}}function $s(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Kr},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let u=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return u+=a.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((t?`
15
- `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?Jr:qs))),s(),u}}function qs(e,t,n){return t===0?e:Jr(e,t,n)}function Jr(e,t,n){return(n?"":" ")+e}const Ws=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zr.peek=Ks;function Xs(){return{canContainEols:["delete"],enter:{strikethrough:Qs},exit:{strikethrough:Gs}}}function Ys(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ws}],handlers:{delete:Zr}}}function Qs(e){this.enter({type:"delete",children:[]},e)}function Gs(e){this.exit(e)}function Zr(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Ks(){return"~"}function Js(e){return e.length}function Zs(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Js,o=[],l=[],a=[],u=[];let s=0,f=-1;for(;++f<e.length;){const y=[],C=[];let k=-1;for(e[f].length>s&&(s=e[f].length);++k<e[f].length;){const A=ec(e[f][k]);if(n.alignDelimiters!==!1){const E=i(A);C[k]=E,(u[k]===void 0||E>u[k])&&(u[k]=E)}y.push(A)}l[f]=y,a[f]=C}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<s;)o[c]=lr(r[c]);else{const y=lr(r);for(;++c<s;)o[c]=y}c=-1;const p=[],h=[];for(;++c<s;){const y=o[c];let C="",k="";y===99?(C=":",k=":"):y===108?C=":":y===114&&(k=":");let A=n.alignDelimiters===!1?1:Math.max(1,u[c]-C.length-k.length);const E=C+"-".repeat(A)+k;n.alignDelimiters!==!1&&(A=C.length+A+k.length,A>u[c]&&(u[c]=A),h[c]=A),p[c]=E}l.splice(1,0,p),a.splice(1,0,h),f=-1;const d=[];for(;++f<l.length;){const y=l[f],C=a[f];c=-1;const k=[];for(;++c<s;){const A=y[c]||"";let E="",F="";if(n.alignDelimiters!==!1){const R=u[c]-(C[c]||0),w=o[c];w===114?E=" ".repeat(R):w===99?R%2?(E=" ".repeat(R/2+.5),F=" ".repeat(R/2-.5)):(E=" ".repeat(R/2),F=E):F=" ".repeat(R)}n.delimiterStart!==!1&&!c&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||c)&&k.push(" "),n.alignDelimiters!==!1&&k.push(E),k.push(A),n.alignDelimiters!==!1&&k.push(F),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||c!==s-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
16
- `)}function ec(e){return e==null?"":String(e)}function lr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function nc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),tc);return i(),l}function tc(e,t,n){return">"+(n?"":" ")+e}function rc(e,t){return or(e,t.inConstruct,!0)&&!or(e,t.notInConstruct,!1)}function or(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ar(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
- `&&rc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
- `}function ic(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function lc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function oc(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ac(e,t,n,r){const i=oc(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(lc(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,uc);return c(),p}const a=n.createTracker(r),u=i.repeat(Math.max(ic(o,i)+1,3)),s=n.enter("codeFenced");let f=a.move(u);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
13
+ `}),n}function Vt(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qt(e,t){const n=Ou(e,t),r=n.one(e,void 0),i=Au(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
+ `},i),o}function Hu(e,t){return e&&"run"in e?async function(n,r){const i=qt(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qt(n,{file:r,...e||t})}}function Wt(e){if(e)throw e}var tn=Object.prototype.hasOwnProperty,Yr=Object.prototype.toString,Xt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Qt=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Yr.call(t)==="[object Array]"},Gt=function(t){if(!t||Yr.call(t)!=="[object Object]")return!1;var n=tn.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&tn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||tn.call(t,i)},Kt=function(t,n){Xt&&n.name==="__proto__"?Xt(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Jt=function(t,n){if(n==="__proto__")if(tn.call(t,n)){if(Yt)return Yt(t,n).value}else return;return t[n]},Uu=function e(){var t,n,r,i,o,l,a=arguments[0],u=1,s=arguments.length,f=!1;for(typeof a=="boolean"&&(f=a,a=arguments[1]||{},u=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});u<s;++u)if(t=arguments[u],t!=null)for(n in t)r=Jt(a,n),i=Jt(t,n),a!==i&&(f&&i&&(Gt(i)||(o=Qt(i)))?(o?(o=!1,l=r&&Qt(r)?r:[]):l=r&&Gt(r)?r:{},Kt(a,{name:n,newValue:e(f,l,i)})):typeof i<"u"&&Kt(a,{name:n,newValue:i}));return a};const wn=br(Uu);function Un(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $u(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...s){const f=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?Vu(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Vu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&n)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const he={basename:qu,dirname:Wu,extname:Xu,join:Yu,sep:"/"};function qu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qe(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Wu(e){if(Qe(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Xu(e){Qe(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Yu(...e){let t=-1,n;for(;++t<e.length;)Qe(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Qu(n)}function Qu(e){Qe(e);const t=e.codePointAt(0)===47;let n=Gu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Gu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ku={cwd:Ju};function Ju(){return"/"}function $n(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Zu(e){if(typeof e=="string")e=new URL(e);else if(!$n(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return es(e)}function es(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Sn=["history","path","basename","stem","extname","dirname"];class Qr{constructor(t){let n;t?$n(t)?n={path:t}:typeof t=="string"||ns(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Ku.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Sn.length;){const o=Sn[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Sn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?he.basename(this.path):void 0}set basename(t){En(t,"basename"),Cn(t,"basename"),this.path=he.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?he.dirname(this.path):void 0}set dirname(t){Zt(this.basename,"dirname"),this.path=he.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?he.extname(this.path):void 0}set extname(t){if(Cn(t,"extname"),Zt(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=he.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$n(t)&&(t=Zu(t)),En(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?he.basename(this.path,this.extname):void 0}set stem(t){En(t,"stem"),Cn(t,"stem"),this.path=he.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new J(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Cn(e,t){if(e&&e.includes(he.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+he.sep+"`")}function En(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Zt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ns(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ts=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},rs={}.hasOwnProperty;class at extends ts{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=$u()}copy(){const t=new at;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(wn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(vn("data",this.frozen),this.namespace[t]=n,this):rs.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ze(t),r=this.parser||this.Parser;return In("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),In("process",this.parser||this.Parser),An("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=Ze(t),u=r.parse(a);r.run(u,a,function(f,c,p){if(f||!c||!p)return s(f);const h=c,g=r.stringify(h,p);os(g)?p.value=g:p.result=g,s(f,p)});function s(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),In("processSync",this.parser||this.Parser),An("processSync",this.compiler||this.Compiler),this.process(t,i),nr("processSync","process",n),r;function i(o,l){n=!0,Wt(o),r=l}}run(t,n,r){er(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=Ze(n);i.run(t,u,s);function s(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),nr("runSync","run",r),i;function o(l,a){Wt(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=Ze(n),i=this.compiler||this.Compiler;return An("stringify",i),er(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(vn("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...c]=s;u(f,c)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(s.plugins),s.settings&&(i.settings=wn(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const c=s[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===s){p=c;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...g]=f;const y=r[p][1];Un(y)&&Un(h)&&(h=wn(!0,y,h)),r[p]=[s,h,...g]}}}}const is=new at().freeze();function In(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function An(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function er(e){if(!Un(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ze(e){return ls(e)?e:new Qr(e)}function ls(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function os(e){return typeof e=="string"||as(e)}function as(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const us="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tr=[],rr={allowDangerousHtml:!0},ss=/^(https?|ircs?|mailto|xmpp)$/i,cs=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function fs(e){const t=hs(e),n=ps(e);return ms(t.runSync(t.parse(n),n),e)}function hs(e){const t=e.rehypePlugins||tr,n=e.remarkPlugins||tr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rr}:rr;return is().use(Wa).use(n).use(Hu,r).use(t)}function ps(e){const t=e.children||"",n=new Qr;return typeof t=="string"&&(n.value=t),n}function ms(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||ds;for(const f of cs)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+us+f.id,void 0);return ot(e,s),Tl(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function s(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in xn)if(Object.hasOwn(xn,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],y=xn[h];(y===null||y.includes(f.tagName))&&(f.properties[h]=u(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function ds(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ss.test(e.slice(0,t))?e:""}function gs(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Gr(e,t,n){const i=mn((n||{}).ignore||[]),o=ys(t);let l=-1;for(;++l<o.length;)Xr(e,"text",a);function a(s,f){let c=-1,p;for(;++c<f.length;){const h=f[c],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return u(s,f)}function u(s,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let g=0;const b=c.children.indexOf(s);let x=!1,v=[];p.lastIndex=0;let E=p.exec(s.value);for(;E;){const F=E.index,R={index:E.index,input:E.input,stack:[...f,s]};let S=h(...E,R);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?p.lastIndex=F+1:(g!==F&&v.push({type:"text",value:s.value.slice(g,F)}),Array.isArray(S)?v.push(...S):S&&v.push(S),g=F+E[0].length,x=!0),!p.global)break;E=p.exec(s.value)}return x?(g<s.value.length&&v.push({type:"text",value:s.value.slice(g)}),c.children.splice(b,1,...v)):v=[s],b+v.length}}function ys(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([xs(i[0]),ks(i[1])])}return t}function xs(e){return typeof e=="string"?new RegExp(gs(e),"g"):e}function ks(e){return typeof e=="function"?e:function(){return e}}function bs(e){Gr(e,[/\r?\n|\r/g,ws])}function ws(){return{type:"break"}}function Ss(){return function(e){bs(e)}}function ir(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Tn="phrasing",Pn=["autolink","link","image","label"];function Cs(){return{transforms:[Ls],enter:{literalAutolink:Is,literalAutolinkEmail:Ln,literalAutolinkHttp:Ln,literalAutolinkWww:Ln},exit:{literalAutolink:Ps,literalAutolinkEmail:Ts,literalAutolinkHttp:As,literalAutolinkWww:vs}}}function Es(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tn,notInConstruct:Pn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tn,notInConstruct:Pn},{character:":",before:"[ps]",after:"\\/",inConstruct:Tn,notInConstruct:Pn}]}}function Is(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ln(e){this.config.enter.autolinkProtocol.call(this,e)}function As(e){this.config.exit.autolinkProtocol.call(this,e)}function vs(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ts(e){this.config.exit.autolinkEmail.call(this,e)}function Ps(e){this.exit(e)}function Ls(e){Gr(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ds],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zs]],{ignore:["link","linkReference"]})}function Ds(e,t,n,r,i){let o="";if(!Kr(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Fs(n)))return!1;const l=Rs(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function zs(e,t,n,r){return!Kr(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Fs(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Rs(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ir(e,"(");let o=ir(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Kr(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ve(n)||fn(n))&&(!t||n!==47)}Jr.peek=$s;function _s(){this.buffer()}function Os(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ms(){this.buffer()}function js(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ns(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bs(e){this.exit(e)}function Hs(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=fe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Us(e){this.exit(e)}function $s(){return"["}function Jr(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Vs(){return{enter:{gfmFootnoteCallString:_s,gfmFootnoteCall:Os,gfmFootnoteDefinitionLabelString:Ms,gfmFootnoteDefinition:js},exit:{gfmFootnoteCallString:Ns,gfmFootnoteCall:Bs,gfmFootnoteDefinitionLabelString:Hs,gfmFootnoteDefinition:Us}}}function qs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Jr},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let u=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return u+=a.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((t?`
15
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?Zr:Ws))),s(),u}}function Ws(e,t,n){return t===0?e:Zr(e,t,n)}function Zr(e,t,n){return(n?"":" ")+e}const Xs=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ei.peek=Js;function Ys(){return{canContainEols:["delete"],enter:{strikethrough:Gs},exit:{strikethrough:Ks}}}function Qs(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xs}],handlers:{delete:ei}}}function Gs(e){this.enter({type:"delete",children:[]},e)}function Ks(e){this.exit(e)}function ei(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Js(){return"~"}function Zs(e){return e.length}function ec(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Zs,o=[],l=[],a=[],u=[];let s=0,f=-1;for(;++f<e.length;){const y=[],b=[];let x=-1;for(e[f].length>s&&(s=e[f].length);++x<e[f].length;){const v=nc(e[f][x]);if(n.alignDelimiters!==!1){const E=i(v);b[x]=E,(u[x]===void 0||E>u[x])&&(u[x]=E)}y.push(v)}l[f]=y,a[f]=b}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<s;)o[c]=lr(r[c]);else{const y=lr(r);for(;++c<s;)o[c]=y}c=-1;const p=[],h=[];for(;++c<s;){const y=o[c];let b="",x="";y===99?(b=":",x=":"):y===108?b=":":y===114&&(x=":");let v=n.alignDelimiters===!1?1:Math.max(1,u[c]-b.length-x.length);const E=b+"-".repeat(v)+x;n.alignDelimiters!==!1&&(v=b.length+v+x.length,v>u[c]&&(u[c]=v),h[c]=v),p[c]=E}l.splice(1,0,p),a.splice(1,0,h),f=-1;const g=[];for(;++f<l.length;){const y=l[f],b=a[f];c=-1;const x=[];for(;++c<s;){const v=y[c]||"";let E="",F="";if(n.alignDelimiters!==!1){const R=u[c]-(b[c]||0),S=o[c];S===114?E=" ".repeat(R):S===99?R%2?(E=" ".repeat(R/2+.5),F=" ".repeat(R/2-.5)):(E=" ".repeat(R/2),F=E):F=" ".repeat(R)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(E),x.push(v),n.alignDelimiters!==!1&&x.push(F),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==s-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
16
+ `)}function nc(e){return e==null?"":String(e)}function lr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function tc(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),rc);return i(),l}function rc(e,t,n){return">"+(n?"":" ")+e}function ic(e,t){return or(e,t.inConstruct,!0)&&!or(e,t.notInConstruct,!1)}function or(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ar(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&ic(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function lc(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function oc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ac(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function uc(e,t,n,r){const i=ac(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(oc(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,sc);return c(),p}const a=n.createTracker(r),u=i.repeat(Math.max(lc(o,i)+1,3)),s=n.enter("codeFenced");let f=a.move(u);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
19
19
  `,encode:["`"],...a.current()})),c()}return f+=a.move(`
20
20
  `),o&&(f+=a.move(o+`
21
- `)),f+=a.move(u),s(),f}function uc(e,t,n){return(n?"":" ")+e}function ut(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function sc(e,t,n,r){const i=ut(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("[");return s+=u.move(n.safe(n.associationId(e),{before:s,after:"]",...u.current()})),s+=u.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":`
22
- `,...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),l(),s}function cc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function We(e){return"&#x"+e.toString(16).toUpperCase()+";"}function un(e,t,n){const r=Re(e),i=Re(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ei.peek=fc;function ei(e,t,n,r){const i=cc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+We(c));const h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function fc(e,t,n){return n.options.emphasis||"*"}function hc(e,t){let n=!1;return ot(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Bn}),!!((!e.depth||e.depth<3)&&Zn(e)&&(t.options.setext||n))}function pc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(hc(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
21
+ `)),f+=a.move(u),s(),f}function sc(e,t,n){return(n?"":" ")+e}function ut(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cc(e,t,n,r){const i=ut(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("[");return s+=u.move(n.safe(n.associationId(e),{before:s,after:"]",...u.current()})),s+=u.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":`
22
+ `,...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),l(),s}function fc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function We(e){return"&#x"+e.toString(16).toUpperCase()+";"}function un(e,t,n){const r=Re(e),i=Re(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ni.peek=hc;function ni(e,t,n,r){const i=fc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+We(c));const h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function hc(e,t,n){return n.options.emphasis||"*"}function pc(e,t){let n=!1;return ot(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Bn}),!!((!e.depth||e.depth<3)&&Zn(e)&&(t.options.setext||n))}function mc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(pc(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
23
23
  `,after:`
24
24
  `});return c(),f(),p+`
25
25
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
26
26
  `))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),u=n.enter("phrasing");o.move(l+" ");let s=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...o.current()});return/^[\t ]/.test(s)&&(s=We(s.charCodeAt(0))+s.slice(1)),s=s?l+" "+s:l,n.options.closeAtx&&(s+=" "+l),u(),a(),s}ni.peek=mc;function ni(e){return e.value||""}function mc(){return"<"}ti.peek=gc;function ti(e,t,n,r){const i=ut(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("![");return s+=u.move(n.safe(e.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),s+=u.move(")"),l(),s}function gc(){return"!"}ri.peek=dc;function ri(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");const s=n.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function dc(){return"!"}ii.peek=yc;function ii(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let u;if(l.atBreak)for(;u=a.exec(r);){let s=u.index;r.charCodeAt(s)===10&&r.charCodeAt(s-1)===13&&s--,r=r.slice(0,s)+" "+r.slice(u.index+1)}}return i+r+i}function yc(){return"`"}function li(e,t){const n=Zn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}oi.peek=kc;function oi(e,t,n,r){const i=ut(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,u;if(li(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),u=n.enter("label");let s=l.move("[");return s+=l.move(n.containerPhrasing(e,{before:s,after:"](",...l.current()})),s+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),s+=l.move("<"),s+=l.move(n.safe(e.url,{before:s,after:">",...l.current()})),s+=l.move(">")):(u=n.enter("destinationRaw"),s+=l.move(n.safe(e.url,{before:s,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${o}`),s+=l.move(" "+i),s+=l.move(n.safe(e.title,{before:s,after:i,...l.current()})),s+=l.move(i),u()),s+=l.move(")"),a(),s}function kc(e,t,n){return li(e,n)?"<":"["}ai.peek=xc;function ai(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");const s=n.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function xc(){return"["}function st(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function bc(e){const t=st(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function wc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ui(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Sc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?wc(n):st(n);const a=e.ordered?l==="."?")":".":bc(n);let u=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),ui(n)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=a),n.bulletCurrent=l;const s=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),s}function Cc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ec(e,t,n,r){const i=Cc(n);let o=n.bulletCurrent||st(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const u=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,a.current()),f);return u(),s;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function Ic(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Ac=mn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tc(e,t,n,r){return(e.children.some(function(l){return Ac(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function vc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}si.peek=Pc;function si(e,t,n,r){const i=vc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+We(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function Pc(e,t,n){return n.options.strong||"*"}function Lc(e,t,n,r){return n.safe(e.value,r)}function Dc(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zc(e,t,n){const r=(ui(n)+(n.options.ruleSpaces?" ":"")).repeat(Dc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ci={blockquote:nc,break:ar,code:ac,definition:sc,emphasis:ei,hardBreak:ar,heading:pc,html:ni,image:ti,imageReference:ri,inlineCode:ii,link:oi,linkReference:ai,list:Sc,listItem:Ec,paragraph:Ic,root:Tc,strong:si,text:Lc,thematicBreak:zc};function Fc(){return{enter:{table:Rc,tableData:ur,tableHeader:ur,tableRow:Oc},exit:{codeText:Mc,table:_c,tableData:Dn,tableHeader:Dn,tableRow:Dn}}}function Rc(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function _c(e){this.exit(e),this.data.inTable=void 0}function Oc(e){this.enter({type:"tableRow",children:[]},e)}function Dn(e){this.exit(e)}function ur(e){this.enter({type:"tableCell",children:[]},e)}function Mc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nc(e,t){return t==="|"?t:e}function jc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:u,tableRow:a}};function l(h,d,y,C){return s(f(h,y,C),h.align)}function a(h,d,y,C){const k=c(h,y,C),A=s([k]);return A.slice(0,A.indexOf(`
29
- `))}function u(h,d,y,C){const k=y.enter("tableCell"),A=y.enter("phrasing"),E=y.containerPhrasing(h,{...C,before:o,after:o});return A(),k(),E}function s(h,d){return Zs(h,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(h,d,y){const C=h.children;let k=-1;const A=[],E=d.enter("table");for(;++k<C.length;)A[k]=c(C[k],d,y);return E(),A}function c(h,d,y){const C=h.children;let k=-1;const A=[],E=d.enter("tableRow");for(;++k<C.length;)A[k]=u(C[k],h,d,y);return E(),A}function p(h,d,y){let C=ci.inlineCode(h,d,y);return y.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Bc(){return{exit:{taskListCheckValueChecked:sr,taskListCheckValueUnchecked:sr,paragraph:Uc}}}function Hc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Vc}}}function sr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Uc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Vc(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let u=ci.listItem(e,t,n,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+l}}function $c(){return[Ss(),Vs(),Xs(),Fc(),Bc()]}function qc(e){return{extensions:[Cs(),$s(e),Ys(),jc(e),Hc()]}}const Wc={tokenize:Jc,partial:!0},fi={tokenize:Zc,partial:!0},hi={tokenize:ef,partial:!0},pi={tokenize:nf,partial:!0},Xc={tokenize:tf,partial:!0},mi={name:"wwwAutolink",tokenize:Gc,previous:di},gi={name:"protocolAutolink",tokenize:Kc,previous:yi},ke={name:"emailAutolink",tokenize:Qc,previous:ki},pe={};function Yc(){return{text:pe}}let Ee=48;for(;Ee<123;)pe[Ee]=ke,Ee++,Ee===58?Ee=65:Ee===91&&(Ee=97);pe[43]=ke;pe[45]=ke;pe[46]=ke;pe[95]=ke;pe[72]=[ke,gi];pe[104]=[ke,gi];pe[87]=[ke,mi];pe[119]=[ke,mi];function Qc(e,t,n){const r=this;let i,o;return l;function l(c){return!$n(c)||!ki.call(r,r.previous)||ct(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return $n(c)?(e.consume(c),a):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(Xc,f,s)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),u):f(c)}function s(c){return e.consume(c),i=!0,u}function f(c){return o&&i&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Gc(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!di.call(r,r.previous)||ct(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Wc,e.attempt(fi,e.attempt(hi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Kc(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&yi.call(r,r.previous)&&!ct(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Z(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),o?s:(o=!0,u)):n(c)}function s(c){return c===null||ln(c)||$(c)||Te(c)||fn(c)?n(c):e.attempt(fi,e.attempt(hi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Jc(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Zc(e,t,n){let r,i,o;return l;function l(s){return s===46||s===95?e.check(pi,u,a)(s):s===null||$(s)||Te(s)||s!==45&&fn(s)?u(s):(o=!0,e.consume(s),l)}function a(s){return s===95?r=!0:(i=r,r=void 0),e.consume(s),l}function u(s){return i||r||!o?n(s):t(s)}}function ef(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(pi,t,o)(l):l===null||$(l)||Te(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function nf(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||$(a)||Te(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||$(a)||Te(a)?t(a):r(a)}function o(a){return Z(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):Z(a)?(e.consume(a),l):n(a)}}function tf(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return K(o)?n(o):t(o)}}function di(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||$(e)}function yi(e){return!Z(e)}function ki(e){return!(e===47||$n(e))}function $n(e){return e===43||e===45||e===46||e===95||K(e)}function ct(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const rf={tokenize:hf,partial:!0};function lf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sf,continuation:{tokenize:cf},exit:ff}},text:{91:{name:"gfmFootnoteCall",tokenize:uf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:of,resolveTo:af}}}}function of(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!l||!l._balanced)return n(u);const s=fe(r.sliceSerialize({start:l.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function af(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function uf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!l||c===null||c===91||$(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return $(c)||(l=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function sf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return u;function u(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(l>999||d===93&&!a||d===null||d===91||$(d))return n(d);if(d===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return $(d)||(a=!0),l++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),l++,f):f(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(o)||i.push(o),M(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function cf(e,t,n){return e.check(Ye,t,e.attempt(rf,t,n))}function ff(e){e.exit("gfmFootnoteDefinition")}function hf(e,t,n){const r=this;return M(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function pf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let s=u;for(;s--;)if(l[s][0]==="exit"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[s][1].end.offset-l[s][1].start.offset){l[u][1].type="strikethroughSequence",l[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[s][1].start),end:Object.assign({},l[u][1].end)},c={type:"strikethroughText",start:Object.assign({},l[s][1].end),end:Object.assign({},l[u][1].start)},p=[["enter",f,a],["enter",l[s][1],a],["exit",l[s][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ie(p,p.length,0,hn(h,l.slice(s+1,u),a)),ie(p,p.length,0,[["exit",c,a],["enter",l[u][1],a],["exit",l[u][1],a],["exit",f,a]]),ie(l,s-1,u-s+3,p),u=s+p.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function o(l,a,u){const s=this.previous,f=this.events;let c=0;return p;function p(d){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(d):(l.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const y=Re(s);if(d===126)return c>1?u(d):(l.consume(d),c++,h);if(c<2&&!n)return u(d);const C=l.exit("strikethroughSequenceTemporary"),k=Re(d);return C._open=!k||k===2&&!!y,C._close=!y||y===2&&!!k,a(d)}}}class mf{constructor(){this.map=[]}add(t,n,r){gf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function gf(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function df(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function yf(){return{flow:{null:{name:"table",tokenize:kf,resolveAll:xf}}}}function kf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(x){let T=r.events.length-1;for(;T>-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const v=T>-1?r.events[T][1].type:null,H=v==="tableHead"||v==="tableRow"?w:u;return H===w&&r.parser.lazy[r.now().line]?n(x):H(x)}function u(x){return e.enter("tableHead"),e.enter("tableRow"),s(x)}function s(x){return x===124||(l=!0,o+=1),f(x)}function f(x){return x===null?n(x):L(x)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):n(x):_(x)?M(e,f,"whitespace")(x):(o+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||$(x)?(e.exit("data"),f(x)):(e.consume(x),x===92?p:c)}function p(x){return x===92||x===124?(e.consume(x),c):c(x)}function h(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),l=!1,_(x)?M(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):d(x))}function d(x){return x===45||x===58?C(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),y):R(x)}function y(x){return _(x)?M(e,C,"whitespace")(x):C(x)}function C(x){return x===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),k):x===45?(o+=1,k(x)):x===null||L(x)?F(x):R(x)}function k(x){return x===45?(e.enter("tableDelimiterFiller"),A(x)):R(x)}function A(x){return x===45?(e.consume(x),A):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(x))}function E(x){return _(x)?M(e,F,"whitespace")(x):F(x)}function F(x){return x===124?d(x):x===null||L(x)?!l||i!==o?R(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):R(x)}function R(x){return n(x)}function w(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||L(x)?(e.exit("tableRow"),t(x)):_(x)?M(e,N,"whitespace")(x):(e.enter("data"),q(x))}function q(x){return x===null||x===124||$(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?B:q)}function B(x){return x===92||x===124?(e.consume(x),q):q(x)}}function xf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,u=0,s,f,c;const p=new mf;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(a=!1,u!==0&&(cr(p,t,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",s,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=en(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=en(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):d.type==="tableHead"?(a=!0,u=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(u=n,o[1]!==0?(l[0]=l[1],c=en(p,t,o,i,n,c)):l[1]!==0&&(c=en(p,t,l,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(l[3]=n)}for(u!==0&&cr(p,t,u,s,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=df(t.events,n))}return e}function en(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Fe(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Fe(t.events,n[1]);if(o={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const s=Fe(t.events,n[2]),f=Fe(t.events,n[3]),c={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,y=n[3]-n[2]-1;e.add(d,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Fe(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function cr(e,t,n,r,i){const o=[],l=Fe(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Fe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bf={name:"tasklistCheck",tokenize:Sf};function wf(){return{text:{91:bf}}}function Sf(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return $(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):n(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return L(u)?t(u):_(u)?e.check({tokenize:Cf},t,n)(u):n(u)}}function Cf(e,t,n){return M(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Ef(e){return Tr([Yc(),lf(),pf(e),yf(),wf()])}const If={};function Af(e){const t=this,n=e||If,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ef(n)),o.push($c()),l.push(qc(n))}function Tf(e){return e.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:6})}function vf({message:e}){return P.jsxs("div",{className:`bubble ${e.role}`,children:[e.role==="assistant"?P.jsx(cs,{remarkPlugins:[ws,Af],children:e.content}):e.content,P.jsxs("div",{className:"bubble-footer",children:[P.jsx("small",{children:e.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}),e.role==="assistant"&&e.usage&&P.jsxs("small",{className:"usage",children:[e.usage.inputTokens.toLocaleString("en-US")," in"," · ",e.usage.outputTokens.toLocaleString("en-US")," out"," · ",Tf(e.usage.estimatedCostUsd)]})]})]})}const zn=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition:void 0;function Pf({messages:e,suggestedReplies:t,loading:n,error:r,send:i}){const[o,l]=le.useState(""),[a,u]=le.useState(!1),s=le.useRef(null),f=le.useRef(null);le.useEffect(()=>{var h;return(h=s.current)==null?void 0:h.scrollIntoView({behavior:"smooth"})},[e,n]),le.useEffect(()=>()=>{var h;(h=f.current)==null||h.stop()},[]);const c=()=>{var d;if(a){(d=f.current)==null||d.stop(),u(!1);return}if(!zn)return;const h=new zn;h.lang="vi-VN",h.continuous=!1,h.interimResults=!1,h.onresult=y=>{const C=y.results[0][0].transcript;l(k=>k?`${k} ${C}`:C)},h.onend=()=>u(!1),h.onerror=()=>u(!1),h.start(),f.current=h,u(!0)},p=()=>{o.trim()&&(i(o),l(""))};return P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"messages",children:[e.map(h=>P.jsx(vf,{message:h},h.id)),n&&P.jsxs("div",{className:"typing-indicator",children:[P.jsx("span",{}),P.jsx("span",{}),P.jsx("span",{})]}),P.jsx("div",{ref:s})]}),t.length>0&&P.jsx("div",{className:"suggestions",children:t.map(h=>P.jsx("button",{onClick:()=>void i(h),children:h},h))}),r&&P.jsx("div",{className:"error-banner",children:r}),P.jsxs("div",{className:"composer",children:[P.jsx("input",{value:o,onChange:h=>l(h.target.value),onKeyDown:h=>h.key==="Enter"&&p(),placeholder:"Type a message...",disabled:n}),zn&&P.jsx("button",{onClick:c,disabled:n,className:`composer-mic${a?" listening":""}`,"aria-label":a?"Stop recording":"Start voice input",children:a?P.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:P.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}):P.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),P.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),P.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),P.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),P.jsx("button",{onClick:p,disabled:n||!o.trim(),"aria-label":"Send message",children:P.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),P.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})}function Lf({token:e,chatbotUrl:t,merchantId:n,timezone:r,autoOpen:i=!1}){const[o,l]=le.useState(i),a=fr(e,t,n,r);le.useEffect(()=>{i&&a.init()},[]);const u=()=>{l(!0),a.init()};return P.jsxs(P.Fragment,{children:[!o&&P.jsx("button",{className:"fab",onClick:u,"aria-label":"Open chatbot",children:"Chat"}),o&&P.jsxs("section",{className:"chat-panel",children:[P.jsxs("header",{children:[P.jsxs("div",{className:"chat-header-info",children:[P.jsx("div",{className:"chat-avatar",children:"AI"}),P.jsxs("div",{children:[P.jsx("strong",{children:"Operational Assistant"}),P.jsx("span",{children:"Online"})]})]}),P.jsxs("div",{className:"chat-header-actions",children:[P.jsx("button",{onClick:()=>void a.clear(),className:"header-icon-btn","aria-label":"New chat",title:"Start a new conversation",children:P.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("path",{d:"M12 20h9"}),P.jsx("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"})]})}),P.jsx("button",{onClick:()=>l(!1),className:"header-icon-btn","aria-label":"Close chatbot",children:P.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[P.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),P.jsx(Pf,{...a})]})]})}exports.ChatWidget=Lf;exports.useChatbot=fr;
27
+ `,...o.current()});return/^[\t ]/.test(s)&&(s=We(s.charCodeAt(0))+s.slice(1)),s=s?l+" "+s:l,n.options.closeAtx&&(s+=" "+l),u(),a(),s}ti.peek=dc;function ti(e){return e.value||""}function dc(){return"<"}ri.peek=gc;function ri(e,t,n,r){const i=ut(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("![");return s+=u.move(n.safe(e.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),s+=u.move(")"),l(),s}function gc(){return"!"}ii.peek=yc;function ii(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");const s=n.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function yc(){return"!"}li.peek=xc;function li(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let u;if(l.atBreak)for(;u=a.exec(r);){let s=u.index;r.charCodeAt(s)===10&&r.charCodeAt(s-1)===13&&s--,r=r.slice(0,s)+" "+r.slice(u.index+1)}}return i+r+i}function xc(){return"`"}function oi(e,t){const n=Zn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ai.peek=kc;function ai(e,t,n,r){const i=ut(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,u;if(oi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),u=n.enter("label");let s=l.move("[");return s+=l.move(n.containerPhrasing(e,{before:s,after:"](",...l.current()})),s+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),s+=l.move("<"),s+=l.move(n.safe(e.url,{before:s,after:">",...l.current()})),s+=l.move(">")):(u=n.enter("destinationRaw"),s+=l.move(n.safe(e.url,{before:s,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${o}`),s+=l.move(" "+i),s+=l.move(n.safe(e.title,{before:s,after:i,...l.current()})),s+=l.move(i),u()),s+=l.move(")"),a(),s}function kc(e,t,n){return oi(e,n)?"<":"["}ui.peek=bc;function ui(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");const s=n.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function bc(){return"["}function st(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wc(e){const t=st(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Sc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function si(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Cc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Sc(n):st(n);const a=e.ordered?l==="."?")":".":wc(n);let u=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),si(n)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=a),n.bulletCurrent=l;const s=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),s}function Ec(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ic(e,t,n,r){const i=Ec(n);let o=n.bulletCurrent||st(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const u=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,a.current()),f);return u(),s;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function Ac(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const vc=mn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tc(e,t,n,r){return(e.children.some(function(l){return vc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Pc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ci.peek=Lc;function ci(e,t,n,r){const i=Pc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=We(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+We(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function Lc(e,t,n){return n.options.strong||"*"}function Dc(e,t,n,r){return n.safe(e.value,r)}function zc(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Fc(e,t,n){const r=(si(n)+(n.options.ruleSpaces?" ":"")).repeat(zc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const fi={blockquote:tc,break:ar,code:uc,definition:cc,emphasis:ni,hardBreak:ar,heading:mc,html:ti,image:ri,imageReference:ii,inlineCode:li,link:ai,linkReference:ui,list:Cc,listItem:Ic,paragraph:Ac,root:Tc,strong:ci,text:Dc,thematicBreak:Fc};function Rc(){return{enter:{table:_c,tableData:ur,tableHeader:ur,tableRow:Mc},exit:{codeText:jc,table:Oc,tableData:Dn,tableHeader:Dn,tableRow:Dn}}}function _c(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Oc(e){this.exit(e),this.data.inTable=void 0}function Mc(e){this.enter({type:"tableRow",children:[]},e)}function Dn(e){this.exit(e)}function ur(e){this.enter({type:"tableCell",children:[]},e)}function jc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nc(e,t){return t==="|"?t:e}function Bc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:u,tableRow:a}};function l(h,g,y,b){return s(f(h,y,b),h.align)}function a(h,g,y,b){const x=c(h,y,b),v=s([x]);return v.slice(0,v.indexOf(`
29
+ `))}function u(h,g,y,b){const x=y.enter("tableCell"),v=y.enter("phrasing"),E=y.containerPhrasing(h,{...b,before:o,after:o});return v(),x(),E}function s(h,g){return ec(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,y){const b=h.children;let x=-1;const v=[],E=g.enter("table");for(;++x<b.length;)v[x]=c(b[x],g,y);return E(),v}function c(h,g,y){const b=h.children;let x=-1;const v=[],E=g.enter("tableRow");for(;++x<b.length;)v[x]=u(b[x],h,g,y);return E(),v}function p(h,g,y){let b=fi.inlineCode(h,g,y);return y.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Hc(){return{exit:{taskListCheckValueChecked:sr,taskListCheckValueUnchecked:sr,paragraph:$c}}}function Uc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Vc}}}function sr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $c(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Vc(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let u=fi.listItem(e,t,n,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+l}}function qc(){return[Cs(),Vs(),Ys(),Rc(),Hc()]}function Wc(e){return{extensions:[Es(),qs(e),Qs(),Bc(e),Uc()]}}const Xc={tokenize:Zc,partial:!0},hi={tokenize:ef,partial:!0},pi={tokenize:nf,partial:!0},mi={tokenize:tf,partial:!0},Yc={tokenize:rf,partial:!0},di={name:"wwwAutolink",tokenize:Kc,previous:yi},gi={name:"protocolAutolink",tokenize:Jc,previous:xi},xe={name:"emailAutolink",tokenize:Gc,previous:ki},pe={};function Qc(){return{text:pe}}let Ee=48;for(;Ee<123;)pe[Ee]=xe,Ee++,Ee===58?Ee=65:Ee===91&&(Ee=97);pe[43]=xe;pe[45]=xe;pe[46]=xe;pe[95]=xe;pe[72]=[xe,gi];pe[104]=[xe,gi];pe[87]=[xe,di];pe[119]=[xe,di];function Gc(e,t,n){const r=this;let i,o;return l;function l(c){return!Vn(c)||!ki.call(r,r.previous)||ct(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Vn(c)?(e.consume(c),a):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(Yc,f,s)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),u):f(c)}function s(c){return e.consume(c),i=!0,u}function f(c){return o&&i&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Kc(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!yi.call(r,r.previous)||ct(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xc,e.attempt(hi,e.attempt(pi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Jc(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&xi.call(r,r.previous)&&!ct(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Z(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),o?s:(o=!0,u)):n(c)}function s(c){return c===null||ln(c)||V(c)||ve(c)||fn(c)?n(c):e.attempt(hi,e.attempt(pi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Zc(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function ef(e,t,n){let r,i,o;return l;function l(s){return s===46||s===95?e.check(mi,u,a)(s):s===null||V(s)||ve(s)||s!==45&&fn(s)?u(s):(o=!0,e.consume(s),l)}function a(s){return s===95?r=!0:(i=r,r=void 0),e.consume(s),l}function u(s){return i||r||!o?n(s):t(s)}}function nf(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(mi,t,o)(l):l===null||V(l)||ve(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function tf(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||V(a)||ve(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||V(a)||ve(a)?t(a):r(a)}function o(a){return Z(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):Z(a)?(e.consume(a),l):n(a)}}function rf(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return K(o)?n(o):t(o)}}function yi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function xi(e){return!Z(e)}function ki(e){return!(e===47||Vn(e))}function Vn(e){return e===43||e===45||e===46||e===95||K(e)}function ct(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const lf={tokenize:pf,partial:!0};function of(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cf,continuation:{tokenize:ff},exit:hf}},text:{91:{name:"gfmFootnoteCall",tokenize:sf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:af,resolveTo:uf}}}}function af(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!l||!l._balanced)return n(u);const s=fe(r.sliceSerialize({start:l.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function uf(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function sf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!l||c===null||c===91||V(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(fe(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return V(c)||(l=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function cf(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||V(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return o=fe(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return V(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),M(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function ff(e,t,n){return e.check(Ye,t,e.attempt(lf,t,n))}function hf(e){e.exit("gfmFootnoteDefinition")}function pf(e,t,n){const r=this;return M(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function mf(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let s=u;for(;s--;)if(l[s][0]==="exit"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[s][1].end.offset-l[s][1].start.offset){l[u][1].type="strikethroughSequence",l[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[s][1].start),end:Object.assign({},l[u][1].end)},c={type:"strikethroughText",start:Object.assign({},l[s][1].end),end:Object.assign({},l[u][1].start)},p=[["enter",f,a],["enter",l[s][1],a],["exit",l[s][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&le(p,p.length,0,hn(h,l.slice(s+1,u),a)),le(p,p.length,0,[["exit",c,a],["enter",l[u][1],a],["exit",l[u][1],a],["exit",f,a]]),le(l,s-1,u-s+3,p),u=s+p.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function o(l,a,u){const s=this.previous,f=this.events;let c=0;return p;function p(g){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const y=Re(s);if(g===126)return c>1?u(g):(l.consume(g),c++,h);if(c<2&&!n)return u(g);const b=l.exit("strikethroughSequenceTemporary"),x=Re(g);return b._open=!x||x===2&&!!y,b._close=!y||y===2&&!!x,a(g)}}}class df{constructor(){this.map=[]}add(t,n,r){gf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function gf(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function yf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function xf(){return{flow:{null:{name:"table",tokenize:kf,resolveAll:bf}}}}function kf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(k){let T=r.events.length-1;for(;T>-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const P=T>-1?r.events[T][1].type:null,H=P==="tableHead"||P==="tableRow"?S:u;return H===S&&r.parser.lazy[r.now().line]?n(k):H(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),s(k)}function s(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?n(k):L(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):_(k)?M(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||V(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,_(k)?M(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?b(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),y):R(k)}function y(k){return _(k)?M(e,b,"whitespace")(k):b(k)}function b(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(o+=1,x(k)):k===null||L(k)?F(k):R(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),v(k)):R(k)}function v(k){return k===45?(e.consume(k),v):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(k))}function E(k){return _(k)?M(e,F,"whitespace")(k):F(k)}function F(k){return k===124?g(k):k===null||L(k)?!l||i!==o?R(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):R(k)}function R(k){return n(k)}function S(k){return e.enter("tableRow"),j(k)}function j(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),j):k===null||L(k)?(e.exit("tableRow"),t(k)):_(k)?M(e,j,"whitespace")(k):(e.enter("data"),q(k))}function q(k){return k===null||k===124||V(k)?(e.exit("data"),j(k)):(e.consume(k),k===92?B:q)}function B(k){return k===92||k===124?(e.consume(k),q):q(k)}}function bf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,u=0,s,f,c;const p=new df;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,u!==0&&(cr(p,t,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",s,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=en(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=en(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,o[1]!==0?(l[0]=l[1],c=en(p,t,o,i,n,c)):l[1]!==0&&(c=en(p,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(u!==0&&cr(p,t,u,s,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=yf(t.events,n))}return e}function en(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Fe(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Fe(t.events,n[1]);if(o={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const s=Fe(t.events,n[2]),f=Fe(t.events,n[3]),c={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,y=n[3]-n[2]-1;e.add(g,y,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Fe(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function cr(e,t,n,r,i){const o=[],l=Fe(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Fe(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const wf={name:"tasklistCheck",tokenize:Cf};function Sf(){return{text:{91:wf}}}function Cf(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return V(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):n(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return L(u)?t(u):_(u)?e.check({tokenize:Ef},t,n)(u):n(u)}}function Ef(e,t,n){return M(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function If(e){return Tr([Qc(),of(),mf(e),xf(),Sf()])}const Af={};function vf(e){const t=this,n=e||Af,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(If(n)),o.push(qc()),l.push(Wc(n))}function Tf(e){return e.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:6})}function Pf({message:e}){return I.jsxs("div",{className:`bubble ${e.role}`,children:[e.role==="assistant"?I.jsx(fs,{remarkPlugins:[Ss,vf],children:e.content}):e.content,I.jsxs("div",{className:"bubble-footer",children:[I.jsx("small",{children:e.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}),e.role==="assistant"&&e.usage&&I.jsxs("small",{className:"usage",children:[e.usage.inputTokens.toLocaleString("en-US")," in"," · ",e.usage.outputTokens.toLocaleString("en-US")," out"," · ",Tf(e.usage.estimatedCostUsd)]})]})]})}const zn=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition:void 0,fr=[{id:"appointments",label:"Appointments",icon:I.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),I.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),I.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),I.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),items:["Today's appointments","Upcoming appointments","Search appointment"]},{id:"staff",label:"Staff",icon:I.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),I.jsx("circle",{cx:"9",cy:"7",r:"4"}),I.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),I.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),items:["Staff schedule","Check available time"]},{id:"reports",label:"Reports",icon:I.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),I.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),I.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),items:["Sales report","Salary report","Search customer"]}],Lf=()=>I.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:I.jsx("polyline",{points:"9 18 15 12 9 6"})});function Df({messages:e,loading:t,error:n,send:r}){const[i,o]=ie.useState(""),[l,a]=ie.useState(!1),[u,s]=ie.useState(null),f=ie.useRef(null),c=ie.useRef(null);ie.useEffect(()=>{var b;return(b=f.current)==null?void 0:b.scrollIntoView({behavior:"smooth"})},[e,t]),ie.useEffect(()=>()=>{var b;(b=c.current)==null||b.stop()},[]);const p=()=>{var x;if(l){(x=c.current)==null||x.stop(),a(!1);return}if(!zn)return;const b=new zn;b.lang="vi-VN",b.continuous=!1,b.interimResults=!1,b.onresult=v=>{const E=v.results[0][0].transcript;o(F=>F?`${F} ${E}`:E)},b.onend=()=>a(!1),b.onerror=()=>a(!1),b.start(),c.current=b,a(!0)},h=()=>{i.trim()&&(r(i),o(""))},g=b=>{s(null),r(b)},y=fr.find(b=>b.id===u);return I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:"chat-body",children:[I.jsxs("div",{className:"messages",children:[e.map(b=>I.jsx(Pf,{message:b},b.id)),t&&I.jsxs("div",{className:"typing-indicator",children:[I.jsx("span",{}),I.jsx("span",{}),I.jsx("span",{})]}),I.jsx("div",{ref:f})]}),I.jsx("div",{className:"action-strip",children:fr.map(b=>I.jsx("button",{className:`action-strip-btn${u===b.id?" active":""}`,onClick:()=>s(x=>x===b.id?null:b.id),"aria-label":b.label,children:b.icon},b.id))}),y&&I.jsxs("div",{className:"action-panel",children:[I.jsxs("div",{className:"action-panel-header",children:[I.jsxs("div",{className:"action-panel-title",children:[y.icon,I.jsx("span",{children:y.label})]}),I.jsx("button",{className:"action-panel-close",onClick:()=>s(null),"aria-label":"Close",children:I.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),y.items.map(b=>I.jsxs("button",{className:"action-panel-item",onClick:()=>g(b),children:[I.jsx("span",{children:b}),I.jsx(Lf,{})]},b))]})]}),n&&I.jsx("div",{className:"error-banner",children:n}),I.jsxs("div",{className:"composer",children:[I.jsx("input",{value:i,onChange:b=>o(b.target.value),onKeyDown:b=>b.key==="Enter"&&h(),placeholder:"Type a message...",disabled:t}),zn&&I.jsx("button",{onClick:p,disabled:t,className:`composer-mic${l?" listening":""}`,"aria-label":l?"Stop recording":"Start voice input",children:l?I.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:I.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}):I.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{d:"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"}),I.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),I.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),I.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]})}),I.jsx("button",{className:"send-btn",onClick:h,disabled:t||!i.trim(),"aria-label":"Send message",children:I.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),I.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2",fill:"currentColor",stroke:"none"})]})})]})]})}function zf({token:e,chatbotUrl:t,merchantId:n,timezone:r,autoOpen:i=!1}){const[o,l]=ie.useState(i),a=hr(e,t,n,r);ie.useEffect(()=>{i&&a.init()},[]);const u=()=>{l(!0),a.init()};return I.jsxs(I.Fragment,{children:[!o&&I.jsx("button",{className:"fab",onClick:u,"aria-label":"Open chatbot",children:"Chat"}),o&&I.jsxs("section",{className:"chat-panel",children:[I.jsxs("header",{className:"chat-header",children:[I.jsxs("div",{className:"chat-header-info",children:[I.jsx("div",{className:"chat-avatar",children:I.jsx("img",{src:"/logo.png",alt:"NailSoft"})}),I.jsxs("div",{children:[I.jsx("strong",{children:"NailSoft Assistant"}),I.jsxs("span",{className:"online-status",children:[I.jsx("span",{className:"online-dot"}),"Online"]})]})]}),I.jsxs("div",{className:"chat-header-actions",children:[I.jsx("button",{onClick:()=>void a.clear(),className:"header-icon-btn","aria-label":"New chat",title:"Start a new conversation",children:I.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{d:"M12 20h9"}),I.jsx("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"})]})}),I.jsx("button",{onClick:()=>l(!1),className:"header-icon-btn","aria-label":"Close chatbot",children:I.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),I.jsx(Df,{...a})]})]})}exports.ChatWidget=zf;exports.useChatbot=hr;