@xcelsior/ui-chat 2.0.2 → 2.0.4
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/.storybook/preview.tsx +2 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +49 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/components/Chat.tsx +35 -74
- package/src/components/ChatWidget.tsx +0 -1
- package/src/hooks/useMessages.ts +22 -1
- package/src/hooks/useWebSocket.ts +18 -1
- package/storybook-static/assets/Chat.stories-BkbpOOSG.js +830 -0
- package/storybook-static/assets/{Color-YHDXOIA2-BMnd3YrF.js → Color-YHDXOIA2-CSuNIR0a.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-CFRXHY34-i_W8iCu9.js → DocsRenderer-CFRXHY34-dpuOKTQp.js} +3 -3
- package/storybook-static/assets/{MessageItem-DAaKZ9s9.js → MessageItem-Dlb6dSKL.js} +9 -9
- package/storybook-static/assets/MessageItem.stories-CsxqSqu-.js +422 -0
- package/storybook-static/assets/{entry-preview-oDnntGcx.js → entry-preview-C_-WO6GJ.js} +1 -1
- package/storybook-static/assets/{iframe-CGBtu2Se.js → iframe-BXTccXxS.js} +2 -2
- package/storybook-static/assets/preview-B8y-wc-n.css +1 -0
- package/storybook-static/assets/preview-CC4t7T7W.js +1 -0
- package/storybook-static/assets/{preview-BRpahs9B.js → preview-Cyx3pE7Q.js} +2 -2
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/tsconfig.json +4 -0
- package/storybook-static/assets/Chat.stories-J_Yp51wU.js +0 -803
- package/storybook-static/assets/MessageItem.stories-Ckr1_scc.js +0 -255
- package/storybook-static/assets/ToastContext-Bty1K7ya.js +0 -1
- package/storybook-static/assets/preview-DUOvJmsz.js +0 -1
- package/storybook-static/assets/preview-DcGwT3kv.css +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{j as L}from"./jsx-runtime-Cf8x2fCZ.js";import{a as Cr}from"./BrandIcons-Cjy5INAp.js";import{g as Dt}from"./index--qcDGAq6.js";import{t as te,c as Er,d as Ir,f as Tr,a as $n,g as Ar,e as Pr,h as Xn,i as $e}from"./en-US-BukEqXxE.js";function Qe(e,n){const t=te(e),r=te(n),i=t.getTime()-r.getTime();return i<0?-1:i>0?1:i}function vr(e){return Er(e,Date.now())}function zr(e){return n=>{const r=(e?Math[e]:Math.trunc)(n);return r===0?0:r}}function Lr(e,n){return+te(e)-+te(n)}function Dr(e){const n=te(e);return n.setHours(23,59,59,999),n}function Mr(e){const n=te(e);return+Dr(n)==+Ir(n)}function Nr(e,n){const t=te(e),r=te(n),i=Qe(t,r),l=Math.abs(Tr(t,r));let o;if(l<1)o=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*l);let a=Qe(t,r)===-i;Mr(te(e))&&l===1&&Qe(e,r)===1&&(a=!1),o=i*(l-Number(a))}return o===0?0:o}function _r(e,n,t){const r=Lr(e,n)/1e3;return zr(t==null?void 0:t.roundingMethod)(r)}function Or(e,n,t){const r=Ar(),i=(t==null?void 0:t.locale)??r.locale??Pr,l=2520,o=Qe(e,n);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:o});let c,u;o>0?(c=te(n),u=te(e)):(c=te(e),u=te(n));const s=_r(u,c),p=($n(u)-$n(c))/1e3,h=Math.round((s-p)/60);let f;if(h<2)return t!=null&&t.includeSeconds?s<5?i.formatDistance("lessThanXSeconds",5,a):s<10?i.formatDistance("lessThanXSeconds",10,a):s<20?i.formatDistance("lessThanXSeconds",20,a):s<40?i.formatDistance("halfAMinute",0,a):s<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):h===0?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",h,a);if(h<45)return i.formatDistance("xMinutes",h,a);if(h<90)return i.formatDistance("aboutXHours",1,a);if(h<Xn){const b=Math.round(h/60);return i.formatDistance("aboutXHours",b,a)}else{if(h<l)return i.formatDistance("xDays",1,a);if(h<$e){const b=Math.round(h/Xn);return i.formatDistance("xDays",b,a)}else if(h<$e*2)return f=Math.round(h/$e),i.formatDistance("aboutXMonths",f,a)}if(f=Nr(u,c),f<12){const b=Math.round(h/$e);return i.formatDistance("xMonths",b,a)}else{const b=f%12,S=Math.trunc(f/12);return b<3?i.formatDistance("aboutXYears",S,a):b<9?i.formatDistance("overXYears",S,a):i.formatDistance("almostXYears",S+1,a)}}function Rr(e,n){return Or(e,vr(e),n)}function Fr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Br=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr={};function Wn(e,n){return(Hr.jsx?Br:jr).test(e)}const Ur=/[ \t\n\f\r]/g;function Vr(e){return typeof e=="object"?e.type==="text"?Yn(e.value):!1:Yn(e)}function Yn(e){return e.replace(Ur,"")===""}class Ue{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Ue.prototype.normal={};Ue.prototype.property={};Ue.prototype.space=void 0;function Mt(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Ue(t,r,n)}function gn(e){return e.toLowerCase()}class Z{constructor(n,t){this.attribute=t,this.property=n}}Z.prototype.attribute="";Z.prototype.booleanish=!1;Z.prototype.boolean=!1;Z.prototype.commaOrSpaceSeparated=!1;Z.prototype.commaSeparated=!1;Z.prototype.defined=!1;Z.prototype.mustUseProperty=!1;Z.prototype.number=!1;Z.prototype.overloadedBoolean=!1;Z.prototype.property="";Z.prototype.spaceSeparated=!1;Z.prototype.space=void 0;let qr=0;const N=we(),W=we(),yn=we(),k=we(),$=we(),Ae=we(),ne=we();function we(){return 2**++qr}const xn=Object.freeze(Object.defineProperty({__proto__:null,boolean:N,booleanish:W,commaOrSpaceSeparated:ne,commaSeparated:Ae,number:k,overloadedBoolean:yn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),tn=Object.keys(xn);class Tn extends Z{constructor(n,t,r,i){let l=-1;if(super(n,t),Qn(this,"space",i),typeof r=="number")for(;++l<tn.length;){const o=tn[l];Qn(this,tn[l],(r&xn[o])===xn[o])}}}Tn.prototype.defined=!0;function Qn(e,n,t){t&&(e[n]=t)}function ve(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new Tn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[gn(r)]=r,t[gn(l.attribute)]=r}return new Ue(n,t,e.space)}const Nt=ve({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:W,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:$,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:k,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:$,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:W,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function _t(e,n){return n in e?e[n]:n}function Ot(e,n){return _t(e,n.toLowerCase())}const $r=ve({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:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:$,autoFocus:N,autoPlay:N,blocking:$,capture:null,charSet:null,checked:N,cite:null,className:$,cols:k,colSpan:null,content:null,contentEditable:W,controls:N,controlsList:$,coords:k|Ae,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:yn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:$,height:k,hidden:yn,high:k,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:$,itemRef:$,itemScope:N,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:k,pattern:null,ping:$,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:$,required:N,reversed:N,rows:k,rowSpan:k,sandbox:$,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:W,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:Ot}),Xr=ve({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",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:ne,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_t}),Rt=ve({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Ft=ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ot}),jt=ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Wr={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"},Yr=/[A-Z]/g,Kn=/-[a-z]/g,Qr=/^data[-\w.:]+$/i;function Kr(e,n){const t=gn(n);let r=n,i=Z;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Qr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Kn,Jr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Kn.test(l)){let o=l.replace(Yr,Gr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Tn}return new i(r,n)}function Gr(e){return"-"+e.toLowerCase()}function Jr(e){return e.charAt(1).toUpperCase()}const Zr=Mt([Nt,$r,Rt,Ft,jt],"html"),An=Mt([Nt,Xr,Rt,Ft,jt],"svg");function ei(e){return e.join(" ").trim()}var Ie={},rn,Gn;function ni(){if(Gn)return rn;Gn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
2
|
-
`,u="/",s="*",p="",h="comment",f="declaration";function b(I,x){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];x=x||{};var v=1,E=1;function F(P){var C=P.match(n);C&&(v+=C.length);var U=P.lastIndexOf(c);E=~U?P.length-U:E+P.length}function M(){var P={line:v,column:E};return function(C){return C.position=new y(P),j(),C}}function y(P){this.start=P,this.end={line:v,column:E},this.source=x.source}y.prototype.content=I;function _(P){var C=new Error(x.source+":"+v+":"+E+": "+P);if(C.reason=P,C.filename=x.source,C.line=v,C.column=E,C.source=I,!x.silent)throw C}function B(P){var C=P.exec(I);if(C){var U=C[0];return F(U),I=I.slice(U.length),C}}function j(){B(t)}function H(P){var C;for(P=P||[];C=A();)C!==!1&&P.push(C);return P}function A(){var P=M();if(!(u!=I.charAt(0)||s!=I.charAt(1))){for(var C=2;p!=I.charAt(C)&&(s!=I.charAt(C)||u!=I.charAt(C+1));)++C;if(C+=2,p===I.charAt(C-1))return _("End of comment missing");var U=I.slice(2,C-2);return E+=2,F(U),I=I.slice(C),E+=2,P({type:h,comment:U})}}function T(){var P=M(),C=B(r);if(C){if(A(),!B(i))return _("property missing ':'");var U=B(l),Y=P({type:f,property:S(C[0].replace(e,p)),value:U?S(U[0].replace(e,p)):p});return B(o),Y}}function q(){var P=[];H(P);for(var C;C=T();)C!==!1&&(P.push(C),H(P));return P}return j(),q()}function S(I){return I?I.replace(a,p):p}return rn=b,rn}var Jn;function ti(){if(Jn)return Ie;Jn=1;var e=Ie&&Ie.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.default=t;const n=e(ni());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),a=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:s}=c;a?i(u,s,c):s&&(l=l||{},l[u]=s)}),l}return Ie}var Ne={},Zn;function ri(){if(Zn)return Ne;Zn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||t.test(u)||e.test(u)},o=function(u,s){return s.toUpperCase()},a=function(u,s){return"".concat(s,"-")},c=function(u,s){return s===void 0&&(s={}),l(u)?u:(u=u.toLowerCase(),s.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,o))};return Ne.camelCase=c,Ne}var _e,et;function ii(){if(et)return _e;et=1;var e=_e&&_e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ti()),t=ri();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(o[(0,t.camelCase)(a,l)]=c)}),o}return r.default=r,_e=r,_e}var li=ii();const oi=Dt(li),Bt=Ht("end"),Pn=Ht("start");function Ht(e){return n;function n(t){const r=t&&t.position&&t.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 ai(e){const n=Pn(e),t=Bt(e);if(n&&t)return{start:n,end:t}}function Fe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nt(e.position):"start"in e||"end"in e?nt(e):"line"in e||"column"in e?kn(e):""}function kn(e){return tt(e&&e.line)+":"+tt(e&&e.column)}function nt(e){return kn(e&&e.start)+"-"+kn(e&&e.end)}function tt(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.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=Fe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const vn={}.hasOwnProperty,ui=new Map,si=/[A-Z]/g,ci=new Set(["table","tbody","thead","tfoot","tr"]),fi=new Set(["td","th"]),Ut="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=bi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ki(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?An:Zr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Vt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Vt(e,n,t){if(n.type==="element")return hi(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return di(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return gi(e,n,t);if(n.type==="mdxjsEsm")return mi(e,n);if(n.type==="root")return yi(e,n,t);if(n.type==="text")return xi(e,n)}function hi(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=An,e.schema=i),e.ancestors.push(n);const l=$t(e,n.tagName,!1),o=wi(e,n);let a=Ln(e,n);return ci.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Vr(c):!0})),qt(e,o,l,n),zn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function di(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}He(e,n.position)}function mi(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);He(e,n.position)}function gi(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=An,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:$t(e,n.name,!0),o=Si(e,n),a=Ln(e,n);return qt(e,o,l,n),zn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function yi(e,n,t){const r={};return zn(r,Ln(e,n)),e.create(n,e.Fragment,r,t)}function xi(e,n){return n.value}function qt(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function zn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function ki(e,n,t){return r;function r(i,l,o,a){const u=Array.isArray(o.children)?t:n;return a?u(l,o,a):u(l,o)}}function bi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),c=Pn(r);return n(i,l,o,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function wi(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&vn.call(n.properties,i)){const l=Ci(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&fi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Si(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else He(e,n.position);else{const i=r.name;let l;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,l=e.evaluater.evaluateExpression(a.expression)}else He(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Ln(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:ui;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const u=i.get(c)||0;o=c+"-"+u,i.set(c,u+1)}}const a=Vt(e,l,o);a!==void 0&&t.push(a)}return t}function Ci(e,n,t){const r=Kr(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Fr(t):ei(t)),r.property==="style"){let i=typeof t=="object"?t:Ei(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Ii(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Wr[r.property]||r.property:r.attribute,t]}}function Ei(e,n){try{return oi(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new K("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=Ut+"#cannot-parse-style-attribute",i}}function $t(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=Wn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Wn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return vn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);He(e)}function He(e,n){const t=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Ut+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Ii(e){const n={};let t;for(t in e)vn.call(e,t)&&(n[Ti(t)]=e[t]);return n}function Ti(e){let n=e.replace(si,Ai);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ai(e){return"-"+e.toLowerCase()}const ln={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"]},Pi={};function vi(e,n){const t=Pi,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Xt(e,r,i)}function Xt(e,n,t){if(zi(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rt(e.children,n,t)}return Array.isArray(e)?rt(e,n,t):""}function rt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Xt(e[i],n,t);return r.join("")}function zi(e){return!!(e&&typeof e=="object")}const it=document.createElement("i");function Dn(e){const n="&"+e+";";it.innerHTML=n;const t=it.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function fe(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ie(e,n){return e.length>0?(fe(e,e.length,0,n),e):n}const lt={}.hasOwnProperty;function Li(e){const n={};let t=-1;for(;++t<e.length;)Di(n,e[t]);return n}function Di(e,n){let t;for(t in n){const i=(lt.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){lt.call(i,o)||(i[o]=[]);const a=l[o];Mi(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Mi(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);fe(e,0,0,r)}function Wt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Pe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=xe(/[A-Za-z]/),re=xe(/[\dA-Za-z]/),Ni=xe(/[#-'*+\--9=?A-Z^-~]/);function bn(e){return e!==null&&(e<32||e===127)}const wn=xe(/\d/),_i=xe(/[\dA-Fa-f]/),Oi=xe(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const Ri=xe(new RegExp("\\p{P}|\\p{S}","u")),Fi=xe(/\s/);function xe(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ze(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&re(e.charCodeAt(t+1))&&re(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function X(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return R(c)?(e.enter(t),a(c)):n(c)}function a(c){return R(c)&&l++<i?(e.consume(c),a):(e.exit(t),n(c))}}const ji={tokenize:Bi};function Bi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),X(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const Hi={tokenize:Ui},ot={tokenize:Vi};function Ui(e){const n=this,t=[];let r=0,i,l,o;return a;function a(E){if(r<t.length){const F=t[r];return n.containerState=F[1],e.attempt(F[0].continuation,c,u)(E)}return u(E)}function c(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&v();const F=n.events.length;let M=F,y;for(;M--;)if(n.events[M][0]==="exit"&&n.events[M][1].type==="chunkFlow"){y=n.events[M][1].end;break}x(r);let _=F;for(;_<n.events.length;)n.events[_][1].end={...y},_++;return fe(n.events,M+1,0,n.events.slice(F)),n.events.length=_,u(E)}return a(E)}function u(E){if(r===t.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return b(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ot,s,p)(E)}function s(E){return i&&v(),x(r),h(E)}function p(E){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,b(E)}function h(E){return n.containerState={},e.attempt(ot,f,b)(E)}function f(E){return r++,t.push([n.currentConstruct,n.containerState]),h(E)}function b(E){if(E===null){i&&v(),x(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),S(E)}function S(E){if(E===null){I(e.exit("chunkFlow"),!0),x(0),e.consume(E);return}return z(E)?(e.consume(E),I(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(E),S)}function I(E,F){const M=n.sliceStream(E);if(F&&M.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(M),n.parser.lazy[E.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<o&&(!i.events[y][1].end||i.events[y][1].end.offset>o))return;const _=n.events.length;let B=_,j,H;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){if(j){H=n.events[B][1].end;break}j=!0}for(x(r),y=_;y<n.events.length;)n.events[y][1].end={...H},y++;fe(n.events,B+1,0,n.events.slice(_)),n.events.length=y}}function x(E){let F=t.length;for(;F-- >E;){const M=t[F];n.containerState=M[1],M[0].exit.call(n,e)}t.length=E}function v(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Vi(e,n,t){return X(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function at(e){if(e===null||J(e)||Fi(e))return 1;if(Ri(e))return 2}function Mn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Sn={name:"attention",resolveAll:qi,tokenize:$i};function qi(e,n){let t=-1,r,i,l,o,a,c,u,s;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const p={...e[r][1].end},h={...e[t][1].start};ut(p,-c),ut(h,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ie(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ie(u,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),u=ie(u,Mn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ie(u,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,u=ie(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,fe(e,r-1,t-r+3,u),t=r+u.length-s-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function $i(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=at(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===l)return e.consume(c),a;const u=e.exit("attentionSequence"),s=at(c),p=!s||s===2&&i||t.includes(c),h=!i||i===2&&s||t.includes(r);return u._open=!!(l===42?p:p&&(i||!h)),u._close=!!(l===42?h:h&&(s||!p)),n(c)}}function ut(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Xi={name:"autolink",tokenize:Wi};function Wi(e,n,t){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(f){return ce(f)?(e.consume(f),o):f===64?t(f):u(f)}function o(f){return f===43||f===45||f===46||re(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||re(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):f===null||f===32||f===60||bn(f)?t(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),s):Ni(f)?(e.consume(f),u):t(f)}function s(f){return re(f)?p(f):t(f)}function p(f){return f===46?(e.consume(f),r=0,s):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):h(f)}function h(f){if((f===45||re(f))&&r++<63){const b=f===45?h:p;return e.consume(f),b}return t(f)}}const Ze={partial:!0,tokenize:Yi};function Yi(e,n,t){return r;function r(l){return R(l)?X(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||z(l)?n(l):t(l)}}const Yt={continuation:{tokenize:Ki},exit:Gi,name:"blockQuote",tokenize:Qi};function Qi(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return R(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Ki(e,n,t){const r=this;return i;function i(o){return R(o)?X(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Yt,n,t)(o)}}function Gi(e){e.exit("blockQuote")}const Qt={name:"characterEscape",tokenize:Ji};function Ji(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Oi(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Kt={name:"characterReference",tokenize:Zi};function Zi(e,n,t){const r=this;let i=0,l,o;return a;function a(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=re,s(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=_i,s):(e.enter("characterReferenceValue"),l=7,o=wn,s(p))}function s(p){if(p===59&&i){const h=e.exit("characterReferenceValue");return o===re&&!Dn(r.sliceSerialize(h))?t(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(p)&&i++<l?(e.consume(p),s):t(p)}}const st={partial:!0,tokenize:nl},ct={concrete:!0,name:"codeFenced",tokenize:el};function el(e,n,t){const r=this,i={partial:!0,tokenize:M};let l=0,o=0,a;return c;function c(y){return u(y)}function u(y){const _=r.events[r.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(y)}function s(y){return y===a?(o++,e.consume(y),s):o<3?t(y):(e.exit("codeFencedFenceSequence"),R(y)?X(e,p,"whitespace")(y):p(y))}function p(y){return y===null||z(y)?(e.exit("codeFencedFence"),r.interrupt?n(y):e.check(st,S,F)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===null||z(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(y)):R(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),X(e,f,"whitespace")(y)):y===96&&y===a?t(y):(e.consume(y),h)}function f(y){return y===null||z(y)?p(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===null||z(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(y)):y===96&&y===a?t(y):(e.consume(y),b)}function S(y){return e.attempt(i,F,I)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),x}function x(y){return l>0&&R(y)?X(e,v,"linePrefix",l+1)(y):v(y)}function v(y){return y===null||z(y)?e.check(st,S,F)(y):(e.enter("codeFlowValue"),E(y))}function E(y){return y===null||z(y)?(e.exit("codeFlowValue"),v(y)):(e.consume(y),E)}function F(y){return e.exit("codeFenced"),n(y)}function M(y,_,B){let j=0;return H;function H(C){return y.enter("lineEnding"),y.consume(C),y.exit("lineEnding"),A}function A(C){return y.enter("codeFencedFence"),R(C)?X(y,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):T(C)}function T(C){return C===a?(y.enter("codeFencedFenceSequence"),q(C)):B(C)}function q(C){return C===a?(j++,y.consume(C),q):j>=o?(y.exit("codeFencedFenceSequence"),R(C)?X(y,P,"whitespace")(C):P(C)):B(C)}function P(C){return C===null||z(C)?(y.exit("codeFencedFence"),_(C)):B(C)}}}function nl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const on={name:"codeIndented",tokenize:rl},tl={partial:!0,tokenize:il};function rl(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),X(e,l,"linePrefix",5)(u)}function l(u){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(u):t(u)}function o(u){return u===null?c(u):z(u)?e.attempt(tl,o,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||z(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),n(u)}}function il(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):X(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):z(o)?i(o):t(o)}}const ll={name:"codeText",previous:al,resolve:ol,tokenize:ul};function ol(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function al(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ul(e,n,t){let r=0,i,l;return o;function o(p){return e.enter("codeText"),e.enter("codeTextSequence"),a(p)}function a(p){return p===96?(e.consume(p),r++,a):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?t(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(l=e.enter("codeTextSequence"),i=0,s(p)):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||z(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),u)}function s(p){return p===96?(e.consume(p),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(l.type="codeTextData",u(p))}}class sl{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Oe(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Oe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Oe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Oe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Oe(this.left,t.reverse())}}}function Oe(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Gt(e){const n={};let t=-1,r,i,l,o,a,c,u;const s=new sl(e);for(;++t<s.length;){for(;t in n;)t=n[t];if(r=s.get(t),t&&r[1].type==="chunkFlow"&&s.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,cl(s,t)),t=n[t],u=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=s.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,t),a.unshift(r),s.splice(i,t-i+1,a))}}return fe(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!u}function cl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,c=[],u={};let s,p,h=-1,f=t,b=0,S=0;const I=[S];for(;f;){for(;e.get(++i)[1]!==f;);l.push(i),f._tokenizer||(s=r.sliceStream(f),f.next||s.push(null),p&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(s),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(S=h+1,I.push(S),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):I.pop(),h=I.length;h--;){const x=a.slice(I[h],I[h+1]),v=l.pop();c.push([v,v+x.length-1]),e.splice(v,2,x)}for(c.reverse(),h=-1;++h<c.length;)u[b+c[h][0]]=b+c[h][1],b+=c[h][1]-c[h][0]-1;return u}const fl={resolve:hl,tokenize:dl},pl={partial:!0,tokenize:ml};function hl(e){return Gt(e),e}function dl(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):z(a)?e.check(pl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ml(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),X(e,l,"linePrefix")}function l(o){if(o===null||z(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Jt(e,n,t,r,i,l,o,a,c){const u=c||Number.POSITIVE_INFINITY;let s=0;return p;function p(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),h):x===null||x===32||x===41||bn(x)?t(x):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(x))}function h(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===62?(e.exit("chunkString"),e.exit(a),h(x)):x===null||x===60||z(x)?t(x):(e.consume(x),x===92?b:f)}function b(x){return x===60||x===62||x===92?(e.consume(x),f):f(x)}function S(x){return!s&&(x===null||x===41||J(x))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(x)):s<u&&x===40?(e.consume(x),s++,S):x===41?(e.consume(x),s--,S):x===null||x===32||x===40||bn(x)?t(x):(e.consume(x),x===92?I:S)}function I(x){return x===40||x===41||x===92?(e.consume(x),S):S(x)}}function Zt(e,n,t,r,i,l){const o=this;let a=0,c;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(l),s}function s(f){return a>999||f===null||f===91||f===93&&!c||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):z(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||z(f)||a++>999?(e.exit("chunkString"),s(f)):(e.consume(f),c||(c=!R(f)),f===92?h:p)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,p):p(f)}}function er(e,n,t,r,i,l){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,c):t(h)}function c(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),c(o)):h===null?t(h):z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),X(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(h))}function s(h){return h===o||h===null||z(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?p:s)}function p(h){return h===o||h===92?(e.consume(h),s):s(h)}}function je(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):R(i)?X(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const gl={name:"definition",tokenize:xl},yl={partial:!0,tokenize:kl};function xl(e,n,t){const r=this;let i;return l;function l(f){return e.enter("definition"),o(f)}function o(f){return Zt.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):t(f)}function c(f){return J(f)?je(e,u)(f):u(f)}function u(f){return Jt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function s(f){return e.attempt(yl,p,p)(f)}function p(f){return R(f)?X(e,h,"whitespace")(f):h(f)}function h(f){return f===null||z(f)?(e.exit("definition"),r.parser.defined.push(i),n(f)):t(f)}}function kl(e,n,t){return r;function r(a){return J(a)?je(e,i)(a):t(a)}function i(a){return er(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return R(a)?X(e,o,"whitespace")(a):o(a)}function o(a){return a===null||z(a)?n(a):t(a)}}const bl={name:"hardBreakEscape",tokenize:wl};function wl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return z(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Sl={name:"headingAtx",resolve:Cl,tokenize:El};function Cl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},fe(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function El(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||J(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||z(s)?(e.exit("atxHeading"),n(s)):R(s)?X(e,a,"whitespace")(s):(e.enter("atxHeadingText"),u(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),a(s))}function u(s){return s===null||s===35||J(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),u)}}const Il=["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"],ft=["pre","script","style","textarea"],Tl={concrete:!0,name:"htmlFlow",resolveTo:vl,tokenize:zl},Al={partial:!0,tokenize:Dl},Pl={partial:!0,tokenize:Ll};function vl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function zl(e,n,t){const r=this;let i,l,o,a,c;return u;function u(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),p}function p(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),l=!0,S):m===63?(e.consume(m),i=3,r.interrupt?n:d):ce(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function h(m){return m===45?(e.consume(m),i=2,f):m===91?(e.consume(m),i=5,a=0,b):ce(m)?(e.consume(m),i=4,r.interrupt?n:d):t(m)}function f(m){return m===45?(e.consume(m),r.interrupt?n:d):t(m)}function b(m){const ae="CDATA[";return m===ae.charCodeAt(a++)?(e.consume(m),a===ae.length?r.interrupt?n:T:b):t(m)}function S(m){return ce(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||J(m)){const ae=m===47,ke=o.toLowerCase();return!ae&&!l&&ft.includes(ke)?(i=1,r.interrupt?n(m):T(m)):Il.includes(o.toLowerCase())?(i=6,ae?(e.consume(m),x):r.interrupt?n(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?v(m):E(m))}return m===45||re(m)?(e.consume(m),o+=String.fromCharCode(m),I):t(m)}function x(m){return m===62?(e.consume(m),r.interrupt?n:T):t(m)}function v(m){return R(m)?(e.consume(m),v):H(m)}function E(m){return m===47?(e.consume(m),H):m===58||m===95||ce(m)?(e.consume(m),F):R(m)?(e.consume(m),E):H(m)}function F(m){return m===45||m===46||m===58||m===95||re(m)?(e.consume(m),F):M(m)}function M(m){return m===61?(e.consume(m),y):R(m)?(e.consume(m),M):E(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,_):R(m)?(e.consume(m),y):B(m)}function _(m){return m===c?(e.consume(m),c=null,j):m===null||z(m)?t(m):(e.consume(m),_)}function B(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||J(m)?M(m):(e.consume(m),B)}function j(m){return m===47||m===62||R(m)?E(m):t(m)}function H(m){return m===62?(e.consume(m),A):t(m)}function A(m){return m===null||z(m)?T(m):R(m)?(e.consume(m),A):t(m)}function T(m){return m===45&&i===2?(e.consume(m),U):m===60&&i===1?(e.consume(m),Y):m===62&&i===4?(e.consume(m),oe):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),pe):z(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Al,he,q)(m)):m===null||z(m)?(e.exit("htmlFlowData"),q(m)):(e.consume(m),T)}function q(m){return e.check(Pl,P,he)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),C}function C(m){return m===null||z(m)?q(m):(e.enter("htmlFlowData"),T(m))}function U(m){return m===45?(e.consume(m),d):T(m)}function Y(m){return m===47?(e.consume(m),o="",le):T(m)}function le(m){if(m===62){const ae=o.toLowerCase();return ft.includes(ae)?(e.consume(m),oe):T(m)}return ce(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),le):T(m)}function pe(m){return m===93?(e.consume(m),d):T(m)}function d(m){return m===62?(e.consume(m),oe):m===45&&i===2?(e.consume(m),d):T(m)}function oe(m){return m===null||z(m)?(e.exit("htmlFlowData"),he(m)):(e.consume(m),oe)}function he(m){return e.exit("htmlFlow"),n(m)}}function Ll(e,n,t){const r=this;return i;function i(o){return z(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Dl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ze,n,t)}}const Ml={name:"htmlText",tokenize:Nl};function Nl(e,n,t){const r=this;let i,l,o;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),M):d===63?(e.consume(d),E):ce(d)?(e.consume(d),B):t(d)}function u(d){return d===45?(e.consume(d),s):d===91?(e.consume(d),l=0,b):ce(d)?(e.consume(d),v):t(d)}function s(d){return d===45?(e.consume(d),f):t(d)}function p(d){return d===null?t(d):d===45?(e.consume(d),h):z(d)?(o=p,Y(d)):(e.consume(d),p)}function h(d){return d===45?(e.consume(d),f):p(d)}function f(d){return d===62?U(d):d===45?h(d):p(d)}function b(d){const oe="CDATA[";return d===oe.charCodeAt(l++)?(e.consume(d),l===oe.length?S:b):t(d)}function S(d){return d===null?t(d):d===93?(e.consume(d),I):z(d)?(o=S,Y(d)):(e.consume(d),S)}function I(d){return d===93?(e.consume(d),x):S(d)}function x(d){return d===62?U(d):d===93?(e.consume(d),x):S(d)}function v(d){return d===null||d===62?U(d):z(d)?(o=v,Y(d)):(e.consume(d),v)}function E(d){return d===null?t(d):d===63?(e.consume(d),F):z(d)?(o=E,Y(d)):(e.consume(d),E)}function F(d){return d===62?U(d):E(d)}function M(d){return ce(d)?(e.consume(d),y):t(d)}function y(d){return d===45||re(d)?(e.consume(d),y):_(d)}function _(d){return z(d)?(o=_,Y(d)):R(d)?(e.consume(d),_):U(d)}function B(d){return d===45||re(d)?(e.consume(d),B):d===47||d===62||J(d)?j(d):t(d)}function j(d){return d===47?(e.consume(d),U):d===58||d===95||ce(d)?(e.consume(d),H):z(d)?(o=j,Y(d)):R(d)?(e.consume(d),j):U(d)}function H(d){return d===45||d===46||d===58||d===95||re(d)?(e.consume(d),H):A(d)}function A(d){return d===61?(e.consume(d),T):z(d)?(o=A,Y(d)):R(d)?(e.consume(d),A):j(d)}function T(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),i=d,q):z(d)?(o=T,Y(d)):R(d)?(e.consume(d),T):(e.consume(d),P)}function q(d){return d===i?(e.consume(d),i=void 0,C):d===null?t(d):z(d)?(o=q,Y(d)):(e.consume(d),q)}function P(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||J(d)?j(d):(e.consume(d),P)}function C(d){return d===47||d===62||J(d)?j(d):t(d)}function U(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function Y(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),le}function le(d){return R(d)?X(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):pe(d)}function pe(d){return e.enter("htmlTextData"),o(d)}}const Nn={name:"labelEnd",resolveAll:Fl,resolveTo:jl,tokenize:Bl},_l={tokenize:Hl},Ol={tokenize:Ul},Rl={tokenize:Vl};function Fl(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&fe(e,0,e.length,t),e}function jl(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},s={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,n],["enter",u,n]],a=ie(a,e.slice(l+1,l+r+3)),a=ie(a,[["enter",s,n]]),a=ie(a,Mn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ie(a,[["exit",s,n],e[o-2],e[o-1],["exit",u,n]]),a=ie(a,e.slice(o+1)),a=ie(a,[["exit",c,n]]),fe(e,l,e.length,a),e}function Bl(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(h){return l?l._inactive?p(h):(o=r.parser.defined.includes(Pe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),c):t(h)}function c(h){return h===40?e.attempt(_l,s,o?s:p)(h):h===91?e.attempt(Ol,s,o?u:p)(h):o?s(h):p(h)}function u(h){return e.attempt(Rl,s,p)(h)}function s(h){return n(h)}function p(h){return l._balanced=!0,t(h)}}function Hl(e,n,t){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return J(p)?je(e,l)(p):l(p)}function l(p){return p===41?s(p):Jt(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return J(p)?je(e,c)(p):s(p)}function a(p){return t(p)}function c(p){return p===34||p===39||p===40?er(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):s(p)}function u(p){return J(p)?je(e,s)(p):s(p)}function s(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):t(p)}}function Ul(e,n,t){const r=this;return i;function i(a){return Zt.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function Vl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const ql={name:"labelStartImage",resolveAll:Nn.resolveAll,tokenize:$l};function $l(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Xl={name:"labelStartLink",resolveAll:Nn.resolveAll,tokenize:Wl};function Wl(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const an={name:"lineEnding",tokenize:Yl};function Yl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),X(e,n,"linePrefix")}}const Ke={name:"thematicBreak",tokenize:Ql};function Ql(e,n,t){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||z(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),R(u)?X(e,a,"whitespace")(u):a(u))}}const G={continuation:{tokenize:Zl},exit:no,name:"list",tokenize:Jl},Kl={partial:!0,tokenize:to},Gl={partial:!0,tokenize:eo};function Jl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const b=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:wn(f)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ke,t,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return t(f)}function c(f){return wn(f)&&++o<10?(e.consume(f),c):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):t(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ze,r.interrupt?t:s,e.attempt(Kl,h,p))}function s(f){return r.containerState.initialBlankLine=!0,l++,h(f)}function p(f){return R(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):t(f)}function h(f){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(f)}}function Zl(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ze,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!R(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Gl,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function eo(e,n,t){const r=this;return X(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function no(e){e.exit(this.containerState.type)}function to(e,n,t){const r=this;return X(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!R(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const pt={name:"setextUnderline",resolveTo:ro,tokenize:io};function ro(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function io(e,n,t){const r=this;let i;return l;function l(u){let s=r.events.length,p;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){p=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=u,o(u)):t(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),R(u)?X(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||z(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const lo={tokenize:oo};function oo(e){const n=this,t=e.attempt(Ze,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ao={resolveAll:tr()},uo=nr("string"),so=nr("text");function nr(e){return{resolveAll:tr(e==="text"?co:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return u(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return u(s)?(t.exit("data"),l(s)):(t.consume(s),c)}function u(s){if(s===null)return!0;const p=i[s];let h=-1;if(p)for(;++h<p.length;){const f=p[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function tr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function co(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,c;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)c=!0,a++;else if(u!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const fo={42:G,43:G,45:G,48:G,49:G,50:G,51:G,52:G,53:G,54:G,55:G,56:G,57:G,62:Yt},po={91:gl},ho={[-2]:on,[-1]:on,32:on},mo={35:Sl,42:Ke,45:[pt,Ke],60:Tl,61:pt,95:Ke,96:ct,126:ct},go={38:Kt,92:Qt},yo={[-5]:an,[-4]:an,[-3]:an,33:ql,38:Kt,42:Sn,60:[Xi,Ml],91:Xl,92:[bl,Qt],93:Nn,95:Sn,96:ll},xo={null:[Sn,ao]},ko={null:[42,95]},bo={null:[]},wo=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ko,contentInitial:po,disable:bo,document:fo,flow:mo,flowInitial:ho,insideSpan:xo,string:go,text:yo},Symbol.toStringTag,{value:"Module"}));function So(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const c={attempt:_(M),check:_(y),consume:v,enter:E,exit:F,interrupt:_(y,{interrupt:!0})},u={code:null,containerState:{},defineSkip:S,events:[],now:b,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:p};let s=n.tokenize.call(u,c);return n.resolveAll&&l.push(n),u;function p(A){return o=ie(o,A),I(),o[o.length-1]!==null?[]:(B(n,0),u.events=Mn(l,u.events,u),u.events)}function h(A,T){return Eo(f(A),T)}function f(A){return Co(o,A)}function b(){const{_bufferIndex:A,_index:T,line:q,column:P,offset:C}=r;return{_bufferIndex:A,_index:T,line:q,column:P,offset:C}}function S(A){i[A.line]=A.column,H()}function I(){let A;for(;r._index<o.length;){const T=o[r._index];if(typeof T=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<T.length;)x(T.charCodeAt(r._bufferIndex));else x(T)}}function x(A){s=s(A)}function v(A){z(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,H()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=A}function E(A,T){const q=T||{};return q.type=A,q.start=b(),u.events.push(["enter",q,u]),a.push(q),q}function F(A){const T=a.pop();return T.end=b(),u.events.push(["exit",T,u]),T}function M(A,T){B(A,T.from)}function y(A,T){T.restore()}function _(A,T){return q;function q(P,C,U){let Y,le,pe,d;return Array.isArray(P)?he(P):"tokenize"in P?he([P]):oe(P);function oe(Q){return Le;function Le(ge){const Se=ge!==null&&Q[ge],Ce=ge!==null&&Q.null,qe=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Ce)?Ce:Ce?[Ce]:[]];return he(qe)(ge)}}function he(Q){return Y=Q,le=0,Q.length===0?U:m(Q[le])}function m(Q){return Le;function Le(ge){return d=j(),pe=Q,Q.partial||(u.currentConstruct=Q),Q.name&&u.parser.constructs.disable.null.includes(Q.name)?ke():Q.tokenize.call(T?Object.assign(Object.create(u),T):u,c,ae,ke)(ge)}}function ae(Q){return A(pe,d),C}function ke(Q){return d.restore(),++le<Y.length?m(Y[le]):U}}}function B(A,T){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&fe(u.events,T,u.events.length-T,A.resolve(u.events.slice(T),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function j(){const A=b(),T=u.previous,q=u.currentConstruct,P=u.events.length,C=Array.from(a);return{from:P,restore:U};function U(){r=A,u.previous=T,u.currentConstruct=q,u.events.length=P,a=C,H()}}function H(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Co(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Eo(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
1
|
+
import{j as T}from"./jsx-runtime-Cf8x2fCZ.js";import{a as Er}from"./BrandIcons-Cjy5INAp.js";import{g as Mt}from"./index--qcDGAq6.js";import{t as te,c as Ir,d as Tr,f as Ar,a as Xn,g as Pr,e as vr,h as Wn,i as $e}from"./en-US-BukEqXxE.js";function Qe(e,n){const t=te(e),r=te(n),i=t.getTime()-r.getTime();return i<0?-1:i>0?1:i}function zr(e){return Ir(e,Date.now())}function Dr(e){return n=>{const r=(e?Math[e]:Math.trunc)(n);return r===0?0:r}}function Lr(e,n){return+te(e)-+te(n)}function Mr(e){const n=te(e);return n.setHours(23,59,59,999),n}function _r(e){const n=te(e);return+Mr(n)==+Tr(n)}function Nr(e,n){const t=te(e),r=te(n),i=Qe(t,r),l=Math.abs(Ar(t,r));let o;if(l<1)o=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*l);let a=Qe(t,r)===-i;_r(te(e))&&l===1&&Qe(e,r)===1&&(a=!1),o=i*(l-Number(a))}return o===0?0:o}function Or(e,n,t){const r=Lr(e,n)/1e3;return Dr(t==null?void 0:t.roundingMethod)(r)}function Rr(e,n,t){const r=Pr(),i=(t==null?void 0:t.locale)??r.locale??vr,l=2520,o=Qe(e,n);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:o});let c,u;o>0?(c=te(n),u=te(e)):(c=te(e),u=te(n));const s=Or(u,c),f=(Xn(u)-Xn(c))/1e3,h=Math.round((s-f)/60);let p;if(h<2)return t!=null&&t.includeSeconds?s<5?i.formatDistance("lessThanXSeconds",5,a):s<10?i.formatDistance("lessThanXSeconds",10,a):s<20?i.formatDistance("lessThanXSeconds",20,a):s<40?i.formatDistance("halfAMinute",0,a):s<60?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",1,a):h===0?i.formatDistance("lessThanXMinutes",1,a):i.formatDistance("xMinutes",h,a);if(h<45)return i.formatDistance("xMinutes",h,a);if(h<90)return i.formatDistance("aboutXHours",1,a);if(h<Wn){const b=Math.round(h/60);return i.formatDistance("aboutXHours",b,a)}else{if(h<l)return i.formatDistance("xDays",1,a);if(h<$e){const b=Math.round(h/Wn);return i.formatDistance("xDays",b,a)}else if(h<$e*2)return p=Math.round(h/$e),i.formatDistance("aboutXMonths",p,a)}if(p=Nr(u,c),p<12){const b=Math.round(h/$e);return i.formatDistance("xMonths",b,a)}else{const b=p%12,S=Math.trunc(p/12);return b<3?i.formatDistance("aboutXYears",S,a):b<9?i.formatDistance("overXYears",S,a):i.formatDistance("almostXYears",S+1,a)}}function Fr(e,n){return Rr(e,zr(e),n)}function jr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Br=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ur={};function Yn(e,n){return(Ur.jsx?Hr:Br).test(e)}const qr=/[ \t\n\f\r]/g;function Vr(e){return typeof e=="object"?e.type==="text"?Qn(e.value):!1:Qn(e)}function Qn(e){return e.replace(qr,"")===""}class Ue{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Ue.prototype.normal={};Ue.prototype.property={};Ue.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Ue(t,r,n)}function gn(e){return e.toLowerCase()}class Z{constructor(n,t){this.attribute=t,this.property=n}}Z.prototype.attribute="";Z.prototype.booleanish=!1;Z.prototype.boolean=!1;Z.prototype.commaOrSpaceSeparated=!1;Z.prototype.commaSeparated=!1;Z.prototype.defined=!1;Z.prototype.mustUseProperty=!1;Z.prototype.number=!1;Z.prototype.overloadedBoolean=!1;Z.prototype.property="";Z.prototype.spaceSeparated=!1;Z.prototype.space=void 0;let $r=0;const M=we(),W=we(),yn=we(),k=we(),$=we(),Ae=we(),ne=we();function we(){return 2**++$r}const xn=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:W,commaOrSpaceSeparated:ne,commaSeparated:Ae,number:k,overloadedBoolean:yn,spaceSeparated:$},Symbol.toStringTag,{value:"Module"})),tn=Object.keys(xn);class An extends Z{constructor(n,t,r,i){let l=-1;if(super(n,t),Kn(this,"space",i),typeof r=="number")for(;++l<tn.length;){const o=tn[l];Kn(this,tn[l],(r&xn[o])===xn[o])}}}An.prototype.defined=!0;function Kn(e,n,t){t&&(e[n]=t)}function ve(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const l=new An(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[gn(r)]=r,t[gn(l.attribute)]=r}return new Ue(n,t,e.space)}const Nt=ve({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:W,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:$,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:k,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:$,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:W,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Ot(e,n){return n in e?e[n]:n}function Rt(e,n){return Ot(e,n.toLowerCase())}const Xr=ve({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:M,allowPaymentRequest:M,allowUserMedia:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:$,autoFocus:M,autoPlay:M,blocking:$,capture:null,charSet:null,checked:M,cite:null,className:$,cols:k,colSpan:null,content:null,contentEditable:W,controls:M,controlsList:$,coords:k|Ae,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:yn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:$,height:k,hidden:yn,high:k,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:$,itemRef:$,itemScope:M,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,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:M,optimum:k,pattern:null,ping:$,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:$,required:M,reversed:M,rows:k,rowSpan:k,sandbox:$,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:W,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M,disableRemotePlayback:M,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:Rt}),Wr=ve({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",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:ne,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ot}),Ft=ve({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),jt=ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rt}),Bt=ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Yr={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"},Qr=/[A-Z]/g,Gn=/-[a-z]/g,Kr=/^data[-\w.:]+$/i;function Gr(e,n){const t=gn(n);let r=n,i=Z;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Kr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Gn,Zr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Gn.test(l)){let o=l.replace(Qr,Jr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=An}return new i(r,n)}function Jr(e){return"-"+e.toLowerCase()}function Zr(e){return e.charAt(1).toUpperCase()}const ei=_t([Nt,Xr,Ft,jt,Bt],"html"),Pn=_t([Nt,Wr,Ft,jt,Bt],"svg");function ni(e){return e.join(" ").trim()}var Ie={},rn,Jn;function ti(){if(Jn)return rn;Jn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
2
|
+
`,u="/",s="*",f="",h="comment",p="declaration";function b(I,x){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];x=x||{};var z=1,E=1;function F(v){var C=v.match(n);C&&(z+=C.length);var U=v.lastIndexOf(c);E=~U?v.length-U:E+v.length}function N(){var v={line:z,column:E};return function(C){return C.position=new y(v),j(),C}}function y(v){this.start=v,this.end={line:z,column:E},this.source=x.source}y.prototype.content=I;function O(v){var C=new Error(x.source+":"+z+":"+E+": "+v);if(C.reason=v,C.filename=x.source,C.line=z,C.column=E,C.source=I,!x.silent)throw C}function B(v){var C=v.exec(I);if(C){var U=C[0];return F(U),I=I.slice(U.length),C}}function j(){B(t)}function H(v){var C;for(v=v||[];C=P();)C!==!1&&v.push(C);return v}function P(){var v=N();if(!(u!=I.charAt(0)||s!=I.charAt(1))){for(var C=2;f!=I.charAt(C)&&(s!=I.charAt(C)||u!=I.charAt(C+1));)++C;if(C+=2,f===I.charAt(C-1))return O("End of comment missing");var U=I.slice(2,C-2);return E+=2,F(U),I=I.slice(C),E+=2,v({type:h,comment:U})}}function A(){var v=N(),C=B(r);if(C){if(P(),!B(i))return O("property missing ':'");var U=B(l),Y=v({type:p,property:S(C[0].replace(e,f)),value:U?S(U[0].replace(e,f)):f});return B(o),Y}}function V(){var v=[];H(v);for(var C;C=A();)C!==!1&&(v.push(C),H(v));return v}return j(),V()}function S(I){return I?I.replace(a,f):f}return rn=b,rn}var Zn;function ri(){if(Zn)return Ie;Zn=1;var e=Ie&&Ie.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.default=t;const n=e(ti());function t(r,i){let l=null;if(!r||typeof r!="string")return l;const o=(0,n.default)(r),a=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:s}=c;a?i(u,s,c):s&&(l=l||{},l[u]=s)}),l}return Ie}var _e={},et;function ii(){if(et)return _e;et=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||t.test(u)||e.test(u)},o=function(u,s){return s.toUpperCase()},a=function(u,s){return"".concat(s,"-")},c=function(u,s){return s===void 0&&(s={}),l(u)?u:(u=u.toLowerCase(),s.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,o))};return _e.camelCase=c,_e}var Ne,nt;function li(){if(nt)return Ne;nt=1;var e=Ne&&Ne.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ri()),t=ii();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(o[(0,t.camelCase)(a,l)]=c)}),o}return r.default=r,Ne=r,Ne}var oi=li();const ai=Mt(oi),Ht=Ut("end"),vn=Ut("start");function Ut(e){return n;function n(t){const r=t&&t.position&&t.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 ui(e){const n=vn(e),t=Ht(e);if(n&&t)return{start:n,end:t}}function Fe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tt(e.position):"start"in e||"end"in e?tt(e):"line"in e||"column"in e?kn(e):""}function kn(e){return rt(e&&e.line)+":"+rt(e&&e.column)}function tt(e){return kn(e&&e.start)+"-"+kn(e&&e.end)}function rt(e){return e&&typeof e=="number"?e:1}class K extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?l.ruleId=r:(l.source=r.slice(0,c),l.ruleId=r.slice(c+1))}if(!l.place&&l.ancestors&&l.ancestors){const c=l.ancestors[l.ancestors.length-1];c&&(l.place=c.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.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=Fe(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const zn={}.hasOwnProperty,si=new Map,ci=/[A-Z]/g,pi=new Set(["table","tbody","thead","tfoot","tr"]),fi=new Set(["td","th"]),qt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=bi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Pn:ei,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Vt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Vt(e,n,t){if(n.type==="element")return di(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return mi(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return yi(e,n,t);if(n.type==="mdxjsEsm")return gi(e,n);if(n.type==="root")return xi(e,n,t);if(n.type==="text")return ki(e,n)}function di(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Pn,e.schema=i),e.ancestors.push(n);const l=Xt(e,n.tagName,!1),o=Si(e,n);let a=Ln(e,n);return pi.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!Vr(c):!0})),$t(e,o,l,n),Dn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function mi(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}He(e,n.position)}function gi(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);He(e,n.position)}function yi(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Pn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Xt(e,n.name,!0),o=Ci(e,n),a=Ln(e,n);return $t(e,o,l,n),Dn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function xi(e,n,t){const r={};return Dn(r,Ln(e,n)),e.create(n,e.Fragment,r,t)}function ki(e,n){return n.value}function $t(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Dn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function bi(e,n,t){return r;function r(i,l,o,a){const u=Array.isArray(o.children)?t:n;return a?u(l,o,a):u(l,o)}}function wi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),c=vn(r);return n(i,l,o,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Si(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&zn.call(n.properties,i)){const l=Ei(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&fi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Ci(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else He(e,n.position);else{const i=r.name;let l;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,l=e.evaluater.evaluateExpression(a.expression)}else He(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Ln(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:si;for(;++r<n.children.length;){const l=n.children[r];let o;if(e.passKeys){const c=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(c){const u=i.get(c)||0;o=c+"-"+u,i.set(c,u+1)}}const a=Vt(e,l,o);a!==void 0&&t.push(a)}return t}function Ei(e,n,t){const r=Gr(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?jr(t):ni(t)),r.property==="style"){let i=typeof t=="object"?t:Ii(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Ti(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Yr[r.property]||r.property:r.attribute,t]}}function Ii(e,n){try{return ai(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new K("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=qt+"#cannot-parse-style-attribute",i}}function Xt(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let l=-1,o;for(;++l<i.length;){const a=Yn(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}r=o}else r=Yn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return zn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);He(e)}function He(e,n){const t=new K("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=qt+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Ti(e){const n={};let t;for(t in e)zn.call(e,t)&&(n[Ai(t)]=e[t]);return n}function Ai(e){let n=e.replace(ci,Pi);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Pi(e){return"-"+e.toLowerCase()}const ln={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"]},vi={};function zi(e,n){const t=vi,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Wt(e,r,i)}function Wt(e,n,t){if(Di(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return it(e.children,n,t)}return Array.isArray(e)?it(e,n,t):""}function it(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Wt(e[i],n,t);return r.join("")}function Di(e){return!!(e&&typeof e=="object")}const lt=document.createElement("i");function Mn(e){const n="&"+e+";";lt.innerHTML=n;const t=lt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function pe(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function ie(e,n){return e.length>0?(pe(e,e.length,0,n),e):n}const ot={}.hasOwnProperty;function Li(e){const n={};let t=-1;for(;++t<e.length;)Mi(n,e[t]);return n}function Mi(e,n){let t;for(t in n){const i=(ot.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){ot.call(i,o)||(i[o]=[]);const a=l[o];_i(i[o],Array.isArray(a)?a:a?[a]:[])}}}function _i(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);pe(e,0,0,r)}function Yt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Pe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=xe(/[A-Za-z]/),re=xe(/[\dA-Za-z]/),Ni=xe(/[#-'*+\--9=?A-Z^-~]/);function bn(e){return e!==null&&(e<32||e===127)}const wn=xe(/\d/),Oi=xe(/[\dA-Fa-f]/),Ri=xe(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function R(e){return e===-2||e===-1||e===32}const Fi=xe(new RegExp("\\p{P}|\\p{S}","u")),ji=xe(/\s/);function xe(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ze(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&re(e.charCodeAt(t+1))&&re(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function X(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(c){return R(c)?(e.enter(t),a(c)):n(c)}function a(c){return R(c)&&l++<i?(e.consume(c),a):(e.exit(t),n(c))}}const Bi={tokenize:Hi};function Hi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),X(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),l(a)}function l(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return D(a)?(e.consume(a),e.exit("chunkText"),l):(e.consume(a),o)}}const Ui={tokenize:qi},at={tokenize:Vi};function qi(e){const n=this,t=[];let r=0,i,l,o;return a;function a(E){if(r<t.length){const F=t[r];return n.containerState=F[1],e.attempt(F[0].continuation,c,u)(E)}return u(E)}function c(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&z();const F=n.events.length;let N=F,y;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){y=n.events[N][1].end;break}x(r);let O=F;for(;O<n.events.length;)n.events[O][1].end={...y},O++;return pe(n.events,N+1,0,n.events.slice(F)),n.events.length=O,u(E)}return a(E)}function u(E){if(r===t.length){if(!i)return h(E);if(i.currentConstruct&&i.currentConstruct.concrete)return b(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(at,s,f)(E)}function s(E){return i&&z(),x(r),h(E)}function f(E){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,b(E)}function h(E){return n.containerState={},e.attempt(at,p,b)(E)}function p(E){return r++,t.push([n.currentConstruct,n.containerState]),h(E)}function b(E){if(E===null){i&&z(),x(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),S(E)}function S(E){if(E===null){I(e.exit("chunkFlow"),!0),x(0),e.consume(E);return}return D(E)?(e.consume(E),I(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(E),S)}function I(E,F){const N=n.sliceStream(E);if(F&&N.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(N),n.parser.lazy[E.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<o&&(!i.events[y][1].end||i.events[y][1].end.offset>o))return;const O=n.events.length;let B=O,j,H;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){if(j){H=n.events[B][1].end;break}j=!0}for(x(r),y=O;y<n.events.length;)n.events[y][1].end={...H},y++;pe(n.events,B+1,0,n.events.slice(O)),n.events.length=y}}function x(E){let F=t.length;for(;F-- >E;){const N=t[F];n.containerState=N[1],N[0].exit.call(n,e)}t.length=E}function z(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Vi(e,n,t){return X(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ut(e){if(e===null||J(e)||ji(e))return 1;if(Fi(e))return 2}function _n(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Sn={name:"attention",resolveAll:$i,tokenize:Xi};function $i(e,n){let t=-1,r,i,l,o,a,c,u,s;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[t][1].start};st(f,-c),st(h,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},l={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ie(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ie(u,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),u=ie(u,_n(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ie(u,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,u=ie(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,pe(e,r-1,t-r+3,u),t=r+u.length-s-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Xi(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ut(r);let l;return o;function o(c){return l=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===l)return e.consume(c),a;const u=e.exit("attentionSequence"),s=ut(c),f=!s||s===2&&i||t.includes(c),h=!i||i===2&&s||t.includes(r);return u._open=!!(l===42?f:f&&(i||!h)),u._close=!!(l===42?h:h&&(s||!f)),n(c)}}function st(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Wi={name:"autolink",tokenize:Yi};function Yi(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return ce(p)?(e.consume(p),o):p===64?t(p):u(p)}function o(p){return p===43||p===45||p===46||re(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||re(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||bn(p)?t(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),s):Ni(p)?(e.consume(p),u):t(p)}function s(p){return re(p)?f(p):t(p)}function f(p){return p===46?(e.consume(p),r=0,s):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):h(p)}function h(p){if((p===45||re(p))&&r++<63){const b=p===45?h:f;return e.consume(p),b}return t(p)}}const Ze={partial:!0,tokenize:Qi};function Qi(e,n,t){return r;function r(l){return R(l)?X(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||D(l)?n(l):t(l)}}const Qt={continuation:{tokenize:Gi},exit:Ji,name:"blockQuote",tokenize:Ki};function Ki(e,n,t){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return R(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function Gi(e,n,t){const r=this;return i;function i(o){return R(o)?X(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Qt,n,t)(o)}}function Ji(e){e.exit("blockQuote")}const Kt={name:"characterEscape",tokenize:Zi};function Zi(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Ri(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Gt={name:"characterReference",tokenize:el};function el(e,n,t){const r=this;let i=0,l,o;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=re,s(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=Oi,s):(e.enter("characterReferenceValue"),l=7,o=wn,s(f))}function s(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return o===re&&!Mn(r.sliceSerialize(h))?t(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(f)&&i++<l?(e.consume(f),s):t(f)}}const ct={partial:!0,tokenize:tl},pt={concrete:!0,name:"codeFenced",tokenize:nl};function nl(e,n,t){const r=this,i={partial:!0,tokenize:N};let l=0,o=0,a;return c;function c(y){return u(y)}function u(y){const O=r.events[r.events.length-1];return l=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,a=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(y)}function s(y){return y===a?(o++,e.consume(y),s):o<3?t(y):(e.exit("codeFencedFenceSequence"),R(y)?X(e,f,"whitespace")(y):f(y))}function f(y){return y===null||D(y)?(e.exit("codeFencedFence"),r.interrupt?n(y):e.check(ct,S,F)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===null||D(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(y)):R(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),X(e,p,"whitespace")(y)):y===96&&y===a?t(y):(e.consume(y),h)}function p(y){return y===null||D(y)?f(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(y))}function b(y){return y===null||D(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(y)):y===96&&y===a?t(y):(e.consume(y),b)}function S(y){return e.attempt(i,F,I)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),x}function x(y){return l>0&&R(y)?X(e,z,"linePrefix",l+1)(y):z(y)}function z(y){return y===null||D(y)?e.check(ct,S,F)(y):(e.enter("codeFlowValue"),E(y))}function E(y){return y===null||D(y)?(e.exit("codeFlowValue"),z(y)):(e.consume(y),E)}function F(y){return e.exit("codeFenced"),n(y)}function N(y,O,B){let j=0;return H;function H(C){return y.enter("lineEnding"),y.consume(C),y.exit("lineEnding"),P}function P(C){return y.enter("codeFencedFence"),R(C)?X(y,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):A(C)}function A(C){return C===a?(y.enter("codeFencedFenceSequence"),V(C)):B(C)}function V(C){return C===a?(j++,y.consume(C),V):j>=o?(y.exit("codeFencedFenceSequence"),R(C)?X(y,v,"whitespace")(C):v(C)):B(C)}function v(C){return C===null||D(C)?(y.exit("codeFencedFence"),O(C)):B(C)}}}function tl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const on={name:"codeIndented",tokenize:il},rl={partial:!0,tokenize:ll};function il(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),X(e,l,"linePrefix",5)(u)}function l(u){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(u):t(u)}function o(u){return u===null?c(u):D(u)?e.attempt(rl,o,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||D(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),n(u)}}function ll(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):D(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):X(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):D(o)?i(o):t(o)}}const ol={name:"codeText",previous:ul,resolve:al,tokenize:sl};function al(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function ul(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sl(e,n,t){let r=0,i,l;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?t(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(l=e.enter("codeTextSequence"),i=0,s(f)):D(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||D(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function s(f){return f===96?(e.consume(f),i++,s):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(f)):(l.type="codeTextData",u(f))}}class cl{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Oe(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Oe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Oe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Oe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Oe(this.left,t.reverse())}}}function Oe(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Jt(e){const n={};let t=-1,r,i,l,o,a,c,u;const s=new cl(e);for(;++t<s.length;){for(;t in n;)t=n[t];if(r=s.get(t),t&&r[1].type==="chunkFlow"&&s.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,pl(s,t)),t=n[t],u=!0);else if(r[1]._container){for(l=t,i=void 0;l--;)if(o=s.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(s.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...s.get(i)[1].start},a=s.slice(i,t),a.unshift(r),s.splice(i,t-i+1,a))}}return pe(e,0,Number.POSITIVE_INFINITY,s.slice(0)),!u}function pl(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const l=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,c=[],u={};let s,f,h=-1,p=t,b=0,S=0;const I=[S];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(s=r.sliceStream(p),p.next||s.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(s),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=t;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(S=h+1,I.push(S),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):I.pop(),h=I.length;h--;){const x=a.slice(I[h],I[h+1]),z=l.pop();c.push([z,z+x.length-1]),e.splice(z,2,x)}for(c.reverse(),h=-1;++h<c.length;)u[b+c[h][0]]=b+c[h][1],b+=c[h][1]-c[h][0]-1;return u}const fl={resolve:dl,tokenize:ml},hl={partial:!0,tokenize:gl};function dl(e){return Jt(e),e}function ml(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?l(a):D(a)?e.check(hl,o,l)(a):(e.consume(a),i)}function l(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function o(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function gl(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),X(e,l,"linePrefix")}function l(o){if(o===null||D(o))return t(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Zt(e,n,t,r,i,l,o,a,c){const u=c||Number.POSITIVE_INFINITY;let s=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),h):x===null||x===32||x===41||bn(x)?t(x):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(x))}function h(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(a),h(x)):x===null||x===60||D(x)?t(x):(e.consume(x),x===92?b:p)}function b(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function S(x){return!s&&(x===null||x===41||J(x))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(x)):s<u&&x===40?(e.consume(x),s++,S):x===41?(e.consume(x),s--,S):x===null||x===32||x===40||bn(x)?t(x):(e.consume(x),x===92?I:S)}function I(x){return x===40||x===41||x===92?(e.consume(x),S):S(x)}}function er(e,n,t,r,i,l){const o=this;let a=0,c;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),s}function s(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):D(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||D(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),c||(c=!R(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function nr(e,n,t,r,i,l){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,c):t(h)}function c(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),c(o)):h===null?t(h):D(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),X(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(h))}function s(h){return h===o||h===null||D(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:s)}function f(h){return h===o||h===92?(e.consume(h),s):s(h)}}function je(e,n){let t;return r;function r(i){return D(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):R(i)?X(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const yl={name:"definition",tokenize:kl},xl={partial:!0,tokenize:bl};function kl(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return er.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return J(p)?je(e,u)(p):u(p)}function u(p){return Zt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(xl,f,f)(p)}function f(p){return R(p)?X(e,h,"whitespace")(p):h(p)}function h(p){return p===null||D(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function bl(e,n,t){return r;function r(a){return J(a)?je(e,i)(a):t(a)}function i(a){return nr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return R(a)?X(e,o,"whitespace")(a):o(a)}function o(a){return a===null||D(a)?n(a):t(a)}}const wl={name:"hardBreakEscape",tokenize:Sl};function Sl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return D(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Cl={name:"headingAtx",resolve:El,tokenize:Il};function El(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},pe(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Il(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||J(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),c(s)):s===null||D(s)?(e.exit("atxHeading"),n(s)):R(s)?X(e,a,"whitespace")(s):(e.enter("atxHeadingText"),u(s))}function c(s){return s===35?(e.consume(s),c):(e.exit("atxHeadingSequence"),a(s))}function u(s){return s===null||s===35||J(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),u)}}const Tl=["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"],ft=["pre","script","style","textarea"],Al={concrete:!0,name:"htmlFlow",resolveTo:zl,tokenize:Dl},Pl={partial:!0,tokenize:Ml},vl={partial:!0,tokenize:Ll};function zl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Dl(e,n,t){const r=this;let i,l,o,a,c;return u;function u(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),l=!0,S):m===63?(e.consume(m),i=3,r.interrupt?n:d):ce(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,b):ce(m)?(e.consume(m),i=4,r.interrupt?n:d):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:d):t(m)}function b(m){const ae="CDATA[";return m===ae.charCodeAt(a++)?(e.consume(m),a===ae.length?r.interrupt?n:A:b):t(m)}function S(m){return ce(m)?(e.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||J(m)){const ae=m===47,ke=o.toLowerCase();return!ae&&!l&&ft.includes(ke)?(i=1,r.interrupt?n(m):A(m)):Tl.includes(o.toLowerCase())?(i=6,ae?(e.consume(m),x):r.interrupt?n(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?z(m):E(m))}return m===45||re(m)?(e.consume(m),o+=String.fromCharCode(m),I):t(m)}function x(m){return m===62?(e.consume(m),r.interrupt?n:A):t(m)}function z(m){return R(m)?(e.consume(m),z):H(m)}function E(m){return m===47?(e.consume(m),H):m===58||m===95||ce(m)?(e.consume(m),F):R(m)?(e.consume(m),E):H(m)}function F(m){return m===45||m===46||m===58||m===95||re(m)?(e.consume(m),F):N(m)}function N(m){return m===61?(e.consume(m),y):R(m)?(e.consume(m),N):E(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,O):R(m)?(e.consume(m),y):B(m)}function O(m){return m===c?(e.consume(m),c=null,j):m===null||D(m)?t(m):(e.consume(m),O)}function B(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||J(m)?N(m):(e.consume(m),B)}function j(m){return m===47||m===62||R(m)?E(m):t(m)}function H(m){return m===62?(e.consume(m),P):t(m)}function P(m){return m===null||D(m)?A(m):R(m)?(e.consume(m),P):t(m)}function A(m){return m===45&&i===2?(e.consume(m),U):m===60&&i===1?(e.consume(m),Y):m===62&&i===4?(e.consume(m),oe):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),fe):D(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Pl,he,V)(m)):m===null||D(m)?(e.exit("htmlFlowData"),V(m)):(e.consume(m),A)}function V(m){return e.check(vl,v,he)(m)}function v(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),C}function C(m){return m===null||D(m)?V(m):(e.enter("htmlFlowData"),A(m))}function U(m){return m===45?(e.consume(m),d):A(m)}function Y(m){return m===47?(e.consume(m),o="",le):A(m)}function le(m){if(m===62){const ae=o.toLowerCase();return ft.includes(ae)?(e.consume(m),oe):A(m)}return ce(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),le):A(m)}function fe(m){return m===93?(e.consume(m),d):A(m)}function d(m){return m===62?(e.consume(m),oe):m===45&&i===2?(e.consume(m),d):A(m)}function oe(m){return m===null||D(m)?(e.exit("htmlFlowData"),he(m)):(e.consume(m),oe)}function he(m){return e.exit("htmlFlow"),n(m)}}function Ll(e,n,t){const r=this;return i;function i(o){return D(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Ml(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ze,n,t)}}const _l={name:"htmlText",tokenize:Nl};function Nl(e,n,t){const r=this;let i,l,o;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),N):d===63?(e.consume(d),E):ce(d)?(e.consume(d),B):t(d)}function u(d){return d===45?(e.consume(d),s):d===91?(e.consume(d),l=0,b):ce(d)?(e.consume(d),z):t(d)}function s(d){return d===45?(e.consume(d),p):t(d)}function f(d){return d===null?t(d):d===45?(e.consume(d),h):D(d)?(o=f,Y(d)):(e.consume(d),f)}function h(d){return d===45?(e.consume(d),p):f(d)}function p(d){return d===62?U(d):d===45?h(d):f(d)}function b(d){const oe="CDATA[";return d===oe.charCodeAt(l++)?(e.consume(d),l===oe.length?S:b):t(d)}function S(d){return d===null?t(d):d===93?(e.consume(d),I):D(d)?(o=S,Y(d)):(e.consume(d),S)}function I(d){return d===93?(e.consume(d),x):S(d)}function x(d){return d===62?U(d):d===93?(e.consume(d),x):S(d)}function z(d){return d===null||d===62?U(d):D(d)?(o=z,Y(d)):(e.consume(d),z)}function E(d){return d===null?t(d):d===63?(e.consume(d),F):D(d)?(o=E,Y(d)):(e.consume(d),E)}function F(d){return d===62?U(d):E(d)}function N(d){return ce(d)?(e.consume(d),y):t(d)}function y(d){return d===45||re(d)?(e.consume(d),y):O(d)}function O(d){return D(d)?(o=O,Y(d)):R(d)?(e.consume(d),O):U(d)}function B(d){return d===45||re(d)?(e.consume(d),B):d===47||d===62||J(d)?j(d):t(d)}function j(d){return d===47?(e.consume(d),U):d===58||d===95||ce(d)?(e.consume(d),H):D(d)?(o=j,Y(d)):R(d)?(e.consume(d),j):U(d)}function H(d){return d===45||d===46||d===58||d===95||re(d)?(e.consume(d),H):P(d)}function P(d){return d===61?(e.consume(d),A):D(d)?(o=P,Y(d)):R(d)?(e.consume(d),P):j(d)}function A(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),i=d,V):D(d)?(o=A,Y(d)):R(d)?(e.consume(d),A):(e.consume(d),v)}function V(d){return d===i?(e.consume(d),i=void 0,C):d===null?t(d):D(d)?(o=V,Y(d)):(e.consume(d),V)}function v(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||J(d)?j(d):(e.consume(d),v)}function C(d){return d===47||d===62||J(d)?j(d):t(d)}function U(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function Y(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),le}function le(d){return R(d)?X(e,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):fe(d)}function fe(d){return e.enter("htmlTextData"),o(d)}}const Nn={name:"labelEnd",resolveAll:jl,resolveTo:Bl,tokenize:Hl},Ol={tokenize:Ul},Rl={tokenize:ql},Fl={tokenize:Vl};function jl(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&pe(e,0,e.length,t),e}function Bl(e,n){let t=e.length,r=0,i,l,o,a;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},s={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,n],["enter",u,n]],a=ie(a,e.slice(l+1,l+r+3)),a=ie(a,[["enter",s,n]]),a=ie(a,_n(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),a=ie(a,[["exit",s,n],e[o-2],e[o-1],["exit",u,n]]),a=ie(a,e.slice(o+1)),a=ie(a,[["exit",c,n]]),pe(e,l,e.length,a),e}function Hl(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return a;function a(h){return l?l._inactive?f(h):(o=r.parser.defined.includes(Pe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),c):t(h)}function c(h){return h===40?e.attempt(Ol,s,o?s:f)(h):h===91?e.attempt(Rl,s,o?u:f)(h):o?s(h):f(h)}function u(h){return e.attempt(Fl,s,f)(h)}function s(h){return n(h)}function f(h){return l._balanced=!0,t(h)}}function Ul(e,n,t){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return J(f)?je(e,l)(f):l(f)}function l(f){return f===41?s(f):Zt(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return J(f)?je(e,c)(f):s(f)}function a(f){return t(f)}function c(f){return f===34||f===39||f===40?nr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):s(f)}function u(f){return J(f)?je(e,s)(f):s(f)}function s(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),n):t(f)}}function ql(e,n,t){const r=this;return i;function i(a){return er.call(r,e,l,o,"reference","referenceMarker","referenceString")(a)}function l(a){return r.parser.defined.includes(Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function o(a){return t(a)}}function Vl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const $l={name:"labelStartImage",resolveAll:Nn.resolveAll,tokenize:Xl};function Xl(e,n,t){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),l}function l(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):t(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const Wl={name:"labelStartLink",resolveAll:Nn.resolveAll,tokenize:Yl};function Yl(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const an={name:"lineEnding",tokenize:Ql};function Ql(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),X(e,n,"linePrefix")}}const Ke={name:"thematicBreak",tokenize:Kl};function Kl(e,n,t){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||D(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),R(u)?X(e,a,"whitespace")(u):a(u))}}const G={continuation:{tokenize:eo},exit:to,name:"list",tokenize:Zl},Gl={partial:!0,tokenize:ro},Jl={partial:!0,tokenize:no};function Zl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:wn(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ke,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return wn(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ze,r.interrupt?t:s,e.attempt(Gl,h,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function f(p){return R(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function eo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ze,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!R(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jl,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function no(e,n,t){const r=this;return X(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function to(e){e.exit(this.containerState.type)}function ro(e,n,t){const r=this;return X(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!R(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const ht={name:"setextUnderline",resolveTo:io,tokenize:lo};function io(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function lo(e,n,t){const r=this;let i;return l;function l(u){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,o(u)):t(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),R(u)?X(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||D(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const oo={tokenize:ao};function ao(e){const n=this,t=e.attempt(Ze,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const uo={resolveAll:rr()},so=tr("string"),co=tr("text");function tr(e){return{resolveAll:rr(e==="text"?po:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return u(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),c}function c(s){return u(s)?(t.exit("data"),l(s)):(t.consume(s),c)}function u(s){if(s===null)return!0;const f=i[s];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function rr(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function po(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,a=0,c;for(;l--;){const u=i[l];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)c=!0,a++;else if(u!==-1){l++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const fo={42:G,43:G,45:G,48:G,49:G,50:G,51:G,52:G,53:G,54:G,55:G,56:G,57:G,62:Qt},ho={91:yl},mo={[-2]:on,[-1]:on,32:on},go={35:Cl,42:Ke,45:[ht,Ke],60:Al,61:ht,95:Ke,96:pt,126:pt},yo={38:Gt,92:Kt},xo={[-5]:an,[-4]:an,[-3]:an,33:$l,38:Gt,42:Sn,60:[Wi,_l],91:Wl,92:[wl,Kt],93:Nn,95:Sn,96:ol},ko={null:[Sn,uo]},bo={null:[42,95]},wo={null:[]},So=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bo,contentInitial:ho,disable:wo,document:fo,flow:go,flowInitial:mo,insideSpan:ko,string:yo,text:xo},Symbol.toStringTag,{value:"Module"}));function Co(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},l=[];let o=[],a=[];const c={attempt:O(N),check:O(y),consume:z,enter:E,exit:F,interrupt:O(y,{interrupt:!0})},u={code:null,containerState:{},defineSkip:S,events:[],now:b,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let s=n.tokenize.call(u,c);return n.resolveAll&&l.push(n),u;function f(P){return o=ie(o,P),I(),o[o.length-1]!==null?[]:(B(n,0),u.events=_n(l,u.events,u),u.events)}function h(P,A){return Io(p(P),A)}function p(P){return Eo(o,P)}function b(){const{_bufferIndex:P,_index:A,line:V,column:v,offset:C}=r;return{_bufferIndex:P,_index:A,line:V,column:v,offset:C}}function S(P){i[P.line]=P.column,H()}function I(){let P;for(;r._index<o.length;){const A=o[r._index];if(typeof A=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<A.length;)x(A.charCodeAt(r._bufferIndex));else x(A)}}function x(P){s=s(P)}function z(P){D(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,H()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=P}function E(P,A){const V=A||{};return V.type=P,V.start=b(),u.events.push(["enter",V,u]),a.push(V),V}function F(P){const A=a.pop();return A.end=b(),u.events.push(["exit",A,u]),A}function N(P,A){B(P,A.from)}function y(P,A){A.restore()}function O(P,A){return V;function V(v,C,U){let Y,le,fe,d;return Array.isArray(v)?he(v):"tokenize"in v?he([v]):oe(v);function oe(Q){return De;function De(ge){const Se=ge!==null&&Q[ge],Ce=ge!==null&&Q.null,Ve=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Ce)?Ce:Ce?[Ce]:[]];return he(Ve)(ge)}}function he(Q){return Y=Q,le=0,Q.length===0?U:m(Q[le])}function m(Q){return De;function De(ge){return d=j(),fe=Q,Q.partial||(u.currentConstruct=Q),Q.name&&u.parser.constructs.disable.null.includes(Q.name)?ke():Q.tokenize.call(A?Object.assign(Object.create(u),A):u,c,ae,ke)(ge)}}function ae(Q){return P(fe,d),C}function ke(Q){return d.restore(),++le<Y.length?m(Y[le]):U}}}function B(P,A){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&pe(u.events,A,u.events.length-A,P.resolve(u.events.slice(A),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function j(){const P=b(),A=u.previous,V=u.currentConstruct,v=u.events.length,C=Array.from(a);return{from:v,restore:U};function U(){r=P,u.previous=A,u.currentConstruct=V,u.events.length=v,a=C,H()}}function H(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Eo(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Io(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
3
3
|
`;break}case-3:{o=`\r
|
|
4
|
-
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function Io(e){const r={constructs:Li([wo,...(e||{}).extensions||[]]),content:i(ji),defined:[],document:i(Hi),flow:i(lo),lazy:{},string:i(uo),text:i(so)};return r;function i(l){return o;function o(a){return So(r,l,a)}}}function To(e){for(;!Gt(e););return e}const ht=/[\0\t\n\r]/g;function Ao(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const c=[];let u,s,p,h,f;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),p=0,n="",t&&(l.charCodeAt(0)===65279&&p++,t=void 0);p<l.length;){if(ht.lastIndex=p,u=ht.exec(l),h=u&&u.index!==void 0?u.index:l.length,f=l.charCodeAt(h),!u){n=l.slice(p);break}if(f===10&&p===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<h&&(c.push(l.slice(p,h)),e+=h-p),f){case 0:{c.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,c.push(-2);e++<s;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=h+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const Po=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vo(e){return e.replace(Po,zo)}function zo(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Wt(t.slice(l?2:1),l?16:10)}return Dn(t)||e}const rr={}.hasOwnProperty;function Lo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Do(t)(To(Io(t).document().write(Ao()(e,n,!0))))}function Do(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Vn),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(Bn),blockQuote:l(Ce),characterEscape:j,characterReference:j,codeFenced:l(qe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(qe,o),codeText:l(dr,o),codeTextData:j,data:j,codeFlowValue:j,definition:l(mr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(gr),hardBreakEscape:l(Hn),hardBreakTrailing:l(Hn),htmlFlow:l(Un,o),htmlFlowData:j,htmlText:l(Un,o),htmlTextData:j,image:l(yr),label:o,link:l(Vn),listItem:l(xr),listItemValue:h,listOrdered:l(qn,p),listUnordered:l(qn),paragraph:l(kr),reference:m,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Bn),strong:l(br),thematicBreak:l(Sr)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:Se,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:Q,characterReference:Le,codeFenced:c(I),codeFencedFence:S,codeFencedFenceInfo:f,codeFencedFenceMeta:b,codeFlowValue:H,codeIndented:c(x),codeText:c(C),codeTextData:H,data:H,definition:c(),definitionDestinationString:F,definitionLabelString:v,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(T),hardBreakTrailing:c(T),htmlFlow:c(q),htmlFlowData:H,htmlText:c(P),htmlTextData:H,image:c(Y),label:pe,labelText:le,lineEnding:A,link:c(U),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:d,resourceTitleString:oe,resource:he,setextHeading:c(B),setextHeadingLineSequence:_,setextHeadingText:y,strong:c(),thematicBreak:c()}};ir(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let w={type:"root",children:[]};const D={stack:[w],tokenStack:[],config:n,enter:a,exit:u,buffer:o,resume:s,data:t},O=[];let V=-1;for(;++V<g.length;)if(g[V][1].type==="listOrdered"||g[V][1].type==="listUnordered")if(g[V][0]==="enter")O.push(V);else{const ue=O.pop();V=i(g,ue,V)}for(V=-1;++V<g.length;){const ue=n[g[V][0]];rr.call(ue,g[V][1].type)&&ue[g[V][1].type].call(Object.assign({sliceSerialize:g[V][2].sliceSerialize},D),g[V][1])}if(D.tokenStack.length>0){const ue=D.tokenStack[D.tokenStack.length-1];(ue[1]||dt).call(D,void 0,ue[0])}for(w.position={start:ye(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:ye(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},V=-1;++V<n.transforms.length;)w=n.transforms[V](w)||w;return w}function i(g,w,D){let O=w-1,V=-1,ue=!1,be,de,De,Me;for(;++O<=D;){const ee=g[O];switch(ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ee[0]==="enter"?V++:V--,Me=void 0;break}case"lineEndingBlank":{ee[0]==="enter"&&(be&&!Me&&!V&&!De&&(De=O),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!V&&ee[0]==="enter"&&ee[1].type==="listItemPrefix"||V===-1&&ee[0]==="exit"&&(ee[1].type==="listUnordered"||ee[1].type==="listOrdered")){if(be){let Ee=O;for(de=void 0;Ee--;){const me=g[Ee];if(me[1].type==="lineEnding"||me[1].type==="lineEndingBlank"){if(me[0]==="exit")continue;de&&(g[de][1].type="lineEndingBlank",ue=!0),me[1].type="lineEnding",de=Ee}else if(!(me[1].type==="linePrefix"||me[1].type==="blockQuotePrefix"||me[1].type==="blockQuotePrefixWhitespace"||me[1].type==="blockQuoteMarker"||me[1].type==="listItemIndent"))break}De&&(!de||De<de)&&(be._spread=!0),be.end=Object.assign({},de?g[de][1].start:ee[1].end),g.splice(de||O,0,["exit",be,ee[2]]),O++,D++}if(ee[1].type==="listItemPrefix"){const Ee={type:"listItem",_spread:!1,start:Object.assign({},ee[1].start),end:void 0};be=Ee,g.splice(O,0,["enter",Ee,ee[2]]),O++,D++,De=void 0,Me=!0}}}return g[w][1]._spread=ue,D}function l(g,w){return D;function D(O){a.call(this,g(O),O),w&&w.call(this,O)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(g,w,D){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([w,D||void 0]),g.position={start:ye(w.start),end:void 0}}function c(g){return w;function w(D){g&&g.call(this,D),u.call(this,D)}}function u(g,w){const D=this.stack.pop(),O=this.tokenStack.pop();if(O)O[0].type!==g.type&&(w?w.call(this,g,O[0]):(O[1]||dt).call(this,g,O[0]));else throw new Error("Cannot close `"+g.type+"` ("+Fe({start:g.start,end:g.end})+"): it’s not open");D.position.end=ye(g.end)}function s(){return vi(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(g){if(this.data.expectingFirstListItemValue){const w=this.stack[this.stack.length-2];w.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function f(){const g=this.resume(),w=this.stack[this.stack.length-1];w.lang=g}function b(){const g=this.resume(),w=this.stack[this.stack.length-1];w.meta=g}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g.replace(/(\r?\n|\r)$/g,"")}function v(g){const w=this.resume(),D=this.stack[this.stack.length-1];D.label=w,D.identifier=Pe(this.sliceSerialize(g)).toLowerCase()}function E(){const g=this.resume(),w=this.stack[this.stack.length-1];w.title=g}function F(){const g=this.resume(),w=this.stack[this.stack.length-1];w.url=g}function M(g){const w=this.stack[this.stack.length-1];if(!w.depth){const D=this.sliceSerialize(g).length;w.depth=D}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function _(g){const w=this.stack[this.stack.length-1];w.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function j(g){const D=this.stack[this.stack.length-1].children;let O=D[D.length-1];(!O||O.type!=="text")&&(O=wr(),O.position={start:ye(g.start),end:void 0},D.push(O)),this.stack.push(O)}function H(g){const w=this.stack.pop();w.value+=this.sliceSerialize(g),w.position.end=ye(g.end)}function A(g){const w=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=w.children[w.children.length-1];D.position.end=ye(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(w.type)&&(j.call(this,g),H.call(this,g))}function T(){this.data.atHardBreak=!0}function q(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function P(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function C(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function U(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const w=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=w,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function Y(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const w=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=w,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function le(g){const w=this.sliceSerialize(g),D=this.stack[this.stack.length-2];D.label=vo(w),D.identifier=Pe(w).toLowerCase()}function pe(){const g=this.stack[this.stack.length-1],w=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const O=g.children;D.children=O}else D.alt=w}function d(){const g=this.resume(),w=this.stack[this.stack.length-1];w.url=g}function oe(){const g=this.resume(),w=this.stack[this.stack.length-1];w.title=g}function he(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ae(g){const w=this.resume(),D=this.stack[this.stack.length-1];D.label=w,D.identifier=Pe(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function ke(g){this.data.characterReferenceType=g.type}function Q(g){const w=this.sliceSerialize(g),D=this.data.characterReferenceType;let O;D?(O=Wt(w,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=Dn(w);const V=this.stack[this.stack.length-1];V.value+=O}function Le(g){const w=this.stack.pop();w.position.end=ye(g.end)}function ge(g){H.call(this,g);const w=this.stack[this.stack.length-1];w.url=this.sliceSerialize(g)}function Se(g){H.call(this,g);const w=this.stack[this.stack.length-1];w.url="mailto:"+this.sliceSerialize(g)}function Ce(){return{type:"blockquote",children:[]}}function qe(){return{type:"code",lang:null,meta:null,value:""}}function dr(){return{type:"inlineCode",value:""}}function mr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gr(){return{type:"emphasis",children:[]}}function Bn(){return{type:"heading",depth:0,children:[]}}function Hn(){return{type:"break"}}function Un(){return{type:"html",value:""}}function yr(){return{type:"image",title:null,url:"",alt:null}}function Vn(){return{type:"link",title:null,url:"",children:[]}}function qn(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function xr(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function kr(){return{type:"paragraph",children:[]}}function br(){return{type:"strong",children:[]}}function wr(){return{type:"text",value:""}}function Sr(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function ir(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?ir(e,r):Mo(e,r)}}function Mo(e,n){let t;for(t in n)if(rr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function dt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Fe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is still open")}function No(e){const n=this;n.parser=t;function t(r){return Lo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function _o(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Oo(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
5
|
-
`}]}function
|
|
6
|
-
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function
|
|
4
|
+
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function To(e){const r={constructs:Li([So,...(e||{}).extensions||[]]),content:i(Bi),defined:[],document:i(Ui),flow:i(oo),lazy:{},string:i(so),text:i(co)};return r;function i(l){return o;function o(a){return Co(r,l,a)}}}function Ao(e){for(;!Jt(e););return e}const dt=/[\0\t\n\r]/g;function Po(){let e=1,n="",t=!0,r;return i;function i(l,o,a){const c=[];let u,s,f,h,p;for(l=n+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),f=0,n="",t&&(l.charCodeAt(0)===65279&&f++,t=void 0);f<l.length;){if(dt.lastIndex=f,u=dt.exec(l),h=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(h),!u){n=l.slice(f);break}if(p===10&&f===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<h&&(c.push(l.slice(f,h)),e+=h-f),p){case 0:{c.push(65533),e++;break}case 9:{for(s=Math.ceil(e/4)*4,c.push(-2);e++<s;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const vo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zo(e){return e.replace(vo,Do)}function Do(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Yt(t.slice(l?2:1),l?16:10)}return Mn(t)||e}const ir={}.hasOwnProperty;function Lo(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Mo(t)(Ao(To(t).document().write(Po()(e,n,!0))))}function Mo(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Vn),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(Hn),blockQuote:l(Ce),characterEscape:j,characterReference:j,codeFenced:l(Ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l(Ve,o),codeText:l(mr,o),codeTextData:j,data:j,codeFlowValue:j,definition:l(gr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(yr),hardBreakEscape:l(Un),hardBreakTrailing:l(Un),htmlFlow:l(qn,o),htmlFlowData:j,htmlText:l(qn,o),htmlTextData:j,image:l(xr),label:o,link:l(Vn),listItem:l(kr),listItemValue:h,listOrdered:l($n,f),listUnordered:l($n),paragraph:l(br),reference:m,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(Hn),strong:l(wr),thematicBreak:l(Cr)},exit:{atxHeading:c(),atxHeadingSequence:N,autolink:c(),autolinkEmail:Se,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:Q,characterReference:De,codeFenced:c(I),codeFencedFence:S,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:H,codeIndented:c(x),codeText:c(C),codeTextData:H,data:H,definition:c(),definitionDestinationString:F,definitionLabelString:z,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(A),hardBreakTrailing:c(A),htmlFlow:c(V),htmlFlowData:H,htmlText:c(v),htmlTextData:H,image:c(Y),label:fe,labelText:le,lineEnding:P,link:c(U),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:d,resourceTitleString:oe,resource:he,setextHeading:c(B),setextHeadingLineSequence:O,setextHeadingText:y,strong:c(),thematicBreak:c()}};lr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(g){let w={type:"root",children:[]};const L={stack:[w],tokenStack:[],config:n,enter:a,exit:u,buffer:o,resume:s,data:t},_=[];let q=-1;for(;++q<g.length;)if(g[q][1].type==="listOrdered"||g[q][1].type==="listUnordered")if(g[q][0]==="enter")_.push(q);else{const ue=_.pop();q=i(g,ue,q)}for(q=-1;++q<g.length;){const ue=n[g[q][0]];ir.call(ue,g[q][1].type)&&ue[g[q][1].type].call(Object.assign({sliceSerialize:g[q][2].sliceSerialize},L),g[q][1])}if(L.tokenStack.length>0){const ue=L.tokenStack[L.tokenStack.length-1];(ue[1]||mt).call(L,void 0,ue[0])}for(w.position={start:ye(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:ye(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<n.transforms.length;)w=n.transforms[q](w)||w;return w}function i(g,w,L){let _=w-1,q=-1,ue=!1,be,de,Le,Me;for(;++_<=L;){const ee=g[_];switch(ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ee[0]==="enter"?q++:q--,Me=void 0;break}case"lineEndingBlank":{ee[0]==="enter"&&(be&&!Me&&!q&&!Le&&(Le=_),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!q&&ee[0]==="enter"&&ee[1].type==="listItemPrefix"||q===-1&&ee[0]==="exit"&&(ee[1].type==="listUnordered"||ee[1].type==="listOrdered")){if(be){let Ee=_;for(de=void 0;Ee--;){const me=g[Ee];if(me[1].type==="lineEnding"||me[1].type==="lineEndingBlank"){if(me[0]==="exit")continue;de&&(g[de][1].type="lineEndingBlank",ue=!0),me[1].type="lineEnding",de=Ee}else if(!(me[1].type==="linePrefix"||me[1].type==="blockQuotePrefix"||me[1].type==="blockQuotePrefixWhitespace"||me[1].type==="blockQuoteMarker"||me[1].type==="listItemIndent"))break}Le&&(!de||Le<de)&&(be._spread=!0),be.end=Object.assign({},de?g[de][1].start:ee[1].end),g.splice(de||_,0,["exit",be,ee[2]]),_++,L++}if(ee[1].type==="listItemPrefix"){const Ee={type:"listItem",_spread:!1,start:Object.assign({},ee[1].start),end:void 0};be=Ee,g.splice(_,0,["enter",Ee,ee[2]]),_++,L++,Le=void 0,Me=!0}}}return g[w][1]._spread=ue,L}function l(g,w){return L;function L(_){a.call(this,g(_),_),w&&w.call(this,_)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(g,w,L){this.stack[this.stack.length-1].children.push(g),this.stack.push(g),this.tokenStack.push([w,L||void 0]),g.position={start:ye(w.start),end:void 0}}function c(g){return w;function w(L){g&&g.call(this,L),u.call(this,L)}}function u(g,w){const L=this.stack.pop(),_=this.tokenStack.pop();if(_)_[0].type!==g.type&&(w?w.call(this,g,_[0]):(_[1]||mt).call(this,g,_[0]));else throw new Error("Cannot close `"+g.type+"` ("+Fe({start:g.start,end:g.end})+"): it’s not open");L.position.end=ye(g.end)}function s(){return zi(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(g){if(this.data.expectingFirstListItemValue){const w=this.stack[this.stack.length-2];w.start=Number.parseInt(this.sliceSerialize(g),10),this.data.expectingFirstListItemValue=void 0}}function p(){const g=this.resume(),w=this.stack[this.stack.length-1];w.lang=g}function b(){const g=this.resume(),w=this.stack[this.stack.length-1];w.meta=g}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g.replace(/(\r?\n|\r)$/g,"")}function z(g){const w=this.resume(),L=this.stack[this.stack.length-1];L.label=w,L.identifier=Pe(this.sliceSerialize(g)).toLowerCase()}function E(){const g=this.resume(),w=this.stack[this.stack.length-1];w.title=g}function F(){const g=this.resume(),w=this.stack[this.stack.length-1];w.url=g}function N(g){const w=this.stack[this.stack.length-1];if(!w.depth){const L=this.sliceSerialize(g).length;w.depth=L}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function O(g){const w=this.stack[this.stack.length-1];w.depth=this.sliceSerialize(g).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function j(g){const L=this.stack[this.stack.length-1].children;let _=L[L.length-1];(!_||_.type!=="text")&&(_=Sr(),_.position={start:ye(g.start),end:void 0},L.push(_)),this.stack.push(_)}function H(g){const w=this.stack.pop();w.value+=this.sliceSerialize(g),w.position.end=ye(g.end)}function P(g){const w=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=w.children[w.children.length-1];L.position.end=ye(g.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(w.type)&&(j.call(this,g),H.call(this,g))}function A(){this.data.atHardBreak=!0}function V(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function v(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function C(){const g=this.resume(),w=this.stack[this.stack.length-1];w.value=g}function U(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const w=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=w,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function Y(){const g=this.stack[this.stack.length-1];if(this.data.inReference){const w=this.data.referenceType||"shortcut";g.type+="Reference",g.referenceType=w,delete g.url,delete g.title}else delete g.identifier,delete g.label;this.data.referenceType=void 0}function le(g){const w=this.sliceSerialize(g),L=this.stack[this.stack.length-2];L.label=zo(w),L.identifier=Pe(w).toLowerCase()}function fe(){const g=this.stack[this.stack.length-1],w=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const _=g.children;L.children=_}else L.alt=w}function d(){const g=this.resume(),w=this.stack[this.stack.length-1];w.url=g}function oe(){const g=this.resume(),w=this.stack[this.stack.length-1];w.title=g}function he(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ae(g){const w=this.resume(),L=this.stack[this.stack.length-1];L.label=w,L.identifier=Pe(this.sliceSerialize(g)).toLowerCase(),this.data.referenceType="full"}function ke(g){this.data.characterReferenceType=g.type}function Q(g){const w=this.sliceSerialize(g),L=this.data.characterReferenceType;let _;L?(_=Yt(w,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_=Mn(w);const q=this.stack[this.stack.length-1];q.value+=_}function De(g){const w=this.stack.pop();w.position.end=ye(g.end)}function ge(g){H.call(this,g);const w=this.stack[this.stack.length-1];w.url=this.sliceSerialize(g)}function Se(g){H.call(this,g);const w=this.stack[this.stack.length-1];w.url="mailto:"+this.sliceSerialize(g)}function Ce(){return{type:"blockquote",children:[]}}function Ve(){return{type:"code",lang:null,meta:null,value:""}}function mr(){return{type:"inlineCode",value:""}}function gr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yr(){return{type:"emphasis",children:[]}}function Hn(){return{type:"heading",depth:0,children:[]}}function Un(){return{type:"break"}}function qn(){return{type:"html",value:""}}function xr(){return{type:"image",title:null,url:"",alt:null}}function Vn(){return{type:"link",title:null,url:"",children:[]}}function $n(g){return{type:"list",ordered:g.type==="listOrdered",start:null,spread:g._spread,children:[]}}function kr(g){return{type:"listItem",spread:g._spread,checked:null,children:[]}}function br(){return{type:"paragraph",children:[]}}function wr(){return{type:"strong",children:[]}}function Sr(){return{type:"text",value:""}}function Cr(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function lr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?lr(e,r):_o(e,r)}}function _o(e,n){let t;for(t in n)if(ir.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function mt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Fe({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Fe({start:n.start,end:n.end})+") is still open")}function No(e){const n=this;n.parser=t;function t(r){return Lo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Oo(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Ro(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
5
|
+
`}]}function Fo(e,n){const t=n.value?n.value+`
|
|
6
|
+
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function jo(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Bo(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ho(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=ze(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function Uo(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function qo(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function or(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function Vo(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return or(e,n);const i={src:ze(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function $o(e,n){const t={src:ze(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Xo(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Wo(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return or(e,n);const i={href:ze(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function Yo(e,n){const t={href:ze(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Qo(e,n,t){const r=e.all(n),i=t?Ko(t):ar(n),l={},o=[];if(typeof n.checked=="boolean"){const s=r[0];let f;s&&s.type==="element"&&s.tagName==="p"?f=s:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const s=r[a];(i||a!==0||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
7
|
`}),s.type==="element"&&s.tagName==="p"&&!i?o.push(...s.children):o.push(s)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
-
`});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,u),e.applyData(n,u)}function
|
|
8
|
+
`});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,u),e.applyData(n,u)}function Ko(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=ar(t[r])}return n}function ar(e){const n=e.spread;return n??e.children.length>1}function Go(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function Jo(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Zo(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ea(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function na(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=vn(n.children[1]),c=Ht(n.children[n.children.length-1]);a&&c&&(o.position={start:a,end:c}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function ta(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let c=-1;const u=[];for(;++c<a;){const f=n.children[c],h={},p=o?o[c]:void 0;p&&(h.align=p);let b={type:"element",tagName:l,properties:h,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),u.push(b)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,s),e.applyData(n,s)}function ra(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const gt=9,yt=32;function ia(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(xt(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(xt(n.slice(i),i>0,!1)),l.join("")}function xt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===gt||l===yt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===gt||l===yt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function la(e,n){const t={type:"text",value:ia(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function oa(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const aa={blockquote:Oo,break:Ro,code:Fo,delete:jo,emphasis:Bo,footnoteReference:Ho,heading:Uo,html:qo,imageReference:Vo,image:$o,inlineCode:Xo,linkReference:Wo,link:Yo,listItem:Qo,list:Go,paragraph:Jo,root:Zo,strong:ea,table:na,tableCell:ra,tableRow:ta,text:la,thematicBreak:oa,toml:Xe,yaml:Xe,definition:Xe,footnoteDefinition:Xe};function Xe(){}const ur=-1,en=0,Be=1,Ge=2,On=3,Rn=4,Fn=5,jn=6,sr=7,cr=8,kt=typeof self=="object"?self:globalThis,ua=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case en:case ur:return t(o,i);case Be:{const a=t([],i);for(const c of o)a.push(r(c));return a}case Ge:{const a=t({},i);for(const[c,u]of o)a[r(c)]=r(u);return a}case On:return t(new Date(o),i);case Rn:{const{source:a,flags:c}=o;return t(new RegExp(a,c),i)}case Fn:{const a=t(new Map,i);for(const[c,u]of o)a.set(r(c),r(u));return a}case jn:{const a=t(new Set,i);for(const c of o)a.add(r(c));return a}case sr:{const{name:a,message:c}=o;return t(new kt[a](c),i)}case cr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new kt[l](o),i)};return r},bt=e=>ua(new Map,e)(0),Te="",{toString:sa}={},{keys:ca}=Object,Re=e=>{const n=typeof e;if(n!=="object"||!e)return[en,n];const t=sa.call(e).slice(8,-1);switch(t){case"Array":return[Be,Te];case"Object":return[Ge,Te];case"Date":return[On,Te];case"RegExp":return[Rn,Te];case"Map":return[Fn,Te];case"Set":return[jn,Te];case"DataView":return[Be,t]}return t.includes("Array")?[Be,t]:t.includes("Error")?[sr,t]:[Ge,t]},We=([e,n])=>e===en&&(n==="function"||n==="symbol"),pa=(e,n,t,r)=>{const i=(o,a)=>{const c=r.push(o)-1;return t.set(a,c),c},l=o=>{if(t.has(o))return t.get(o);let[a,c]=Re(o);switch(a){case en:{let s=o;switch(c){case"bigint":a=cr,s=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);s=null;break;case"undefined":return i([ur],o)}return i([a,s],o)}case Be:{if(c){let h=o;return c==="DataView"?h=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(h=new Uint8Array(o)),i([c,[...h]],o)}const s=[],f=i([a,s],o);for(const h of o)s.push(l(h));return f}case Ge:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const s=[],f=i([a,s],o);for(const h of ca(o))(e||!We(Re(o[h])))&&s.push([l(h),l(o[h])]);return f}case On:return i([a,o.toISOString()],o);case Rn:{const{source:s,flags:f}=o;return i([a,{source:s,flags:f}],o)}case Fn:{const s=[],f=i([a,s],o);for(const[h,p]of o)(e||!(We(Re(h))||We(Re(p))))&&s.push([l(h),l(p)]);return f}case jn:{const s=[],f=i([a,s],o);for(const h of o)(e||!We(Re(h)))&&s.push(l(h));return f}}const{message:u}=o;return i([a,{name:c,message:u}],o)};return l},wt=(e,{json:n,lossy:t}={})=>{const r=[];return pa(!(n||t),!!n,new Map,r)(e),r},Je=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?bt(wt(e,n)):structuredClone(e):(e,n)=>bt(wt(e,n));function fa(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function ha(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function da(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||fa,r=e.options.footnoteBackLabel||ha,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const s=e.all(u),f=String(u.identifier).toUpperCase(),h=ze(f.toLowerCase());let p=0;const b=[],S=e.footnoteCounts.get(f);for(;S!==void 0&&++p<=S;){b.length>0&&b.push({type:"text",value:" "});let z=typeof t=="string"?t:t(c,p);typeof z=="string"&&(z={type:"text",value:z}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(z)?z:[z]})}const I=s[s.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const z=I.children[I.children.length-1];z&&z.type==="text"?z.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...b)}else s.push(...b);const x={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(s,!0)};e.patch(u,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Je(o),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
|
|
10
|
+
`}]}}const pr=(function(e){if(e==null)return xa;if(typeof e=="function")return nn(e);if(typeof e=="object")return Array.isArray(e)?ma(e):ga(e);if(typeof e=="string")return ya(e);throw new Error("Expected function, string, or object as test")});function ma(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=pr(e[t]);return nn(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].apply(this,i))return!0;return!1}}function ga(e){const n=e;return nn(t);function t(r){const i=r;let l;for(l in e)if(i[l]!==n[l])return!1;return!0}}function ya(e){return nn(n);function n(t){return t&&t.type===e}}function nn(e){return n;function n(t,r,i){return!!(ka(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function xa(){return!0}function ka(e){return e!==null&&typeof e=="object"&&"type"in e}const fr=[],ba=!0,St=!1,wa="skip";function Sa(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const l=pr(i),o=r?-1:1;a(e,void 0,[])();function a(c,u,s){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=fr,b,S,I;if((!n||l(c,u,s[s.length-1]||void 0))&&(p=Ca(t(c,s)),p[0]===St))return p;if("children"in c&&c.children){const x=c;if(x.children&&p[0]!==wa)for(S=(r?x.children.length:-1)+o,I=s.concat(x);S>-1&&S<x.children.length;){const z=x.children[S];if(b=a(z,S,I)(),b[0]===St)return b;S=typeof b[1]=="number"?b[1]:S+o}}return p}}}function Ca(e){return Array.isArray(e)?e:typeof e=="number"?[ba,e]:e==null?fr:[e]}function hr(e,n,t,r){let i,l,o;typeof n=="function"&&typeof t!="function"?(l=void 0,o=n,i=t):(l=n,o=t,i=r),Sa(e,l,a,i);function a(c,u){const s=u[u.length-1],f=s?s.children.indexOf(c):void 0;return o(c,f,s)}}const Cn={}.hasOwnProperty,Ea={};function Ia(e,n){const t=n||Ea,r=new Map,i=new Map,l=new Map,o={...aa,...t.handlers},a={all:u,applyData:Aa,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:c,options:t,patch:Ta,wrap:va};return hr(e,function(s){if(s.type==="definition"||s.type==="footnoteDefinition"){const f=s.type==="definition"?r:i,h=String(s.identifier).toUpperCase();f.has(h)||f.set(h,s)}}),a;function c(s,f){const h=s.type,p=a.handlers[h];if(Cn.call(a.handlers,h)&&p)return p(a,s,f);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in s){const{children:S,...I}=s,x=Je(I);return x.children=a.all(s),x}return Je(s)}return(a.options.unknownHandler||Pa)(a,s,f)}function u(s){const f=[];if("children"in s){const h=s.children;let p=-1;for(;++p<h.length;){const b=a.one(h[p],s);if(b){if(p&&h[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Ct(b.value)),!Array.isArray(b)&&b.type==="element")){const S=b.children[0];S&&S.type==="text"&&(S.value=Ct(S.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function Ta(e,n){e.position&&(n.position=ui(e))}function Aa(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&l&&Object.assign(t.properties,Je(l)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Pa(e,n){const t=n.data||{},r="value"in n&&!(Cn.call(t,"hProperties")||Cn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function va(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
11
11
|
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
12
12
|
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
13
|
-
`}),t}function
|
|
14
|
-
`},i),l}function va(e,n){return e&&"run"in e?async function(t,r){const i=Ct(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Ct(t,{file:r,...e||n})}}function Et(e){if(e)throw e}var un,It;function za(){if(It)return un;It=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},l=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var s=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!s&&!p)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},o=function(u,s){t&&s.name==="__proto__"?t(u,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):u[s.name]=s.newValue},a=function(u,s){if(s==="__proto__")if(e.call(u,s)){if(r)return r(u,s).value}else return;return u[s]};return un=function c(){var u,s,p,h,f,b,S=arguments[0],I=1,x=arguments.length,v=!1;for(typeof S=="boolean"&&(v=S,S=arguments[1]||{},I=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});I<x;++I)if(u=arguments[I],u!=null)for(s in u)p=a(S,s),h=a(u,s),S!==h&&(v&&h&&(l(h)||(f=i(h)))?(f?(f=!1,b=p&&i(p)?p:[]):b=p&&l(p)?p:{},o(S,{name:s,newValue:c(v,b,h)})):typeof h<"u"&&o(S,{name:s,newValue:h}));return S},un}var La=za();const sn=Dt(La);function En(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Da(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(c,...u){const s=e[++l];let p=-1;if(c){o(c);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,s?Ma(s,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ma(e,n){let t;return r;function r(...o){const a=e.length>o.length;let c;a&&o.push(i);try{c=e.apply(this,o)}catch(u){const s=u;if(a&&t)throw s;return i(s)}a||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const se={basename:Na,dirname:_a,extname:Oa,join:Ra,sep:"/"};function Na(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ve(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function _a(e){if(Ve(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Oa(e){Ve(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Ra(...e){let n=-1,t;for(;++n<e.length;)Ve(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Fa(t)}function Fa(e){Ve(e);const n=e.codePointAt(0)===47;let t=ja(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ja(e,n){let t="",r=0,i=-1,l=0,o=-1,a,c;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function Ve(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ba={cwd:Ha};function Ha(){return"/"}function In(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ua(e){if(typeof e=="string")e=new URL(e);else if(!In(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Va(e)}function Va(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const cn=["history","path","basename","stem","extname","dirname"];class hr{constructor(n){let t;n?In(n)?t={path:n}:typeof n=="string"||qa(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ba.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cn.length;){const l=cn[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)cn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?se.basename(this.path):void 0}set basename(n){pn(n,"basename"),fn(n,"basename"),this.path=se.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?se.dirname(this.path):void 0}set dirname(n){Tt(this.basename,"dirname"),this.path=se.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?se.extname(this.path):void 0}set extname(n){if(fn(n,"extname"),Tt(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=se.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){In(n)&&(n=Ua(n)),pn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?se.basename(this.path,this.extname):void 0}set stem(n){pn(n,"stem"),fn(n,"stem"),this.path=se.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new K(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function fn(e,n){if(e&&e.includes(se.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+se.sep+"`")}function pn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Tt(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function qa(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $a=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Xa={}.hasOwnProperty;class jn extends $a{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=Da()}copy(){const n=new jn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(sn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(mn("data",this.frozen),this.namespace[n]=t,this):Xa.call(this.namespace,n)&&this.namespace[n]||void 0:n?(mn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ye(n),r=this.parser||this.Parser;return hn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),hn("process",this.parser||this.Parser),dn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=Ye(n),c=r.parse(a);r.run(c,a,function(s,p,h){if(s||!p||!h)return u(s);const f=p,b=r.stringify(f,h);Qa(b)?h.value=b:h.result=b,u(s,h)});function u(s,p){s||!p?o(s):l?l(p):t(void 0,p)}}}processSync(n){let t=!1,r;return this.freeze(),hn("processSync",this.parser||this.Parser),dn("processSync",this.compiler||this.Compiler),this.process(n,i),Pt("processSync","process",t),r;function i(l,o){t=!0,Et(l),r=o}}run(n,t,r){At(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const c=Ye(t);i.run(n,c,u);function u(s,p,h){const f=p||n;s?a(s):o?o(f):r(void 0,f,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),Pt("runSync","run",r),i;function l(o,a){Et(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=Ye(t),i=this.compiler||this.Compiler;return dn("stringify",i),At(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(mn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[s,...p]=u;c(s,p)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=sn(!0,i.settings,u.settings))}function a(u){let s=-1;if(u!=null)if(Array.isArray(u))for(;++s<u.length;){const p=u[s];l(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,s){let p=-1,h=-1;for(;++p<r.length;)if(r[p][0]===u){h=p;break}if(h===-1)r.push([u,...s]);else if(s.length>0){let[f,...b]=s;const S=r[h][1];En(S)&&En(f)&&(f=sn(!0,S,f)),r[h]=[u,f,...b]}}}}const Wa=new jn().freeze();function hn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function At(e){if(!En(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Pt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ye(e){return Ya(e)?e:new hr(e)}function Ya(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Qa(e){return typeof e=="string"||Ka(e)}function Ka(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ga="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vt=[],zt={allowDangerousHtml:!0},Ja=/^(https?|ircs?|mailto|xmpp)$/i,Za=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function eu(e){const n=nu(e),t=tu(e);return ru(n.runSync(n.parse(t),t),e)}function nu(e){const n=e.rehypePlugins||vt,t=e.remarkPlugins||vt,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zt}:zt;return Wa().use(No).use(t).use(va,r).use(n)}function tu(e){const n=e.children||"",t=new hr;return typeof n=="string"&&(t.value=n),t}function ru(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||iu;for(const s of Za)Object.hasOwn(n,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+Ga+s.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),pr(e,u),pi(e,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function u(s,p,h){if(s.type==="raw"&&h&&typeof p=="number")return o?h.children.splice(p,1):h.children[p]={type:"text",value:s.value},p;if(s.type==="element"){let f;for(f in ln)if(Object.hasOwn(ln,f)&&Object.hasOwn(s.properties,f)){const b=s.properties[f],S=ln[f];(S===null||S.includes(s.tagName))&&(s.properties[f]=c(String(b||""),f,s))}}if(s.type==="element"){let f=t?!t.includes(s.tagName):l?l.includes(s.tagName):!1;if(!f&&r&&typeof p=="number"&&(f=!r(s,p,h)),f&&h&&typeof p=="number")return a&&s.children?h.children.splice(p,1,...s.children):h.children.splice(p,1),p}}}function iu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Ja.test(e.slice(0,n))?e:""}function Lt({message:e,currentUser:n,showAvatar:t=!0,showTimestamp:r=!0,theme:i}){var E,F;const l=e.senderType===n.type,o=e.senderType==="system",a=((E=e.metadata)==null?void 0:E.isAI)===!0,c=e.senderType==="bot",u=(i==null?void 0:i.background)||"#00001a",s=(()=>{if(!u.startsWith("#"))return!1;const M=u.replace("#",""),y=parseInt(M.substring(0,2),16),_=parseInt(M.substring(2,4),16),B=parseInt(M.substring(4,6),16);return(.299*y+.587*_+.114*B)/255>.5})(),p=(i==null?void 0:i.primary)||"#337eff",h=(i==null?void 0:i.primaryStrong)||"#005eff",f=(i==null?void 0:i.text)||(s?"#1a1a2e":"#f7f7f8"),b=(i==null?void 0:i.textMuted)||(s?"rgba(0,0,0,0.35)":"rgba(247,247,248,0.35)");if(o)return L.jsx("div",{className:"flex justify-center my-3",children:L.jsx("div",{className:"px-4 py-1.5 rounded-full",style:{backgroundColor:s?"rgba(0,0,0,0.04)":"rgba(255,255,255,0.03)",boxShadow:s?"inset 0 0 0 1px rgba(0,0,0,0.06)":"inset 0 0 0 0.5px rgba(255,255,255,0.06)"},children:L.jsx("p",{style:{fontSize:"11px",letterSpacing:"0.019em",color:b},children:e.content})})});const I=l?null:(()=>{var M;return c||a?"AI Assistant":e.senderType==="agent"?((M=e.metadata)==null?void 0:M.agentName)||"Support Agent":null})(),x={background:`linear-gradient(135deg, ${p}, ${h})`,color:"#ffffff",borderRadius:"18px 18px 4px 18px",boxShadow:`0 2px 12px -3px ${p}40`},v=s?{backgroundColor:"rgba(0,0,0,0.04)",color:f,borderRadius:"18px 18px 18px 4px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.06)"}:{backgroundColor:"rgba(255,255,255,0.04)",color:f,borderRadius:"18px 18px 18px 4px",boxShadow:"inset 0 0 0 0.5px rgba(255,255,255,0.06), inset 0 1px 0 0 rgba(255,255,255,0.08)"};return L.jsxs("div",{className:`flex gap-2.5 mb-3 ${l?"flex-row-reverse":"flex-row"}`,children:[t&&!l&&L.jsx("div",{className:"flex-shrink-0 mt-auto mb-5",children:c||a?L.jsx(Cr,{size:28}):L.jsx("div",{className:"h-7 w-7 rounded-full flex items-center justify-center",style:{background:s?`linear-gradient(135deg, ${p}30, rgba(0,0,0,0.04))`:`linear-gradient(135deg, ${p}60, rgba(255,255,255,0.06))`,boxShadow:s?"inset 0 0 0 1px rgba(0,0,0,0.08)":"inset 0 0 0 0.5px rgba(255,255,255,0.1)"},children:L.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s?p:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[L.jsx("title",{children:"Agent"}),L.jsx("path",{d:"M3 18v-6a9 9 0 0 1 18 0v6"}),L.jsx("path",{d:"M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"})]})})}),t&&l&&L.jsx("div",{className:"w-7 flex-shrink-0"}),L.jsxs("div",{className:`flex flex-col max-w-[75%] ${l?"items-end":"items-start"}`,children:[I&&L.jsx("span",{className:"mb-1 px-1 font-medium",style:{color:s?"rgba(0,0,0,0.45)":"rgba(247,247,248,0.4)",fontSize:"11px",letterSpacing:"0.019em"},children:I}),L.jsxs("div",{className:"px-4 py-2.5",style:{...l?x:v,fontSize:"14px",lineHeight:"1.5",letterSpacing:"0.006em"},children:[e.messageType==="text"&&L.jsx(eu,{components:{p:({children:M})=>L.jsx("p",{style:{margin:0},children:M}),img:({src:M,alt:y,..._})=>L.jsx("img",{..._,src:M,alt:y,className:"max-w-full h-auto rounded-lg my-2",style:{boxShadow:"0 2px 8px rgba(0,0,0,0.2)"},loading:"lazy"}),a:({href:M,children:y,..._})=>L.jsx("a",{..._,href:M,target:"_blank",rel:"noopener noreferrer",style:{color:l?"rgba(255,255,255,0.85)":p,textDecoration:"underline",textUnderlineOffset:"2px"},children:y}),code:({children:M})=>L.jsx("code",{style:{backgroundColor:l?"rgba(0,0,0,0.2)":s?"rgba(0,0,0,0.06)":"rgba(255,255,255,0.06)",borderRadius:"4px",padding:"2px 5px",fontSize:"12px",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace'},children:M})},children:e.content}),e.messageType==="image"&&L.jsx("div",{children:L.jsx("img",{src:e.content,alt:"Attachment",className:"max-w-full h-auto rounded-lg",loading:"lazy"})}),e.messageType==="file"&&L.jsxs("div",{className:"flex items-center gap-2",children:[L.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[L.jsx("title",{children:"File"}),L.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})]}),L.jsx("a",{href:e.content,target:"_blank",rel:"noopener noreferrer",style:{color:l?"rgba(255,255,255,0.85)":p,textDecoration:"underline",textUnderlineOffset:"2px"},children:((F=e.metadata)==null?void 0:F.fileName)||"Download file"})]})]}),r&&L.jsxs("div",{className:`flex items-center gap-1.5 mt-1 px-1 ${l?"flex-row-reverse":"flex-row"}`,children:[L.jsx("span",{style:{fontSize:"11px",letterSpacing:"0.019em",color:b},children:Rr(new Date(e.createdAt),{addSuffix:!0})}),l&&e.status&&L.jsxs("span",{style:{color:b},children:[e.status==="sent"&&L.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[L.jsx("title",{children:"Sent"}),L.jsx("polyline",{points:"20 6 9 17 4 12"})]}),e.status==="delivered"&&L.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[L.jsx("title",{children:"Delivered"}),L.jsx("polyline",{points:"18 6 7 17 2 12"}),L.jsx("polyline",{points:"22 6 11 17"})]}),e.status==="read"&&L.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:p,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[L.jsx("title",{children:"Read"}),L.jsx("polyline",{points:"18 6 7 17 2 12"}),L.jsx("polyline",{points:"22 6 11 17"})]})]})]})]})]})}try{Lt.displayName="MessageItem",Lt.__docgenInfo={description:"",displayName:"MessageItem",props:{message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"IMessage"}},currentUser:{defaultValue:null,description:"",name:"currentUser",required:!0,type:{name:"IUser"}},showAvatar:{defaultValue:{value:"true"},description:"",name:"showAvatar",required:!1,type:{name:"boolean | undefined"}},showTimestamp:{defaultValue:{value:"true"},description:"",name:"showTimestamp",required:!1,type:{name:"boolean | undefined"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"IChatTheme | undefined"}}}}}catch{}export{Lt as M};
|
|
13
|
+
`}),t}function Ct(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Et(e,n){const t=Ia(e,n),r=t.one(e,void 0),i=da(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
14
|
+
`},i),l}function za(e,n){return e&&"run"in e?async function(t,r){const i=Et(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Et(t,{file:r,...e||n})}}function It(e){if(e)throw e}var un,Tt;function Da(){if(Tt)return un;Tt=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},l=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var s=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!s&&!f)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},o=function(u,s){t&&s.name==="__proto__"?t(u,s.name,{enumerable:!0,configurable:!0,value:s.newValue,writable:!0}):u[s.name]=s.newValue},a=function(u,s){if(s==="__proto__")if(e.call(u,s)){if(r)return r(u,s).value}else return;return u[s]};return un=function c(){var u,s,f,h,p,b,S=arguments[0],I=1,x=arguments.length,z=!1;for(typeof S=="boolean"&&(z=S,S=arguments[1]||{},I=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});I<x;++I)if(u=arguments[I],u!=null)for(s in u)f=a(S,s),h=a(u,s),S!==h&&(z&&h&&(l(h)||(p=i(h)))?(p?(p=!1,b=f&&i(f)?f:[]):b=f&&l(f)?f:{},o(S,{name:s,newValue:c(z,b,h)})):typeof h<"u"&&o(S,{name:s,newValue:h}));return S},un}var La=Da();const sn=Mt(La);function En(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ma(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(c,...u){const s=e[++l];let f=-1;if(c){o(c);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,s?_a(s,a)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function _a(e,n){let t;return r;function r(...o){const a=e.length>o.length;let c;a&&o.push(i);try{c=e.apply(this,o)}catch(u){const s=u;if(a&&t)throw s;return i(s)}a||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const se={basename:Na,dirname:Oa,extname:Ra,join:Fa,sep:"/"};function Na(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');qe(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Oa(e){if(qe(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Ra(e){qe(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Fa(...e){let n=-1,t;for(;++n<e.length;)qe(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":ja(t)}function ja(e){qe(e);const n=e.codePointAt(0)===47;let t=Ba(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Ba(e,n){let t="",r=0,i=-1,l=0,o=-1,a,c;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function qe(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ha={cwd:Ua};function Ua(){return"/"}function In(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qa(e){if(typeof e=="string")e=new URL(e);else if(!In(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Va(e)}function Va(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const cn=["history","path","basename","stem","extname","dirname"];class dr{constructor(n){let t;n?In(n)?t={path:n}:typeof n=="string"||$a(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Ha.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cn.length;){const l=cn[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)cn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?se.basename(this.path):void 0}set basename(n){fn(n,"basename"),pn(n,"basename"),this.path=se.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?se.dirname(this.path):void 0}set dirname(n){At(this.basename,"dirname"),this.path=se.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?se.extname(this.path):void 0}set extname(n){if(pn(n,"extname"),At(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=se.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){In(n)&&(n=qa(n)),fn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?se.basename(this.path,this.extname):void 0}set stem(n){fn(n,"stem"),pn(n,"stem"),this.path=se.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new K(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function pn(e,n){if(e&&e.includes(se.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+se.sep+"`")}function fn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function At(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function $a(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Xa=(function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l}),Wa={}.hasOwnProperty;class Bn extends Xa{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=Ma()}copy(){const n=new Bn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(sn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(mn("data",this.frozen),this.namespace[n]=t,this):Wa.call(this.namespace,n)&&this.namespace[n]||void 0:n?(mn("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ye(n),r=this.parser||this.Parser;return hn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),hn("process",this.parser||this.Parser),dn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(l,o){const a=Ye(n),c=r.parse(a);r.run(c,a,function(s,f,h){if(s||!f||!h)return u(s);const p=f,b=r.stringify(p,h);Ka(b)?h.value=b:h.result=b,u(s,h)});function u(s,f){s||!f?o(s):l?l(f):t(void 0,f)}}}processSync(n){let t=!1,r;return this.freeze(),hn("processSync",this.parser||this.Parser),dn("processSync",this.compiler||this.Compiler),this.process(n,i),vt("processSync","process",t),r;function i(l,o){t=!0,It(l),r=o}}run(n,t,r){Pt(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?l(void 0,r):new Promise(l);function l(o,a){const c=Ye(t);i.run(n,c,u);function u(s,f,h){const p=f||n;s?a(s):o?o(p):r(void 0,p,h)}}}runSync(n,t){let r=!1,i;return this.run(n,t,l),vt("runSync","run",r),i;function l(o,a){It(o),i=a,r=!0}}stringify(n,t){this.freeze();const r=Ye(t),i=this.compiler||this.Compiler;return dn("stringify",i),Pt(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(mn("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):o(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function l(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[s,...f]=u;c(s,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))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(u.plugins),u.settings&&(i.settings=sn(!0,i.settings,u.settings))}function a(u){let s=-1;if(u!=null)if(Array.isArray(u))for(;++s<u.length;){const f=u[s];l(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,s){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...s]);else if(s.length>0){let[p,...b]=s;const S=r[h][1];En(S)&&En(p)&&(p=sn(!0,S,p)),r[h]=[u,p,...b]}}}}const Ya=new Bn().freeze();function hn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Pt(e){if(!En(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ye(e){return Qa(e)?e:new dr(e)}function Qa(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ka(e){return typeof e=="string"||Ga(e)}function Ga(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ja="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zt=[],Dt={allowDangerousHtml:!0},Za=/^(https?|ircs?|mailto|xmpp)$/i,eu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nu(e){const n=tu(e),t=ru(e);return iu(n.runSync(n.parse(t),t),e)}function tu(e){const n=e.rehypePlugins||zt,t=e.remarkPlugins||zt,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Dt}:Dt;return Ya().use(No).use(t).use(za,r).use(n)}function ru(e){const n=e.children||"",t=new dr;return typeof n=="string"&&(t.value=n),t}function iu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||lu;for(const s of eu)Object.hasOwn(n,s.from)&&(""+s.from+(s.to?"use `"+s.to+"` instead":"remove it")+Ja+s.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),hr(e,u),hi(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function u(s,f,h){if(s.type==="raw"&&h&&typeof f=="number")return o?h.children.splice(f,1):h.children[f]={type:"text",value:s.value},f;if(s.type==="element"){let p;for(p in ln)if(Object.hasOwn(ln,p)&&Object.hasOwn(s.properties,p)){const b=s.properties[p],S=ln[p];(S===null||S.includes(s.tagName))&&(s.properties[p]=c(String(b||""),p,s))}}if(s.type==="element"){let p=t?!t.includes(s.tagName):l?l.includes(s.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(s,f,h)),p&&h&&typeof f=="number")return a&&s.children?h.children.splice(f,1,...s.children):h.children.splice(f,1),f}}}function lu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Za.test(e.slice(0,n))?e:""}function ou(e,n){const t=(e==null?void 0:e.primary)||"#337eff",r=(e==null?void 0:e.text)||(n?"#1a1a2e":"#f7f7f8"),i=n?"rgba(0,0,0,0.9)":"rgba(255,255,255,0.95)",l=n?"rgba(0,0,0,0.06)":"rgba(255,255,255,0.08)",o=n?"rgba(0,0,0,0.04)":"rgba(0,0,0,0.25)",a=n?"1px solid rgba(0,0,0,0.08)":"1px solid rgba(255,255,255,0.06)",c=n?`3px solid ${t}60`:`3px solid ${t}80`;return{paragraph:{margin:"0 0 8px 0",lineHeight:"1.6",color:r},strong:{fontWeight:600,color:i},emphasis:{fontStyle:"italic",color:r},link:{color:t,textDecoration:"underline",textUnderlineOffset:"2px",cursor:"pointer"},list:{paddingLeft:"20px",margin:"8px 0",color:r},listItem:{margin:"4px 0",lineHeight:"1.5",color:r},code:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:"0.875em",backgroundColor:l,padding:"2px 6px",borderRadius:"4px",color:r},codeBlock:{fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontSize:"0.8125em",backgroundColor:o,border:a,padding:"12px",borderRadius:"8px",overflowX:"auto",margin:"8px 0",color:r,lineHeight:"1.5",display:"block",whiteSpace:"pre"},heading:{fontWeight:600,marginTop:"12px",marginBottom:"6px",color:i,lineHeight:"1.3"},blockquote:{borderLeft:c,backgroundColor:n?"rgba(0,0,0,0.02)":"rgba(255,255,255,0.02)",margin:"8px 0",padding:"6px 12px",borderRadius:"0 4px 4px 0",color:r,fontStyle:"italic"},hr:{border:"none",borderTop:n?"1px solid rgba(0,0,0,0.1)":"1px solid rgba(255,255,255,0.08)",margin:"12px 0"}}}function au(e){const n=(e==null?void 0:e.background)||"#00001a";if(!n.startsWith("#"))return!1;const t=n.replace("#","");if(t.length<6)return!1;const r=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),l=parseInt(t.substring(4,6),16);return(.299*r+.587*i+.114*l)/255>.5}function Tn({content:e,theme:n}){const t=au(n),r=ou(n,t),i={display:"block"};return T.jsx("div",{style:i,children:T.jsx(nu,{components:{p:({children:l})=>T.jsx("p",{style:r.paragraph,children:l}),strong:({children:l})=>T.jsx("strong",{style:r.strong,children:l}),em:({children:l})=>T.jsx("em",{style:r.emphasis,children:l}),a:({href:l,children:o})=>T.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",style:r.link,children:o}),ul:({children:l})=>T.jsx("ul",{style:{...r.list,listStyleType:"disc"},children:l}),ol:({children:l})=>T.jsx("ol",{style:{...r.list,listStyleType:"decimal"},children:l}),li:({children:l})=>T.jsx("li",{style:r.listItem,children:l}),code:(({children:l,className:o})=>o!=null&&o.startsWith("language-")?T.jsx("code",{className:o,style:r.codeBlock,children:l}):T.jsx("code",{style:r.code,children:l})),pre:({children:l})=>T.jsx("pre",{style:{margin:"8px 0",padding:0,backgroundColor:"transparent",border:"none",overflow:"visible"},children:l}),h1:({children:l})=>T.jsx("h1",{style:{...r.heading,fontSize:"1.15em"},children:l}),h2:({children:l})=>T.jsx("h2",{style:{...r.heading,fontSize:"1.1em"},children:l}),h3:({children:l})=>T.jsx("h3",{style:{...r.heading,fontSize:"1.05em"},children:l}),h4:({children:l})=>T.jsx("h4",{style:{...r.heading,fontSize:"1em"},children:l}),h5:({children:l})=>T.jsx("h5",{style:{...r.heading,fontSize:"0.95em"},children:l}),h6:({children:l})=>T.jsx("h6",{style:{...r.heading,fontSize:"0.9em"},children:l}),blockquote:({children:l})=>T.jsx("blockquote",{style:r.blockquote,children:l}),hr:()=>T.jsx("hr",{style:r.hr})},children:e})})}try{Tn.displayName="MarkdownMessage",Tn.__docgenInfo={description:"",displayName:"MarkdownMessage",props:{content:{defaultValue:null,description:"",name:"content",required:!0,type:{name:"string"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"IChatTheme | undefined"}}}}}catch{}function Lt({message:e,currentUser:n,showAvatar:t=!0,showTimestamp:r=!0,theme:i}){var E,F;const l=e.senderType===n.type,o=e.senderType==="system",a=((E=e.metadata)==null?void 0:E.isAI)===!0,c=e.senderType==="bot",u=(i==null?void 0:i.background)||"#00001a",s=(()=>{if(!u.startsWith("#"))return!1;const N=u.replace("#",""),y=parseInt(N.substring(0,2),16),O=parseInt(N.substring(2,4),16),B=parseInt(N.substring(4,6),16);return(.299*y+.587*O+.114*B)/255>.5})(),f=(i==null?void 0:i.primary)||"#337eff",h=(i==null?void 0:i.primaryStrong)||"#005eff",p=(i==null?void 0:i.text)||(s?"#1a1a2e":"#f7f7f8"),b=(i==null?void 0:i.textMuted)||(s?"rgba(0,0,0,0.35)":"rgba(247,247,248,0.35)");if(o)return T.jsx("div",{className:"flex justify-center my-3",children:T.jsx("div",{className:"px-4 py-1.5 rounded-full",style:{backgroundColor:s?"rgba(0,0,0,0.04)":"rgba(255,255,255,0.03)",boxShadow:s?"inset 0 0 0 1px rgba(0,0,0,0.06)":"inset 0 0 0 0.5px rgba(255,255,255,0.06)"},children:T.jsx("p",{style:{fontSize:"11px",letterSpacing:"0.019em",color:b},children:e.content})})});const I=l?null:(()=>{var N;return c||a?"AI Assistant":e.senderType==="agent"?((N=e.metadata)==null?void 0:N.agentName)||"Support Agent":null})(),x={background:`linear-gradient(135deg, ${f}, ${h})`,color:"#ffffff",borderRadius:"18px 18px 4px 18px",boxShadow:`0 2px 12px -3px ${f}40`},z=s?{backgroundColor:"rgba(0,0,0,0.04)",color:p,borderRadius:"18px 18px 18px 4px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.06)"}:{backgroundColor:"rgba(255,255,255,0.04)",color:p,borderRadius:"18px 18px 18px 4px",boxShadow:"inset 0 0 0 0.5px rgba(255,255,255,0.06), inset 0 1px 0 0 rgba(255,255,255,0.08)"};return T.jsxs("div",{className:`flex gap-2.5 mb-3 ${l?"flex-row-reverse":"flex-row"}`,children:[t&&!l&&T.jsx("div",{className:"flex-shrink-0 mt-auto mb-5",children:c||a?T.jsx(Er,{size:28}):T.jsx("div",{className:"h-7 w-7 rounded-full flex items-center justify-center",style:{background:s?`linear-gradient(135deg, ${f}30, rgba(0,0,0,0.04))`:`linear-gradient(135deg, ${f}60, rgba(255,255,255,0.06))`,boxShadow:s?"inset 0 0 0 1px rgba(0,0,0,0.08)":"inset 0 0 0 0.5px rgba(255,255,255,0.1)"},children:T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:s?f:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsx("title",{children:"Agent"}),T.jsx("path",{d:"M3 18v-6a9 9 0 0 1 18 0v6"}),T.jsx("path",{d:"M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"})]})})}),t&&l&&T.jsx("div",{className:"w-7 flex-shrink-0"}),T.jsxs("div",{className:`flex flex-col max-w-[75%] ${l?"items-end":"items-start"}`,children:[I&&T.jsx("span",{className:"mb-1 px-1 font-medium",style:{color:s?"rgba(0,0,0,0.45)":"rgba(247,247,248,0.4)",fontSize:"11px",letterSpacing:"0.019em"},children:I}),T.jsxs("div",{className:"px-4 py-2.5",style:{...l?x:z,fontSize:"14px",lineHeight:"1.5",letterSpacing:"0.006em"},children:[e.messageType==="text"&&(l?T.jsx("span",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.content}):T.jsx(Tn,{content:e.content,theme:i})),e.messageType==="image"&&T.jsx("div",{children:T.jsx("img",{src:e.content,alt:"Attachment",className:"max-w-full h-auto rounded-lg",loading:"lazy"})}),e.messageType==="file"&&T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsx("title",{children:"File"}),T.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})]}),T.jsx("a",{href:e.content,target:"_blank",rel:"noopener noreferrer",style:{color:l?"rgba(255,255,255,0.85)":f,textDecoration:"underline",textUnderlineOffset:"2px"},children:((F=e.metadata)==null?void 0:F.fileName)||"Download file"})]})]}),r&&T.jsxs("div",{className:`flex items-center gap-1.5 mt-1 px-1 ${l?"flex-row-reverse":"flex-row"}`,children:[T.jsx("span",{style:{fontSize:"11px",letterSpacing:"0.019em",color:b},children:Fr(new Date(e.createdAt),{addSuffix:!0})}),l&&e.status&&T.jsxs("span",{style:{color:b},children:[e.status==="sent"&&T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsx("title",{children:"Sent"}),T.jsx("polyline",{points:"20 6 9 17 4 12"})]}),e.status==="delivered"&&T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsx("title",{children:"Delivered"}),T.jsx("polyline",{points:"18 6 7 17 2 12"}),T.jsx("polyline",{points:"22 6 11 17"})]}),e.status==="read"&&T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:f,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[T.jsx("title",{children:"Read"}),T.jsx("polyline",{points:"18 6 7 17 2 12"}),T.jsx("polyline",{points:"22 6 11 17"})]})]})]})]})]})}try{Lt.displayName="MessageItem",Lt.__docgenInfo={description:"",displayName:"MessageItem",props:{message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"IMessage"}},currentUser:{defaultValue:null,description:"",name:"currentUser",required:!0,type:{name:"IUser"}},showAvatar:{defaultValue:{value:"true"},description:"",name:"showAvatar",required:!1,type:{name:"boolean | undefined"}},showTimestamp:{defaultValue:{value:"true"},description:"",name:"showTimestamp",required:!1,type:{name:"boolean | undefined"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"IChatTheme | undefined"}}}}}catch{}export{Lt as M};
|