reflexive 1.0.3 → 1.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/dashboard/out/404/index.html +1 -1
- package/dashboard/out/404.html +1 -1
- package/dashboard/out/__next.__PAGE__.txt +2 -2
- package/dashboard/out/__next._full.txt +3 -3
- package/dashboard/out/__next._head.txt +1 -1
- package/dashboard/out/__next._index.txt +2 -2
- package/dashboard/out/__next._tree.txt +2 -2
- package/dashboard/out/_next/static/chunks/{875b2f53bcfbbafb.js → c62b453c839de707.js} +2 -2
- package/dashboard/out/_next/static/chunks/f9e509bcd7517ecf.css +3 -0
- package/dashboard/out/_not-found/__next._full.txt +2 -2
- package/dashboard/out/_not-found/__next._head.txt +1 -1
- package/dashboard/out/_not-found/__next._index.txt +2 -2
- package/dashboard/out/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dashboard/out/_not-found/__next._not-found.txt +1 -1
- package/dashboard/out/_not-found/__next._tree.txt +2 -2
- package/dashboard/out/_not-found/index.html +1 -1
- package/dashboard/out/_not-found/index.txt +2 -2
- package/dashboard/out/index.html +1 -1
- package/dashboard/out/index.txt +3 -3
- package/package.json +1 -1
- package/dashboard/out/_next/static/chunks/209a165917e29ad7.css +0 -3
- /package/dashboard/out/_next/static/{I_vZuWMcbkmd2WL7bmaZz → KfK8jqevnQRRpFcUiOQN9}/_buildManifest.js +0 -0
- /package/dashboard/out/_next/static/{I_vZuWMcbkmd2WL7bmaZz → KfK8jqevnQRRpFcUiOQN9}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24363,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function d(e){return e?e.replace(u,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,u=1;function p(e){var t=e.match(l);t&&(n+=t.length);var r=e.lastIndexOf("\n");u=~r?e.length-r:u+e.length}function f(){var e={line:n,column:u};return function(t){return t.position=new h(e),g(i),t}}function h(e){this.start=e,this.end={line:n,column:u},this.source=t.source}function m(r){var l=Error(t.source+":"+n+":"+u+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=u,l.source=e,t.silent);else throw l}function g(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function x(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return u+=2,p(r),e=e.slice(n),u+=2,t({type:"comment",comment:r})}}h.prototype.content=e,g(i);var b,v=[];for(x(v);b=function(){var e=f(),t=g(o);if(t){if(y(),!g(a))return m("property missing ':'");var n=g(s),l=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(c),l}}();)!1!==b&&(v.push(b),x(v));return v}},77559,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,l.default)(e),i="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:l}=e;i?t(r,l,e):l&&((n=n||{})[r]=l)}),n};let l=r(e.r(24363))},57203,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||i.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,c):e.replace(o,c)).replace(l,s))}},43588,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(77559)),l=e.r(57203);function i(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,l.camelCase)(e,t)]=r)}),n}i.default=i,t.exports=i},84422,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===l.call(e)},s=function(e){if(!e||"[object Object]"!==l.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,l,i,o,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(t=arguments[p],null!=t)for(n in t)r=u(d,n),d!==(l=u(t,n))&&(h&&l&&(s(l)||(i=a(l)))?(i?(i=!1,o=r&&a(r)?r:[]):o=r&&s(r)?r:{},c(d,{name:n,newValue:e(h,o,l)})):void 0!==l&&c(d,{name:n,newValue:l}));return d}},23733,e=>{"use strict";var t=e.i(27493),n=e.i(4);function r({status:e,showControls:n,onStart:r,onStop:l,onRestart:i,onShutdown:o}){let a=e?.isRunning??!1;return(0,t.jsxs)("header",{className:"flex justify-between items-center py-1 px-0 border-b border-zinc-800 mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-lg font-bold flex items-center gap-0",children:[(0,t.jsx)("img",{src:"/logo-carbon.png",alt:"R",className:"h-[90px] w-auto -mr-[26px] -mt-1 -ml-4 relative z-10 drop-shadow-[0_0_4px_rgba(74,222,128,0.2)]"}),(0,t.jsx)("span",{className:"text-2xl font-bold tracking-wider bg-gradient-to-r from-green-400 via-green-500 to-green-600 bg-clip-text text-transparent -ml-3",children:"EFLEXIVE"})]}),e?.entry&&(0,t.jsx)("div",{className:"text-xs text-zinc-500 font-mono",children:e.entry})]}),n?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:r,disabled:a,className:"px-3 py-1.5 text-xs bg-zinc-800 border border-green-500 rounded text-white hover:bg-green-900 disabled:opacity-50 disabled:cursor-not-allowed",children:"Start"}),(0,t.jsx)("button",{onClick:i,className:"px-3 py-1.5 text-xs bg-zinc-800 border border-zinc-600 rounded text-white hover:bg-zinc-700",children:"Restart"}),(0,t.jsx)("button",{onClick:l,disabled:!a,className:"px-3 py-1.5 text-xs bg-zinc-800 border border-red-500 rounded text-white hover:bg-red-900 disabled:opacity-50 disabled:cursor-not-allowed",children:"Stop"}),(0,t.jsx)("button",{onClick:()=>{confirm("Shutdown Reflexive completely?")&&o()},className:"px-2.5 py-1.5 text-base bg-zinc-800 border border-amber-500 rounded text-amber-500 hover:bg-amber-900",title:"Shutdown Reflexive",children:"⏻"})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-green-900/50 rounded-full text-xs",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-green-500"}),(0,t.jsx)("span",{children:"Running"})]})]})}function l({isRunning:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${e?"bg-green-500":"bg-red-500"}`}),(0,t.jsx)("span",{children:e?"Running":"Stopped"})]})}function i(){}function o(){}let a=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c={};function u(e,t){return((t||c).jsx?s:a).test(e)}let d=/[ \t\n\f\r]/g;function p(e){return""===e.replace(d,"")}class f{constructor(e,t){this.attribute=t,this.property=e}}f.prototype.attribute="",f.prototype.booleanish=!1,f.prototype.boolean=!1,f.prototype.commaOrSpaceSeparated=!1,f.prototype.commaSeparated=!1,f.prototype.defined=!1,f.prototype.mustUseProperty=!1,f.prototype.number=!1,f.prototype.overloadedBoolean=!1,f.prototype.property="",f.prototype.spaceSeparated=!1,f.prototype.space=void 0;let h=0,m=w(),g=w(),x=w(),y=w(),b=w(),v=w(),k=w();function w(){return 2**++h}e.s(["boolean",0,m,"booleanish",0,g,"commaOrSpaceSeparated",0,k,"commaSeparated",0,v,"number",0,y,"overloadedBoolean",0,x,"spaceSeparated",0,b],1797);var S=e.i(1797);let C=Object.keys(S);class j extends f{constructor(e,t,n,r){let l=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++l<C.length;){const e=C[l];!function(e,t,n){n&&(e[t]=n)}(this,C[l],(n&S[e])===S[e])}}}function z(e){return e.toLowerCase()}j.prototype.defined=!0;let N=/[A-Z]/g,E=/-[a-z]/g,T=/^data[-\w.:]+$/i;function P(e){return"-"+e.toLowerCase()}function A(e){return e.charAt(1).toUpperCase()}let I={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"};class L{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function D(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new L(n,r,t)}function O(e){let t={},n={};for(let[r,l]of Object.entries(e.properties)){let i=new j(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[z(r)]=r,n[z(i.attribute)]=r}return new L(t,n,e.space)}L.prototype.normal={},L.prototype.property={},L.prototype.space=void 0;let M=O({properties:{ariaActiveDescendant:null,ariaAtomic:g,ariaAutoComplete:null,ariaBusy:g,ariaChecked:g,ariaColCount:y,ariaColIndex:y,ariaColSpan:y,ariaControls:b,ariaCurrent:null,ariaDescribedBy:b,ariaDetails:null,ariaDisabled:g,ariaDropEffect:b,ariaErrorMessage:null,ariaExpanded:g,ariaFlowTo:b,ariaGrabbed:g,ariaHasPopup:null,ariaHidden:g,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:b,ariaLevel:y,ariaLive:null,ariaModal:g,ariaMultiLine:g,ariaMultiSelectable:g,ariaOrientation:null,ariaOwns:b,ariaPlaceholder:null,ariaPosInSet:y,ariaPressed:g,ariaReadOnly:g,ariaRelevant:null,ariaRequired:g,ariaRoleDescription:b,ariaRowCount:y,ariaRowIndex:y,ariaRowSpan:y,ariaSelected:g,ariaSetSize:y,ariaSort:null,ariaValueMax:y,ariaValueMin:y,ariaValueNow:y,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function R(e,t){return t in e?e[t]:t}function F(e,t){return R(e,t.toLowerCase())}let _=O({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:v,acceptCharset:b,accessKey:b,action:null,allow:null,allowFullScreen:m,allowPaymentRequest:m,allowUserMedia:m,alt:null,as:null,async:m,autoCapitalize:null,autoComplete:b,autoFocus:m,autoPlay:m,blocking:b,capture:null,charSet:null,checked:m,cite:null,className:b,cols:y,colSpan:null,content:null,contentEditable:g,controls:m,controlsList:b,coords:y|v,crossOrigin:null,data:null,dateTime:null,decoding:null,default:m,defer:m,dir:null,dirName:null,disabled:m,download:x,draggable:g,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:m,formTarget:null,headers:b,height:y,hidden:x,high:y,href:null,hrefLang:null,htmlFor:b,httpEquiv:b,id:null,imageSizes:null,imageSrcSet:null,inert:m,inputMode:null,integrity:null,is:null,isMap:m,itemId:null,itemProp:b,itemRef:b,itemScope:m,itemType:b,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:m,low:y,manifest:null,max:null,maxLength:y,media:null,method:null,min:null,minLength:y,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:y,pattern:null,ping:b,placeholder:null,playsInline:m,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:m,referrerPolicy:null,rel:b,required:m,reversed:m,rows:y,rowSpan:y,sandbox:b,scope:null,scoped:m,seamless:m,selected:m,shadowRootClonable:m,shadowRootDelegatesFocus:m,shadowRootMode:null,shape:null,size:y,sizes:null,slot:null,span:y,spellCheck:g,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y,step:null,style:null,tabIndex:y,target:null,title:null,translate:null,type:null,typeMustMatch:m,useMap:null,value:g,width:y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:b,axis:null,background:null,bgColor:null,border:y,borderColor:null,bottomMargin:y,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:y,leftMargin:y,link:null,longDesc:null,lowSrc:null,marginHeight:y,marginWidth:y,noResize:m,noHref:m,noShade:m,noWrap:m,object:null,profile:null,prompt:null,rev:null,rightMargin:y,rules:null,scheme:null,scrolling:g,standby:null,summary:null,text:null,topMargin:y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:m,disableRemotePlayback:m,prefix:null,property:null,results:y,security:null,unselectable:null},space:"html",transform:F}),B=O({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:k,accentHeight:y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y,amplitude:y,arabicForm:null,ascent:y,attributeName:null,attributeType:null,azimuth:y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y,by:null,calcMode:null,capHeight:y,className:b,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:y,diffuseConstant:y,direction:null,display:null,dur:null,divisor:y,dominantBaseline:null,download:m,dx:null,dy:null,edgeMode:null,editable:null,elevation:y,enableBackground:null,end:null,event:null,exponent:y,externalResourcesRequired:null,fill:null,fillOpacity:y,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:v,g2:v,glyphName:v,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y,horizOriginX:y,horizOriginY:y,id:null,ideographic:y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y,k:y,k1:y,k2:y,k3:y,k4:y,kernelMatrix:k,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y,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:y,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:y,overlineThickness:y,paintOrder:null,panose1:null,path:null,pathLength:y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:b,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y,pointsAtY:y,pointsAtZ:y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:k,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:k,rev:k,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:k,requiredFeatures:k,requiredFonts:k,requiredFormats:k,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:y,specularExponent:y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y,strikethroughThickness:y,string:null,stroke:null,strokeDashArray:k,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y,strokeOpacity:y,strokeWidth:null,style:null,surfaceScale:y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:k,tabIndex:y,tableValues:null,target:null,targetX:y,targetY:y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:k,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y,underlineThickness:y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y,values:null,vAlphabetic:y,vMathematical:y,vectorEffect:null,vHanging:y,vIdeographic:y,version:null,vertAdvY:y,vertOriginX:y,vertOriginY:y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:R}),U=O({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),H=O({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:F}),$=O({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),V=D([M,_,U,H,$],"html"),q=D([M,B,U,H,$],"svg");var W=e.i(43588);let J=X("end"),K=X("start");function X(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Q(e){return e&&"object"==typeof e?"position"in e||"type"in e?Z(e.position):"start"in e||"end"in e?Z(e):"line"in e||"column"in e?Y(e):"":""}function Y(e){return G(e&&e.line)+":"+G(e&&e.column)}function Z(e){return Y(e&&e.start)+"-"+Y(e&&e.end)}function G(e){return e&&"number"==typeof e?e:1}class ee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",l={},i=!1;if(t&&(l="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!l.cause&&e&&(i=!0,r=e.message,l.cause=e),!l.ruleId&&!l.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?l.ruleId=n:(l.source=n.slice(0,e),l.ruleId=n.slice(e+1))}if(!l.place&&l.ancestors&&l.ancestors){const e=l.ancestors[l.ancestors.length-1];e&&(l.place=e.position)}const o=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=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Q(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=i&&l.cause&&"string"==typeof l.cause.stack?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ee.prototype.file="",ee.prototype.name="",ee.prototype.reason="",ee.prototype.message="",ee.prototype.stack="",ee.prototype.column=void 0,ee.prototype.line=void 0,ee.prototype.ancestors=void 0,ee.prototype.cause=void 0,ee.prototype.fatal=void 0,ee.prototype.place=void 0,ee.prototype.ruleId=void 0,ee.prototype.source=void 0;let et={}.hasOwnProperty,en=new Map,er=/[A-Z]/g,el=new Set(["table","tbody","thead","tfoot","tr"]),ei=new Set(["td","th"]),eo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ea(e,t,n){var r,l,o,a,s,c,u,d,h;let m,g,x,y,b,v,k,w,S,C,L;return"element"===t.type?(r=e,l=t,o=n,g=m=r.schema,"svg"===l.tagName.toLowerCase()&&"html"===m.space&&(r.schema=q),r.ancestors.push(l),x=ed(r,l.tagName,!1),y=function(e,t){let n,r,l={};for(r in t.properties)if("children"!==r&&et.call(t.properties,r)){let i=function(e,t,n){let r=function(e,t){let n=z(t),r=t,l=f;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&T.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(E,A);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!E.test(e)){let n=e.replace(N,P);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}l=j}return new l(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var l;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(l=n)[l.length-1]?[...l,""]:l).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,W.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new ee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=eo+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)et.call(e,t)&&(n[function(e){let t=e.replace(er,ef);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?I[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(i){let[r,o]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof o&&ei.has(t.tagName)?n=o:l[r]=o}}return n&&((l.style||(l.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),l}(r,l),b=eu(r,l),el.has(l.tagName)&&(b=b.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&p(e.value):p(e))})),es(r,y,x,l),ec(y,b),r.ancestors.pop(),r.schema=m,r.create(l,x,y,o)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return i("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}ep(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(a=e,s=t,c=n,k=v=a.schema,"svg"===s.name&&"html"===v.space&&(a.schema=q),a.ancestors.push(s),w=null===s.name?a.Fragment:ed(a,s.name,!0),S=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];i("ExpressionStatement"===t.type);let l=t.expression;i("ObjectExpression"===l.type);let o=l.properties[0];i("SpreadElement"===o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ep(e,t.position);else{let l,o=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];i("ExpressionStatement"===t.type),l=e.evaluater.evaluateExpression(t.expression)}else ep(e,t.position);else l=null===r.value||r.value;n[o]=l}return n}(a,s),C=eu(a,s),es(a,S,w,s),ec(S,C),a.ancestors.pop(),a.schema=v,a.create(s,w,S,c)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ep(e,t.position)}(e,t):"root"===t.type?(u=e,d=t,h=n,ec(L={},eu(u,d)),u.create(d,u.Fragment,L,h)):"text"===t.type?t.value:void 0}function es(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ec(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eu(e,t){let n=[],r=-1,l=e.passKeys?new Map:en;for(;++r<t.children.length;){let i,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=l.get(e)||0;i=e+"-"+t,l.set(e,t+1)}}let a=ea(e,o,i);void 0!==a&&n.push(a)}return n}function ed(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),l=-1;for(;++l<n.length;){let t=u(n[l])?{type:"Identifier",name:n[l]}:{type:"Literal",value:n[l]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(l&&"Literal"===t.type),optional:!1}:t}i(e,"always a result"),r=e}else r=u(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return et.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ep(e)}function ep(e,t){let n=new ee("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=eo+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ef(e){return"-"+e.toLowerCase()}let eh={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"]},em={};function eg(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ex(e.children,t,n)}return Array.isArray(e)?ex(e,t,n):""}function ex(e,t,n){let r=[],l=-1;for(;++l<e.length;)r[l]=eg(e[l],t,n);return r.join("")}function ey(e,t,n,r){let l,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)(l=Array.from(r)).unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)(l=r.slice(o,o+1e4)).unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function eb(e,t){return e.length>0?(ey(e,e.length,0,t),e):t}let ev={}.hasOwnProperty,ek=eL(/[A-Za-z]/),ew=eL(/[\dA-Za-z]/),eS=eL(/[#-'*+\--9=?A-Z^-~]/);function eC(e){return null!==e&&(e<32||127===e)}let ej=eL(/\d/),ez=eL(/[\dA-Fa-f]/),eN=eL(/[!-/:-@[-`{-~]/);function eE(e){return null!==e&&e<-2}function eT(e){return null!==e&&(e<0||32===e)}function eP(e){return -2===e||-1===e||32===e}let eA=eL(/\p{P}|\p{S}/u),eI=eL(/\s/);function eL(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eD(e,t,n,r){let l=r?r-1:1/0,i=0;return function(r){return eP(r)?(e.enter(n),function r(o){return eP(o)&&i++<l?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let eO={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eD(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let l=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eE(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},eM={tokenize:function(e){let t,n,r,l=this,i=[],o=0;return a;function a(t){if(o<i.length){let n=i[o];return l.containerState=n[1],e.attempt(n[0].continuation,s,c)(t)}return c(t)}function s(e){if(o++,l.containerState._closeFlow){let n;l.containerState._closeFlow=void 0,t&&x();let r=l.events.length,i=r;for(;i--;)if("exit"===l.events[i][0]&&"chunkFlow"===l.events[i][1].type){n=l.events[i][1].end;break}g(o);let a=r;for(;a<l.events.length;)l.events[a][1].end={...n},a++;return ey(l.events,i+1,0,l.events.slice(r)),l.events.length=a,c(e)}return a(e)}function c(n){if(o===i.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);l.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return l.containerState={},e.check(eR,u,d)(n)}function u(e){return t&&x(),g(o),p(e)}function d(e){return l.parser.lazy[l.now().line]=o!==i.length,r=l.now().offset,h(e)}function p(t){return l.containerState={},e.attempt(eR,f,h)(t)}function f(e){return o++,i.push([l.currentConstruct,l.containerState]),p(e)}function h(r){if(null===r){t&&x(),g(0),e.consume(r);return}return t=t||l.parser.flow(l.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return eE(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,l.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(e,i){let a=l.sliceStream(e);if(i&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),l.parser.lazy[e.start.line]){let e,n,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<r&&(!t.events[i][1].end||t.events[i][1].end.offset>r))return;let a=l.events.length,s=a;for(;s--;)if("exit"===l.events[s][0]&&"chunkFlow"===l.events[s][1].type){if(e){n=l.events[s][1].end;break}e=!0}for(g(o),i=a;i<l.events.length;)l.events[i][1].end={...n},i++;ey(l.events,s+1,0,l.events.slice(a)),l.events.length=i}}function g(t){let n=i.length;for(;n-- >t;){let t=i[n];l.containerState=t[1],t[0].exit.call(l,e)}i.length=t}function x(){t.write([null]),n=void 0,t=void 0,l.containerState._closeFlow=void 0}}},eR={tokenize:function(e,t,n){return eD(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eF={partial:!0,tokenize:function(e,t,n){return function(t){return eP(t)?eD(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eE(e)?t(e):n(e)}}};class e_{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&eB(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),eB(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eB(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);eB(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eB(this.left,t.reverse())}}}function eB(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function eU(e){let t,n,r,l,i,o,a,s={},c=-1,u=new e_(e);for(;++c<u.length;){for(;c in s;)c=s[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,l=e.get(t)[1],i=e.get(t)[2],o=t-1,a=[],s=l._tokenizer;!s&&(s=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let c=s.events,u=[],d={},p=-1,f=l,h=0,m=0,g=[0];for(;f;){for(;e.get(++o)[1]!==f;);a.push(o),!f._tokenizer&&(n=i.sliceStream(f),f.next||n.push(null),r&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=f,f=f.next}for(f=l;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){let t=c.slice(g[p],g[p+1]),n=a.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),p=-1;++p<u.length;)d[h+u[p][0]]=h+u[p][1],h+=u[p][1]-u[p][0]-1;return d}(u,c)),c=s[c],a=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(l=u.get(r))[1].type||"lineEndingBlank"===l[1].type)"enter"===l[0]&&(n&&(u.get(n)[1].type="lineEndingBlank"),l[1].type="lineEnding",n=r);else if("linePrefix"===l[1].type||"listItemIndent"===l[1].type);else break;n&&(t[1].end={...u.get(n)[1].start},(i=u.slice(n,c)).unshift(t),u.splice(n,c-n+1,i))}}return ey(e,0,1/0,u.slice(0)),!a}let eH={resolve:function(e){return eU(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?l(t):eE(t)?e.check(e$,i,l)(t):(e.consume(t),r)}function l(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},e$={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eD(e,l,"linePrefix")};function l(l){if(null===l||eE(l))return n(l);let i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}},eV={tokenize:function(e){let t=this,n=e.attempt(eF,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eD(e,e.attempt(this.parser.constructs.flow,r,e.attempt(eH,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},eq={resolveAll:eX()},eW=eK("string"),eJ=eK("text");function eK(e){return{resolveAll:eX("text"===e?eQ:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],l=t.attempt(r,i,o);return i;function i(e){return s(e)?l(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),l(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],l=-1;if(t)for(;++l<t.length;){let e=t[l];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function eX(e){return function(t,n){let r,l=-1;for(;++l<=t.length;)void 0===r?t[l]&&"data"===t[l][1].type&&(r=l,l++):t[l]&&"data"===t[l][1].type||(l!==r+2&&(t[r][1].end=t[l-1][1].end,t.splice(r+2,l-r-2),l=r+2),r=void 0);return e?e(t,n):t}}function eQ(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,l=e[n-1][1],i=t.sliceStream(l),o=i.length,a=-1,s=0;for(;o--;){let e=i[o];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:l.start._bufferIndex+a,_index:l.start._index+o,line:l.end.line,column:l.end.column-s,offset:l.end.offset-s},end:{...l.end}};l.end={...i.start},l.start.offset===l.end.offset?Object.assign(l,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}function eY(e){return null===e||eT(e)||eI(e)?1:eA(e)?2:void 0}function eZ(e,t,n){let r=[],l=-1;for(;++l<e.length;){let i=e[l].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}let eG={name:"attention",resolveAll:function(e,t){let n,r,l,i,o,a,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[n][1].end},p={...e[u][1].start};e0(d,-a),e0(p,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},l={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[n][1].end={...i.start},e[u][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eb(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eb(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",l,t]]),s=eb(s,eZ(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=eb(s,[["exit",l,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=eb(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ey(e,n-1,u-n+3,s),u=n+s.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,l=this.previous,i=eY(l);return function(o){return n=o,e.enter("attentionSequence"),function o(a){if(a===n)return e.consume(a),o;let s=e.exit("attentionSequence"),c=eY(a),u=!c||2===c&&i||r.includes(a),d=!i||2===i&&c||r.includes(l);return s._open=!!(42===n?u:u&&(i||!d)),s._close=!!(42===n?d:d&&(c||!u)),t(a)}(o)}}};function e0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let e1={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eP(t)?eD(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)};function l(r){return e.attempt(e1,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),l}return n(t)};function l(n){return eP(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},e5={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eN(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},e2=document.createElement("i");function e4(e){let t="&"+e+";";e2.innerHTML=t;let n=e2.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let e3={name:"characterReference",tokenize:function(e,t,n){let r,l,i=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,l=ew,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,l=ez,c):(e.enter("characterReferenceValue"),r=7,l=ej,c(t))}function c(a){if(59===a&&o){let r=e.exit("characterReferenceValue");return l!==ew||e4(i.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return l(a)&&o++<r?(e.consume(a),c):n(a)}}},e7={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l)};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},e9={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,l=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),eP(t)?eD(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(l){return l===r?(i++,e.consume(l),t):i>=a?(e.exit("codeFencedFenceSequence"),eP(l)?eD(e,c,"whitespace")(l):c(l)):n(l)}(t)):n(t)}function c(r){return null===r||eE(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,a=0;return function(t){var i;let c;return i=t,o=(c=l.events[l.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=i,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(l){return l===r?(a++,e.consume(l),t):a<3?n(l):(e.exit("codeFencedFenceSequence"),eP(l)?eD(e,s,"whitespace")(l):s(l))}(i)};function s(i){return null===i||eE(i)?(e.exit("codeFencedFence"),l.interrupt?t(i):e.check(e7,u,h)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(l){return null===l||eE(l)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(l)):eP(l)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eD(e,c,"whitespace")(l)):96===l&&l===r?n(l):(e.consume(l),t)}(i))}function c(t){return null===t||eE(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(l){return null===l||eE(l)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(l)):96===l&&l===r?n(l):(e.consume(l),t)}(t))}function u(t){return e.attempt(i,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&eP(t)?eD(e,f,"linePrefix",o+1)(t):f(t)}function f(t){return null===t||eE(t)?e.check(e7,u,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eE(n)?(e.exit("codeFlowValue"),f(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},e6={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eD(e,l,"linePrefix",5)(t)};function l(t){let l=r.events[r.events.length-1];return l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?function t(n){return null===n?i(n):eE(n)?e.attempt(e8,t,i)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eE(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function i(n){return e.exit("codeIndented"),t(n)}}},e8={partial:!0,tokenize:function(e,t,n){let r=this;return l;function l(t){return r.parser.lazy[r.now().line]?n(t):eE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):eD(e,i,"linePrefix",5)(t)}function i(e){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):eE(e)?l(e):n(e)}}};function te(e,t,n,r,l,i,o,a,s){let c=s||1/0,u=0;return function(t){return 60===t?(e.enter(r),e.enter(l),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||eC(t)?n(t):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(l),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||eE(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(l){return!u&&(null===l||41===l||eT(l))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(l)):u<c&&40===l?(e.consume(l),u++,h):41===l?(e.consume(l),u--,h):null===l||32===l||40===l||eC(l)?n(l):(e.consume(l),92===l?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function tt(e,t,n,r,l,i){let o,a=this,s=0;return function(t){return e.enter(r),e.enter(l),e.consume(t),e.exit(l),e.enter(i),c};function c(d){return s>999||null===d||91===d||93===d&&!o||94===d&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(l),e.consume(d),e.exit(l),e.exit(r),t):eE(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||eE(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!eP(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function tn(e,t,n,r,l,i){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(l),e.consume(t),e.exit(l),o=40===t?41:t,a):n(t)};function a(n){return n===o?(e.enter(l),e.consume(n),e.exit(l),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===o?(e.exit(i),a(o)):null===t?n(t):eE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eD(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||eE(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function tr(e,t){let n;return function r(l){return eE(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,r):eP(l)?eD(e,r,n?"linePrefix":"lineSuffix")(l):t(l)}}function tl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let ti={partial:!0,tokenize:function(e,t,n){return function(t){return eT(t)?tr(e,r)(t):n(t)};function r(t){return tn(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function l(t){return eP(t)?eD(e,i,"whitespace")(t):i(t)}function i(e){return null===e||eE(e)?t(e):n(e)}}},to=["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"],ta=["pre","script","style","textarea"],ts={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eF,t,n)}}},tc={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):n(t)};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tu={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&ey(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,l,i,o=e.length,a=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(l){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(l=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[l][1].end}},u={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[l-2][1].start}};return i=eb(i=[["enter",s,t],["enter",c,t]],e.slice(r+1,r+a+3)),i=eb(i,[["enter",u,t]]),i=eb(i,eZ(t.parser.constructs.insideSpan.null,e.slice(r+a+4,l-3),t)),i=eb(i,[["exit",u,t],e[l-2],e[l-1],["exit",c,t]]),i=eb(i,e.slice(l+1)),i=eb(i,[["exit",s,t]]),ey(e,r,e.length,i),e},tokenize:function(e,t,n){let r,l,i=this,o=i.events.length;for(;o--;)if(("labelImage"===i.events[o][1].type||"labelLink"===i.events[o][1].type)&&!i.events[o][1]._balanced){r=i.events[o][1];break}return function(t){return r?r._inactive?u(t):(l=i.parser.defined.includes(tl(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(td,c,l?c:u)(t):91===t?e.attempt(tp,c,l?s:u)(t):l?c(t):u(t)}function s(t){return e.attempt(tf,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},td={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eT(t)?tr(e,l)(t):l(t)}function l(t){return 41===t?c(t):te(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return eT(t)?tr(e,a)(t):c(t)}function o(e){return n(e)}function a(t){return 34===t||39===t||40===t?tn(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return eT(t)?tr(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tp={tokenize:function(e,t,n){let r=this;return function(t){return tt.call(r,e,l,i,"reference","referenceMarker","referenceString")(t)};function l(e){return r.parser.defined.includes(tl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},tf={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},th={name:"labelStartImage",resolveAll:tu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),l};function l(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tm={name:"labelStartLink",resolveAll:tu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),l};function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tg={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eD(e,t,"linePrefix")}}},tx={name:"thematicBreak",tokenize:function(e,t,n){let r,l=0;return function(i){var o;return e.enter("thematicBreak"),r=o=i,function i(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),l++,t):(e.exit("thematicBreakSequence"),eP(n)?eD(e,i,"whitespace")(n):i(n))}(o)):l>=3&&(null===o||eE(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},ty={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eF,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eD(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eP(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tv,t,l)(n))});function l(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,eD(e,e.attempt(ty,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,l=r.events[r.events.length-1],i=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,o=0;return function(t){let l=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===l?!r.containerState.marker||t===r.containerState.marker:ej(t)){if(r.containerState.type||(r.containerState.type=l,e.enter(l,{_container:!0})),"listUnordered"===l)return e.enter("listItemPrefix"),42===t||45===t?e.check(tx,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(l){return ej(l)&&++o<10?(e.consume(l),t):(!r.interrupt||o<2)&&(r.containerState.marker?l===r.containerState.marker:41===l||46===l)?(e.exit("listItemValue"),a(l)):n(l)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eF,r.interrupt?n:s,e.attempt(tb,u,c))}function s(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return eP(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tb={partial:!0,tokenize:function(e,t,n){let r=this;return eD(e,function(e){let l=r.events[r.events.length-1];return!eP(e)&&l&&"listItemPrefixWhitespace"===l[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tv={partial:!0,tokenize:function(e,t,n){let r=this;return eD(e,function(e){let l=r.events[r.events.length-1];return l&&"listItemIndent"===l[1].type&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tk={name:"setextUnderline",resolveTo:function(e,t){let n,r,l,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),l||"definition"!==e[i][1].type||(l=i);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",l?(e.splice(r,0,["enter",o,t]),e.splice(l+1,0,["exit",e[n][1],t]),e[n][1].end={...e[l][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,l=this;return function(t){var o;let a,s=l.events.length;for(;s--;)if("lineEnding"!==l.events[s][1].type&&"linePrefix"!==l.events[s][1].type&&"content"!==l.events[s][1].type){a="paragraph"===l.events[s][1].type;break}return!l.parser.lazy[l.now().line]&&(l.interrupt||a)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eP(n)?eD(e,i,"lineSuffix")(n):i(n))}(o)):n(t)};function i(r){return null===r||eE(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,l=this;return function(t){var r;return e.enter("definition"),r=t,tt.call(l,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function i(t){return(r=tl(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return eT(t)?tr(e,a)(t):a(t)}function a(t){return te(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(ti,c,c)(t)}function c(t){return eP(t)?eD(e,u,"whitespace")(t):u(t)}function u(i){return null===i||eE(i)?(e.exit("definition"),l.parser.defined.push(r),t(i)):n(i)}}}},"disable",0,{null:[]},"document",0,{42:ty,43:ty,45:ty,48:ty,49:ty,50:ty,51:ty,52:ty,53:ty,54:ty,55:ty,56:ty,57:ty,62:e1},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,l=e.length-2,i=3;return"whitespace"===e[3][1].type&&(i+=2),l-2>i&&"whitespace"===e[l][1].type&&(l-=2),"atxHeadingSequence"===e[l][1].type&&(i===l-1||l-4>i&&"whitespace"===e[l-2][1].type)&&(l-=i+1===l?2:4),l>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[l][1].end},r={type:"chunkText",start:e[i][1].start,end:e[l][1].end,contentType:"text"},ey(e,i,l-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(l){var i;return e.enter("atxHeading"),i=l,e.enter("atxHeadingSequence"),function l(i){return 35===i&&r++<6?(e.consume(i),l):null===i||eT(i)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eE(r)?(e.exit("atxHeading"),t(r)):eP(r)?eD(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eT(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(i)):n(i)}(i)}}},42:tx,45:[tk,tx],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,l,i,o,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),l=!0,f):63===o?(e.consume(o),r=3,s.interrupt?t:I):ek(o)?(e.consume(o),i=String.fromCharCode(o),h):n(o)}function u(l){return 45===l?(e.consume(l),r=2,d):91===l?(e.consume(l),r=5,o=0,p):ek(l)?(e.consume(l),r=4,s.interrupt?t:I):n(l)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:I):n(r)}function p(r){let l="CDATA[";return r===l.charCodeAt(o++)?(e.consume(r),o===l.length)?s.interrupt?t:C:p:n(r)}function f(t){return ek(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(o){if(null===o||47===o||62===o||eT(o)){let a=47===o,c=i.toLowerCase();return!a&&!l&&ta.includes(c)?(r=1,s.interrupt?t(o):C(o)):to.includes(i.toLowerCase())?(r=6,a)?(e.consume(o),m):s.interrupt?t(o):C(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):l?function t(n){return eP(n)?(e.consume(n),t):w(n)}(o):g(o))}return 45===o||ew(o)?(e.consume(o),i+=String.fromCharCode(o),h):n(o)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:C):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||ek(t)?(e.consume(t),x):eP(t)?(e.consume(t),g):w(t)}function x(t){return 45===t||46===t||58===t||95===t||ew(t)?(e.consume(t),x):y(t)}function y(t){return 61===t?(e.consume(t),b):eP(t)?(e.consume(t),y):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,v):eP(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eT(n)?y(n):(e.consume(n),t)}(t)}function v(t){return t===a?(e.consume(t),a=null,k):null===t||eE(t)?n(t):(e.consume(t),v)}function k(e){return 47===e||62===e||eP(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||eE(t)?C(t):eP(t)?(e.consume(t),S):n(t)}function C(t){return 45===t&&2===r?(e.consume(t),E):60===t&&1===r?(e.consume(t),T):62===t&&4===r?(e.consume(t),L):63===t&&3===r?(e.consume(t),I):93===t&&5===r?(e.consume(t),A):eE(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(ts,D,j)(t)):null===t||eE(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),C)}function j(t){return e.check(tc,z,D)(t)}function z(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||eE(t)?j(t):(e.enter("htmlFlowData"),C(t))}function E(t){return 45===t?(e.consume(t),I):C(t)}function T(t){return 47===t?(e.consume(t),i="",P):C(t)}function P(t){if(62===t){let n=i.toLowerCase();return ta.includes(n)?(e.consume(t),L):C(t)}return ek(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),P):C(t)}function A(t){return 93===t?(e.consume(t),I):C(t)}function I(t){return 62===t?(e.consume(t),L):45===t&&2===r?(e.consume(t),I):C(t)}function L(t){return null===t||eE(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),L)}function D(n){return e.exit("htmlFlow"),t(n)}}},61:tk,95:tx,96:e9,126:e9},"flowInitial",0,{[-2]:e6,[-1]:e6,32:e6},"insideSpan",0,{null:[eG,eq]},"string",0,{38:e3,92:e5},"text",0,{[-5]:tg,[-4]:tg,[-3]:tg,33:th,38:e3,42:eG,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return ek(t)?(e.consume(t),i):64===t?n(t):a(t)}function i(t){return 43===t||45===t||46===t||ew(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||ew(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||eC(r)?n(r):(e.consume(r),o)}function a(t){return 64===t?(e.consume(t),s):eS(t)?(e.consume(t),a):n(t)}function s(l){return ew(l)?function l(i){return 46===i?(e.consume(i),r=0,s):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(i){if((45===i||ew(i))&&r++<63){let n=45===i?t:l;return e.consume(i),n}return n(i)}(i)}(l):n(l)}}},{name:"htmlText",tokenize:function(e,t,n){let r,l,i,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),v):63===t?(e.consume(t),y):ek(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),l=0,f):ek(t)?(e.consume(t),x):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):eE(t)?(i=u,P(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?T(e):45===e?d(e):u(e)}function f(t){let r="CDATA[";return t===r.charCodeAt(l++)?(e.consume(t),l===r.length?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):eE(t)?(i=h,P(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):h(t)}function x(t){return null===t||62===t?T(t):eE(t)?(i=x,P(t)):(e.consume(t),x)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):eE(t)?(i=y,P(t)):(e.consume(t),y)}function b(e){return 62===e?T(e):y(e)}function v(t){return ek(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||ew(t)?(e.consume(t),k):function t(n){return eE(n)?(i=t,P(n)):eP(n)?(e.consume(n),t):T(n)}(t)}function w(t){return 45===t||ew(t)?(e.consume(t),w):47===t||62===t||eT(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),T):58===t||95===t||ek(t)?(e.consume(t),C):eE(t)?(i=S,P(t)):eP(t)?(e.consume(t),S):T(t)}function C(t){return 45===t||46===t||58===t||95===t||ew(t)?(e.consume(t),C):function t(n){return 61===n?(e.consume(n),j):eE(n)?(i=t,P(n)):eP(n)?(e.consume(n),t):S(n)}(t)}function j(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,z):eE(t)?(i=j,P(t)):eP(t)?(e.consume(t),j):(e.consume(t),N)}function z(t){return t===r?(e.consume(t),r=void 0,E):null===t?n(t):eE(t)?(i=z,P(t)):(e.consume(t),z)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eT(t)?S(t):(e.consume(t),N)}function E(e){return 47===e||62===e||eT(e)?S(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function P(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return eP(t)?eD(e,I,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),i(t)}}}],91:tm,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eE(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},e5],93:tu,95:eG,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,l=3;if(("lineEnding"===e[3][1].type||"space"===e[l][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=l;++t<r;)if("codeTextData"===e[t][1].type){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(t=l-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,l,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),i++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(l=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(l.type="codeTextData",a(o))}(s)):eE(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||eE(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),a)}}}}],37909);var tw=e.i(37909);let tS=/[\0\t\n\r]/g;function tC(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let tj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tz(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tC(n.slice(t?2:1),t?16:10)}return e4(n)||e}let tN={}.hasOwnProperty;function tE(e){return{line:e.line,column:e.column,offset:e.offset}}function tT(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+") is still open")}function tP(e){let t=this;t.parser=function(n){var r,l;let i,o,a,s;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(l=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(x),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(f),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:r(f,l),codeText:r(function(){return{type:"inlineCode",value:""}},l),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,l),htmlFlowData:c,htmlText:r(g,l),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:l,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tC(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=e4(n);let l=this.stack[this.stack.length-1];l.value+=t},characterReference:function(e){this.stack.pop().position.end=tE(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tl(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(tj,tz),n.identifier=tl(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tE(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(c.call(this,e),u.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tl(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let l=n[r];Array.isArray(l)?e(t,l):function(e,t){let n;for(n in t)if(tN.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,l)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:i,exit:a,buffer:l,resume:s,data:n},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,n){let r,l,i,o,a=t-1,s=-1,c=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||i||(i=a),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=a;for(l=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;l&&(e[l][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",l=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!l||i<l)&&(r._spread=!0),r.end=Object.assign({},l?e[l][1].start:t[1].end),e.splice(l||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let l={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=l,e.splice(a,0,["enter",l,t[2]]),a++,n++,i=void 0,o=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];tN.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||tT).call(o,void 0,e[0])}for(r.position={start:tE(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tE(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){i.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function i(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tE(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tT).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+"): it’s not open");n.position.end=tE(e.end)}function s(){var e;return e=this.stack.pop(),eg(e,"boolean"!=typeof em.includeImageAlt||em.includeImageAlt,"boolean"!=typeof em.includeHtml||em.includeHtml)}function c(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tE(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tE(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(l)(function(e){for(;!eU(e););return e}((function(e){let t={constructs:function(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,l=(ev.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];if(i)for(r in i){ev.call(l,r)||(l[r]=[]);let e=i[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ey(e,0,0,r)}(l[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}([tw,...(e||{}).extensions||[]]),content:n(eO),defined:[],document:n(eM),flow:n(eV),lazy:{},string:n(eW),text:n(eJ)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},l={},i=[],o=[],a=[],s={attempt:h(function(e,t){m(e,t.from)}),check:h(f),consume:function(e){eE(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:h(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){l[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,l=[];for(;++r<e.length;){let i,o=e[r];if("string"==typeof o)i=o;else switch(o){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&n)continue;i=" ";break;default:i=String.fromCharCode(o)}n=-2===o,l.push(i)}return l.join("")}(d(e),t)},sliceStream:d,write:function(e){return(o=eb(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),u=u(t)}else u=u(n)}}(),null!==o[o.length-1])?[]:(m(t,0),c.events=eZ(i,c.events,c),c.events)}},u=t.tokenize.call(c,s);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){let n,r=t.start._index,l=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;if(r===i)n=[e[r].slice(l,o)];else{if(n=e.slice(r,i),l>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(l):n.shift()}o>0&&n.push(e[i].slice(0,o))}return n}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:n,column:l,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:l,offset:i}}function f(e,t){t.restore()}function h(e,t){return function(n,l,i){var o;let u,d,f,h;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(u=e,d=0,0===e.length)?i:x(e[d])}function x(e){return function(n){let l,i,o,u,d;return(l=p(),i=c.previous,o=c.currentConstruct,u=c.events.length,d=Array.from(a),h={from:u,restore:function(){r=l,c.previous=i,c.currentConstruct=o,c.events.length=u,a=d,g()}},f=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,y,b)(n)}}function y(t){return e(f,h),l}function b(e){return(h.restore(),++d<u.length)?x(u[d]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&ey(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}(t,e,n)}}})(l).document().write((o=1,a="",s=!0,function(e,t,n){let r,l,c,u,d,p=[];for(e=a+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,a="",s&&(65279===e.charCodeAt(0)&&c++,s=void 0);c<e.length;){if(tS.lastIndex=c,u=(r=tS.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(u),!r){a=e.slice(c);break}if(10===d&&c===u&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),c<u&&(p.push(e.slice(c,u)),o+=u-c),d){case 0:p.push(65533),o++;break;case 9:for(l=4*Math.ceil(o/4),p.push(-2);o++<l;)p.push(-1);break;case 10:p.push(-4),o=1;break;default:i=!0,o=1}c=u+1}return n&&(i&&p.push(-5),a&&p.push(a),p.push(null)),p})(n,r,!0))))}}let tA="object"==typeof self?self:globalThis,tI=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=l=>{if(t.has(l))return t.get(l);let[i,o]=e[l];switch(i){case 0:case -1:return n(o,l);case 1:{let e=n([],l);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},l);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),l);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),l)}case 5:{let e=n(new Map,l);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,l);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new tA[e](t),l)}case 8:return n(BigInt(o),l);case"BigInt":return n(Object(BigInt(o)),l);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new tA[i](o),l)})(0)},{toString:tL}={},{keys:tD}=Object,tO=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tL.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},tM=([e,t])=>0===e&&("function"===t||"symbol"===t),tR=(e,{json:t,lossy:n}={})=>{var r,l,i;let o,a,s=[];return(r=!(t||n),l=!!t,i=new Map,o=(e,t)=>{let n=s.push(e)-1;return i.set(t,n),n},a=e=>{if(i.has(e))return i.get(e);let[t,n]=tO(e);switch(t){case 0:{let l=e;switch(n){case"bigint":t=8,l=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);l=null;break;case"undefined":return o([-1],e)}return o([t,l],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),o([n,[...t]],e)}let r=[],l=o([t,r],e);for(let t of e)r.push(a(t));return l}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(l&&"toJSON"in e)return a(e.toJSON());let i=[],s=o([t,i],e);for(let t of tD(e))(r||!tM(tO(e[t])))&&i.push([a(t),a(e[t])]);return s}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],l=o([t,n],e);for(let[t,l]of e)(r||!(tM(tO(t))||tM(tO(l))))&&n.push([a(t),a(l)]);return l}case 6:{let n=[],l=o([t,n],e);for(let t of e)(r||!tM(tO(t)))&&n.push(a(t));return l}}let{message:s}=e;return o([t,{name:n,message:s}],e)})(e),s},tF="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tI(tR(e,t)):structuredClone(e):(e,t)=>tI(tR(e,t));function t_(e){let t=[],n=-1,r=0,l=0;for(;++n<e.length;){let i=e.charCodeAt(n),o="";if(37===i&&ew(e.charCodeAt(n+1))&&ew(e.charCodeAt(n+2)))l=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){let t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(o=String.fromCharCode(i,t),l=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+l+1,o=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}function tB(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function tU(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let tH=function(e){var t,n;if(null==e)return tV;if("function"==typeof e)return t$(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=tH(e[n]);return t$(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,t$(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,t$(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function t$(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function tV(){return!0}let tq=[];function tW(e,t,n,r){var l,i,o;let a,s,c,u,d,p;"function"==typeof t&&"function"!=typeof n?(s=void 0,c=t,a=n):(s=t,c=n,a=r),l=s,i=function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return c(e,r,n)},o=a,"function"==typeof l&&"function"!=typeof i?(o=i,i=l):u=l,d=tH(u),p=o?-1:1,(function e(t,n,r){let a=t&&"object"==typeof t?t:{};if("string"==typeof a.type){let e="string"==typeof a.tagName?a.tagName:"string"==typeof a.name?a.name:void 0;Object.defineProperty(s,"name",{value:"node ("+t.type+(e?"<"+e+">":"")+")"})}return s;function s(){var a;let s,c,u,f=tq;if((!l||d(t,n,r[r.length-1]||void 0))&&!1===(f=Array.isArray(a=i(t,r))?a:"number"==typeof a?[!0,a]:null==a?tq:[a])[0])return f;if("children"in t&&t.children&&t.children&&"skip"!==f[0])for(c=(o?t.children.length:-1)+p,u=r.concat(t);c>-1&&c<t.children.length;){if(!1===(s=e(t.children[c],c,u)())[0])return s;c="number"==typeof s[1]?s[1]:c+p}return f}})(e,void 0,[])()}function tJ(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let l=e.all(t),i=l[0];i&&"text"===i.type?i.value="["+i.value:l.unshift({type:"text",value:"["});let o=l[l.length-1];return o&&"text"===o.type?o.value+=r:l.push({type:"text",value:r}),l}function tK(e){let t=e.spread;return null==t?e.children.length>1:t}function tX(e,t,n){let r=0,l=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(l-1);for(;9===t||32===t;)l--,t=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}let tQ={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",l=String(t.identifier).toUpperCase(),i=t_(l.toLowerCase()),o=e.footnoteOrder.indexOf(l),a=e.footnoteCounts.get(l);void 0===a?(a=0,e.footnoteOrder.push(l),n=e.footnoteOrder.length):n=o+1,a+=1,e.footnoteCounts.set(l,a);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tJ(e,t);let l={src:t_(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(l.title=r.title);let i={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){let n={src:t_(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tJ(e,t);let l={href:t_(r.url||"")};null!==r.title&&void 0!==r.title&&(l.title=r.title);let i={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){let n={href:t_(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),l=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=tK(n[r])}return t}(n):tK(t),i={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(l||0!==a||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||l?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(l||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:i,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),l=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++l<r.length;){let e=r[l];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),l=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),l.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=K(t.children[1]),o=J(t.children[t.children.length-1]);i&&o&&(r.position={start:i,end:o}),l.push(r)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,l=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,o=i?i.length:t.children.length,a=-1,s=[];for(;++a<o;){let n=t.children[a],r={},o=i?i[a]:void 0;o&&(r.align=o);let c={type:"element",tagName:l,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),l=0,i=[];for(;r;)i.push(tX(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=n.exec(t);return i.push(tX(t.slice(l),l>0,!1)),i.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:tY,yaml:tY,definition:tY,footnoteDefinition:tY};function tY(){}let tZ={}.hasOwnProperty,tG={};function t0(e,t){e.position&&(t.position=function(e){let t=K(e),n=J(e);if(t&&n)return{start:t,end:n}}(e))}function t1(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,l=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&l&&Object.assign(n.properties,tF(l)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function t5(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function t2(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function t4(e,t){let n,r,l,o,a=(n=t||tG,r=new Map,l=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let l=o.one(n[r],e);if(l){if(r&&"break"===n[r-1].type&&(Array.isArray(l)||"text"!==l.type||(l.value=t2(l.value)),!Array.isArray(l)&&"element"===l.type)){let e=l.children[0];e&&"text"===e.type&&(e.value=t2(e.value))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t},applyData:t1,definitionById:r,footnoteById:l,footnoteCounts:new Map,footnoteOrder:[],handlers:{...tQ,...n.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(tZ.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=tF(n);return r.children=o.all(e),r}return tF(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(tZ.call(n,"hProperties")||tZ.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(o,e,t)},options:n,patch:t0,wrap:t5},tW(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:l,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o),s=a.one(e,void 0),c=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tB,r=e.options.footnoteBackLabel||tU,l=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let l=e.footnoteById.get(e.footnoteOrder[s]);if(!l)continue;let i=e.all(l),o=String(l.identifier).toUpperCase(),c=t_(o.toLowerCase()),u=0,d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){let e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else i.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(l,h),a.push(h)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...tF(o),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(a),u=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return c&&(i("children"in u),u.children.push({type:"text",value:"\n"},c)),u}function t3(e,t){return e&&"run"in e?async function(n,r){let l=t4(n,{file:r,...t});await e.run(l,r)}:function(n,r){return t4(n,{file:r,...e||t})}}function t7(e){if(e)throw e}var t9=e.i(84422);function t6(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let t8=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nr(e);let r=0,l=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(l=i):(a=-1,l=o));return r===l?l=o:l<0&&(l=e.length),e.slice(r,l)},ne=function(e){let t;if(nr(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},nt=function(e){let t;nr(e);let n=e.length,r=-1,l=0,i=-1,o=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){l=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==o&&(o=1):i>-1&&(o=-1)}return i<0||r<0||0===o||1===o&&i===r-1&&i===l+1?"":e.slice(i,r)},nn=function(...e){var t;let n,r,l,i=-1;for(;++i<e.length;)nr(e[i]),e[i]&&(l=void 0===l?e[i]:l+"/"+e[i]);return void 0===l?".":(nr(t=l),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,l="",i=0,o=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(l.length<2||2!==i||46!==l.codePointAt(l.length-1)||46!==l.codePointAt(l.length-2)){if(l.length>2){if((r=l.lastIndexOf("/"))!==l.length-1){r<0?(l="",i=0):i=(l=l.slice(0,r)).length-1-l.lastIndexOf("/"),o=s,a=0;continue}}else if(l.length>0){l="",i=0,o=s,a=0;continue}}t&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+e.slice(o+1,s):l=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&a>-1?a++:a=-1}return l}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nr(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function nl(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let ni=["history","path","basename","stem","extname","dirname"];class no{constructor(e){let t,n;t=e?nl(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ni.length;){const e=ni[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)ni.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?t8(this.path):void 0}set basename(e){ns(e,"basename"),na(e,"basename"),this.path=nn(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ne(this.path):void 0}set dirname(e){nc(this.basename,"dirname"),this.path=nn(e||"",this.basename)}get extname(){return"string"==typeof this.path?nt(this.path):void 0}set extname(e){if(na(e,"extname"),nc(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=nn(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){nl(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!nl(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),ns(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?t8(this.path,this.extname):void 0}set stem(e){ns(e,"stem"),na(e,"stem"),this.path=nn(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function na(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function ns(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nc(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nu=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nd={}.hasOwnProperty;class np extends nu{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=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function l(i,...o){let a=e[++n],s=-1;if(i)return void r(i);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,a?(function(e,t){let n;return function(...t){let i,o=e.length>t.length;o&&t.push(r);try{i=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(i&&i.then&&"function"==typeof i.then?i.then(l,r):i instanceof Error?r(i):l(i))};function r(e,...l){n||(n=!0,t(e,...l))}function l(e){r(null,e)}})(a,l)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new np,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,t9.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(ng("data",this.frozen),this.namespace[e]=t,this):nd.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ng("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nb(e),n=this.parser||this.Parser;return nh("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nh("process",this.parser||this.Parser),nm("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,l){let o=nb(e),a=n.parse(o);function s(e,n){e||!n?l(e):r?r(n):(i(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(a,o,function(e,t,r){var l,i;if(e||!t||!r)return s(e);let o=n.stringify(t,r);"string"==typeof(l=o)||(i=l)&&"object"==typeof i&&"byteLength"in i&&"byteOffset"in i?r.value=o:r.result=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nh("processSync",this.parser||this.Parser),nm("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,t7(e),t=r}),ny("processSync","process",n),i(t,"we either bailed on an error or have a tree"),t}run(e,t,n){nx(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?l(void 0,n):new Promise(l);function l(l,o){i("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let a=nb(t);r.run(e,a,function(t,r,a){let s=r||e;t?o(t):l?l(s):(i(n,"`done` is defined if `resolve` is not"),n(void 0,s,a))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){t7(e),n=t,r=!0}),ny("runSync","run",r),i(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=nb(t),r=this.compiler||this.Compiler;return nm("stringify",r),nx(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(ng("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?i(e):l(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function l(e){if(!("plugins"in e)&&!("settings"in e))throw 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");i(e.plugins),e.settings&&(r.settings=(0,t9.default)(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;o(t,n)}else l(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,l=-1;for(;++r<n.length;)if(n[r][0]===e){l=r;break}if(-1===l)n.push([e,...t]);else if(t.length>0){let[r,...i]=t,o=n[l][1];t6(o)&&t6(r)&&(r=(0,t9.default)(!0,o,r)),n[l]=[e,r,...i]}}}}let nf=new np().freeze();function nh(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nm(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function ng(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nx(e){if(!t6(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function ny(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nb(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new no(e)}let nv=[],nk={allowDangerousHtml:!0},nw=/^(https?|ircs?|mailto|xmpp)$/i,nS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nC(e){var n;let r,l,i,a,s,c=(r=(n=e).rehypePlugins||nv,l=n.remarkPlugins||nv,i=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...nk}:nk,nf().use(tP).use(l).use(t3,i).use(r)),u=(a=e.children||"",s=new no,"string"==typeof a?s.value=a:o("Unexpected value `"+a+"` for `children` prop, expected `string`"),s);return function(e,n){let r=n.allowedElements,l=n.allowElement,i=n.components,a=n.disallowedElements,s=n.skipHtml,c=n.unwrapDisallowed,u=n.urlTransform||nj;for(let e of nS)Object.hasOwn(n,e.from)&&o("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return r&&a&&o("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),tW(e,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return s?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in eh)if(Object.hasOwn(eh,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eh[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let i=r?!r.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&l&&"number"==typeof t&&(i=!l(e,t,n)),i&&n&&"number"==typeof t)return c&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){var n,r,l,i;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=a,r=t.jsxDEV,o=function(e,t,l,i){let o=Array.isArray(l.children),a=K(e);return r(t,l,i,o,{columnNumber:a?a.column-1:void 0,fileName:n,lineNumber:a?a.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");l=t.jsx,i=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?i:l;return r?o(t,n,r):o(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?q:V,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=ea(s,e,void 0);return c&&"string"!=typeof c?c:s.create(e,s.Fragment,{children:c||void 0},void 0)}(e,{Fragment:t.Fragment,components:i,ignoreInvalidStyle:!0,jsx:t.jsx,jsxs:t.jsxs,passKeys:!0,passNode:!0})}(c.runSync(c.parse(u),u),e)}function nj(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return -1===t||-1!==l&&t>l||-1!==n&&t>n||-1!==r&&t>r||nw.test(e.slice(0,t))?e:""}let nz=/🔧 \*\*([^*]+)\*\*(?:\s*\(([^)]+)\))?/g;function nN({toolInfo:e}){return(0,t.jsxs)("div",{className:`tool-call ${e.isSendInput?"send-input":""}`,children:[(0,t.jsx)("span",{className:"tool-icon",children:"⚡"}),(0,t.jsx)("span",{className:"tool-name",children:e.toolName}),e.params&&(0,t.jsx)("span",{className:"tool-params",children:e.params})]})}function nE({content:e}){let{segments:r,hasToolCalls:l}=(0,n.useMemo)(()=>(function(e){let t,n=[],r=0,l=!1,i=RegExp(nz.source,"g");for(;null!==(t=i.exec(e));){l=!0,t.index>r&&n.push({type:"text",content:e.slice(r,t.index)});let i=t[1],o=t[2]||null,a="send_input"===i.toLowerCase();n.push({type:"tool",content:t[0],toolInfo:{toolName:i,params:o,isSendInput:a}}),r=t.index+t[0].length}return r<e.length&&n.push({type:"text",content:e.slice(r)}),{segments:n,hasToolCalls:l}})(e||""),[e]);return l?(0,t.jsx)(t.Fragment,{children:r.map((e,n)=>"tool"===e.type&&e.toolInfo?(0,t.jsx)(nN,{toolInfo:e.toolInfo},n):(0,t.jsx)(nC,{children:e.content},n))}):(0,t.jsx)(nC,{children:e||"..."})}function nT({messages:e,isLoading:r,isRunning:i,showControls:o,interactive:a,onSendMessage:s,onStopResponse:c,onClearMessages:u,onSendCliInput:d}){let[p,f]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[g,x]=(0,n.useState)("agent"),[y,b]=(0,n.useState)(!1),v=(0,n.useRef)(null);return(0,n.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,t.jsxs)("div",{className:"flex-1 flex flex-col bg-zinc-900 border border-zinc-800 rounded-md overflow-hidden min-w-0",children:[(0,t.jsxs)("div",{className:"px-3.5 py-2.5 bg-zinc-800/80 border-b border-zinc-800 flex justify-between items-center text-sm font-medium",children:[(0,t.jsx)("span",{children:"Chat with your app"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:u,className:"px-2 py-0.5 text-xs text-zinc-400 border border-zinc-700 rounded hover:bg-zinc-700 hover:text-white",children:"+ New"}),o&&(0,t.jsx)(l,{isRunning:i})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",style:{padding:"12px"},children:[e.map(e=>(0,t.jsxs)("div",{className:"message",style:{marginBottom:"12px"},children:[(0,t.jsx)("div",{className:"message-meta",children:e.isWatchTrigger&&"assistant"===e.role?`👁 watch triggered: ${e.watchPattern?.slice(0,30)||""}`:e.role}),(0,t.jsx)("div",{className:"bubble",style:{background:"user"===e.role?"#1e3a5f":"#1a1a24",marginLeft:"user"===e.role?"30px":void 0,marginRight:"assistant"===e.role?"30px":void 0,borderLeft:e.isWatchTrigger&&"assistant"===e.role?"3px solid #3b82f6":void 0},children:"assistant"===e.role?(0,t.jsx)(nE,{content:e.content}):e.content})]},e.id)),r&&e[e.length-1]?.role==="assistant"&&!e[e.length-1]?.content&&(0,t.jsxs)("div",{className:"thinking",children:[(0,t.jsx)("span",{}),(0,t.jsx)("span",{}),(0,t.jsx)("span",{})]}),(0,t.jsx)("div",{ref:v})]}),(0,t.jsxs)("div",{className:"p-3 border-t border-zinc-800",children:[a&&(0,t.jsxs)("div",{className:"flex gap-1 mb-2",children:[(0,t.jsx)("button",{onClick:()=>x("agent"),className:`px-2.5 py-1 text-xs rounded border ${"agent"===g?"bg-blue-900/50 border-blue-500 text-white":"bg-zinc-800 border-zinc-700 text-zinc-400 hover:bg-zinc-700"}`,children:"Ask Agent"}),(0,t.jsx)("button",{onClick:()=>x("cli"),className:`px-2.5 py-1 text-xs rounded border ${"cli"===g?"bg-blue-900/50 border-blue-500 text-white":"bg-zinc-800 border-zinc-700 text-zinc-400 hover:bg-zinc-700"}`,children:"Direct to CLI"})]}),"agent"===g?(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p.trim()&&!r&&(s(p.trim()),f(""))},className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:a?"Ask the agent about the CLI...":"Ask about your app...",className:"flex-1 px-3 py-2.5 bg-zinc-800 border border-zinc-700 rounded-md text-sm text-white placeholder:text-zinc-500 focus:outline-none focus:border-blue-500",disabled:r}),r?(0,t.jsx)("button",{type:"button",onClick:c,className:"px-3.5 py-2.5 bg-red-500 rounded-md text-white font-medium hover:bg-red-600",children:"■"}):(0,t.jsx)("button",{type:"submit",disabled:!p.trim(),className:"px-5 py-2.5 bg-blue-500 rounded-md text-white font-medium hover:bg-blue-600 disabled:opacity-50",children:"Send"})]}):(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),h.trim()&&d&&(d(h),m(""))},className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"Type directly to the CLI...",className:"flex-1 px-3 py-2.5 bg-green-950 border border-green-800 rounded-md text-sm text-green-400 font-mono placeholder:text-green-700 focus:outline-none focus:border-green-500"}),(0,t.jsx)("button",{type:"submit",disabled:!h.trim(),className:"px-4 py-2.5 bg-green-700 rounded-md text-white font-medium hover:bg-green-600 disabled:opacity-50",children:"Send to CLI"})]}),a&&"cli"===g&&(0,t.jsx)("div",{className:"flex items-center mt-2 pt-2 border-t border-zinc-800",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs text-green-400",children:[(0,t.jsx)("span",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),"CLI waiting for input"]})}),o&&(0,t.jsx)("div",{className:"flex items-center mt-2 pt-2 border-t border-zinc-800",children:(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-zinc-500 cursor-pointer hover:text-white",children:[(0,t.jsx)("input",{type:"checkbox",checked:y,onChange:e=>b(e.target.checked),className:"w-4 h-4 accent-blue-500"}),(0,t.jsx)("span",{children:"Let agent continue after output"})]})})]})]})}let nP=["border-purple-500 text-purple-500 bg-purple-500/10","border-pink-500 text-pink-500 bg-pink-500/10","border-orange-500 text-orange-500 bg-orange-500/10","border-sky-500 text-sky-500 bg-sky-500/10","border-emerald-500 text-emerald-500 bg-emerald-500/10","border-yellow-500 text-yellow-500 bg-yellow-500/10","border-violet-500 text-violet-500 bg-violet-500/10","border-cyan-500 text-cyan-500 bg-cyan-500/10","border-rose-500 text-rose-500 bg-rose-500/10","border-lime-500 text-lime-500 bg-lime-500/10"],nA={"border-purple-500 text-purple-500 bg-purple-500/10":"text-purple-500","border-pink-500 text-pink-500 bg-pink-500/10":"text-pink-500","border-orange-500 text-orange-500 bg-orange-500/10":"text-orange-500","border-sky-500 text-sky-500 bg-sky-500/10":"text-sky-500","border-emerald-500 text-emerald-500 bg-emerald-500/10":"text-emerald-500","border-yellow-500 text-yellow-500 bg-yellow-500/10":"text-yellow-500","border-violet-500 text-violet-500 bg-violet-500/10":"text-violet-500","border-cyan-500 text-cyan-500 bg-cyan-500/10":"text-cyan-500","border-rose-500 text-rose-500 bg-rose-500/10":"text-rose-500","border-lime-500 text-lime-500 bg-lime-500/10":"text-lime-500"},nI={stdout:"text-green-500",info:"text-green-500",stderr:"text-red-500",error:"text-red-500",system:"text-blue-500",debug:"text-blue-500",warn:"text-yellow-500","breakpoint-prompt":"text-pink-400"},nL={stdout:"Standard output from your application",info:"Standard output from your application",stderr:"Standard error output from your application",error:"Standard error output from your application",system:"Reflexive system messages (start, stop, errors)",debug:"Reflexive system messages (start, stop, errors)",warn:"Warning messages from your application",inject:"Instrumentation logs from injected code","breakpoint-prompt":"Interactive breakpoint prompt"},nD=[{key:"stdout",label:"stdout",color:"border-green-500 text-green-500 bg-green-500/10",description:"Standard output from your application"},{key:"stderr",label:"stderr",color:"border-red-500 text-red-500 bg-red-500/10",description:"Standard error output from your application"},{key:"system",label:"system",color:"border-blue-500 text-blue-500 bg-blue-500/10",description:"Reflexive system messages (start, stop, errors)"},{key:"inject",label:"inject",color:"border-purple-500 text-purple-500 bg-purple-500/10",description:"Instrumentation logs from injected code"}];function nO({logs:e,status:r,showControls:l,debugPanelsHeight:i,watches:o,onAddWatch:a,onEditWatch:s,onClearLogs:c,onResize:u}){let d=(0,n.useCallback)(e=>{if(!o)return null;let t=e.toLowerCase();for(let e of o)if(t.includes(e.pattern.toLowerCase()))return e;return null},[o]),[p,f]=(0,n.useState)(""),[h,m]=(0,n.useState)(new Set(["stdout","stderr","system","inject","info","error","debug","warn"])),[g,x]=(0,n.useState)(!1),[y,b]=(0,n.useState)(!1),[v,k]=(0,n.useState)(0),[w,S]=(0,n.useState)(new Map),C=(0,n.useRef)(null),j=(0,n.useRef)(null),z=(0,n.useMemo)(()=>e.filter(e=>{if(v>0&&e.timestamp&&new Date(e.timestamp).getTime()<v)return!1;let t=h.has(e.type)||h.has("stdout")&&"info"===e.type||h.has("stderr")&&"error"===e.type,n=!p||e.message.toLowerCase().includes(p.toLowerCase());return t&&n}),[e,h,p,v]);(0,n.useEffect)(()=>{let t=new Map,n=0;for(let r of e)if(r.type.startsWith("inject:")){let e=r.type;!t.has(e)&&(t.set(e,nP[n%nP.length]),n++)}t.size===w.size&&[...t.keys()].every(e=>w.has(e))||(S(t),m(e=>{let n=new Set(e);for(let e of t.keys())n.add(e);return n}))},[e]),(0,n.useEffect)(()=>{g||C.current?.scrollIntoView({behavior:"smooth"})},[z,g]);let N=e=>{m(t=>{let n=new Set(t);return n.has(e)?(n.delete(e),"stdout"===e&&n.delete("info"),"stderr"===e&&n.delete("error")):(n.add(e),"stdout"===e&&n.add("info"),"stderr"===e&&n.add("error")),n})};return(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3.5 py-2.5 bg-zinc-800/80 cursor-pointer select-none border-b border-zinc-800 hover:bg-zinc-800",onClick:()=>b(!y),children:[(0,t.jsx)("span",{className:`text-xs transition-transform ${y?"-rotate-90":""}`,children:"▼"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:l?"Process Output":"Application Logs"}),(0,t.jsx)("div",{className:"ml-auto flex gap-1.5",children:!y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),k(Date.now()),c?.()},className:"px-2 py-0.5 text-xs text-zinc-400 border border-zinc-700 rounded hover:bg-zinc-700 hover:text-white",title:"Clear logs",children:"⌫"}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),x(!g)},className:`px-2 py-0.5 text-xs border rounded ${g?"text-amber-400 border-amber-500 bg-amber-500/10":"text-zinc-400 border-zinc-700 hover:bg-zinc-700 hover:text-white"}`,title:g?"Resume auto-scroll":"Pause auto-scroll",children:g?"▶":"⏸"})]})})]}),!y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-zinc-950 border-b border-zinc-800",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:"Filter logs...",className:"w-36 px-2 py-1 text-xs bg-zinc-900 border border-zinc-700 rounded text-zinc-300 placeholder:text-zinc-600 focus:outline-none focus:border-blue-500",style:{fontFamily:"'SF Mono', Monaco, monospace"}}),(0,t.jsxs)("div",{className:"flex gap-1.5 flex-wrap",children:[nD.map(({key:e,label:n,color:r,description:l})=>(0,t.jsx)("button",{onClick:()=>N(e),title:l,className:`px-2 py-0.5 text-[10px] font-mono rounded-full border transition-opacity ${r} ${h.has(e)?"opacity-100":"opacity-30 bg-transparent"}`,children:n},e)),[...w.entries()].map(([e,n])=>(0,t.jsx)("button",{onClick:()=>N(e),title:`Injected logs: ${e.replace("inject:","")}`,className:`px-2 py-0.5 text-[10px] font-mono rounded-full border transition-opacity ${n} ${h.has(e)?"opacity-100":"opacity-30 bg-transparent"}`,children:e.replace("inject:","")},e))]})]}),(0,t.jsxs)("div",{ref:j,onScroll:()=>{let e=j.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<20;t&&g?x(!1):t||g||x(!0)},className:"flex-1 overflow-y-auto p-2 text-[11px]",style:{fontFamily:"'SF Mono', Monaco, monospace"},children:[z.map((e,n)=>{var r;let l,i;return(0,t.jsxs)("div",{className:`flex gap-2 py-0.5 px-1.5 border-b border-zinc-900 hover:bg-zinc-800/50 group ${"breakpoint-prompt"===e.type?"bg-pink-950/20":""}`,children:[(0,t.jsx)("span",{className:`w-20 flex-shrink-0 text-right pr-2 text-[10px] ${(r=e.type).startsWith("inject:")&&w.has(r)?nA[w.get(r)]||"text-purple-500":nI[r]||"text-zinc-500"}`,title:nL[e.type]||(e.type.startsWith("inject:")?`Injected logs: ${e.type.replace("inject:","")}`:e.type),children:e.type}),(0,t.jsx)("span",{className:"text-zinc-400 whitespace-pre-wrap break-all flex-1",dangerouslySetInnerHTML:{__html:function(e){let t={30:"#000",31:"#ef4444",32:"#22c55e",33:"#eab308",34:"#3b82f6",35:"#a855f7",36:"#06b6d4",37:"#e5e5e5",90:"#737373",91:"#fca5a5",92:"#86efac",93:"#fde047",94:"#93c5fd",95:"#d8b4fe",96:"#67e8f9",97:"#fff"},n="",r=0,l=0;for(;l<e.length;){if("\x1b"===e[l]&&"["===e[l+1]){let i=l+2;for(;i<e.length&&/[0-9;]/.test(e[i]);)i++;if("m"===e[i]){let o=e.slice(l+2,i);if(o&&"0"!==o&&"22"!==o&&"39"!==o){let e=o.split(";"),l="";for(let n of e)"1"===n?l+="font-weight:bold;":"3"===n?l+="font-style:italic;":"4"===n?l+="text-decoration:underline;":t[n]&&(l+="color:"+t[n]+";");l&&(n+='<span style="'+l+'">',r++)}else r>0&&(n+="</span>",r--);l=i+1;continue}}let i=e[l];"<"===i?n+="<":">"===i?n+=">":"&"===i?n+="&":n+=i,l++}for(;r>0;)n+="</span>",r--;return n.replace(/(https?:\/\/[^\s<>"']+)/g,'<a href="$1" target="_blank" rel="noopener" class="text-blue-400 underline hover:text-blue-300">$1</a>')}(e.message)}}),(a||s)&&(i=!!(l=d(e.message)),(0,t.jsx)("button",{onClick:()=>{l&&s?s(l):a&&a(e.message)},className:`px-1 ${i?"text-blue-400 opacity-100":"opacity-0 group-hover:opacity-100 text-zinc-600 hover:text-blue-400"}`,title:i?`Edit watch: ${l.pattern.slice(0,30)}`:"Add watch",children:"👁"}))]},n)}),(0,t.jsx)("div",{ref:C})]}),(0,t.jsxs)("div",{className:"flex gap-4 px-3 py-2.5 bg-zinc-950 border-t border-zinc-800 text-xs",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("span",{className:"text-zinc-500",children:"PID:"}),(0,t.jsx)("span",{className:"text-white",children:r?.pid||"--"})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("span",{className:"text-zinc-500",children:"Uptime:"}),(0,t.jsxs)("span",{className:"text-white",children:[r?.uptime||0,"s"]})]}),l&&(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("span",{className:"text-zinc-500",children:"Restarts:"}),(0,t.jsx)("span",{className:"text-white",children:r?.restartCount||0})]})]})]}),u&&(0,t.jsxs)("div",{className:"h-3 flex-shrink-0 relative group",style:{cursor:"row-resize"},onMouseDown:e=>{let t=e.clientY,n=i||180,r=e=>{u(n+(t-e.clientY))},l=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",l)},children:[(0,t.jsxs)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-row gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-zinc-600 group-hover:bg-zinc-400 transition-colors"}),(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-zinc-600 group-hover:bg-zinc-400 transition-colors"}),(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-zinc-600 group-hover:bg-zinc-400 transition-colors"})]}),(0,t.jsx)("div",{className:"absolute inset-0 bg-zinc-700 opacity-0 group-hover:opacity-30 transition-opacity"})]})]})}function nM({capabilities:e,watches:r,breakpoints:l,debuggerStatus:i,showDebug:o,height:a,interactive:s,eval:c,debug:u,onEditWatch:d,onDeleteWatch:p,onToggleWatch:f,onEditBreakpointPrompt:h,onDeleteBreakpoint:m,onToggleBreakpoint:g,onDebuggerResume:x,onDebuggerStepOver:y,onDebuggerStepInto:b,onDebuggerStepOut:v,onTogglePermission:k,onReloadSettings:w}){let[S,C]=(0,n.useState)(!1),[j,z]=(0,n.useState)(!1),[N,E]=(0,n.useState)(!1),[T,P]=(0,n.useState)(!1),[A,I]=(0,n.useState)(!1),L=i?.connected&&i?.paused,D=async(e,t)=>{if(w&&!A){I(!0);try{await w({[e]:t})}finally{I(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col border-t border-zinc-800 overflow-y-auto",style:a?{height:a,flexShrink:0}:void 0,children:[(0,t.jsx)(nR,{title:"Modes",badge:A?(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-amber-900 rounded animate-pulse",children:"reloading..."}):void 0,collapsed:S,onToggle:()=>C(!S),children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-1 p-2",children:[(0,t.jsx)(nB,{label:"Interactive",enabled:s??!1,description:"Proxy stdin/stdout",disabled:A,onToggle:e=>D("interactive",e)}),(0,t.jsx)(nB,{label:"Debug",enabled:u??!1,description:"V8 Inspector breakpoints",disabled:A,onToggle:e=>D("debug",e)}),(0,t.jsx)(nB,{label:"Eval",enabled:c??!1,description:"Runtime eval + injection",disabled:A,onToggle:e=>D("eval",e)})]})}),(0,t.jsx)(nR,{title:"Permissions",collapsed:j,onToggle:()=>z(!j),children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-1 p-2",children:[(0,t.jsx)(nF,{label:"Read Files",enabled:e.readFiles,permissionKey:"readFiles",onToggle:k}),(0,t.jsx)(nF,{label:"Write Files",enabled:e.writeFiles,permissionKey:"writeFiles",onToggle:k}),(0,t.jsx)(nF,{label:"Shell Access",enabled:e.shellAccess,permissionKey:"shellAccess",onToggle:k}),(0,t.jsx)(nF,{label:"Restart",enabled:e.restart,permissionKey:"restart",onToggle:k})]})}),(0,t.jsx)(nR,{title:"Watch",count:r.filter(e=>e.enabled).length,collapsed:N,onToggle:()=>E(!N),children:0===r.length?(0,t.jsx)("div",{className:"p-3 text-center text-xs text-zinc-600",children:"No watches. Click 👁 on a log entry to add one."}):(0,t.jsx)("div",{className:"max-h-28 overflow-y-auto",children:r.map(e=>(0,t.jsxs)("div",{className:`group flex items-center gap-2 px-3 py-1.5 text-xs border-b border-zinc-900 hover:bg-zinc-800/50 ${e.enabled?"":"opacity-40"}`,children:[(0,t.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:t=>f(e.id,t.target.checked),className:"w-3 h-3 accent-blue-500"}),(0,t.jsxs)("span",{className:`flex-1 truncate text-[11px] ${!e.enabled?"line-through":""}`,style:{fontFamily:"'SF Mono', Monaco, monospace"},title:e.pattern,children:[e.pattern.slice(0,40),e.pattern.length>40?"...":""]}),e.hitCount>0&&(0,t.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium bg-zinc-800 text-amber-400 rounded-full",children:e.hitCount}),(0,t.jsxs)("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)("button",{onClick:()=>d(e),className:"text-zinc-500 hover:text-white px-1 py-0.5 rounded hover:bg-zinc-700",title:"Edit",children:"✎"}),(0,t.jsx)("button",{onClick:()=>p(e.id),className:"text-zinc-500 hover:text-red-500 px-1 py-0.5 rounded hover:bg-red-500/10",title:"Delete",children:"✕"})]})]},e.id))})}),o&&(0,t.jsx)(nR,{title:"V8 Debugger",badge:(0,t.jsx)(n_,{enabled:i?.enabled??!1,connected:i?.connected??!1,paused:i?.paused??!1}),controls:(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:y,disabled:!L,className:"px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:bg-zinc-700 hover:text-white disabled:opacity-40 disabled:cursor-not-allowed",children:"Step"}),(0,t.jsx)("button",{onClick:b,disabled:!L,className:"px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:bg-zinc-700 hover:text-white disabled:opacity-40 disabled:cursor-not-allowed",children:"Into"}),(0,t.jsx)("button",{onClick:v,disabled:!L,className:"px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:bg-zinc-700 hover:text-white disabled:opacity-40 disabled:cursor-not-allowed",children:"Out"}),(0,t.jsx)("button",{onClick:x,disabled:!L,className:`px-2 py-0.5 text-[10px] rounded ${L?"bg-red-900/50 border border-red-700 text-red-400 animate-pulse":"bg-green-900/30 border border-green-800 text-green-500"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"▶"})]}),collapsed:T,onToggle:()=>P(!T),children:i?.connected?0===l.length?(0,t.jsx)("div",{className:"p-3 text-center text-xs text-zinc-600",children:"Connected. Set breakpoints via chat."}):(0,t.jsxs)("div",{className:"max-h-28 overflow-y-auto",children:[l.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs border-b border-zinc-900 hover:bg-zinc-800/50 group",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:t=>g(e.id,t.target.checked),className:"w-3 h-3 accent-blue-500"}),(0,t.jsxs)("span",{className:"flex-1 font-mono text-[11px]",children:[e.file.split("/").pop(),":",e.line]}),e.hitCount>0&&(0,t.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium bg-zinc-800 text-amber-400 rounded-full",children:e.hitCount}),(0,t.jsx)("button",{onClick:()=>h(e),className:`text-xs ${e.prompt?"text-blue-400":"opacity-50 group-hover:opacity-100 text-zinc-500"}`,title:e.prompt?"Edit prompt":"Add prompt",children:"💬"}),e.prompt&&(0,t.jsx)("input",{type:"checkbox",checked:e.promptEnabled,onChange:t=>g(e.id,e.enabled),className:"w-3 h-3 accent-blue-500",title:"Enable prompt on hit"}),(0,t.jsx)("button",{onClick:()=>m(e.id),className:"opacity-50 group-hover:opacity-100 text-zinc-500 hover:text-red-500",children:"×"})]},e.id)),i?.paused&&i.callStack&&i.callStack.length>0&&(0,t.jsxs)("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:[(0,t.jsx)("div",{className:"px-3 py-1 text-[10px] text-zinc-500",children:"Call Stack:"}),i.callStack.slice(0,5).map((e,n)=>(0,t.jsxs)("div",{className:"flex gap-1 px-3 py-0.5 text-[10px] font-mono",children:[(0,t.jsxs)("span",{className:"text-zinc-600",children:["#",n]}),(0,t.jsxs)("span",{className:"text-zinc-400",children:[e.functionName||"(anonymous)"," at ",e.url.split("/").pop(),":",e.lineNumber]})]},n))]})]}):(0,t.jsx)("div",{className:"p-3 text-center text-xs text-zinc-600",children:"Waiting for debugger connection..."})})]})}function nR({title:e,count:n,badge:r,controls:l,collapsed:i,onToggle:o,children:a}){return(0,t.jsxs)("div",{className:"border-b border-zinc-900",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-zinc-950 cursor-pointer select-none hover:text-white text-zinc-400",onClick:o,children:[(0,t.jsx)("span",{className:`text-[10px] transition-transform ${i?"-rotate-90":""}`,children:"▼"}),(0,t.jsx)("span",{className:"text-xs",children:e}),void 0!==n&&(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-zinc-800 rounded-full",children:n}),r,l&&(0,t.jsx)("div",{className:"ml-auto",onClick:e=>e.stopPropagation(),children:l})]}),!i&&(0,t.jsx)("div",{className:"bg-zinc-900",children:a})]})}function nF({label:e,enabled:n,permissionKey:r,onToggle:l}){return(0,t.jsxs)("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded text-[10px] bg-zinc-900 ${n?"text-green-400":"text-zinc-600 opacity-70"} ${l?"cursor-pointer hover:bg-zinc-800":""}`,onClick:()=>{l&&l(r)},children:[(0,t.jsx)("span",{className:n?"text-green-400":"text-red-500",children:n?"✓":"✗"}),(0,t.jsx)("span",{children:e})]})}function n_({enabled:e,connected:n,paused:r}){return e?n?r?(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-red-600 rounded animate-pulse",children:"PAUSED"}):(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-green-900 rounded",children:"running"}):(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-amber-900 rounded",children:"waiting"}):(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-zinc-700 rounded",children:"disabled"})}function nB({label:e,enabled:n,description:r,disabled:l,onToggle:i}){return(0,t.jsxs)("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded text-[10px] bg-zinc-900 ${n?"text-blue-400":"text-zinc-600"} ${l?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-zinc-800"}`,onClick:()=>!l&&i(!n),title:r,children:[(0,t.jsx)("input",{type:"checkbox",checked:n,disabled:l,onChange:e=>{e.stopPropagation(),l||i(e.target.checked)},className:"w-3 h-3 accent-blue-500"}),(0,t.jsx)("span",{children:e})]})}function nU({isOpen:e,watch:r,initialMessage:l,onClose:i,onSave:o}){let[a,s]=(0,n.useState)(""),[c,u]=(0,n.useState)("");return((0,n.useEffect)(()=>{r?(s(r.pattern),u(r.prompt)):(l?s(l.slice(0,100)):s(""),u(""))},[r,l,e]),e)?(0,t.jsx)("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50",onClick:i,children:(0,t.jsxs)("div",{className:"bg-zinc-900 border border-zinc-700 rounded-lg w-full max-w-lg overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-4 py-3 border-b border-zinc-700",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold",children:r?"Edit Watch Trigger":"Add Watch Trigger"}),(0,t.jsx)("button",{onClick:i,className:"text-zinc-500 hover:text-white text-xl",children:"×"})]}),(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Pattern (substring match)"}),(0,t.jsx)("input",{type:"text",value:a,onChange:e=>s(e.target.value),placeholder:"e.g., error, connected, user login",className:"w-full px-3 py-2 bg-zinc-950 border border-zinc-700 rounded text-sm text-white placeholder:text-zinc-600 focus:outline-none focus:border-blue-500"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Matched message preview"}),(0,t.jsxs)("div",{className:"px-3 py-2 bg-zinc-800 border border-zinc-700 rounded text-xs font-mono text-zinc-500 break-all",children:[l?.slice(0,200)||a||"-",(l?.length||0)>200?"...":""]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Prompt to send to agent when triggered"}),(0,t.jsx)("textarea",{value:c,onChange:e=>u(e.target.value),placeholder:"e.g., Investigate this error and suggest a fix",rows:4,className:"w-full px-3 py-2 bg-zinc-950 border border-zinc-700 rounded text-sm font-mono text-white placeholder:text-zinc-600 focus:outline-none focus:border-blue-500 resize-y"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-4 py-3 border-t border-zinc-700",children:[(0,t.jsx)("button",{onClick:i,className:"px-4 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded text-white hover:bg-zinc-700",children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>{a.trim()&&(o(a.trim(),c.trim()),i())},disabled:!a.trim(),className:"px-4 py-2 text-sm bg-green-700 border border-green-600 rounded text-white hover:bg-green-600 disabled:opacity-50",children:"Save Watch"})]})]})}):null}function nH({isOpen:e,breakpoint:r,onClose:l,onSave:i}){let[o,a]=(0,n.useState)("");if((0,n.useEffect)(()=>{r?a(r.prompt||""):a("")},[r,e]),!e||!r)return null;let s=r.file.split("/").pop()||r.file;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50",onClick:l,children:(0,t.jsxs)("div",{className:"bg-zinc-900 border border-zinc-700 rounded-lg w-full max-w-lg overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-4 py-3 border-b border-zinc-700",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold",children:"Breakpoint Prompt"}),(0,t.jsx)("button",{onClick:l,className:"text-zinc-500 hover:text-white text-xl",children:"×"})]}),(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Breakpoint Location"}),(0,t.jsxs)("div",{className:"px-3 py-2 bg-zinc-800 border border-zinc-700 rounded text-xs font-mono text-zinc-400",children:[s,":",r.line]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Prompt to send to agent when breakpoint hits"}),(0,t.jsx)("textarea",{value:o,onChange:e=>a(e.target.value),placeholder:"e.g., Analyze the current call stack and local variables, explain what's happening",rows:4,className:"w-full px-3 py-2 bg-zinc-950 border border-zinc-700 rounded text-sm font-mono text-white placeholder:text-zinc-600 focus:outline-none focus:border-blue-500 resize-y",autoFocus:!0})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-4 py-3 border-t border-zinc-700",children:[(0,t.jsx)("button",{onClick:l,className:"px-4 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded text-white hover:bg-zinc-700",children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>{i(o.trim()),l()},className:"px-4 py-2 text-sm bg-green-700 border border-green-600 rounded text-white hover:bg-green-600",children:"Save"})]})]})})}function n$({isShutdown:e}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 bg-zinc-950 flex flex-col items-center justify-center text-center p-5 z-50",children:[(0,t.jsx)("div",{className:"text-6xl mb-5",children:"👋"}),(0,t.jsx)("h1",{className:"text-3xl font-bold text-white mb-2",children:"Thank you for using Reflexive"}),(0,t.jsx)("p",{className:"text-zinc-500 mb-8",children:"We hope you enjoyed building apps by talking to them."}),(0,t.jsxs)("div",{className:"flex gap-5 flex-wrap justify-center",children:[(0,t.jsxs)("a",{href:"https://github.com/genecyber/Reflexive",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-6 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"Star on GitHub"]}),(0,t.jsxs)("a",{href:"https://x.com/reflexiveai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-6 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)("svg",{height:"18",width:"18",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),"Follow on X"]}),(0,t.jsxs)("a",{href:"https://discord.gg/reflexive",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-6 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),"Join Discord"]})]}),(0,t.jsx)("p",{className:"mt-10 text-zinc-600 text-sm",children:"Server has been shut down. You can close this tab."})]}):null}let nV=e.i(22534).default.env.NEXT_PUBLIC_API_BASE||"",nq={readFiles:!0,writeFiles:!1,shellAccess:!1,restart:!0,networkAccess:!0,inject:!1,eval:!1,debug:!1};function nW({label:e,count:n,onClick:r}){return(0,t.jsxs)("div",{onClick:r,className:"py-3 px-2 text-xs text-zinc-500 cursor-pointer border-b border-zinc-800 hover:text-white hover:bg-zinc-800 flex items-center gap-1",style:{writingMode:"vertical-rl"},children:[(0,t.jsx)("span",{className:"text-[10px]",children:"▶"}),(0,t.jsx)("span",{children:e}),void 0!==n&&n>0&&(0,t.jsx)("span",{className:"bg-zinc-700 px-1 rounded text-[9px]",children:n})]})}function nJ(){let{status:e,logs:l,debuggerStatus:i,breakpoints:o,startProcess:a,stopProcess:s,restartProcess:c,shutdown:u,debuggerResume:d,debuggerStepOver:p,debuggerStepInto:f,debuggerStepOut:h,updateBreakpoint:m,deleteBreakpoint:g,sendCliInput:x,togglePermission:y,reloadSettings:b}=function(){let[e,t]=(0,n.useState)(null),[r,l]=(0,n.useState)([]),[i,o]=(0,n.useState)(null),[a,s]=(0,n.useState)([]),[c,u]=(0,n.useState)(!1),d=(0,n.useCallback)(async()=>{try{let e=await fetch(`${nV}/state`);if(e.ok){let n=await e.json();t(n),u(!0)}}catch{u(!1)}},[]),p=(0,n.useCallback)(async(e=100)=>{try{let t=await fetch(`${nV}/logs?count=${e}`);if(t.ok){let e=await t.json();l(e)}}catch{}},[]),f=(0,n.useCallback)(async()=>{try{let e=await fetch(`${nV}/debugger-status`);if(e.ok){let t=await e.json();o(t)}}catch{}},[]),h=(0,n.useCallback)(async()=>{try{let e=await fetch(`${nV}/debugger-breakpoints`);if(e.ok){let t=await e.json();s(t.breakpoints||[])}}catch{}},[]),m=(0,n.useCallback)(async()=>{await fetch(`${nV}/start`,{method:"POST"}),await d()},[d]),g=(0,n.useCallback)(async()=>{await fetch(`${nV}/stop`,{method:"POST"}),await d()},[d]),x=(0,n.useCallback)(async()=>{await fetch(`${nV}/restart`,{method:"POST"}),await d()},[d]),y=(0,n.useCallback)(async()=>{await fetch(`${nV}/shutdown`,{method:"POST"})},[]),b=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-resume`,{method:"POST"})},[]),v=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-step-over`,{method:"POST"})},[]),k=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-step-into`,{method:"POST"})},[]),w=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-step-out`,{method:"POST"})},[]),S=(0,n.useCallback)(async(e,t,n)=>{await fetch(`${nV}/debugger-breakpoints`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,line:t,...n})}),await h()},[h]),C=(0,n.useCallback)(async(e,t)=>{await fetch(`${nV}/debugger-breakpoint/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),await h()},[h]),j=(0,n.useCallback)(async e=>{await fetch(`${nV}/debugger-breakpoint/${encodeURIComponent(e)}`,{method:"DELETE"}),await h()},[h]),z=(0,n.useCallback)(async e=>{await fetch(`${nV}/cli-input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})})},[]),N=(0,n.useCallback)(async(e,t)=>{await fetch(`${nV}/log`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e,message:t})})},[]),E=(0,n.useCallback)(async e=>{await fetch(`${nV}/permissions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({permission:e,toggle:!0})}),await d()},[d]),T=(0,n.useCallback)(async e=>{let t=await fetch(`${nV}/reload`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();return n.success&&await d(),n},[d]);return(0,n.useEffect)(()=>{d(),p();let e=setInterval(()=>{d(),p()},2e3);return()=>clearInterval(e)},[d,p]),(0,n.useEffect)(()=>{f(),h();let e=setInterval(()=>{f(),h()},1e3);return()=>clearInterval(e)},[f,h]),{status:e,logs:r,debuggerStatus:i,breakpoints:a,isConnected:c,fetchStatus:d,fetchLogs:p,fetchDebuggerStatus:f,fetchBreakpoints:h,startProcess:m,stopProcess:g,restartProcess:x,shutdown:y,debuggerResume:b,debuggerStepOver:v,debuggerStepInto:k,debuggerStepOut:w,addBreakpoint:S,updateBreakpoint:C,deleteBreakpoint:j,sendCliInput:z,logMessage:N,togglePermission:E,reloadSettings:T}}(),{messages:v,isLoading:k,sendMessage:w,stopResponse:S,clearMessages:C}=function(){let[e,t]=(0,n.useState)([]),[r,l]=(0,n.useState)(!1),i=(0,n.useRef)(null),o=(0,n.useCallback)(async(e,n)=>{let r={id:Date.now().toString(),role:"user",content:e,isWatchTrigger:n?.isWatchTrigger,watchPattern:n?.watchPattern};t(e=>[...e,r]),l(!0);let o={id:(Date.now()+1).toString(),role:"assistant",content:"",isWatchTrigger:n?.isWatchTrigger,watchPattern:n?.watchPattern};t(e=>[...e,o]);try{i.current=new AbortController;let n=await fetch(`${nV}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e}),signal:i.current.signal}),r=n.body?.getReader(),l=new TextDecoder,o="";if(r)for(;;){let{done:e,value:n}=await r.read();if(e)break;for(let e of l.decode(n,{stream:!0}).split("\n"))if(e.startsWith("data: "))try{let n=JSON.parse(e.slice(6));if("text"===n.type)o+=n.content,t(e=>{let t=[...e],n=t.length-1;return t[n]?.role==="assistant"&&(t[n]={...t[n],content:o}),t});else if("tool"===n.type){let e=n.name.replace(/^mcp__[^_]+__/,""),r=Object.entries(n.input||{}).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(", ");o+=`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24363,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function d(e){return e?e.replace(u,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,u=1;function p(e){var t=e.match(l);t&&(n+=t.length);var r=e.lastIndexOf("\n");u=~r?e.length-r:u+e.length}function f(){var e={line:n,column:u};return function(t){return t.position=new h(e),g(i),t}}function h(e){this.start=e,this.end={line:n,column:u},this.source=t.source}function m(r){var l=Error(t.source+":"+n+":"+u+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=u,l.source=e,t.silent);else throw l}function g(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function x(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return u+=2,p(r),e=e.slice(n),u+=2,t({type:"comment",comment:r})}}h.prototype.content=e,g(i);var b,v=[];for(x(v);b=function(){var e=f(),t=g(o);if(t){if(y(),!g(a))return m("property missing ':'");var n=g(s),l=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(c),l}}();)!1!==b&&(v.push(b),x(v));return v}},77559,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,l.default)(e),i="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:l}=e;i?t(r,l,e):l&&((n=n||{})[r]=l)}),n};let l=r(e.r(24363))},57203,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||i.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,c):e.replace(o,c)).replace(l,s))}},43588,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(77559)),l=e.r(57203);function i(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,l.camelCase)(e,t)]=r)}),n}i.default=i,t.exports=i},84422,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===l.call(e)},s=function(e){if(!e||"[object Object]"!==l.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,l,i,o,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(t=arguments[p],null!=t)for(n in t)r=u(d,n),d!==(l=u(t,n))&&(h&&l&&(s(l)||(i=a(l)))?(i?(i=!1,o=r&&a(r)?r:[]):o=r&&s(r)?r:{},c(d,{name:n,newValue:e(h,o,l)})):void 0!==l&&c(d,{name:n,newValue:l}));return d}},23733,e=>{"use strict";var t=e.i(27493),n=e.i(4);function r({status:e,showControls:n,onStart:r,onStop:l,onRestart:i,onShutdown:o}){let a=e?.isRunning??!1;return(0,t.jsxs)("header",{className:"flex justify-between items-center py-1 px-0 border-b border-zinc-800 mb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-lg font-bold flex items-center gap-0",children:[(0,t.jsx)("img",{src:"/logo-carbon.png",alt:"R",className:"h-[90px] w-auto -mr-[26px] -mt-1 -ml-4 relative z-10 drop-shadow-[0_0_4px_rgba(74,222,128,0.2)]"}),(0,t.jsx)("span",{className:"text-2xl font-bold tracking-wider bg-gradient-to-r from-green-400 via-green-500 to-green-600 bg-clip-text text-transparent -ml-3",children:"EFLEXIVE"})]}),e?.entry&&(0,t.jsx)("div",{className:"text-xs text-zinc-500 font-mono",children:e.entry})]}),n?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:r,disabled:a,className:"px-3 py-1.5 text-xs bg-zinc-800 border border-green-500 rounded text-white hover:bg-green-900 disabled:opacity-50 disabled:cursor-not-allowed",children:"Start"}),(0,t.jsx)("button",{onClick:i,className:"px-3 py-1.5 text-xs bg-zinc-800 border border-zinc-600 rounded text-white hover:bg-zinc-700",children:"Restart"}),(0,t.jsx)("button",{onClick:l,disabled:!a,className:"px-3 py-1.5 text-xs bg-zinc-800 border border-red-500 rounded text-white hover:bg-red-900 disabled:opacity-50 disabled:cursor-not-allowed",children:"Stop"}),(0,t.jsx)("button",{onClick:()=>{confirm("Shutdown Reflexive completely?")&&o()},className:"px-2.5 py-1.5 text-base bg-zinc-800 border border-amber-500 rounded text-amber-500 hover:bg-amber-900",title:"Shutdown Reflexive",children:"⏻"})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-green-900/50 rounded-full text-xs",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full bg-green-500"}),(0,t.jsx)("span",{children:"Running"})]})]})}function l({isRunning:e}){return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${e?"bg-green-500":"bg-red-500"}`}),(0,t.jsx)("span",{children:e?"Running":"Stopped"})]})}function i(){}function o(){}let a=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c={};function u(e,t){return((t||c).jsx?s:a).test(e)}let d=/[ \t\n\f\r]/g;function p(e){return""===e.replace(d,"")}class f{constructor(e,t){this.attribute=t,this.property=e}}f.prototype.attribute="",f.prototype.booleanish=!1,f.prototype.boolean=!1,f.prototype.commaOrSpaceSeparated=!1,f.prototype.commaSeparated=!1,f.prototype.defined=!1,f.prototype.mustUseProperty=!1,f.prototype.number=!1,f.prototype.overloadedBoolean=!1,f.prototype.property="",f.prototype.spaceSeparated=!1,f.prototype.space=void 0;let h=0,m=w(),g=w(),x=w(),y=w(),b=w(),v=w(),k=w();function w(){return 2**++h}e.s(["boolean",0,m,"booleanish",0,g,"commaOrSpaceSeparated",0,k,"commaSeparated",0,v,"number",0,y,"overloadedBoolean",0,x,"spaceSeparated",0,b],1797);var S=e.i(1797);let C=Object.keys(S);class j extends f{constructor(e,t,n,r){let l=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++l<C.length;){const e=C[l];!function(e,t,n){n&&(e[t]=n)}(this,C[l],(n&S[e])===S[e])}}}function z(e){return e.toLowerCase()}j.prototype.defined=!0;let N=/[A-Z]/g,E=/-[a-z]/g,T=/^data[-\w.:]+$/i;function P(e){return"-"+e.toLowerCase()}function A(e){return e.charAt(1).toUpperCase()}let I={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"};class L{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function D(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new L(n,r,t)}function O(e){let t={},n={};for(let[r,l]of Object.entries(e.properties)){let i=new j(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[z(r)]=r,n[z(i.attribute)]=r}return new L(t,n,e.space)}L.prototype.normal={},L.prototype.property={},L.prototype.space=void 0;let M=O({properties:{ariaActiveDescendant:null,ariaAtomic:g,ariaAutoComplete:null,ariaBusy:g,ariaChecked:g,ariaColCount:y,ariaColIndex:y,ariaColSpan:y,ariaControls:b,ariaCurrent:null,ariaDescribedBy:b,ariaDetails:null,ariaDisabled:g,ariaDropEffect:b,ariaErrorMessage:null,ariaExpanded:g,ariaFlowTo:b,ariaGrabbed:g,ariaHasPopup:null,ariaHidden:g,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:b,ariaLevel:y,ariaLive:null,ariaModal:g,ariaMultiLine:g,ariaMultiSelectable:g,ariaOrientation:null,ariaOwns:b,ariaPlaceholder:null,ariaPosInSet:y,ariaPressed:g,ariaReadOnly:g,ariaRelevant:null,ariaRequired:g,ariaRoleDescription:b,ariaRowCount:y,ariaRowIndex:y,ariaRowSpan:y,ariaSelected:g,ariaSetSize:y,ariaSort:null,ariaValueMax:y,ariaValueMin:y,ariaValueNow:y,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function R(e,t){return t in e?e[t]:t}function F(e,t){return R(e,t.toLowerCase())}let _=O({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:v,acceptCharset:b,accessKey:b,action:null,allow:null,allowFullScreen:m,allowPaymentRequest:m,allowUserMedia:m,alt:null,as:null,async:m,autoCapitalize:null,autoComplete:b,autoFocus:m,autoPlay:m,blocking:b,capture:null,charSet:null,checked:m,cite:null,className:b,cols:y,colSpan:null,content:null,contentEditable:g,controls:m,controlsList:b,coords:y|v,crossOrigin:null,data:null,dateTime:null,decoding:null,default:m,defer:m,dir:null,dirName:null,disabled:m,download:x,draggable:g,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:m,formTarget:null,headers:b,height:y,hidden:x,high:y,href:null,hrefLang:null,htmlFor:b,httpEquiv:b,id:null,imageSizes:null,imageSrcSet:null,inert:m,inputMode:null,integrity:null,is:null,isMap:m,itemId:null,itemProp:b,itemRef:b,itemScope:m,itemType:b,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:m,low:y,manifest:null,max:null,maxLength:y,media:null,method:null,min:null,minLength:y,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:y,pattern:null,ping:b,placeholder:null,playsInline:m,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:m,referrerPolicy:null,rel:b,required:m,reversed:m,rows:y,rowSpan:y,sandbox:b,scope:null,scoped:m,seamless:m,selected:m,shadowRootClonable:m,shadowRootDelegatesFocus:m,shadowRootMode:null,shape:null,size:y,sizes:null,slot:null,span:y,spellCheck:g,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y,step:null,style:null,tabIndex:y,target:null,title:null,translate:null,type:null,typeMustMatch:m,useMap:null,value:g,width:y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:b,axis:null,background:null,bgColor:null,border:y,borderColor:null,bottomMargin:y,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:y,leftMargin:y,link:null,longDesc:null,lowSrc:null,marginHeight:y,marginWidth:y,noResize:m,noHref:m,noShade:m,noWrap:m,object:null,profile:null,prompt:null,rev:null,rightMargin:y,rules:null,scheme:null,scrolling:g,standby:null,summary:null,text:null,topMargin:y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:m,disableRemotePlayback:m,prefix:null,property:null,results:y,security:null,unselectable:null},space:"html",transform:F}),B=O({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:k,accentHeight:y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y,amplitude:y,arabicForm:null,ascent:y,attributeName:null,attributeType:null,azimuth:y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y,by:null,calcMode:null,capHeight:y,className:b,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:y,diffuseConstant:y,direction:null,display:null,dur:null,divisor:y,dominantBaseline:null,download:m,dx:null,dy:null,edgeMode:null,editable:null,elevation:y,enableBackground:null,end:null,event:null,exponent:y,externalResourcesRequired:null,fill:null,fillOpacity:y,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:v,g2:v,glyphName:v,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y,horizOriginX:y,horizOriginY:y,id:null,ideographic:y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y,k:y,k1:y,k2:y,k3:y,k4:y,kernelMatrix:k,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y,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:y,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:y,overlineThickness:y,paintOrder:null,panose1:null,path:null,pathLength:y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:b,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y,pointsAtY:y,pointsAtZ:y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:k,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:k,rev:k,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:k,requiredFeatures:k,requiredFonts:k,requiredFormats:k,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:y,specularExponent:y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y,strikethroughThickness:y,string:null,stroke:null,strokeDashArray:k,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y,strokeOpacity:y,strokeWidth:null,style:null,surfaceScale:y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:k,tabIndex:y,tableValues:null,target:null,targetX:y,targetY:y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:k,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y,underlineThickness:y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y,values:null,vAlphabetic:y,vMathematical:y,vectorEffect:null,vHanging:y,vIdeographic:y,version:null,vertAdvY:y,vertOriginX:y,vertOriginY:y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:R}),U=O({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),H=O({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:F}),$=O({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),V=D([M,_,U,H,$],"html"),q=D([M,B,U,H,$],"svg");var W=e.i(43588);let J=X("end"),K=X("start");function X(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Q(e){return e&&"object"==typeof e?"position"in e||"type"in e?Z(e.position):"start"in e||"end"in e?Z(e):"line"in e||"column"in e?Y(e):"":""}function Y(e){return G(e&&e.line)+":"+G(e&&e.column)}function Z(e){return Y(e&&e.start)+"-"+Y(e&&e.end)}function G(e){return e&&"number"==typeof e?e:1}class ee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",l={},i=!1;if(t&&(l="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!l.cause&&e&&(i=!0,r=e.message,l.cause=e),!l.ruleId&&!l.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?l.ruleId=n:(l.source=n.slice(0,e),l.ruleId=n.slice(e+1))}if(!l.place&&l.ancestors&&l.ancestors){const e=l.ancestors[l.ancestors.length-1];e&&(l.place=e.position)}const o=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=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=Q(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=i&&l.cause&&"string"==typeof l.cause.stack?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ee.prototype.file="",ee.prototype.name="",ee.prototype.reason="",ee.prototype.message="",ee.prototype.stack="",ee.prototype.column=void 0,ee.prototype.line=void 0,ee.prototype.ancestors=void 0,ee.prototype.cause=void 0,ee.prototype.fatal=void 0,ee.prototype.place=void 0,ee.prototype.ruleId=void 0,ee.prototype.source=void 0;let et={}.hasOwnProperty,en=new Map,er=/[A-Z]/g,el=new Set(["table","tbody","thead","tfoot","tr"]),ei=new Set(["td","th"]),eo="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ea(e,t,n){var r,l,o,a,s,c,u,d,h;let m,g,x,y,b,v,k,w,S,C,L;return"element"===t.type?(r=e,l=t,o=n,g=m=r.schema,"svg"===l.tagName.toLowerCase()&&"html"===m.space&&(r.schema=q),r.ancestors.push(l),x=ed(r,l.tagName,!1),y=function(e,t){let n,r,l={};for(r in t.properties)if("children"!==r&&et.call(t.properties,r)){let i=function(e,t,n){let r=function(e,t){let n=z(t),r=t,l=f;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&T.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(E,A);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!E.test(e)){let n=e.replace(N,P);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}l=j}return new l(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var l;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(l=n)[l.length-1]?[...l,""]:l).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,W.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new ee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=eo+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)et.call(e,t)&&(n[function(e){let t=e.replace(er,ef);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?I[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(i){let[r,o]=i;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof o&&ei.has(t.tagName)?n=o:l[r]=o}}return n&&((l.style||(l.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),l}(r,l),b=eu(r,l),el.has(l.tagName)&&(b=b.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&p(e.value):p(e))})),es(r,y,x,l),ec(y,b),r.ancestors.pop(),r.schema=m,r.create(l,x,y,o)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return i("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}ep(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(a=e,s=t,c=n,k=v=a.schema,"svg"===s.name&&"html"===v.space&&(a.schema=q),a.ancestors.push(s),w=null===s.name?a.Fragment:ed(a,s.name,!0),S=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];i("ExpressionStatement"===t.type);let l=t.expression;i("ObjectExpression"===l.type);let o=l.properties[0];i("SpreadElement"===o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ep(e,t.position);else{let l,o=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];i("ExpressionStatement"===t.type),l=e.evaluater.evaluateExpression(t.expression)}else ep(e,t.position);else l=null===r.value||r.value;n[o]=l}return n}(a,s),C=eu(a,s),es(a,S,w,s),ec(S,C),a.ancestors.pop(),a.schema=v,a.create(s,w,S,c)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ep(e,t.position)}(e,t):"root"===t.type?(u=e,d=t,h=n,ec(L={},eu(u,d)),u.create(d,u.Fragment,L,h)):"text"===t.type?t.value:void 0}function es(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ec(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eu(e,t){let n=[],r=-1,l=e.passKeys?new Map:en;for(;++r<t.children.length;){let i,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=l.get(e)||0;i=e+"-"+t,l.set(e,t+1)}}let a=ea(e,o,i);void 0!==a&&n.push(a)}return n}function ed(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),l=-1;for(;++l<n.length;){let t=u(n[l])?{type:"Identifier",name:n[l]}:{type:"Literal",value:n[l]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(l&&"Literal"===t.type),optional:!1}:t}i(e,"always a result"),r=e}else r=u(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return et.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ep(e)}function ep(e,t){let n=new ee("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=eo+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ef(e){return"-"+e.toLowerCase()}let eh={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"]},em={};function eg(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ex(e.children,t,n)}return Array.isArray(e)?ex(e,t,n):""}function ex(e,t,n){let r=[],l=-1;for(;++l<e.length;)r[l]=eg(e[l],t,n);return r.join("")}function ey(e,t,n,r){let l,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)(l=Array.from(r)).unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)(l=r.slice(o,o+1e4)).unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function eb(e,t){return e.length>0?(ey(e,e.length,0,t),e):t}let ev={}.hasOwnProperty,ek=eL(/[A-Za-z]/),ew=eL(/[\dA-Za-z]/),eS=eL(/[#-'*+\--9=?A-Z^-~]/);function eC(e){return null!==e&&(e<32||127===e)}let ej=eL(/\d/),ez=eL(/[\dA-Fa-f]/),eN=eL(/[!-/:-@[-`{-~]/);function eE(e){return null!==e&&e<-2}function eT(e){return null!==e&&(e<0||32===e)}function eP(e){return -2===e||-1===e||32===e}let eA=eL(/\p{P}|\p{S}/u),eI=eL(/\s/);function eL(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eD(e,t,n,r){let l=r?r-1:1/0,i=0;return function(r){return eP(r)?(e.enter(n),function r(o){return eP(o)&&i++<l?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let eO={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eD(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let l=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return eE(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},eM={tokenize:function(e){let t,n,r,l=this,i=[],o=0;return a;function a(t){if(o<i.length){let n=i[o];return l.containerState=n[1],e.attempt(n[0].continuation,s,c)(t)}return c(t)}function s(e){if(o++,l.containerState._closeFlow){let n;l.containerState._closeFlow=void 0,t&&x();let r=l.events.length,i=r;for(;i--;)if("exit"===l.events[i][0]&&"chunkFlow"===l.events[i][1].type){n=l.events[i][1].end;break}g(o);let a=r;for(;a<l.events.length;)l.events[a][1].end={...n},a++;return ey(l.events,i+1,0,l.events.slice(r)),l.events.length=a,c(e)}return a(e)}function c(n){if(o===i.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return h(n);l.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return l.containerState={},e.check(eR,u,d)(n)}function u(e){return t&&x(),g(o),p(e)}function d(e){return l.parser.lazy[l.now().line]=o!==i.length,r=l.now().offset,h(e)}function p(t){return l.containerState={},e.attempt(eR,f,h)(t)}function f(e){return o++,i.push([l.currentConstruct,l.containerState]),p(e)}function h(r){if(null===r){t&&x(),g(0),e.consume(r);return}return t=t||l.parser.flow(l.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return eE(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,l.interrupt=void 0,a):(e.consume(n),t)}(r)}function m(e,i){let a=l.sliceStream(e);if(i&&a.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(a),l.parser.lazy[e.start.line]){let e,n,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<r&&(!t.events[i][1].end||t.events[i][1].end.offset>r))return;let a=l.events.length,s=a;for(;s--;)if("exit"===l.events[s][0]&&"chunkFlow"===l.events[s][1].type){if(e){n=l.events[s][1].end;break}e=!0}for(g(o),i=a;i<l.events.length;)l.events[i][1].end={...n},i++;ey(l.events,s+1,0,l.events.slice(a)),l.events.length=i}}function g(t){let n=i.length;for(;n-- >t;){let t=i[n];l.containerState=t[1],t[0].exit.call(l,e)}i.length=t}function x(){t.write([null]),n=void 0,t=void 0,l.containerState._closeFlow=void 0}}},eR={tokenize:function(e,t,n){return eD(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eF={partial:!0,tokenize:function(e,t,n){return function(t){return eP(t)?eD(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||eE(e)?t(e):n(e)}}};class e_{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&eB(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),eB(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eB(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);eB(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eB(this.left,t.reverse())}}}function eB(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function eU(e){let t,n,r,l,i,o,a,s={},c=-1,u=new e_(e);for(;++c<u.length;){for(;c in s;)c=s[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,l=e.get(t)[1],i=e.get(t)[2],o=t-1,a=[],s=l._tokenizer;!s&&(s=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let c=s.events,u=[],d={},p=-1,f=l,h=0,m=0,g=[0];for(;f;){for(;e.get(++o)[1]!==f;);a.push(o),!f._tokenizer&&(n=i.sliceStream(f),f.next||n.push(null),r&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=f,f=f.next}for(f=l;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){let t=c.slice(g[p],g[p+1]),n=a.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),p=-1;++p<u.length;)d[h+u[p][0]]=h+u[p][1],h+=u[p][1]-u[p][0]-1;return d}(u,c)),c=s[c],a=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(l=u.get(r))[1].type||"lineEndingBlank"===l[1].type)"enter"===l[0]&&(n&&(u.get(n)[1].type="lineEndingBlank"),l[1].type="lineEnding",n=r);else if("linePrefix"===l[1].type||"listItemIndent"===l[1].type);else break;n&&(t[1].end={...u.get(n)[1].start},(i=u.slice(n,c)).unshift(t),u.splice(n,c-n+1,i))}}return ey(e,0,1/0,u.slice(0)),!a}let eH={resolve:function(e){return eU(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?l(t):eE(t)?e.check(e$,i,l)(t):(e.consume(t),r)}function l(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},e$={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eD(e,l,"linePrefix")};function l(l){if(null===l||eE(l))return n(l);let i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}},eV={tokenize:function(e){let t=this,n=e.attempt(eF,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eD(e,e.attempt(this.parser.constructs.flow,r,e.attempt(eH,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},eq={resolveAll:eX()},eW=eK("string"),eJ=eK("text");function eK(e){return{resolveAll:eX("text"===e?eQ:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],l=t.attempt(r,i,o);return i;function i(e){return s(e)?l(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),a)}function a(e){return s(e)?(t.exit("data"),l(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;let t=r[e],l=-1;if(t)for(;++l<t.length;){let e=t[l];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function eX(e){return function(t,n){let r,l=-1;for(;++l<=t.length;)void 0===r?t[l]&&"data"===t[l][1].type&&(r=l,l++):t[l]&&"data"===t[l][1].type||(l!==r+2&&(t[r][1].end=t[l-1][1].end,t.splice(r+2,l-r-2),l=r+2),r=void 0);return e?e(t,n):t}}function eQ(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,l=e[n-1][1],i=t.sliceStream(l),o=i.length,a=-1,s=0;for(;o--;){let e=i[o];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:l.start._bufferIndex+a,_index:l.start._index+o,line:l.end.line,column:l.end.column-s,offset:l.end.offset-s},end:{...l.end}};l.end={...i.start},l.start.offset===l.end.offset?Object.assign(l,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}function eY(e){return null===e||eT(e)||eI(e)?1:eA(e)?2:void 0}function eZ(e,t,n){let r=[],l=-1;for(;++l<e.length;){let i=e[l].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}let eG={name:"attention",resolveAll:function(e,t){let n,r,l,i,o,a,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[n][1].end},p={...e[u][1].start};e0(d,-a),e0(p,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:a>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},l={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:a>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[n][1].end={...i.start},e[u][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=eb(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=eb(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",l,t]]),s=eb(s,eZ(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=eb(s,[["exit",l,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=eb(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ey(e,n-1,u-n+3,s),u=n+s.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,l=this.previous,i=eY(l);return function(o){return n=o,e.enter("attentionSequence"),function o(a){if(a===n)return e.consume(a),o;let s=e.exit("attentionSequence"),c=eY(a),u=!c||2===c&&i||r.includes(a),d=!i||2===i&&c||r.includes(l);return s._open=!!(42===n?u:u&&(i||!d)),s._close=!!(42===n?d:d&&(c||!u)),t(a)}(o)}}};function e0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let e1={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eP(t)?eD(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)};function l(r){return e.attempt(e1,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),l}return n(t)};function l(n){return eP(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},e5={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return eN(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},e2=document.createElement("i");function e4(e){let t="&"+e+";";e2.innerHTML=t;let n=e2.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let e3={name:"characterReference",tokenize:function(e,t,n){let r,l,i=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,l=ew,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,l=ez,c):(e.enter("characterReferenceValue"),r=7,l=ej,c(t))}function c(a){if(59===a&&o){let r=e.exit("characterReferenceValue");return l!==ew||e4(i.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return l(a)&&o++<r?(e.consume(a),c):n(a)}}},e7={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l)};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},e9={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,l=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),eP(t)?eD(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(l){return l===r?(i++,e.consume(l),t):i>=a?(e.exit("codeFencedFenceSequence"),eP(l)?eD(e,c,"whitespace")(l):c(l)):n(l)}(t)):n(t)}function c(r){return null===r||eE(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,a=0;return function(t){var i;let c;return i=t,o=(c=l.events[l.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=i,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(l){return l===r?(a++,e.consume(l),t):a<3?n(l):(e.exit("codeFencedFenceSequence"),eP(l)?eD(e,s,"whitespace")(l):s(l))}(i)};function s(i){return null===i||eE(i)?(e.exit("codeFencedFence"),l.interrupt?t(i):e.check(e7,u,h)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(l){return null===l||eE(l)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(l)):eP(l)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eD(e,c,"whitespace")(l)):96===l&&l===r?n(l):(e.consume(l),t)}(i))}function c(t){return null===t||eE(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(l){return null===l||eE(l)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(l)):96===l&&l===r?n(l):(e.consume(l),t)}(t))}function u(t){return e.attempt(i,h,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&eP(t)?eD(e,f,"linePrefix",o+1)(t):f(t)}function f(t){return null===t||eE(t)?e.check(e7,u,h)(t):(e.enter("codeFlowValue"),function t(n){return null===n||eE(n)?(e.exit("codeFlowValue"),f(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("codeFenced"),t(n)}}},e6={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eD(e,l,"linePrefix",5)(t)};function l(t){let l=r.events[r.events.length-1];return l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?function t(n){return null===n?i(n):eE(n)?e.attempt(e8,t,i)(n):(e.enter("codeFlowValue"),function n(r){return null===r||eE(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function i(n){return e.exit("codeIndented"),t(n)}}},e8={partial:!0,tokenize:function(e,t,n){let r=this;return l;function l(t){return r.parser.lazy[r.now().line]?n(t):eE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):eD(e,i,"linePrefix",5)(t)}function i(e){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):eE(e)?l(e):n(e)}}};function te(e,t,n,r,l,i,o,a,s){let c=s||1/0,u=0;return function(t){return 60===t?(e.enter(r),e.enter(l),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||eC(t)?n(t):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(t))};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(l),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(a),d(t)):null===t||60===t||eE(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(l){return!u&&(null===l||41===l||eT(l))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(l)):u<c&&40===l?(e.consume(l),u++,h):41===l?(e.consume(l),u--,h):null===l||32===l||40===l||eC(l)?n(l):(e.consume(l),92===l?m:h)}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function tt(e,t,n,r,l,i){let o,a=this,s=0;return function(t){return e.enter(r),e.enter(l),e.consume(t),e.exit(l),e.enter(i),c};function c(d){return s>999||null===d||91===d||93===d&&!o||94===d&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(l),e.consume(d),e.exit(l),e.exit(r),t):eE(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||eE(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!eP(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function tn(e,t,n,r,l,i){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(l),e.consume(t),e.exit(l),o=40===t?41:t,a):n(t)};function a(n){return n===o?(e.enter(l),e.consume(n),e.exit(l),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===o?(e.exit(i),a(o)):null===t?n(t):eE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eD(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||eE(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function tr(e,t){let n;return function r(l){return eE(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,r):eP(l)?eD(e,r,n?"linePrefix":"lineSuffix")(l):t(l)}}function tl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let ti={partial:!0,tokenize:function(e,t,n){return function(t){return eT(t)?tr(e,r)(t):n(t)};function r(t){return tn(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function l(t){return eP(t)?eD(e,i,"whitespace")(t):i(t)}function i(e){return null===e||eE(e)?t(e):n(e)}}},to=["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"],ta=["pre","script","style","textarea"],ts={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eF,t,n)}}},tc={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return eE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):n(t)};function l(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tu={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&ey(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,l,i,o=e.length,a=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(l){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(l=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[l][1].end}},u={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[l-2][1].start}};return i=eb(i=[["enter",s,t],["enter",c,t]],e.slice(r+1,r+a+3)),i=eb(i,[["enter",u,t]]),i=eb(i,eZ(t.parser.constructs.insideSpan.null,e.slice(r+a+4,l-3),t)),i=eb(i,[["exit",u,t],e[l-2],e[l-1],["exit",c,t]]),i=eb(i,e.slice(l+1)),i=eb(i,[["exit",s,t]]),ey(e,r,e.length,i),e},tokenize:function(e,t,n){let r,l,i=this,o=i.events.length;for(;o--;)if(("labelImage"===i.events[o][1].type||"labelLink"===i.events[o][1].type)&&!i.events[o][1]._balanced){r=i.events[o][1];break}return function(t){return r?r._inactive?u(t):(l=i.parser.defined.includes(tl(i.sliceSerialize({start:r.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(td,c,l?c:u)(t):91===t?e.attempt(tp,c,l?s:u)(t):l?c(t):u(t)}function s(t){return e.attempt(tf,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},td={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return eT(t)?tr(e,l)(t):l(t)}function l(t){return 41===t?c(t):te(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return eT(t)?tr(e,a)(t):c(t)}function o(e){return n(e)}function a(t){return 34===t||39===t||40===t?tn(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return eT(t)?tr(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},tp={tokenize:function(e,t,n){let r=this;return function(t){return tt.call(r,e,l,i,"reference","referenceMarker","referenceString")(t)};function l(e){return r.parser.defined.includes(tl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},tf={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},th={name:"labelStartImage",resolveAll:tu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),l};function l(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tm={name:"labelStartLink",resolveAll:tu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),l};function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tg={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eD(e,t,"linePrefix")}}},tx={name:"thematicBreak",tokenize:function(e,t,n){let r,l=0;return function(i){var o;return e.enter("thematicBreak"),r=o=i,function i(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),l++,t):(e.exit("thematicBreakSequence"),eP(n)?eD(e,i,"whitespace")(n):i(n))}(o)):l>=3&&(null===o||eE(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},ty={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eF,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eD(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eP(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tv,t,l)(n))});function l(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,eD(e,e.attempt(ty,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,l=r.events[r.events.length-1],i=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,o=0;return function(t){let l=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===l?!r.containerState.marker||t===r.containerState.marker:ej(t)){if(r.containerState.type||(r.containerState.type=l,e.enter(l,{_container:!0})),"listUnordered"===l)return e.enter("listItemPrefix"),42===t||45===t?e.check(tx,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(l){return ej(l)&&++o<10?(e.consume(l),t):(!r.interrupt||o<2)&&(r.containerState.marker?l===r.containerState.marker:41===l||46===l)?(e.exit("listItemValue"),a(l)):n(l)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eF,r.interrupt?n:s,e.attempt(tb,u,c))}function s(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return eP(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tb={partial:!0,tokenize:function(e,t,n){let r=this;return eD(e,function(e){let l=r.events[r.events.length-1];return!eP(e)&&l&&"listItemPrefixWhitespace"===l[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tv={partial:!0,tokenize:function(e,t,n){let r=this;return eD(e,function(e){let l=r.events[r.events.length-1];return l&&"listItemIndent"===l[1].type&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tk={name:"setextUnderline",resolveTo:function(e,t){let n,r,l,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),l||"definition"!==e[i][1].type||(l=i);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",l?(e.splice(r,0,["enter",o,t]),e.splice(l+1,0,["exit",e[n][1],t]),e[n][1].end={...e[l][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,l=this;return function(t){var o;let a,s=l.events.length;for(;s--;)if("lineEnding"!==l.events[s][1].type&&"linePrefix"!==l.events[s][1].type&&"content"!==l.events[s][1].type){a="paragraph"===l.events[s][1].type;break}return!l.parser.lazy[l.now().line]&&(l.interrupt||a)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eP(n)?eD(e,i,"lineSuffix")(n):i(n))}(o)):n(t)};function i(r){return null===r||eE(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,l=this;return function(t){var r;return e.enter("definition"),r=t,tt.call(l,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function i(t){return(r=tl(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return eT(t)?tr(e,a)(t):a(t)}function a(t){return te(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(ti,c,c)(t)}function c(t){return eP(t)?eD(e,u,"whitespace")(t):u(t)}function u(i){return null===i||eE(i)?(e.exit("definition"),l.parser.defined.push(r),t(i)):n(i)}}}},"disable",0,{null:[]},"document",0,{42:ty,43:ty,45:ty,48:ty,49:ty,50:ty,51:ty,52:ty,53:ty,54:ty,55:ty,56:ty,57:ty,62:e1},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,l=e.length-2,i=3;return"whitespace"===e[3][1].type&&(i+=2),l-2>i&&"whitespace"===e[l][1].type&&(l-=2),"atxHeadingSequence"===e[l][1].type&&(i===l-1||l-4>i&&"whitespace"===e[l-2][1].type)&&(l-=i+1===l?2:4),l>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[l][1].end},r={type:"chunkText",start:e[i][1].start,end:e[l][1].end,contentType:"text"},ey(e,i,l-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(l){var i;return e.enter("atxHeading"),i=l,e.enter("atxHeadingSequence"),function l(i){return 35===i&&r++<6?(e.consume(i),l):null===i||eT(i)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||eE(r)?(e.exit("atxHeading"),t(r)):eP(r)?eD(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eT(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(i)):n(i)}(i)}}},42:tx,45:[tk,tx],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,l,i,o,a,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),l=!0,f):63===o?(e.consume(o),r=3,s.interrupt?t:I):ek(o)?(e.consume(o),i=String.fromCharCode(o),h):n(o)}function u(l){return 45===l?(e.consume(l),r=2,d):91===l?(e.consume(l),r=5,o=0,p):ek(l)?(e.consume(l),r=4,s.interrupt?t:I):n(l)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:I):n(r)}function p(r){let l="CDATA[";return r===l.charCodeAt(o++)?(e.consume(r),o===l.length)?s.interrupt?t:C:p:n(r)}function f(t){return ek(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(o){if(null===o||47===o||62===o||eT(o)){let a=47===o,c=i.toLowerCase();return!a&&!l&&ta.includes(c)?(r=1,s.interrupt?t(o):C(o)):to.includes(i.toLowerCase())?(r=6,a)?(e.consume(o),m):s.interrupt?t(o):C(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):l?function t(n){return eP(n)?(e.consume(n),t):w(n)}(o):g(o))}return 45===o||ew(o)?(e.consume(o),i+=String.fromCharCode(o),h):n(o)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:C):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||ek(t)?(e.consume(t),x):eP(t)?(e.consume(t),g):w(t)}function x(t){return 45===t||46===t||58===t||95===t||ew(t)?(e.consume(t),x):y(t)}function y(t){return 61===t?(e.consume(t),b):eP(t)?(e.consume(t),y):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,v):eP(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eT(n)?y(n):(e.consume(n),t)}(t)}function v(t){return t===a?(e.consume(t),a=null,k):null===t||eE(t)?n(t):(e.consume(t),v)}function k(e){return 47===e||62===e||eP(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||eE(t)?C(t):eP(t)?(e.consume(t),S):n(t)}function C(t){return 45===t&&2===r?(e.consume(t),E):60===t&&1===r?(e.consume(t),T):62===t&&4===r?(e.consume(t),L):63===t&&3===r?(e.consume(t),I):93===t&&5===r?(e.consume(t),A):eE(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(ts,D,j)(t)):null===t||eE(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),C)}function j(t){return e.check(tc,z,D)(t)}function z(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||eE(t)?j(t):(e.enter("htmlFlowData"),C(t))}function E(t){return 45===t?(e.consume(t),I):C(t)}function T(t){return 47===t?(e.consume(t),i="",P):C(t)}function P(t){if(62===t){let n=i.toLowerCase();return ta.includes(n)?(e.consume(t),L):C(t)}return ek(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),P):C(t)}function A(t){return 93===t?(e.consume(t),I):C(t)}function I(t){return 62===t?(e.consume(t),L):45===t&&2===r?(e.consume(t),I):C(t)}function L(t){return null===t||eE(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),L)}function D(n){return e.exit("htmlFlow"),t(n)}}},61:tk,95:tx,96:e9,126:e9},"flowInitial",0,{[-2]:e6,[-1]:e6,32:e6},"insideSpan",0,{null:[eG,eq]},"string",0,{38:e3,92:e5},"text",0,{[-5]:tg,[-4]:tg,[-3]:tg,33:th,38:e3,42:eG,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l};function l(t){return ek(t)?(e.consume(t),i):64===t?n(t):a(t)}function i(t){return 43===t||45===t||46===t||ew(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||ew(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||eC(r)?n(r):(e.consume(r),o)}function a(t){return 64===t?(e.consume(t),s):eS(t)?(e.consume(t),a):n(t)}function s(l){return ew(l)?function l(i){return 46===i?(e.consume(i),r=0,s):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(i){if((45===i||ew(i))&&r++<63){let n=45===i?t:l;return e.consume(i),n}return n(i)}(i)}(l):n(l)}}},{name:"htmlText",tokenize:function(e,t,n){let r,l,i,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),v):63===t?(e.consume(t),y):ek(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),l=0,f):ek(t)?(e.consume(t),x):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):eE(t)?(i=u,P(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?T(e):45===e?d(e):u(e)}function f(t){let r="CDATA[";return t===r.charCodeAt(l++)?(e.consume(t),l===r.length?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):eE(t)?(i=h,P(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):h(t)}function x(t){return null===t||62===t?T(t):eE(t)?(i=x,P(t)):(e.consume(t),x)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):eE(t)?(i=y,P(t)):(e.consume(t),y)}function b(e){return 62===e?T(e):y(e)}function v(t){return ek(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||ew(t)?(e.consume(t),k):function t(n){return eE(n)?(i=t,P(n)):eP(n)?(e.consume(n),t):T(n)}(t)}function w(t){return 45===t||ew(t)?(e.consume(t),w):47===t||62===t||eT(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),T):58===t||95===t||ek(t)?(e.consume(t),C):eE(t)?(i=S,P(t)):eP(t)?(e.consume(t),S):T(t)}function C(t){return 45===t||46===t||58===t||95===t||ew(t)?(e.consume(t),C):function t(n){return 61===n?(e.consume(n),j):eE(n)?(i=t,P(n)):eP(n)?(e.consume(n),t):S(n)}(t)}function j(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,z):eE(t)?(i=j,P(t)):eP(t)?(e.consume(t),j):(e.consume(t),N)}function z(t){return t===r?(e.consume(t),r=void 0,E):null===t?n(t):eE(t)?(i=z,P(t)):(e.consume(t),z)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eT(t)?S(t):(e.consume(t),N)}function E(e){return 47===e||62===e||eT(e)?S(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function P(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return eP(t)?eD(e,I,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),i(t)}}}],91:tm,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return eE(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},e5],93:tu,95:eG,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,l=3;if(("lineEnding"===e[3][1].type||"space"===e[l][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=l;++t<r;)if("codeTextData"===e[t][1].type){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(t=l-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,l,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),i++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(l=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(l.type="codeTextData",a(o))}(s)):eE(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),a(s))}function a(t){return null===t||32===t||96===t||eE(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),a)}}}}],37909);var tw=e.i(37909);let tS=/[\0\t\n\r]/g;function tC(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let tj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tz(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tC(n.slice(t?2:1),t?16:10)}return e4(n)||e}let tN={}.hasOwnProperty;function tE(e){return{line:e.line,column:e.column,offset:e.offset}}function tT(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+Q({start:t.start,end:t.end})+") is still open")}function tP(e){let t=this;t.parser=function(n){var r,l;let i,o,a,s;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(l=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(x),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(h),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(f),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:r(f,l),codeText:r(function(){return{type:"inlineCode",value:""}},l),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,l),htmlFlowData:c,htmlText:r(g,l),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:l,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:r(h),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tC(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=e4(n);let l=this.stack[this.stack.length-1];l.value+=t},characterReference:function(e){this.stack.pop().position.end=tE(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tl(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(tj,tz),n.identifier=tl(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tE(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(c.call(this,e),u.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tl(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let l=n[r];Array.isArray(l)?e(t,l):function(e,t){let n;for(n in t)if(tN.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,l)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:i,exit:a,buffer:l,resume:s,data:n},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,n){let r,l,i,o,a=t-1,s=-1,c=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||i||(i=a),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=a;for(l=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;l&&(e[l][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",l=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!l||i<l)&&(r._spread=!0),r.end=Object.assign({},l?e[l][1].start:t[1].end),e.splice(l||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let l={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=l,e.splice(a,0,["enter",l,t[2]]),a++,n++,i=void 0,o=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];tN.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||tT).call(o,void 0,e[0])}for(r.position={start:tE(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tE(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){i.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function i(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:tE(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),a.call(this,t)}}function a(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tT).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Q({start:e.start,end:e.end})+"): it’s not open");n.position.end=tE(e.end)}function s(){var e;return e=this.stack.pop(),eg(e,"boolean"!=typeof em.includeImageAlt||em.includeImageAlt,"boolean"!=typeof em.includeHtml||em.includeHtml)}function c(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tE(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tE(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function h(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(l)(function(e){for(;!eU(e););return e}((function(e){let t={constructs:function(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,l=(ev.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];if(i)for(r in i){ev.call(l,r)||(l[r]=[]);let e=i[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ey(e,0,0,r)}(l[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}([tw,...(e||{}).extensions||[]]),content:n(eO),defined:[],document:n(eM),flow:n(eV),lazy:{},string:n(eW),text:n(eJ)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},l={},i=[],o=[],a=[],s={attempt:h(function(e,t){m(e,t.from)}),check:h(f),consume:function(e){eE(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),a.push(n),n},exit:function(e){let t=a.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:h(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){l[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,l=[];for(;++r<e.length;){let i,o=e[r];if("string"==typeof o)i=o;else switch(o){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&n)continue;i=" ";break;default:i=String.fromCharCode(o)}n=-2===o,l.push(i)}return l.join("")}(d(e),t)},sliceStream:d,write:function(e){return(o=eb(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),u=u(t)}else u=u(n)}}(),null!==o[o.length-1])?[]:(m(t,0),c.events=eZ(i,c.events,c),c.events)}},u=t.tokenize.call(c,s);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){let n,r=t.start._index,l=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;if(r===i)n=[e[r].slice(l,o)];else{if(n=e.slice(r,i),l>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(l):n.shift()}o>0&&n.push(e[i].slice(0,o))}return n}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:n,column:l,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:l,offset:i}}function f(e,t){t.restore()}function h(e,t){return function(n,l,i){var o;let u,d,f,h;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(u=e,d=0,0===e.length)?i:x(e[d])}function x(e){return function(n){let l,i,o,u,d;return(l=p(),i=c.previous,o=c.currentConstruct,u=c.events.length,d=Array.from(a),h={from:u,restore:function(){r=l,c.previous=i,c.currentConstruct=o,c.events.length=u,a=d,g()}},f=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,y,b)(n)}}function y(t){return e(f,h),l}function b(e){return(h.restore(),++d<u.length)?x(u[d]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&ey(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}(t,e,n)}}})(l).document().write((o=1,a="",s=!0,function(e,t,n){let r,l,c,u,d,p=[];for(e=a+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,a="",s&&(65279===e.charCodeAt(0)&&c++,s=void 0);c<e.length;){if(tS.lastIndex=c,u=(r=tS.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(u),!r){a=e.slice(c);break}if(10===d&&c===u&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),c<u&&(p.push(e.slice(c,u)),o+=u-c),d){case 0:p.push(65533),o++;break;case 9:for(l=4*Math.ceil(o/4),p.push(-2);o++<l;)p.push(-1);break;case 10:p.push(-4),o=1;break;default:i=!0,o=1}c=u+1}return n&&(i&&p.push(-5),a&&p.push(a),p.push(null)),p})(n,r,!0))))}}let tA="object"==typeof self?self:globalThis,tI=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=l=>{if(t.has(l))return t.get(l);let[i,o]=e[l];switch(i){case 0:case -1:return n(o,l);case 1:{let e=n([],l);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},l);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),l);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),l)}case 5:{let e=n(new Map,l);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,l);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new tA[e](t),l)}case 8:return n(BigInt(o),l);case"BigInt":return n(Object(BigInt(o)),l);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new tA[i](o),l)})(0)},{toString:tL}={},{keys:tD}=Object,tO=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tL.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},tM=([e,t])=>0===e&&("function"===t||"symbol"===t),tR=(e,{json:t,lossy:n}={})=>{var r,l,i;let o,a,s=[];return(r=!(t||n),l=!!t,i=new Map,o=(e,t)=>{let n=s.push(e)-1;return i.set(t,n),n},a=e=>{if(i.has(e))return i.get(e);let[t,n]=tO(e);switch(t){case 0:{let l=e;switch(n){case"bigint":t=8,l=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);l=null;break;case"undefined":return o([-1],e)}return o([t,l],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),o([n,[...t]],e)}let r=[],l=o([t,r],e);for(let t of e)r.push(a(t));return l}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(l&&"toJSON"in e)return a(e.toJSON());let i=[],s=o([t,i],e);for(let t of tD(e))(r||!tM(tO(e[t])))&&i.push([a(t),a(e[t])]);return s}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],l=o([t,n],e);for(let[t,l]of e)(r||!(tM(tO(t))||tM(tO(l))))&&n.push([a(t),a(l)]);return l}case 6:{let n=[],l=o([t,n],e);for(let t of e)(r||!tM(tO(t)))&&n.push(a(t));return l}}let{message:s}=e;return o([t,{name:n,message:s}],e)})(e),s},tF="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?tI(tR(e,t)):structuredClone(e):(e,t)=>tI(tR(e,t));function t_(e){let t=[],n=-1,r=0,l=0;for(;++n<e.length;){let i=e.charCodeAt(n),o="";if(37===i&&ew(e.charCodeAt(n+1))&&ew(e.charCodeAt(n+2)))l=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){let t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(o=String.fromCharCode(i,t),l=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+l+1,o=""),l&&(n+=l,l=0)}return t.join("")+e.slice(r)}function tB(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function tU(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let tH=function(e){var t,n;if(null==e)return tV;if("function"==typeof e)return t$(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=tH(e[n]);return t$(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,t$(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,t$(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function t$(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function tV(){return!0}let tq=[];function tW(e,t,n,r){var l,i,o;let a,s,c,u,d,p;"function"==typeof t&&"function"!=typeof n?(s=void 0,c=t,a=n):(s=t,c=n,a=r),l=s,i=function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return c(e,r,n)},o=a,"function"==typeof l&&"function"!=typeof i?(o=i,i=l):u=l,d=tH(u),p=o?-1:1,(function e(t,n,r){let a=t&&"object"==typeof t?t:{};if("string"==typeof a.type){let e="string"==typeof a.tagName?a.tagName:"string"==typeof a.name?a.name:void 0;Object.defineProperty(s,"name",{value:"node ("+t.type+(e?"<"+e+">":"")+")"})}return s;function s(){var a;let s,c,u,f=tq;if((!l||d(t,n,r[r.length-1]||void 0))&&!1===(f=Array.isArray(a=i(t,r))?a:"number"==typeof a?[!0,a]:null==a?tq:[a])[0])return f;if("children"in t&&t.children&&t.children&&"skip"!==f[0])for(c=(o?t.children.length:-1)+p,u=r.concat(t);c>-1&&c<t.children.length;){if(!1===(s=e(t.children[c],c,u)())[0])return s;c="number"==typeof s[1]?s[1]:c+p}return f}})(e,void 0,[])()}function tJ(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let l=e.all(t),i=l[0];i&&"text"===i.type?i.value="["+i.value:l.unshift({type:"text",value:"["});let o=l[l.length-1];return o&&"text"===o.type?o.value+=r:l.push({type:"text",value:r}),l}function tK(e){let t=e.spread;return null==t?e.children.length>1:t}function tX(e,t,n){let r=0,l=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(l-1);for(;9===t||32===t;)l--,t=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}let tQ={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",l=String(t.identifier).toUpperCase(),i=t_(l.toLowerCase()),o=e.footnoteOrder.indexOf(l),a=e.footnoteCounts.get(l);void 0===a?(a=0,e.footnoteOrder.push(l),n=e.footnoteOrder.length):n=o+1,a+=1,e.footnoteCounts.set(l,a);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tJ(e,t);let l={src:t_(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(l.title=r.title);let i={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){let n={src:t_(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tJ(e,t);let l={href:t_(r.url||"")};null!==r.title&&void 0!==r.title&&(l.title=r.title);let i={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){let n={href:t_(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),l=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=tK(n[r])}return t}(n):tK(t),i={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(l||0!==a||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||l?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(l||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:i,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),l=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++l<r.length;){let e=r[l];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),l=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),l.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=K(t.children[1]),o=J(t.children[t.children.length-1]);i&&o&&(r.position={start:i,end:o}),l.push(r)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,l=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,o=i?i.length:t.children.length,a=-1,s=[];for(;++a<o;){let n=t.children[a],r={},o=i?i[a]:void 0;o&&(r.align=o);let c={type:"element",tagName:l,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),l=0,i=[];for(;r;)i.push(tX(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=n.exec(t);return i.push(tX(t.slice(l),l>0,!1)),i.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:tY,yaml:tY,definition:tY,footnoteDefinition:tY};function tY(){}let tZ={}.hasOwnProperty,tG={};function t0(e,t){e.position&&(t.position=function(e){let t=K(e),n=J(e);if(t&&n)return{start:t,end:n}}(e))}function t1(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,l=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&l&&Object.assign(n.properties,tF(l)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function t5(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function t2(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function t4(e,t){let n,r,l,o,a=(n=t||tG,r=new Map,l=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let l=o.one(n[r],e);if(l){if(r&&"break"===n[r-1].type&&(Array.isArray(l)||"text"!==l.type||(l.value=t2(l.value)),!Array.isArray(l)&&"element"===l.type)){let e=l.children[0];e&&"text"===e.type&&(e.value=t2(e.value))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t},applyData:t1,definitionById:r,footnoteById:l,footnoteCounts:new Map,footnoteOrder:[],handlers:{...tQ,...n.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(tZ.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=tF(n);return r.children=o.all(e),r}return tF(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(tZ.call(n,"hProperties")||tZ.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(o,e,t)},options:n,patch:t0,wrap:t5},tW(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:l,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o),s=a.one(e,void 0),c=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tB,r=e.options.footnoteBackLabel||tU,l=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],s=-1;for(;++s<e.footnoteOrder.length;){let l=e.footnoteById.get(e.footnoteOrder[s]);if(!l)continue;let i=e.all(l),o=String(l.identifier).toUpperCase(),c=t_(o.toLowerCase()),u=0,d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){let e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else i.push(...d);let h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(l,h),a.push(h)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...tF(o),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(a),u=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return c&&(i("children"in u),u.children.push({type:"text",value:"\n"},c)),u}function t3(e,t){return e&&"run"in e?async function(n,r){let l=t4(n,{file:r,...t});await e.run(l,r)}:function(n,r){return t4(n,{file:r,...e||t})}}function t7(e){if(e)throw e}var t9=e.i(84422);function t6(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let t8=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nr(e);let r=0,l=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1);return l<0?"":e.slice(r,l)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(l=i):(a=-1,l=o));return r===l?l=o:l<0&&(l=e.length),e.slice(r,l)},ne=function(e){let t;if(nr(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},nt=function(e){let t;nr(e);let n=e.length,r=-1,l=0,i=-1,o=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){l=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==o&&(o=1):i>-1&&(o=-1)}return i<0||r<0||0===o||1===o&&i===r-1&&i===l+1?"":e.slice(i,r)},nn=function(...e){var t;let n,r,l,i=-1;for(;++i<e.length;)nr(e[i]),e[i]&&(l=void 0===l?e[i]:l+"/"+e[i]);return void 0===l?".":(nr(t=l),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,l="",i=0,o=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(l.length<2||2!==i||46!==l.codePointAt(l.length-1)||46!==l.codePointAt(l.length-2)){if(l.length>2){if((r=l.lastIndexOf("/"))!==l.length-1){r<0?(l="",i=0):i=(l=l.slice(0,r)).length-1-l.lastIndexOf("/"),o=s,a=0;continue}}else if(l.length>0){l="",i=0,o=s,a=0;continue}}t&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+e.slice(o+1,s):l=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&a>-1?a++:a=-1}return l}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nr(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function nl(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let ni=["history","path","basename","stem","extname","dirname"];class no{constructor(e){let t,n;t=e?nl(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ni.length;){const e=ni[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)ni.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?t8(this.path):void 0}set basename(e){ns(e,"basename"),na(e,"basename"),this.path=nn(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ne(this.path):void 0}set dirname(e){nc(this.basename,"dirname"),this.path=nn(e||"",this.basename)}get extname(){return"string"==typeof this.path?nt(this.path):void 0}set extname(e){if(na(e,"extname"),nc(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=nn(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){nl(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!nl(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),ns(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?t8(this.path,this.extname):void 0}set stem(e){ns(e,"stem"),na(e,"stem"),this.path=nn(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function na(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function ns(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nc(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nu=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nd={}.hasOwnProperty;class np extends nu{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=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function l(i,...o){let a=e[++n],s=-1;if(i)return void r(i);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,a?(function(e,t){let n;return function(...t){let i,o=e.length>t.length;o&&t.push(r);try{i=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(i&&i.then&&"function"==typeof i.then?i.then(l,r):i instanceof Error?r(i):l(i))};function r(e,...l){n||(n=!0,t(e,...l))}function l(e){r(null,e)}})(a,l)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new np,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,t9.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(ng("data",this.frozen),this.namespace[e]=t,this):nd.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ng("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nb(e),n=this.parser||this.Parser;return nh("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),nh("process",this.parser||this.Parser),nm("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,l){let o=nb(e),a=n.parse(o);function s(e,n){e||!n?l(e):r?r(n):(i(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(a,o,function(e,t,r){var l,i;if(e||!t||!r)return s(e);let o=n.stringify(t,r);"string"==typeof(l=o)||(i=l)&&"object"==typeof i&&"byteLength"in i&&"byteOffset"in i?r.value=o:r.result=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),nh("processSync",this.parser||this.Parser),nm("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,t7(e),t=r}),ny("processSync","process",n),i(t,"we either bailed on an error or have a tree"),t}run(e,t,n){nx(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?l(void 0,n):new Promise(l);function l(l,o){i("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let a=nb(t);r.run(e,a,function(t,r,a){let s=r||e;t?o(t):l?l(s):(i(n,"`done` is defined if `resolve` is not"),n(void 0,s,a))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){t7(e),n=t,r=!0}),ny("runSync","run",r),i(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=nb(t),r=this.compiler||this.Compiler;return nm("stringify",r),nx(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(ng("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?i(e):l(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function l(e){if(!("plugins"in e)&&!("settings"in e))throw 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");i(e.plugins),e.settings&&(r.settings=(0,t9.default)(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;o(t,n)}else l(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,l=-1;for(;++r<n.length;)if(n[r][0]===e){l=r;break}if(-1===l)n.push([e,...t]);else if(t.length>0){let[r,...i]=t,o=n[l][1];t6(o)&&t6(r)&&(r=(0,t9.default)(!0,o,r)),n[l]=[e,r,...i]}}}}let nf=new np().freeze();function nh(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nm(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function ng(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nx(e){if(!t6(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function ny(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nb(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new no(e)}let nv=[],nk={allowDangerousHtml:!0},nw=/^(https?|ircs?|mailto|xmpp)$/i,nS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nC(e){var n;let r,l,i,a,s,c=(r=(n=e).rehypePlugins||nv,l=n.remarkPlugins||nv,i=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...nk}:nk,nf().use(tP).use(l).use(t3,i).use(r)),u=(a=e.children||"",s=new no,"string"==typeof a?s.value=a:o("Unexpected value `"+a+"` for `children` prop, expected `string`"),s);return function(e,n){let r=n.allowedElements,l=n.allowElement,i=n.components,a=n.disallowedElements,s=n.skipHtml,c=n.unwrapDisallowed,u=n.urlTransform||nj;for(let e of nS)Object.hasOwn(n,e.from)&&o("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return r&&a&&o("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),tW(e,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return s?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in eh)if(Object.hasOwn(eh,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eh[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let i=r?!r.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&l&&"number"==typeof t&&(i=!l(e,t,n)),i&&n&&"number"==typeof t)return c&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){var n,r,l,i;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let a=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=a,r=t.jsxDEV,o=function(e,t,l,i){let o=Array.isArray(l.children),a=K(e);return r(t,l,i,o,{columnNumber:a?a.column-1:void 0,fileName:n,lineNumber:a?a.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");l=t.jsx,i=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?i:l;return r?o(t,n,r):o(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?q:V,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=ea(s,e,void 0);return c&&"string"!=typeof c?c:s.create(e,s.Fragment,{children:c||void 0},void 0)}(e,{Fragment:t.Fragment,components:i,ignoreInvalidStyle:!0,jsx:t.jsx,jsxs:t.jsxs,passKeys:!0,passNode:!0})}(c.runSync(c.parse(u),u),e)}function nj(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return -1===t||-1!==l&&t>l||-1!==n&&t>n||-1!==r&&t>r||nw.test(e.slice(0,t))?e:""}let nz=/🔧 \*\*([^*]+)\*\*(?:\s*\(([^)]+)\))?/g;function nN({toolInfo:e}){return(0,t.jsxs)("div",{className:`tool-call ${e.isSendInput?"send-input":""}`,children:[(0,t.jsx)("span",{className:"tool-icon",children:"⚡"}),(0,t.jsx)("span",{className:"tool-name",children:e.toolName}),e.params&&(0,t.jsx)("span",{className:"tool-params",children:e.params})]})}function nE({content:e}){let{segments:r,hasToolCalls:l}=(0,n.useMemo)(()=>(function(e){let t,n=[],r=0,l=!1,i=RegExp(nz.source,"g");for(;null!==(t=i.exec(e));){l=!0,t.index>r&&n.push({type:"text",content:e.slice(r,t.index)});let i=t[1],o=t[2]||null,a="send_input"===i.toLowerCase();n.push({type:"tool",content:t[0],toolInfo:{toolName:i,params:o,isSendInput:a}}),r=t.index+t[0].length}return r<e.length&&n.push({type:"text",content:e.slice(r)}),{segments:n,hasToolCalls:l}})(e||""),[e]);return l?(0,t.jsx)(t.Fragment,{children:r.map((e,n)=>"tool"===e.type&&e.toolInfo?(0,t.jsx)(nN,{toolInfo:e.toolInfo},n):(0,t.jsx)(nC,{children:e.content},n))}):(0,t.jsx)(nC,{children:e||"..."})}function nT({messages:e,isLoading:r,isRunning:i,showControls:o,interactive:a,onSendMessage:s,onStopResponse:c,onClearMessages:u,onSendCliInput:d}){let[p,f]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[g,x]=(0,n.useState)("agent"),[y,b]=(0,n.useState)(!1),v=(0,n.useRef)(null);return(0,n.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,t.jsxs)("div",{className:"flex-1 flex flex-col bg-zinc-900 border border-zinc-800 rounded-md overflow-hidden min-w-0",children:[(0,t.jsxs)("div",{className:"px-3.5 py-2.5 bg-zinc-800/80 border-b border-zinc-800 flex justify-between items-center text-sm font-medium",children:[(0,t.jsx)("span",{children:"Chat with your app"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:u,className:"px-2 py-0.5 text-xs text-zinc-400 border border-zinc-700 rounded hover:bg-zinc-700 hover:text-white",children:"+ New"}),o&&(0,t.jsx)(l,{isRunning:i})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",style:{padding:"12px"},children:[e.map(e=>(0,t.jsxs)("div",{className:"message",style:{marginBottom:"12px"},children:[(0,t.jsx)("div",{className:"message-meta",children:e.isWatchTrigger&&"assistant"===e.role?`👁 watch triggered: ${e.watchPattern?.slice(0,30)||""}`:e.role}),(0,t.jsx)("div",{className:"bubble",style:{background:"user"===e.role?"#1e3a5f":"#1a1a24",marginLeft:"user"===e.role?"30px":void 0,marginRight:"assistant"===e.role?"30px":void 0,borderLeft:e.isWatchTrigger&&"assistant"===e.role?"3px solid #3b82f6":void 0},children:"assistant"===e.role?(0,t.jsx)(nE,{content:e.content}):e.content})]},e.id)),r&&e[e.length-1]?.role==="assistant"&&!e[e.length-1]?.content&&(0,t.jsxs)("div",{className:"thinking",children:[(0,t.jsx)("span",{}),(0,t.jsx)("span",{}),(0,t.jsx)("span",{})]}),(0,t.jsx)("div",{ref:v})]}),(0,t.jsxs)("div",{className:"p-3 border-t border-zinc-800",children:[a&&(0,t.jsxs)("div",{className:"flex gap-1 mb-2",children:[(0,t.jsx)("button",{onClick:()=>x("agent"),className:`px-2.5 py-1 text-xs rounded border ${"agent"===g?"bg-blue-900/50 border-blue-500 text-white":"bg-zinc-800 border-zinc-700 text-zinc-400 hover:bg-zinc-700"}`,children:"Ask Agent"}),(0,t.jsx)("button",{onClick:()=>x("cli"),className:`px-2.5 py-1 text-xs rounded border ${"cli"===g?"bg-blue-900/50 border-blue-500 text-white":"bg-zinc-800 border-zinc-700 text-zinc-400 hover:bg-zinc-700"}`,children:"Direct to CLI"})]}),"agent"===g?(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p.trim()&&!r&&(s(p.trim()),f(""))},className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:a?"Ask the agent about the CLI...":"Ask about your app...",className:"flex-1 px-3 py-2.5 bg-zinc-800 border border-zinc-700 rounded-md text-sm text-white placeholder:text-zinc-500 focus:outline-none focus:border-blue-500",disabled:r}),r?(0,t.jsx)("button",{type:"button",onClick:c,className:"px-3.5 py-2.5 bg-red-500 rounded-md text-white font-medium hover:bg-red-600",children:"■"}):(0,t.jsx)("button",{type:"submit",disabled:!p.trim(),className:"px-5 py-2.5 bg-blue-500 rounded-md text-white font-medium hover:bg-blue-600 disabled:opacity-50",children:"Send"})]}):(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),h.trim()&&d&&(d(h),m(""))},className:"flex gap-2",children:[(0,t.jsx)("input",{type:"text",value:h,onChange:e=>m(e.target.value),placeholder:"Type directly to the CLI...",className:"flex-1 px-3 py-2.5 bg-green-950 border border-green-800 rounded-md text-sm text-green-400 font-mono placeholder:text-green-700 focus:outline-none focus:border-green-500"}),(0,t.jsx)("button",{type:"submit",disabled:!h.trim(),className:"px-4 py-2.5 bg-green-700 rounded-md text-white font-medium hover:bg-green-600 disabled:opacity-50",children:"Send to CLI"})]}),a&&"cli"===g&&(0,t.jsx)("div",{className:"flex items-center mt-2 pt-2 border-t border-zinc-800",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs text-green-400",children:[(0,t.jsx)("span",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),"CLI waiting for input"]})}),o&&(0,t.jsx)("div",{className:"flex items-center mt-2 pt-2 border-t border-zinc-800",children:(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-zinc-500 cursor-pointer hover:text-white",children:[(0,t.jsx)("input",{type:"checkbox",checked:y,onChange:e=>b(e.target.checked),className:"w-4 h-4 accent-blue-500"}),(0,t.jsx)("span",{children:"Let agent continue after output"})]})})]})]})}let nP=["border-purple-500 text-purple-500 bg-purple-500/10","border-pink-500 text-pink-500 bg-pink-500/10","border-orange-500 text-orange-500 bg-orange-500/10","border-sky-500 text-sky-500 bg-sky-500/10","border-emerald-500 text-emerald-500 bg-emerald-500/10","border-yellow-500 text-yellow-500 bg-yellow-500/10","border-violet-500 text-violet-500 bg-violet-500/10","border-cyan-500 text-cyan-500 bg-cyan-500/10","border-rose-500 text-rose-500 bg-rose-500/10","border-lime-500 text-lime-500 bg-lime-500/10"],nA={"border-purple-500 text-purple-500 bg-purple-500/10":"text-purple-500","border-pink-500 text-pink-500 bg-pink-500/10":"text-pink-500","border-orange-500 text-orange-500 bg-orange-500/10":"text-orange-500","border-sky-500 text-sky-500 bg-sky-500/10":"text-sky-500","border-emerald-500 text-emerald-500 bg-emerald-500/10":"text-emerald-500","border-yellow-500 text-yellow-500 bg-yellow-500/10":"text-yellow-500","border-violet-500 text-violet-500 bg-violet-500/10":"text-violet-500","border-cyan-500 text-cyan-500 bg-cyan-500/10":"text-cyan-500","border-rose-500 text-rose-500 bg-rose-500/10":"text-rose-500","border-lime-500 text-lime-500 bg-lime-500/10":"text-lime-500"},nI={stdout:"text-green-500",info:"text-green-500",stderr:"text-red-500",error:"text-red-500",system:"text-blue-500",debug:"text-blue-500",warn:"text-yellow-500","breakpoint-prompt":"text-pink-400"},nL={stdout:"Standard output from your application",info:"Standard output from your application",stderr:"Standard error output from your application",error:"Standard error output from your application",system:"Reflexive system messages (start, stop, errors)",debug:"Reflexive system messages (start, stop, errors)",warn:"Warning messages from your application",inject:"Instrumentation logs from injected code","breakpoint-prompt":"Interactive breakpoint prompt"},nD=[{key:"stdout",label:"stdout",color:"border-green-500 text-green-500 bg-green-500/10",description:"Standard output from your application"},{key:"stderr",label:"stderr",color:"border-red-500 text-red-500 bg-red-500/10",description:"Standard error output from your application"},{key:"system",label:"system",color:"border-blue-500 text-blue-500 bg-blue-500/10",description:"Reflexive system messages (start, stop, errors)"},{key:"inject",label:"inject",color:"border-purple-500 text-purple-500 bg-purple-500/10",description:"Instrumentation logs from injected code"}];function nO({logs:e,status:r,showControls:l,debugPanelsHeight:i,watches:o,onAddWatch:a,onEditWatch:s,onClearLogs:c,onResize:u}){let d=(0,n.useCallback)(e=>{if(!o)return null;let t=e.toLowerCase();for(let e of o)if(t.includes(e.pattern.toLowerCase()))return e;return null},[o]),[p,f]=(0,n.useState)(""),[h,m]=(0,n.useState)(new Set(["stdout","stderr","system","inject","info","error","debug","warn"])),[g,x]=(0,n.useState)(!1),[y,b]=(0,n.useState)(!1),[v,k]=(0,n.useState)(0),[w,S]=(0,n.useState)(new Map),C=(0,n.useRef)(null),j=(0,n.useRef)(null),z=(0,n.useMemo)(()=>e.filter(e=>{if(v>0&&e.timestamp&&new Date(e.timestamp).getTime()<v)return!1;let t=h.has(e.type)||h.has("stdout")&&"info"===e.type||h.has("stderr")&&"error"===e.type,n=!p||e.message.toLowerCase().includes(p.toLowerCase());return t&&n}),[e,h,p,v]);(0,n.useEffect)(()=>{let t=new Map,n=0;for(let r of e)if(r.type.startsWith("inject:")){let e=r.type;!t.has(e)&&(t.set(e,nP[n%nP.length]),n++)}t.size===w.size&&[...t.keys()].every(e=>w.has(e))||(S(t),m(e=>{let n=new Set(e);for(let e of t.keys())n.add(e);return n}))},[e]),(0,n.useEffect)(()=>{g||C.current?.scrollIntoView({behavior:"smooth"})},[z,g]);let N=e=>{m(t=>{let n=new Set(t);return n.has(e)?(n.delete(e),"stdout"===e&&n.delete("info"),"stderr"===e&&n.delete("error")):(n.add(e),"stdout"===e&&n.add("info"),"stderr"===e&&n.add("error")),n})};return(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3.5 py-2.5 bg-zinc-800/80 cursor-pointer select-none border-b border-zinc-800 hover:bg-zinc-800",onClick:()=>b(!y),children:[(0,t.jsx)("span",{className:`text-xs transition-transform ${y?"-rotate-90":""}`,children:"▼"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:l?"Process Output":"Application Logs"}),(0,t.jsx)("div",{className:"ml-auto flex gap-1.5",children:!y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),k(Date.now()),c?.()},className:"px-2 py-0.5 text-xs text-zinc-400 border border-zinc-700 rounded hover:bg-zinc-700 hover:text-white",title:"Clear logs",children:"⌫"}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),x(!g)},className:`px-2 py-0.5 text-xs border rounded ${g?"text-amber-400 border-amber-500 bg-amber-500/10":"text-zinc-400 border-zinc-700 hover:bg-zinc-700 hover:text-white"}`,title:g?"Resume auto-scroll":"Pause auto-scroll",children:g?"▶":"⏸"})]})})]}),!y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-zinc-950 border-b border-zinc-800",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:"Filter logs...",className:"w-36 px-2 py-1 text-xs bg-zinc-900 border border-zinc-700 rounded text-zinc-300 placeholder:text-zinc-600 focus:outline-none focus:border-blue-500",style:{fontFamily:"'SF Mono', Monaco, monospace"}}),(0,t.jsxs)("div",{className:"flex gap-1.5 flex-wrap",children:[nD.map(({key:e,label:n,color:r,description:l})=>(0,t.jsx)("button",{onClick:()=>N(e),title:l,className:`px-2 py-0.5 text-[10px] font-mono rounded-full border transition-opacity ${r} ${h.has(e)?"opacity-100":"opacity-30 bg-transparent"}`,children:n},e)),[...w.entries()].map(([e,n])=>(0,t.jsx)("button",{onClick:()=>N(e),title:`Injected logs: ${e.replace("inject:","")}`,className:`px-2 py-0.5 text-[10px] font-mono rounded-full border transition-opacity ${n} ${h.has(e)?"opacity-100":"opacity-30 bg-transparent"}`,children:e.replace("inject:","")},e))]})]}),(0,t.jsxs)("div",{ref:j,onScroll:()=>{let e=j.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<20;t&&g?x(!1):t||g||x(!0)},className:"flex-1 overflow-y-auto p-2 text-[11px]",style:{fontFamily:"'SF Mono', Monaco, monospace"},children:[z.map((e,n)=>{var r;let l,i;return(0,t.jsxs)("div",{className:`flex gap-2 py-0.5 px-1.5 border-b border-zinc-900 hover:bg-zinc-800/50 group ${"breakpoint-prompt"===e.type?"bg-pink-950/20":""}`,children:[(0,t.jsx)("span",{className:`w-20 flex-shrink-0 text-right pr-2 text-[10px] ${(r=e.type).startsWith("inject:")&&w.has(r)?nA[w.get(r)]||"text-purple-500":nI[r]||"text-zinc-500"}`,title:nL[e.type]||(e.type.startsWith("inject:")?`Injected logs: ${e.type.replace("inject:","")}`:e.type),children:e.type}),(0,t.jsx)("span",{className:"text-zinc-400 whitespace-pre-wrap break-all flex-1",dangerouslySetInnerHTML:{__html:function(e){let t={30:"#000",31:"#ef4444",32:"#22c55e",33:"#eab308",34:"#3b82f6",35:"#a855f7",36:"#06b6d4",37:"#e5e5e5",90:"#737373",91:"#fca5a5",92:"#86efac",93:"#fde047",94:"#93c5fd",95:"#d8b4fe",96:"#67e8f9",97:"#fff"},n="",r=0,l=0;for(;l<e.length;){if("\x1b"===e[l]&&"["===e[l+1]){let i=l+2;for(;i<e.length&&/[0-9;]/.test(e[i]);)i++;if("m"===e[i]){let o=e.slice(l+2,i);if(o&&"0"!==o&&"22"!==o&&"39"!==o){let e=o.split(";"),l="";for(let n of e)"1"===n?l+="font-weight:bold;":"3"===n?l+="font-style:italic;":"4"===n?l+="text-decoration:underline;":t[n]&&(l+="color:"+t[n]+";");l&&(n+='<span style="'+l+'">',r++)}else r>0&&(n+="</span>",r--);l=i+1;continue}}let i=e[l];"<"===i?n+="<":">"===i?n+=">":"&"===i?n+="&":n+=i,l++}for(;r>0;)n+="</span>",r--;return n.replace(/(https?:\/\/[^\s<>"']+)/g,'<a href="$1" target="_blank" rel="noopener" class="text-blue-400 underline hover:text-blue-300">$1</a>')}(e.message)}}),(a||s)&&(i=!!(l=d(e.message)),(0,t.jsx)("button",{onClick:()=>{l&&s?s(l):a&&a(e.message)},className:`px-1 ${i?"text-blue-400 opacity-100":"opacity-0 group-hover:opacity-100 text-zinc-600 hover:text-blue-400"}`,title:i?`Edit watch: ${l.pattern.slice(0,30)}`:"Add watch",children:"👁"}))]},n)}),(0,t.jsx)("div",{ref:C})]}),(0,t.jsxs)("div",{className:"flex gap-4 px-3 py-2.5 bg-zinc-950 border-t border-zinc-800 text-xs",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("span",{className:"text-zinc-500",children:"PID:"}),(0,t.jsx)("span",{className:"text-white",children:r?.pid||"--"})]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("span",{className:"text-zinc-500",children:"Uptime:"}),(0,t.jsxs)("span",{className:"text-white",children:[r?.uptime||0,"s"]})]}),l&&(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("span",{className:"text-zinc-500",children:"Restarts:"}),(0,t.jsx)("span",{className:"text-white",children:r?.restartCount||0})]})]})]}),u&&(0,t.jsxs)("div",{className:"h-3 flex-shrink-0 relative group",style:{cursor:"row-resize"},onMouseDown:e=>{let t=e.clientY,n=i||180,r=e=>{u(n+(t-e.clientY))},l=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",l)},children:[(0,t.jsxs)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-row gap-1",children:[(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-zinc-600 group-hover:bg-zinc-400 transition-colors"}),(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-zinc-600 group-hover:bg-zinc-400 transition-colors"}),(0,t.jsx)("div",{className:"w-1 h-1 rounded-full bg-zinc-600 group-hover:bg-zinc-400 transition-colors"})]}),(0,t.jsx)("div",{className:"absolute inset-0 bg-zinc-700 opacity-0 group-hover:opacity-30 transition-opacity"})]})]})}function nM({capabilities:e,watches:r,breakpoints:l,debuggerStatus:i,showDebug:o,height:a,interactive:s,eval:c,debug:u,onEditWatch:d,onDeleteWatch:p,onToggleWatch:f,onEditBreakpointPrompt:h,onDeleteBreakpoint:m,onToggleBreakpoint:g,onDebuggerResume:x,onDebuggerStepOver:y,onDebuggerStepInto:b,onDebuggerStepOut:v,onTogglePermission:k,onReloadSettings:w}){let[S,C]=(0,n.useState)(!1),[j,z]=(0,n.useState)(!1),[N,E]=(0,n.useState)(!1),[T,P]=(0,n.useState)(!1),[A,I]=(0,n.useState)(!1),L=i?.connected&&i?.paused,D=async(e,t)=>{if(w&&!A){I(!0);try{await w({[e]:t})}finally{I(!1)}}};return(0,t.jsxs)("div",{className:"flex flex-col border-t border-zinc-800 overflow-y-auto",style:a?{height:a,flexShrink:0}:void 0,children:[(0,t.jsx)(nR,{title:"Modes",badge:A?(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-amber-900 rounded animate-pulse",children:"reloading..."}):void 0,collapsed:S,onToggle:()=>C(!S),children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-1 p-2",children:[(0,t.jsx)(nB,{label:"Interactive",enabled:s??!1,description:"Proxy stdin/stdout",disabled:A,onToggle:e=>D("interactive",e)}),(0,t.jsx)(nB,{label:"Debug",enabled:u??!1,description:"V8 Inspector breakpoints",disabled:A,onToggle:e=>D("debug",e)}),(0,t.jsx)(nB,{label:"Eval",enabled:c??!1,description:"Runtime eval + injection",disabled:A,onToggle:e=>D("eval",e)})]})}),(0,t.jsx)(nR,{title:"Permissions",collapsed:j,onToggle:()=>z(!j),children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-1 p-2",children:[(0,t.jsx)(nF,{label:"Read Files",enabled:e.readFiles,permissionKey:"readFiles",onToggle:k}),(0,t.jsx)(nF,{label:"Write Files",enabled:e.writeFiles,permissionKey:"writeFiles",onToggle:k}),(0,t.jsx)(nF,{label:"Shell Access",enabled:e.shellAccess,permissionKey:"shellAccess",onToggle:k}),(0,t.jsx)(nF,{label:"Restart",enabled:e.restart,permissionKey:"restart",onToggle:k})]})}),(0,t.jsx)(nR,{title:"Watch",count:r.filter(e=>e.enabled).length,collapsed:N,onToggle:()=>E(!N),children:0===r.length?(0,t.jsx)("div",{className:"p-3 text-center text-xs text-zinc-600",children:"No watches. Click 👁 on a log entry to add one."}):(0,t.jsx)("div",{className:"max-h-28 overflow-y-auto",children:r.map(e=>(0,t.jsxs)("div",{className:`group flex items-center gap-2 px-3 py-1.5 text-xs border-b border-zinc-900 hover:bg-zinc-800/50 ${e.enabled?"":"opacity-40"}`,children:[(0,t.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:t=>f(e.id,t.target.checked),className:"w-3 h-3 accent-blue-500"}),(0,t.jsxs)("span",{className:`flex-1 truncate text-[11px] ${!e.enabled?"line-through":""}`,style:{fontFamily:"'SF Mono', Monaco, monospace"},title:e.pattern,children:[e.pattern.slice(0,40),e.pattern.length>40?"...":""]}),e.hitCount>0&&(0,t.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium bg-zinc-800 text-amber-400 rounded-full",children:e.hitCount}),(0,t.jsxs)("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)("button",{onClick:()=>d(e),className:"text-zinc-500 hover:text-white px-1 py-0.5 rounded hover:bg-zinc-700",title:"Edit",children:"✎"}),(0,t.jsx)("button",{onClick:()=>p(e.id),className:"text-zinc-500 hover:text-red-500 px-1 py-0.5 rounded hover:bg-red-500/10",title:"Delete",children:"✕"})]})]},e.id))})}),o&&(0,t.jsx)(nR,{title:"V8 Debugger",badge:(0,t.jsx)(n_,{enabled:i?.enabled??!1,connected:i?.connected??!1,paused:i?.paused??!1}),controls:(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("button",{onClick:y,disabled:!L,className:"px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:bg-zinc-700 hover:text-white disabled:opacity-40 disabled:cursor-not-allowed",children:"Step"}),(0,t.jsx)("button",{onClick:b,disabled:!L,className:"px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:bg-zinc-700 hover:text-white disabled:opacity-40 disabled:cursor-not-allowed",children:"Into"}),(0,t.jsx)("button",{onClick:v,disabled:!L,className:"px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded text-zinc-400 hover:bg-zinc-700 hover:text-white disabled:opacity-40 disabled:cursor-not-allowed",children:"Out"}),(0,t.jsx)("button",{onClick:x,disabled:!L,className:`px-2 py-0.5 text-[10px] rounded ${L?"bg-red-900/50 border border-red-700 text-red-400 animate-pulse":"bg-green-900/30 border border-green-800 text-green-500"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"▶"})]}),collapsed:T,onToggle:()=>P(!T),children:i?.connected?0===l.length?(0,t.jsx)("div",{className:"p-3 text-center text-xs text-zinc-600",children:"Connected. Set breakpoints via chat."}):(0,t.jsxs)("div",{className:"max-h-28 overflow-y-auto",children:[l.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs border-b border-zinc-900 hover:bg-zinc-800/50 group",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:t=>g(e.id,t.target.checked),className:"w-3 h-3 accent-blue-500"}),(0,t.jsxs)("span",{className:"flex-1 font-mono text-[11px]",children:[e.file.split("/").pop(),":",e.line]}),e.hitCount>0&&(0,t.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium bg-zinc-800 text-amber-400 rounded-full",children:e.hitCount}),(0,t.jsx)("button",{onClick:()=>h(e),className:`text-xs ${e.prompt?"text-blue-400":"opacity-50 group-hover:opacity-100 text-zinc-500"}`,title:e.prompt?"Edit prompt":"Add prompt",children:"💬"}),e.prompt&&(0,t.jsx)("input",{type:"checkbox",checked:e.promptEnabled,onChange:t=>g(e.id,e.enabled),className:"w-3 h-3 accent-blue-500",title:"Enable prompt on hit"}),(0,t.jsx)("button",{onClick:()=>m(e.id),className:"opacity-50 group-hover:opacity-100 text-zinc-500 hover:text-red-500",children:"×"})]},e.id)),i?.paused&&i.callStack&&i.callStack.length>0&&(0,t.jsxs)("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:[(0,t.jsx)("div",{className:"px-3 py-1 text-[10px] text-zinc-500",children:"Call Stack:"}),i.callStack.slice(0,5).map((e,n)=>(0,t.jsxs)("div",{className:"flex gap-1 px-3 py-0.5 text-[10px] font-mono",children:[(0,t.jsxs)("span",{className:"text-zinc-600",children:["#",n]}),(0,t.jsxs)("span",{className:"text-zinc-400",children:[e.functionName||"(anonymous)"," at ",e.url.split("/").pop(),":",e.lineNumber]})]},n))]})]}):(0,t.jsx)("div",{className:"p-3 text-center text-xs text-zinc-600",children:"Waiting for debugger connection..."})})]})}function nR({title:e,count:n,badge:r,controls:l,collapsed:i,onToggle:o,children:a}){return(0,t.jsxs)("div",{className:"border-b border-zinc-900",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-zinc-950 cursor-pointer select-none hover:text-white text-zinc-400",onClick:o,children:[(0,t.jsx)("span",{className:`text-[10px] transition-transform ${i?"-rotate-90":""}`,children:"▼"}),(0,t.jsx)("span",{className:"text-xs",children:e}),void 0!==n&&(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-zinc-800 rounded-full",children:n}),r,l&&(0,t.jsx)("div",{className:"ml-auto",onClick:e=>e.stopPropagation(),children:l})]}),!i&&(0,t.jsx)("div",{className:"bg-zinc-900",children:a})]})}function nF({label:e,enabled:n,permissionKey:r,onToggle:l}){return(0,t.jsxs)("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded text-[10px] bg-zinc-900 ${n?"text-green-400":"text-zinc-600 opacity-70"} ${l?"cursor-pointer hover:bg-zinc-800":""}`,onClick:()=>{l&&l(r)},children:[(0,t.jsx)("span",{className:n?"text-green-400":"text-red-500",children:n?"✓":"✗"}),(0,t.jsx)("span",{children:e})]})}function n_({enabled:e,connected:n,paused:r}){return e?n?r?(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-red-600 rounded animate-pulse",children:"PAUSED"}):(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-green-900 rounded",children:"running"}):(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-amber-900 rounded",children:"waiting"}):(0,t.jsx)("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] bg-zinc-700 rounded",children:"disabled"})}function nB({label:e,enabled:n,description:r,disabled:l,onToggle:i}){return(0,t.jsxs)("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded text-[10px] bg-zinc-900 ${n?"text-blue-400":"text-zinc-600"} ${l?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-zinc-800"}`,onClick:()=>!l&&i(!n),title:r,children:[(0,t.jsx)("input",{type:"checkbox",checked:n,disabled:l,onChange:e=>{e.stopPropagation(),l||i(e.target.checked)},className:"w-3 h-3 accent-blue-500"}),(0,t.jsx)("span",{children:e})]})}function nU({isOpen:e,watch:r,initialMessage:l,onClose:i,onSave:o}){let[a,s]=(0,n.useState)(""),[c,u]=(0,n.useState)("");return((0,n.useEffect)(()=>{r?(s(r.pattern),u(r.prompt)):(l?s(l.slice(0,100)):s(""),u(""))},[r,l,e]),e)?(0,t.jsx)("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50",onClick:i,children:(0,t.jsxs)("div",{className:"bg-zinc-900 border border-zinc-700 rounded-lg w-full max-w-lg overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-4 py-3 border-b border-zinc-700",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold",children:r?"Edit Watch Trigger":"Add Watch Trigger"}),(0,t.jsx)("button",{onClick:i,className:"text-zinc-500 hover:text-white text-xl",children:"×"})]}),(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Pattern (substring match)"}),(0,t.jsx)("input",{type:"text",value:a,onChange:e=>s(e.target.value),placeholder:"e.g., error, connected, user login",className:"w-full px-3 py-2 bg-zinc-950 border border-zinc-700 rounded text-sm text-white placeholder:text-zinc-600 focus:outline-none focus:border-blue-500"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Matched message preview"}),(0,t.jsxs)("div",{className:"px-3 py-2 bg-zinc-800 border border-zinc-700 rounded text-xs font-mono text-zinc-500 break-all",children:[l?.slice(0,200)||a||"-",(l?.length||0)>200?"...":""]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Prompt to send to agent when triggered"}),(0,t.jsx)("textarea",{value:c,onChange:e=>u(e.target.value),placeholder:"e.g., Investigate this error and suggest a fix",rows:4,className:"w-full px-3 py-2 bg-zinc-950 border border-zinc-700 rounded text-sm font-mono text-white placeholder:text-zinc-600 focus:outline-none focus:border-blue-500 resize-y"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-4 py-3 border-t border-zinc-700",children:[(0,t.jsx)("button",{onClick:i,className:"px-4 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded text-white hover:bg-zinc-700",children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>{a.trim()&&(o(a.trim(),c.trim()),i())},disabled:!a.trim(),className:"px-4 py-2 text-sm bg-green-700 border border-green-600 rounded text-white hover:bg-green-600 disabled:opacity-50",children:"Save Watch"})]})]})}):null}function nH({isOpen:e,breakpoint:r,onClose:l,onSave:i}){let[o,a]=(0,n.useState)("");if((0,n.useEffect)(()=>{r?a(r.prompt||""):a("")},[r,e]),!e||!r)return null;let s=r.file.split("/").pop()||r.file;return(0,t.jsx)("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50",onClick:l,children:(0,t.jsxs)("div",{className:"bg-zinc-900 border border-zinc-700 rounded-lg w-full max-w-lg overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center px-4 py-3 border-b border-zinc-700",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold",children:"Breakpoint Prompt"}),(0,t.jsx)("button",{onClick:l,className:"text-zinc-500 hover:text-white text-xl",children:"×"})]}),(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Breakpoint Location"}),(0,t.jsxs)("div",{className:"px-3 py-2 bg-zinc-800 border border-zinc-700 rounded text-xs font-mono text-zinc-400",children:[s,":",r.line]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-zinc-500 mb-1.5",children:"Prompt to send to agent when breakpoint hits"}),(0,t.jsx)("textarea",{value:o,onChange:e=>a(e.target.value),placeholder:"e.g., Analyze the current call stack and local variables, explain what's happening",rows:4,className:"w-full px-3 py-2 bg-zinc-950 border border-zinc-700 rounded text-sm font-mono text-white placeholder:text-zinc-600 focus:outline-none focus:border-blue-500 resize-y",autoFocus:!0})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-4 py-3 border-t border-zinc-700",children:[(0,t.jsx)("button",{onClick:l,className:"px-4 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded text-white hover:bg-zinc-700",children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>{i(o.trim()),l()},className:"px-4 py-2 text-sm bg-green-700 border border-green-600 rounded text-white hover:bg-green-600",children:"Save"})]})]})})}function n$({isShutdown:e}){return e?(0,t.jsxs)("div",{className:"fixed inset-0 bg-zinc-950 flex flex-col items-center justify-center text-center p-5 z-50",children:[(0,t.jsx)("div",{className:"text-6xl mb-5",children:"👋"}),(0,t.jsx)("h1",{className:"text-3xl font-bold text-white mb-2",children:"Thank you for using Reflexive"}),(0,t.jsx)("p",{className:"text-zinc-500 mb-8",children:"We hope you enjoyed building apps by talking to them."}),(0,t.jsxs)("div",{className:"flex gap-5 flex-wrap justify-center",children:[(0,t.jsxs)("a",{href:"https://github.com/genecyber/Reflexive",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-6 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 16 16",fill:"currentColor",children:(0,t.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"Star on GitHub"]}),(0,t.jsxs)("a",{href:"https://x.com/reflexiveai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-6 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)("svg",{height:"18",width:"18",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),"Follow on X"]}),(0,t.jsxs)("a",{href:"https://discord.gg/reflexive",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-6 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white hover:bg-zinc-700 transition-colors",children:[(0,t.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),"Join Discord"]})]}),(0,t.jsx)("p",{className:"mt-10 text-zinc-600 text-sm",children:"Server has been shut down. You can close this tab."})]}):null}let nV=e.i(22534).default.env.NEXT_PUBLIC_API_BASE||"",nq={readFiles:!0,writeFiles:!1,shellAccess:!1,restart:!0,networkAccess:!0,inject:!1,eval:!1,debug:!1};function nW({label:e,count:n,onClick:r}){return(0,t.jsxs)("div",{onClick:r,className:"py-3 px-2 text-xs text-zinc-500 cursor-pointer border-b border-zinc-800 hover:text-white hover:bg-zinc-800 flex items-center gap-1",style:{writingMode:"vertical-rl"},children:[(0,t.jsx)("span",{className:"text-[10px]",children:"▶"}),(0,t.jsx)("span",{children:e}),void 0!==n&&n>0&&(0,t.jsx)("span",{className:"bg-zinc-700 px-1 rounded text-[9px]",children:n})]})}function nJ(){let{status:e,logs:l,debuggerStatus:i,breakpoints:o,startProcess:a,stopProcess:s,restartProcess:c,shutdown:u,debuggerResume:d,debuggerStepOver:p,debuggerStepInto:f,debuggerStepOut:h,updateBreakpoint:m,deleteBreakpoint:g,sendCliInput:x,togglePermission:y,reloadSettings:b}=function(){let[e,t]=(0,n.useState)(null),[r,l]=(0,n.useState)([]),[i,o]=(0,n.useState)(null),[a,s]=(0,n.useState)([]),[c,u]=(0,n.useState)(!1),d=(0,n.useCallback)(async()=>{try{let e=await fetch(`${nV}/state`);if(e.ok){let n=await e.json();t(n),u(!0)}}catch{u(!1)}},[]),p=(0,n.useCallback)(async(e=100)=>{try{let t=await fetch(`${nV}/logs?count=${e}`);if(t.ok){let e=await t.json();l(e)}}catch{}},[]),f=(0,n.useCallback)(async()=>{try{let e=await fetch(`${nV}/debugger-status`);if(e.ok){let t=await e.json();o(t)}}catch{}},[]),h=(0,n.useCallback)(async()=>{try{let e=await fetch(`${nV}/debugger-breakpoints`);if(e.ok){let t=await e.json();s(t.breakpoints||[])}}catch{}},[]),m=(0,n.useCallback)(async()=>{await fetch(`${nV}/start`,{method:"POST"}),await d()},[d]),g=(0,n.useCallback)(async()=>{await fetch(`${nV}/stop`,{method:"POST"}),await d()},[d]),x=(0,n.useCallback)(async()=>{await fetch(`${nV}/restart`,{method:"POST"}),await d()},[d]),y=(0,n.useCallback)(async()=>{await fetch(`${nV}/shutdown`,{method:"POST"})},[]),b=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-resume`,{method:"POST"})},[]),v=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-step-over`,{method:"POST"})},[]),k=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-step-into`,{method:"POST"})},[]),w=(0,n.useCallback)(async()=>{await fetch(`${nV}/debugger-step-out`,{method:"POST"})},[]),S=(0,n.useCallback)(async(e,t,n)=>{await fetch(`${nV}/debugger-breakpoints`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,line:t,...n})}),await h()},[h]),C=(0,n.useCallback)(async(e,t)=>{await fetch(`${nV}/debugger-breakpoint/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),await h()},[h]),j=(0,n.useCallback)(async e=>{await fetch(`${nV}/debugger-breakpoint/${encodeURIComponent(e)}`,{method:"DELETE"}),await h()},[h]),z=(0,n.useCallback)(async e=>{await fetch(`${nV}/cli-input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})})},[]),N=(0,n.useCallback)(async(e,t)=>{await fetch(`${nV}/log`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e,message:t})})},[]),E=(0,n.useCallback)(async e=>{await fetch(`${nV}/permissions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({permission:e,toggle:!0})}),await d()},[d]),T=(0,n.useCallback)(async e=>{let t=await fetch(`${nV}/reload`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();return n.success&&await d(),n},[d]);return(0,n.useEffect)(()=>{d(),p();let e=setInterval(()=>{d(),p()},2e3);return()=>clearInterval(e)},[d,p]),(0,n.useEffect)(()=>{f(),h();let e=setInterval(()=>{f(),h()},1e3);return()=>clearInterval(e)},[f,h]),{status:e,logs:r,debuggerStatus:i,breakpoints:a,isConnected:c,fetchStatus:d,fetchLogs:p,fetchDebuggerStatus:f,fetchBreakpoints:h,startProcess:m,stopProcess:g,restartProcess:x,shutdown:y,debuggerResume:b,debuggerStepOver:v,debuggerStepInto:k,debuggerStepOut:w,addBreakpoint:S,updateBreakpoint:C,deleteBreakpoint:j,sendCliInput:z,logMessage:N,togglePermission:E,reloadSettings:T}}(),{messages:v,isLoading:k,sendMessage:w,stopResponse:S,clearMessages:C}=function(){let[e,t]=(0,n.useState)([]),[r,l]=(0,n.useState)(!1),i=(0,n.useRef)(null),o=(0,n.useCallback)(async(e,n)=>{let r={id:Date.now().toString(),role:"user",content:e,isWatchTrigger:n?.isWatchTrigger,watchPattern:n?.watchPattern};t(e=>[...e,r]),l(!0);let o={id:(Date.now()+1).toString(),role:"assistant",content:"",isWatchTrigger:n?.isWatchTrigger,watchPattern:n?.watchPattern};t(e=>[...e,o]);try{i.current=new AbortController;let n=await fetch(`${nV}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e}),signal:i.current.signal}),r=n.body?.getReader(),l=new TextDecoder,o="";if(r)for(;;){let{done:e,value:n}=await r.read();if(e)break;for(let e of l.decode(n,{stream:!0}).split("\n"))if(e.startsWith("data: "))try{let n=JSON.parse(e.slice(6));if("text"===n.type)o+=n.content,t(e=>{let t=[...e],n=t.length-1;return t[n]?.role==="assistant"&&(t[n]={...t[n],content:o}),t});else if("tool"===n.type){let e=n.name.replace(/^mcp__[^_]+__/,""),r=(e,t=50)=>{let n=("string"==typeof e?e:JSON.stringify(e)).replace(/\n/g," ").replace(/\s+/g," ").replace(/[()]/g,"");return n.length>t?n.slice(0,t)+"...":n},l=Object.entries(n.input||{}).map(([e,t])=>`${e}: ${r(t)}`).join(", ");o+=`
|
|
2
2
|
|
|
3
|
-
🔧 **${e}**${
|
|
3
|
+
🔧 **${e}**${l?` (${l})`:""}
|
|
4
4
|
|
|
5
5
|
`,t(e=>{let t=[...e],n=t.length-1;return t[n]?.role==="assistant"&&(t[n]={...t[n],content:o}),t})}}catch{}}}catch(e){"AbortError"!==e.name&&t(t=>{let n=[...t],r=n.length-1;return n[r]?.role==="assistant"&&(n[r]={...n[r],content:`Error: ${e.message}`}),n})}finally{l(!1),i.current=null}},[]);return{messages:e,isLoading:r,sendMessage:o,stopResponse:(0,n.useCallback)(()=>{i.current?.abort(),l(!1)},[]),clearMessages:(0,n.useCallback)(()=>{t([])},[])}}(),j="reflexive-watches",[z,N]=(0,n.useState)([]),[E,T]=(0,n.useState)(0),P=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(!P.current){P.current=!0;try{let e=localStorage.getItem(j);if(e){let t=JSON.parse(e);if(Array.isArray(t)&&t.length>0){N(t);let e=Math.max(...t.map(e=>e.id));T(e)}}}catch(e){console.error("Failed to load watches from localStorage:",e)}}},[]),(0,n.useEffect)(()=>{if(P.current)try{localStorage.setItem(j,JSON.stringify(z))}catch(e){console.error("Failed to save watches to localStorage:",e)}},[z]);let A=(0,n.useRef)(0),I=(0,n.useRef)(new Map),L=(0,n.useRef)(!1),[D,O]=(0,n.useState)(!1),[M,R]=(0,n.useState)(null),[F,_]=(0,n.useState)(""),[B,U]=(0,n.useState)(!1),[H,$]=(0,n.useState)(null),[V,q]=(0,n.useState)(!1),[W,J]=(0,n.useState)(380),[K,X]=(0,n.useState)(180),[Q,Y]=(0,n.useState)(!1),Z=(0,n.useCallback)(()=>{if(L.current||k)return;let e=I.current;if(0===e.size)return;let t=e.entries().next();if(t.done||!t.value)return;let[n,r]=t.value;e.delete(n),L.current=!0;let l=r.count>1?` (triggered ${r.count}x)`:"",i=r.timestamps.slice(0,5).join(", ")+(r.timestamps.length>5?"...":"");w(`WATCH TRIGGER: Pattern "${r.pattern}" matched${l}
|
|
6
6
|
|