@jingyi0605/codingns 0.5.0 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/assets/AdaptiveButlerPage-CUyNL98E.js +3 -0
- package/dist/public/assets/App-BFP7LCSC.js +30 -0
- package/dist/public/assets/{BootstrapPage-Vu5oEJ8z.js → BootstrapPage-G74dX2Us.js} +1 -1
- package/dist/public/assets/ConversationPage-Bz0_tvvM.js +2 -0
- package/dist/public/assets/{DesktopDetachPreviewPage-BgeEqbc5.js → DesktopDetachPreviewPage-IV7oEdOX.js} +1 -1
- package/dist/public/assets/DesktopWindowPage-BBmHyRg5.js +2 -0
- package/dist/public/assets/FileContextPanel--FVTxDrq.js +1 -0
- package/dist/public/assets/GitSidebar-DAiSi9oc.js +6 -0
- package/dist/public/assets/{MobileCreateSessionSheet-DLq5qPkx.js → MobileCreateSessionSheet-DqVwz_Hp.js} +1 -1
- package/dist/public/assets/MobileSheet-D1lMrcvD.js +1 -0
- package/dist/public/assets/{MobileTopHeaderFrame-DArgZI7L.js → MobileTopHeaderFrame-COTc7cRr.js} +1 -1
- package/dist/public/assets/{MobileWorkspaceSwitcherHeader-0ywJKfBQ.js → MobileWorkspaceSwitcherHeader-DJPV9ym2.js} +1 -1
- package/dist/public/assets/RelayConnectEntryPage-dSwU8VzK.js +1 -0
- package/dist/public/assets/{ServerSettingsModal-izoYMx9U.js → ServerSettingsModal-B34ms3ze.js} +1 -1
- package/dist/public/assets/{SessionIndexPage-C5aG8FIv.js → SessionIndexPage-D3tG1gmM.js} +1 -1
- package/dist/public/assets/SettingsPage-B3-6-5GL.js +1 -0
- package/dist/public/assets/TerminalManagerPanel-DhuTEdzV.js +1 -0
- package/dist/public/assets/{TerminalPage-CtKXIU0h.js → TerminalPage-DpsvQQVR.js} +19 -19
- package/dist/public/assets/{TerminalRuntimeFallbackModal-CRhOQOsT.js → TerminalRuntimeFallbackModal-CNzOt5v5.js} +1 -1
- package/dist/public/assets/{ToolFilesPage-DcYPsS-e.js → ToolFilesPage-BX9QDi9Y.js} +1 -1
- package/dist/public/assets/{ToolGitPage-CsPl89ty.js → ToolGitPage-4VtFox3p.js} +1 -1
- package/dist/public/assets/{ToolProcessesPage-D0dvR8xK.js → ToolProcessesPage-DZJC6Qnt.js} +1 -1
- package/dist/public/assets/{ToolsHomePage-4fP-KRiv.js → ToolsHomePage-D7JbrAWv.js} +1 -1
- package/dist/public/assets/{WorkbenchLandingPage-kvlfyxRo.js → WorkbenchLandingPage-C0yqnzqh.js} +1 -1
- package/dist/public/assets/WorkbenchLayout-Brlj8K3i.js +3 -0
- package/dist/public/assets/{WorkbenchModal-Ctob14VR.js → WorkbenchModal-CbDxaCOR.js} +1 -1
- package/dist/public/assets/WorkbenchShellRoute-BMcnFadA.css +1 -0
- package/dist/public/assets/WorkbenchShellRoute-puGpdDFY.js +1 -0
- package/dist/public/assets/{WorkspaceDebugDetailPage-Com5kEXJ.js → WorkspaceDebugDetailPage-fTGweC9N.js} +1 -1
- package/dist/public/assets/WorkspaceDetailPage-BtaIzSDB.js +1 -0
- package/dist/public/assets/WorkspaceHomePage-CUmmYDrM.js +1 -0
- package/dist/public/assets/client-runtime-manager-RHFa_iWo.js +1 -0
- package/dist/public/assets/{default-session-permission-mode-CcGwR4Kk.js → default-session-permission-mode-Cu5SreTG.js} +1 -1
- package/dist/public/assets/file-tree-icon-BMKuc5pw.js +31 -0
- package/dist/public/assets/index-Cq3ue0za.css +1 -0
- package/dist/public/assets/index-DEbFT-Aq.js +42 -0
- package/dist/public/assets/{preferences-service-KIYeE2gk.js → preferences-service-gv_9vGKz.js} +1 -1
- package/dist/public/assets/session-runtime-machine-Bfnxkk9B.js +17 -0
- package/dist/public/assets/{terminal-runtime-meta-AWXJpN4r.js → terminal-runtime-meta-B9xJGY__.js} +1 -1
- package/dist/public/assets/{useRegisteredDebugTemplates-DBDRdptr.js → useRegisteredDebugTemplates-CDfl54Wt.js} +1 -1
- package/dist/public/index.html +2 -2
- package/dist/server/config/env.d.ts +1 -0
- package/dist/server/config/env.js +36 -0
- package/dist/server/config/env.js.map +1 -1
- package/dist/server/modules/client/client-controller.js +1 -1
- package/dist/server/modules/client/client-controller.js.map +1 -1
- package/dist/server/modules/client/client-service.d.ts +16 -2
- package/dist/server/modules/client/client-service.js +21 -3
- package/dist/server/modules/client/client-service.js.map +1 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-packets.d.ts +16 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-packets.js.map +1 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.d.ts +2 -1
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.js +18 -0
- package/dist/server/modules/relay-tunnel/crypto/relay-tunnel-protocol.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.d.ts +13 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.js +2 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-client-context.js.map +1 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.d.ts +6 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js +110 -10
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.d.ts +16 -4
- package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js +216 -101
- package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.d.ts +6 -2
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.js +457 -40
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.js.map +1 -1
- package/dist/server/modules/sessions/session-activity-inspector.js +6 -8
- package/dist/server/modules/sessions/session-activity-inspector.js.map +1 -1
- package/dist/server/modules/sessions/session-history-service.d.ts +1 -0
- package/dist/server/modules/sessions/session-history-service.js +62 -7
- package/dist/server/modules/sessions/session-history-service.js.map +1 -1
- package/dist/server/modules/workbench/snapshot-revision.d.ts +4 -0
- package/dist/server/modules/workbench/snapshot-revision.js +13 -0
- package/dist/server/modules/workbench/snapshot-revision.js.map +1 -0
- package/dist/server/modules/workbench/workbench-service.d.ts +33 -2
- package/dist/server/modules/workbench/workbench-service.js +39 -4
- package/dist/server/modules/workbench/workbench-service.js.map +1 -1
- package/dist/server/modules/workbench/workspace-panel-snapshot-service.d.ts +6 -1
- package/dist/server/modules/workbench/workspace-panel-snapshot-service.js +10 -8
- package/dist/server/modules/workbench/workspace-panel-snapshot-service.js.map +1 -1
- package/dist/server/server/create-server.js +11 -6
- package/dist/server/server/create-server.js.map +1 -1
- package/dist/server/types/domain.d.ts +9 -0
- package/dist/server/ws/workbench-ws-hub.js +295 -43
- package/dist/server/ws/workbench-ws-hub.js.map +1 -1
- package/dist/server/ws/ws-server.js +141 -8
- package/dist/server/ws/ws-server.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +33 -6
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +1 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +78 -36
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +1 -1
- package/package.json +1 -1
- package/dist/public/assets/AdaptiveButlerPage-R-XZw7pd.js +0 -3
- package/dist/public/assets/App-DkvE5EyM.js +0 -30
- package/dist/public/assets/ConversationPage-Cjpg6g0J.js +0 -2
- package/dist/public/assets/DesktopWindowPage-1WelvxdH.js +0 -2
- package/dist/public/assets/FileContextPanel-D_ghXJuW.js +0 -1
- package/dist/public/assets/GitSidebar-D9f9Jxwr.js +0 -6
- package/dist/public/assets/MobileSheet-DLg-gX1t.js +0 -1
- package/dist/public/assets/SettingsPage-HJIC-P-4.js +0 -1
- package/dist/public/assets/TerminalManagerPanel-DpyUTo9k.js +0 -1
- package/dist/public/assets/WorkbenchLayout-ByFw4eeu.js +0 -3
- package/dist/public/assets/WorkbenchShellRoute-BUITtdAg.css +0 -1
- package/dist/public/assets/WorkbenchShellRoute-Kw7JEZI3.js +0 -1
- package/dist/public/assets/WorkspaceDetailPage-D0Lrx4Uz.js +0 -1
- package/dist/public/assets/WorkspaceHomePage-wR8d3aP9.js +0 -1
- package/dist/public/assets/file-tree-icon-UFVoVzhM.js +0 -31
- package/dist/public/assets/index-Byp9hJ0c.js +0 -42
- package/dist/public/assets/index-_52jxu4a.css +0 -1
- package/dist/public/assets/session-runtime-machine-0KNSSPp5.js +0 -17
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{g as yr,j as z,b as Y,t as j,A as Mi}from"./index-Byp9hJ0c.js";import{D as Di}from"./WorkbenchModal-Ctob14VR.js";import{e as Fi,d as Ri}from"./App-DkvE5EyM.js";import{aN as At,aO as Ni}from"./WorkbenchLayout-ByFw4eeu.js";function Oi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _i=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ji=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bi={};function Tn(e,t){return(Bi.jsx?ji:_i).test(e)}const Vi=/[ \t\n\f\r]/g;function Ui(e){return typeof e=="object"?e.type==="text"?Pn(e.value):!1:Pn(e)}function Pn(e){return e.replace(Vi,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function wr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function Xt(e){return e.toLowerCase()}class ae{constructor(t,n){this.attribute=n,this.property=t}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let Hi=0;const O=Fe(),K=Fe(),Gt=Fe(),C=Fe(),G=Fe(),Ue=Fe(),ue=Fe();function Fe(){return 2**++Hi}const Qt=Object.freeze(Object.defineProperty({__proto__:null,boolean:O,booleanish:K,commaOrSpaceSeparated:ue,commaSeparated:Ue,number:C,overloadedBoolean:Gt,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Tt=Object.keys(Qt);class sn extends ae{constructor(t,n,r,i){let o=-1;if(super(t,n),zn(this,"space",i),typeof r=="number")for(;++o<Tt.length;){const l=Tt[o];zn(this,Tt[o],(r&Qt[l])===Qt[l])}}}sn.prototype.defined=!0;function zn(e,t,n){n&&(e[t]=n)}function We(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new sn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Xt(r)]=r,n[Xt(o.attribute)]=r}return new lt(t,n,e.space)}const br=We({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:K,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:G,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:C,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:G,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:K,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sr(e,t){return t in e?e[t]:t}function vr(e,t){return Sr(e,t.toLowerCase())}const Wi=We({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ue,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:O,allowPaymentRequest:O,allowUserMedia:O,alt:null,as:null,async:O,autoCapitalize:null,autoComplete:G,autoFocus:O,autoPlay:O,blocking:G,capture:null,charSet:null,checked:O,cite:null,className:G,cols:C,colSpan:null,content:null,contentEditable:K,controls:O,controlsList:G,coords:C|Ue,crossOrigin:null,data:null,dateTime:null,decoding:null,default:O,defer:O,dir:null,dirName:null,disabled:O,download:Gt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:O,formTarget:null,headers:G,height:C,hidden:Gt,high:C,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:O,inputMode:null,integrity:null,is:null,isMap:O,itemId:null,itemProp:G,itemRef:G,itemScope:O,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:O,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:O,muted:O,name:null,nonce:null,noModule:O,noValidate:O,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:O,optimum:C,pattern:null,ping:G,placeholder:null,playsInline:O,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:O,referrerPolicy:null,rel:G,required:O,reversed:O,rows:C,rowSpan:C,sandbox:G,scope:null,scoped:O,seamless:O,selected:O,shadowRootClonable:O,shadowRootDelegatesFocus:O,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:O,useMap:null,value:K,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:O,declare:O,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:O,noHref:O,noShade:O,noWrap:O,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:O,disableRemotePlayback:O,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:vr}),$i=We({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:ue,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:G,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:O,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ue,g2:Ue,glyphName:Ue,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ue,rev:ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ue,requiredFeatures:ue,requiredFonts:ue,requiredFormats:ue,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ue,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sr}),Cr=We({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Er=We({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vr}),Ir=We({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qi={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"},Yi=/[A-Z]/g,Mn=/-[a-z]/g,Xi=/^data[-\w.:]+$/i;function Gi(e,t){const n=Xt(t);let r=t,i=ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Xi.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Mn,Zi);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Mn.test(o)){let l=o.replace(Yi,Qi);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=sn}return new i(r,t)}function Qi(e){return"-"+e.toLowerCase()}function Zi(e){return e.charAt(1).toUpperCase()}const Ji=wr([br,Wi,Cr,Er,Ir],"html"),un=wr([br,$i,Cr,Er,Ir],"svg");function Ki(e){return e.join(" ").trim()}var je={},Pt,Dn;function el(){if(Dn)return Pt;Dn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
|
|
2
|
-
`,u="/",f="*",c="",p="comment",h="declaration";function g(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var E=1,v=1;function F(P){var L=P.match(t);L&&(E+=L.length);var $=P.lastIndexOf(s);v=~$?P.length-$:v+P.length}function D(){var P={line:E,column:v};return function(L){return L.position=new y(P),_(),L}}function y(P){this.start=P,this.end={line:E,column:v},this.source=k.source}y.prototype.content=S;function N(P){var L=new Error(k.source+":"+E+":"+v+": "+P);if(L.reason=P,L.filename=k.source,L.line=E,L.column=v,L.source=S,!k.silent)throw L}function V(P){var L=P.exec(S);if(L){var $=L[0];return F($),S=S.slice($.length),L}}function _(){V(n)}function x(P){var L;for(P=P||[];L=A();)L!==!1&&P.push(L);return P}function A(){var P=D();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var L=2;c!=S.charAt(L)&&(f!=S.charAt(L)||u!=S.charAt(L+1));)++L;if(L+=2,c===S.charAt(L-1))return N("End of comment missing");var $=S.slice(2,L-2);return v+=2,F($),S=S.slice(L),v+=2,P({type:p,comment:$})}}function T(){var P=D(),L=V(r);if(L){if(A(),!V(i))return N("property missing ':'");var $=V(o),Z=P({type:h,property:b(L[0].replace(e,c)),value:$?b($[0].replace(e,c)):c});return V(l),Z}}function U(){var P=[];x(P);for(var L;L=T();)L!==!1&&(P.push(L),x(P));return P}return _(),U()}function b(S){return S?S.replace(a,c):c}return Pt=g,Pt}var Fn;function tl(){if(Fn)return je;Fn=1;var e=je&&je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(je,"__esModule",{value:!0}),je.default=n;const t=e(el());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return je}var Ge={},Rn;function nl(){if(Rn)return Ge;Rn=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ge.camelCase=s,Ge}var Qe,Nn;function rl(){if(Nn)return Qe;Nn=1;var e=Qe&&Qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(tl()),n=nl();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Qe=r,Qe}var il=rl();const ll=yr(il),Lr=Ar("end"),cn=Ar("start");function Ar(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ol(e){const t=cn(e),n=Lr(e);if(t&&n)return{start:t,end:n}}function Ke(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?On(e.position):"start"in e||"end"in e?On(e):"line"in e||"column"in e?Zt(e):""}function Zt(e){return _n(e&&e.line)+":"+_n(e&&e.column)}function On(e){return Zt(e&&e.start)+"-"+Zt(e&&e.end)}function _n(e){return e&&typeof e=="number"?e:1}class re extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ke(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}re.prototype.file="";re.prototype.name="";re.prototype.reason="";re.prototype.message="";re.prototype.stack="";re.prototype.column=void 0;re.prototype.line=void 0;re.prototype.ancestors=void 0;re.prototype.cause=void 0;re.prototype.fatal=void 0;re.prototype.place=void 0;re.prototype.ruleId=void 0;re.prototype.source=void 0;const fn={}.hasOwnProperty,al=new Map,sl=/[A-Z]/g,ul=new Set(["table","tbody","thead","tfoot","tr"]),cl=new Set(["td","th"]),Tr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=yl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=xl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?un:Ji,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Pr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Pr(e,t,n){if(t.type==="element")return hl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ml(e,t,n);if(t.type==="mdxjsEsm")return dl(e,t);if(t.type==="root")return gl(e,t,n);if(t.type==="text")return kl(e,t)}function hl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=un,e.schema=i),e.ancestors.push(t);const o=Mr(e,t.tagName,!1),l=wl(e,t);let a=pn(e,t);return ul.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Ui(s):!0})),zr(e,l,o,t),hn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function pl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rt(e,t.position)}function dl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rt(e,t.position)}function ml(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=un,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Mr(e,t.name,!0),l=bl(e,t),a=pn(e,t);return zr(e,l,o,t),hn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function gl(e,t,n){const r={};return hn(r,pn(e,t)),e.create(t,e.Fragment,r,n)}function kl(e,t){return t.value}function zr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xl(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function yl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=cn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function wl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&fn.call(t.properties,i)){const o=Sl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&cl.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function bl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else rt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else rt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:al;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Pr(e,o,l);a!==void 0&&n.push(a)}return n}function Sl(e,t,n){const r=Gi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Oi(n):Ki(n)),r.property==="style"){let i=typeof n=="object"?n:vl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Cl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?qi[r.property]||r.property:r.attribute,n]}}function vl(e,t){try{return ll(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new re("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Tr+"#cannot-parse-style-attribute",i}}function Mr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Tn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Tn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return fn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rt(e)}function rt(e,t){const n=new re("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=Tr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Cl(e){const t={};let n;for(n in e)fn.call(e,n)&&(t[El(n)]=e[n]);return t}function El(e){let t=e.replace(sl,Il);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Il(e){return"-"+e.toLowerCase()}const zt={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"]},Ll={};function dn(e,t){const n=Ll,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Dr(e,r,i)}function Dr(e,t,n){if(Al(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return jn(e.children,t,n)}return Array.isArray(e)?jn(e,t,n):""}function jn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Dr(e[i],t,n);return r.join("")}function Al(e){return!!(e&&typeof e=="object")}const Bn=document.createElement("i");function mn(e){const t="&"+e+";";Bn.innerHTML=t;const n=Bn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ce(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function fe(e,t){return e.length>0?(ce(e,e.length,0,t),e):t}const Vn={}.hasOwnProperty;function Fr(e){const t={};let n=-1;for(;++n<e.length;)Tl(t,e[n]);return t}function Tl(e,t){let n;for(n in t){const i=(Vn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Vn.call(i,l)||(i[l]=[]);const a=o[l];Pl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Pl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ce(e,0,0,r)}function Rr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function me(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ie=Le(/[A-Za-z]/),ne=Le(/[\dA-Za-z]/),zl=Le(/[#-'*+\--9=?A-Z^-~]/);function mt(e){return e!==null&&(e<32||e===127)}const Jt=Le(/\d/),Ml=Le(/[\dA-Fa-f]/),Dl=Le(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const yt=Le(new RegExp("\\p{P}|\\p{S}","u")),De=Le(/\s/);function Le(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $e(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&ne(e.charCodeAt(n+1))&&ne(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function W(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(n),a(s)):t(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const Fl={tokenize:Rl};function Rl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),W(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return M(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Nl={tokenize:Ol},Un={tokenize:_l};function Ol(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const F=t.events.length;let D=F,y;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){y=t.events[D][1].end;break}k(r);let N=F;for(;N<t.events.length;)t.events[N][1].end={...y},N++;return ce(t.events,D+1,0,t.events.slice(F)),t.events.length=N,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Un,f,c)(v)}function f(v){return i&&E(),k(r),p(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function p(v){return t.containerState={},e.attempt(Un,h,g)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function g(v){if(v===null){i&&E(),k(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(v);return}return M(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,F){const D=t.sliceStream(v);if(F&&D.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(D),t.parser.lazy[v.start.line]){let y=i.events.length;for(;y--;)if(i.events[y][1].start.offset<l&&(!i.events[y][1].end||i.events[y][1].end.offset>l))return;const N=t.events.length;let V=N,_,x;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(_){x=t.events[V][1].end;break}_=!0}for(k(r),y=N;y<t.events.length;)t.events[y][1].end={...x},y++;ce(t.events,V+1,0,t.events.slice(N)),t.events.length=y}}function k(v){let F=n.length;for(;F-- >v;){const D=n[F];t.containerState=D[1],D[0].exit.call(t,e)}n.length=v}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _l(e,t,n){return W(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||X(e)||De(e))return 1;if(yt(e))return 2}function wt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Kt={name:"attention",resolveAll:jl,tokenize:Bl};function jl(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};Hn(c,-s),Hn(p,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fe(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=fe(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=fe(u,wt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=fe(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=fe(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ce(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Bl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=He(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=He(s),c=!f||f===2&&i||n.includes(s),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(s)}}function Hn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Vl={name:"autolink",tokenize:Ul};function Ul(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return ie(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||ne(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||ne(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||mt(h)?n(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),f):zl(h)?(e.consume(h),u):n(h)}function f(h){return ne(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||ne(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return n(h)}}const ot={partial:!0,tokenize:Hl};function Hl(e,t,n){return r;function r(o){return B(o)?W(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||M(o)?t(o):n(o)}}const Nr={continuation:{tokenize:$l},exit:ql,name:"blockQuote",tokenize:Wl};function Wl(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function $l(e,t,n){const r=this;return i;function i(l){return B(l)?W(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Nr,t,n)(l)}}function ql(e){e.exit("blockQuote")}const Or={name:"characterEscape",tokenize:Yl};function Yl(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Dl(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const _r={name:"characterReference",tokenize:Xl};function Xl(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=ne,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Ml,f):(e.enter("characterReferenceValue"),o=7,l=Jt,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===ne&&!mn(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const Wn={partial:!0,tokenize:Ql},$n={concrete:!0,name:"codeFenced",tokenize:Gl};function Gl(e,t,n){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(y){return u(y)}function u(y){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=y,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(y)}function f(y){return y===a?(l++,e.consume(y),f):l<3?n(y):(e.exit("codeFencedFenceSequence"),B(y)?W(e,c,"whitespace")(y):c(y))}function c(y){return y===null||M(y)?(e.exit("codeFencedFence"),r.interrupt?t(y):e.check(Wn,b,F)(y)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||M(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(y)):B(y)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),W(e,h,"whitespace")(y)):y===96&&y===a?n(y):(e.consume(y),p)}function h(y){return y===null||M(y)?c(y):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===null||M(y)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(y)):y===96&&y===a?n(y):(e.consume(y),g)}function b(y){return e.attempt(i,F,S)(y)}function S(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),k}function k(y){return o>0&&B(y)?W(e,E,"linePrefix",o+1)(y):E(y)}function E(y){return y===null||M(y)?e.check(Wn,b,F)(y):(e.enter("codeFlowValue"),v(y))}function v(y){return y===null||M(y)?(e.exit("codeFlowValue"),E(y)):(e.consume(y),v)}function F(y){return e.exit("codeFenced"),t(y)}function D(y,N,V){let _=0;return x;function x(L){return y.enter("lineEnding"),y.consume(L),y.exit("lineEnding"),A}function A(L){return y.enter("codeFencedFence"),B(L)?W(y,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):T(L)}function T(L){return L===a?(y.enter("codeFencedFenceSequence"),U(L)):V(L)}function U(L){return L===a?(_++,y.consume(L),U):_>=l?(y.exit("codeFencedFenceSequence"),B(L)?W(y,P,"whitespace")(L):P(L)):V(L)}function P(L){return L===null||M(L)?(y.exit("codeFencedFence"),N(L)):V(L)}}}function Ql(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Mt={name:"codeIndented",tokenize:Jl},Zl={partial:!0,tokenize:Kl};function Jl(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),W(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):M(u)?e.attempt(Zl,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||M(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function Kl(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):W(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):M(l)?i(l):n(l)}}const eo={name:"codeText",previous:no,resolve:to,tokenize:ro};function to(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function no(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ro(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):M(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||M(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class io{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ze(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ze(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ze(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ze(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ze(this.left,n.reverse())}}}function Ze(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 jr(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new io(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,lo(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ce(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function lo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,p=-1,h=n,g=0,b=0;const S=[b];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(b=p+1,S.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),p=S.length;p--;){const k=a.slice(S[p],S[p+1]),E=o.pop();s.push([E,E+k.length-1]),e.splice(E,2,k)}for(s.reverse(),p=-1;++p<s.length;)u[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return u}const oo={resolve:so,tokenize:uo},ao={partial:!0,tokenize:co};function so(e){return jr(e),e}function uo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):M(a)?e.check(ao,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function co(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),W(e,o,"linePrefix")}function o(l){if(l===null||M(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Br(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),p):k===null||k===32||k===41||mt(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(k))}function p(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(k))}function h(k){return k===62?(e.exit("chunkString"),e.exit(a),p(k)):k===null||k===60||M(k)?n(k):(e.consume(k),k===92?g:h)}function g(k){return k===60||k===62||k===92?(e.consume(k),h):h(k)}function b(k){return!f&&(k===null||k===41||X(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):f<u&&k===40?(e.consume(k),f++,b):k===41?(e.consume(k),f--,b):k===null||k===32||k===40||mt(k)?n(k):(e.consume(k),k===92?S:b)}function S(k){return k===40||k===41||k===92?(e.consume(k),b):b(k)}}function Vr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!s||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):M(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||M(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),s||(s=!B(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Ur(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,s):n(p)}function s(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),s(l)):p===null?n(p):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),W(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||M(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function et(e,t){let n;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):B(i)?W(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const fo={name:"definition",tokenize:po},ho={partial:!0,tokenize:mo};function po(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Vr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):n(h)}function s(h){return X(h)?et(e,u)(h):u(h)}function u(h){return Br(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(ho,c,c)(h)}function c(h){return B(h)?W(e,p,"whitespace")(h):p(h)}function p(h){return h===null||M(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function mo(e,t,n){return r;function r(a){return X(a)?et(e,i)(a):n(a)}function i(a){return Ur(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?W(e,l,"whitespace")(a):l(a)}function l(a){return a===null||M(a)?t(a):n(a)}}const go={name:"hardBreakEscape",tokenize:ko};function ko(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return M(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const xo={name:"headingAtx",resolve:yo,tokenize:wo};function yo(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ce(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function wo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||X(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||M(f)?(e.exit("atxHeading"),t(f)):B(f)?W(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||X(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const bo=["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"],qn=["pre","script","style","textarea"],So={concrete:!0,name:"htmlFlow",resolveTo:Eo,tokenize:Io},vo={partial:!0,tokenize:Ao},Co={partial:!0,tokenize:Lo};function Eo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Io(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),p):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):ie(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function p(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,a=0,g):ie(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function h(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const J="CDATA[";return m===J.charCodeAt(a++)?(e.consume(m),a===J.length?r.interrupt?t:T:g):n(m)}function b(m){return ie(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||X(m)){const J=m===47,we=l.toLowerCase();return!J&&!o&&qn.includes(we)?(i=1,r.interrupt?t(m):T(m)):bo.includes(l.toLowerCase())?(i=6,J?(e.consume(m),k):r.interrupt?t(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?E(m):v(m))}return m===45||ne(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function k(m){return m===62?(e.consume(m),r.interrupt?t:T):n(m)}function E(m){return B(m)?(e.consume(m),E):x(m)}function v(m){return m===47?(e.consume(m),x):m===58||m===95||ie(m)?(e.consume(m),F):B(m)?(e.consume(m),v):x(m)}function F(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),F):D(m)}function D(m){return m===61?(e.consume(m),y):B(m)?(e.consume(m),D):v(m)}function y(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),y):V(m)}function N(m){return m===s?(e.consume(m),s=null,_):m===null||M(m)?n(m):(e.consume(m),N)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||X(m)?D(m):(e.consume(m),V)}function _(m){return m===47||m===62||B(m)?v(m):n(m)}function x(m){return m===62?(e.consume(m),A):n(m)}function A(m){return m===null||M(m)?T(m):B(m)?(e.consume(m),A):n(m)}function T(m){return m===45&&i===2?(e.consume(m),$):m===60&&i===1?(e.consume(m),Z):m===62&&i===4?(e.consume(m),te):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),he):M(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(vo,pe,U)(m)):m===null||M(m)?(e.exit("htmlFlowData"),U(m)):(e.consume(m),T)}function U(m){return e.check(Co,P,pe)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),L}function L(m){return m===null||M(m)?U(m):(e.enter("htmlFlowData"),T(m))}function $(m){return m===45?(e.consume(m),d):T(m)}function Z(m){return m===47?(e.consume(m),l="",le):T(m)}function le(m){if(m===62){const J=l.toLowerCase();return qn.includes(J)?(e.consume(m),te):T(m)}return ie(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),le):T(m)}function he(m){return m===93?(e.consume(m),d):T(m)}function d(m){return m===62?(e.consume(m),te):m===45&&i===2?(e.consume(m),d):T(m)}function te(m){return m===null||M(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),te)}function pe(m){return e.exit("htmlFlow"),t(m)}}function Lo(e,t,n){const r=this;return i;function i(l){return M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Ao(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ot,t,n)}}const To={name:"htmlText",tokenize:Po};function Po(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),D):d===63?(e.consume(d),v):ie(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):ie(d)?(e.consume(d),E):n(d)}function f(d){return d===45?(e.consume(d),h):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),p):M(d)?(l=c,Z(d)):(e.consume(d),c)}function p(d){return d===45?(e.consume(d),h):c(d)}function h(d){return d===62?$(d):d===45?p(d):c(d)}function g(d){const te="CDATA[";return d===te.charCodeAt(o++)?(e.consume(d),o===te.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):M(d)?(l=b,Z(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),k):b(d)}function k(d){return d===62?$(d):d===93?(e.consume(d),k):b(d)}function E(d){return d===null||d===62?$(d):M(d)?(l=E,Z(d)):(e.consume(d),E)}function v(d){return d===null?n(d):d===63?(e.consume(d),F):M(d)?(l=v,Z(d)):(e.consume(d),v)}function F(d){return d===62?$(d):v(d)}function D(d){return ie(d)?(e.consume(d),y):n(d)}function y(d){return d===45||ne(d)?(e.consume(d),y):N(d)}function N(d){return M(d)?(l=N,Z(d)):B(d)?(e.consume(d),N):$(d)}function V(d){return d===45||ne(d)?(e.consume(d),V):d===47||d===62||X(d)?_(d):n(d)}function _(d){return d===47?(e.consume(d),$):d===58||d===95||ie(d)?(e.consume(d),x):M(d)?(l=_,Z(d)):B(d)?(e.consume(d),_):$(d)}function x(d){return d===45||d===46||d===58||d===95||ne(d)?(e.consume(d),x):A(d)}function A(d){return d===61?(e.consume(d),T):M(d)?(l=A,Z(d)):B(d)?(e.consume(d),A):_(d)}function T(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,U):M(d)?(l=T,Z(d)):B(d)?(e.consume(d),T):(e.consume(d),P)}function U(d){return d===i?(e.consume(d),i=void 0,L):d===null?n(d):M(d)?(l=U,Z(d)):(e.consume(d),U)}function P(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||X(d)?_(d):(e.consume(d),P)}function L(d){return d===47||d===62||X(d)?_(d):n(d)}function $(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function Z(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),le}function le(d){return B(d)?W(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):he(d)}function he(d){return e.enter("htmlTextData"),l(d)}}const gn={name:"labelEnd",resolveAll:Fo,resolveTo:Ro,tokenize:No},zo={tokenize:Oo},Mo={tokenize:_o},Do={tokenize:jo};function Fo(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ce(e,0,e.length,n),e}function Ro(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=fe(a,e.slice(o+1,o+r+3)),a=fe(a,[["enter",f,t]]),a=fe(a,wt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=fe(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=fe(a,e.slice(l+1)),a=fe(a,[["exit",s,t]]),ce(e,o,e.length,a),e}function No(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(me(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(zo,f,l?f:c)(p):p===91?e.attempt(Mo,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(Do,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function Oo(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return X(c)?et(e,o)(c):o(c)}function o(c){return c===41?f(c):Br(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return X(c)?et(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?Ur(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return X(c)?et(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function _o(e,t,n){const r=this;return i;function i(a){return Vr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function jo(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Bo={name:"labelStartImage",resolveAll:gn.resolveAll,tokenize:Vo};function Vo(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Uo={name:"labelStartLink",resolveAll:gn.resolveAll,tokenize:Ho};function Ho(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Dt={name:"lineEnding",tokenize:Wo};function Wo(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),W(e,t,"linePrefix")}}const dt={name:"thematicBreak",tokenize:$o};function $o(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||M(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?W(e,a,"whitespace")(u):a(u))}}const oe={continuation:{tokenize:Go},exit:Zo,name:"list",tokenize:Xo},qo={partial:!0,tokenize:Jo},Yo={partial:!0,tokenize:Qo};function Xo(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Jt(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(dt,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return n(h)}function s(h){return Jt(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(ot,r.interrupt?n:f,e.attempt(qo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return B(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Go(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ot,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,W(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Yo,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,W(e,e.attempt(oe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Qo(e,t,n){const r=this;return W(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Zo(e){e.exit(this.containerState.type)}function Jo(e,t,n){const r=this;return W(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Yn={name:"setextUnderline",resolveTo:Ko,tokenize:ea};function Ko(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function ea(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?W(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||M(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const ta={tokenize:na};function na(e){const t=this,n=e.attempt(ot,r,e.attempt(this.parser.constructs.flowInitial,i,W(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ra={resolveAll:Wr()},ia=Hr("string"),la=Hr("text");function Hr(e){return{resolveAll:Wr(e==="text"?oa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Wr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function oa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const aa={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:Nr},sa={91:fo},ua={[-2]:Mt,[-1]:Mt,32:Mt},ca={35:xo,42:dt,45:[Yn,dt],60:So,61:Yn,95:dt,96:$n,126:$n},fa={38:_r,92:Or},ha={[-5]:Dt,[-4]:Dt,[-3]:Dt,33:Bo,38:_r,42:Kt,60:[Vl,To],91:Uo,92:[go,Or],93:gn,95:Kt,96:eo},pa={null:[Kt,ra]},da={null:[42,95]},ma={null:[]},ga=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:da,contentInitial:sa,disable:ma,document:aa,flow:ca,flowInitial:ua,insideSpan:pa,string:fa,text:ha},Symbol.toStringTag,{value:"Module"}));function ka(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(y),consume:E,enter:v,exit:F,interrupt:N(y,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(A){return l=fe(l,A),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=wt(o,u.events,u),u.events)}function p(A,T){return ya(h(A),T)}function h(A){return xa(l,A)}function g(){const{_bufferIndex:A,_index:T,line:U,column:P,offset:L}=r;return{_bufferIndex:A,_index:T,line:U,column:P,offset:L}}function b(A){i[A.line]=A.column,x()}function S(){let A;for(;r._index<l.length;){const T=l[r._index];if(typeof T=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<T.length;)k(T.charCodeAt(r._bufferIndex));else k(T)}}function k(A){f=f(A)}function E(A){M(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,x()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=A}function v(A,T){const U=T||{};return U.type=A,U.start=g(),u.events.push(["enter",U,u]),a.push(U),U}function F(A){const T=a.pop();return T.end=g(),u.events.push(["exit",T,u]),T}function D(A,T){V(A,T.from)}function y(A,T){T.restore()}function N(A,T){return U;function U(P,L,$){let Z,le,he,d;return Array.isArray(P)?pe(P):"tokenize"in P?pe([P]):te(P);function te(ee){return Ae;function Ae(ge){const ke=ge!==null&&ee[ge],Ce=ge!==null&&ee.null,Re=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Ce)?Ce:Ce?[Ce]:[]];return pe(Re)(ge)}}function pe(ee){return Z=ee,le=0,ee.length===0?$:m(ee[le])}function m(ee){return Ae;function Ae(ge){return d=_(),he=ee,ee.partial||(u.currentConstruct=ee),ee.name&&u.parser.constructs.disable.null.includes(ee.name)?we():ee.tokenize.call(T?Object.assign(Object.create(u),T):u,s,J,we)(ge)}}function J(ee){return A(he,d),L}function we(ee){return d.restore(),++le<Z.length?m(Z[le]):$}}}function V(A,T){A.resolveAll&&!o.includes(A)&&o.push(A),A.resolve&&ce(u.events,T,u.events.length-T,A.resolve(u.events.slice(T),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function _(){const A=g(),T=u.previous,U=u.currentConstruct,P=u.events.length,L=Array.from(a);return{from:P,restore:$};function $(){r=A,u.previous=T,u.currentConstruct=U,u.events.length=P,a=L,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function xa(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function ya(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
3
|
-
`;break}case-3:{l=`\r
|
|
4
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function wa(e){const r={constructs:Fr([ga,...(e||{}).extensions||[]]),content:i(Fl),defined:[],document:i(Nl),flow:i(ta),lazy:{},string:i(ia),text:i(la)};return r;function i(o){return l;function l(a){return ka(r,o,a)}}}function ba(e){for(;!jr(e););return e}const Xn=/[\0\t\n\r]/g;function Sa(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Xn.lastIndex=c,u=Xn.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){t=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const va=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ca(e){return e.replace(va,Ea)}function Ea(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Rr(n.slice(o?2:1),o?16:10)}return mn(n)||e}const $r={}.hasOwnProperty;function Ia(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),La(n)(ba(wa(n).document().write(Sa()(e,t,!0))))}function La(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Q),autolinkProtocol:_,autolinkEmail:_,atxHeading:o(st),blockQuote:o(Ce),characterEscape:_,characterReference:_,codeFenced:o(Re),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Re,l),codeText:o(Ee,l),codeTextData:_,data:_,codeFlowValue:_,definition:o(Te),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Et),hardBreakEscape:o(ut),hardBreakTrailing:o(ut),htmlFlow:o(Ne,l),htmlFlowData:_,htmlText:o(Ne,l),htmlTextData:_,image:o(It),label:l,link:o(Q),listItem:o(Oe),listItemValue:p,listOrdered:o(Pe,c),listUnordered:o(Pe),paragraph:o(Lt),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(st),strong:o(qe),thematicBreak:o(zi)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:ke,autolinkProtocol:ge,blockQuote:s(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:ee,characterReference:Ae,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:x,codeIndented:s(k),codeText:s(L),codeTextData:x,data:x,definition:s(),definitionDestinationString:F,definitionLabelString:E,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(T),hardBreakTrailing:s(T),htmlFlow:s(U),htmlFlowData:x,htmlText:s(P),htmlTextData:x,image:s(Z),label:he,labelText:le,lineEnding:A,link:s($),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:J,resourceDestinationString:d,resourceTitleString:te,resource:pe,setextHeading:s(V),setextHeadingLineSequence:N,setextHeadingText:y,strong:s(),thematicBreak:s()}};qr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let I={type:"root",children:[]};const R={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},H=[];let q=-1;for(;++q<w.length;)if(w[q][1].type==="listOrdered"||w[q][1].type==="listUnordered")if(w[q][0]==="enter")H.push(q);else{const de=H.pop();q=i(w,de,q)}for(q=-1;++q<w.length;){const de=t[w[q][0]];$r.call(de,w[q][1].type)&&de[w[q][1].type].call(Object.assign({sliceSerialize:w[q][2].sliceSerialize},R),w[q][1])}if(R.tokenStack.length>0){const de=R.tokenStack[R.tokenStack.length-1];(de[1]||Gn).call(R,void 0,de[0])}for(I.position={start:Ie(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Ie(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},q=-1;++q<t.transforms.length;)I=t.transforms[q](I)||I;return I}function i(w,I,R){let H=I-1,q=-1,de=!1,ze,be,Ye,Xe;for(;++H<=R;){const se=w[H];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?q++:q--,Xe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(ze&&!Xe&&!q&&!Ye&&(Ye=H),Xe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xe=void 0}if(!q&&se[0]==="enter"&&se[1].type==="listItemPrefix"||q===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(ze){let _e=H;for(be=void 0;_e--;){const Se=w[_e];if(Se[1].type==="lineEnding"||Se[1].type==="lineEndingBlank"){if(Se[0]==="exit")continue;be&&(w[be][1].type="lineEndingBlank",de=!0),Se[1].type="lineEnding",be=_e}else if(!(Se[1].type==="linePrefix"||Se[1].type==="blockQuotePrefix"||Se[1].type==="blockQuotePrefixWhitespace"||Se[1].type==="blockQuoteMarker"||Se[1].type==="listItemIndent"))break}Ye&&(!be||Ye<be)&&(ze._spread=!0),ze.end=Object.assign({},be?w[be][1].start:se[1].end),w.splice(be||H,0,["exit",ze,se[2]]),H++,R++}if(se[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};ze=_e,w.splice(H,0,["enter",_e,se[2]]),H++,R++,Ye=void 0,Xe=!0}}}return w[I][1]._spread=de,R}function o(w,I){return R;function R(H){a.call(this,w(H),H),I&&I.call(this,H)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,I,R){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([I,R||void 0]),w.position={start:Ie(I.start),end:void 0}}function s(w){return I;function I(R){w&&w.call(this,R),u.call(this,R)}}function u(w,I){const R=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==w.type&&(I?I.call(this,w,H[0]):(H[1]||Gn).call(this,w,H[0]));else throw new Error("Cannot close `"+w.type+"` ("+Ke({start:w.start,end:w.end})+"): it’s not open");R.position.end=Ie(w.end)}function f(){return dn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(w){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function h(){const w=this.resume(),I=this.stack[this.stack.length-1];I.lang=w}function g(){const w=this.resume(),I=this.stack[this.stack.length-1];I.meta=w}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/(\r?\n|\r)$/g,"")}function E(w){const I=this.resume(),R=this.stack[this.stack.length-1];R.label=I,R.identifier=me(this.sliceSerialize(w)).toLowerCase()}function v(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function F(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function D(w){const I=this.stack[this.stack.length-1];if(!I.depth){const R=this.sliceSerialize(w).length;I.depth=R}}function y(){this.data.setextHeadingSlurpLineEnding=!0}function N(w){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function _(w){const R=this.stack[this.stack.length-1].children;let H=R[R.length-1];(!H||H.type!=="text")&&(H=Pi(),H.position={start:Ie(w.start),end:void 0},R.push(H)),this.stack.push(H)}function x(w){const I=this.stack.pop();I.value+=this.sliceSerialize(w),I.position.end=Ie(w.end)}function A(w){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const R=I.children[I.children.length-1];R.position.end=Ie(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(_.call(this,w),x.call(this,w))}function T(){this.data.atHardBreak=!0}function U(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function P(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function L(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function $(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Z(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function le(w){const I=this.sliceSerialize(w),R=this.stack[this.stack.length-2];R.label=Ca(I),R.identifier=me(I).toLowerCase()}function he(){const w=this.stack[this.stack.length-1],I=this.resume(),R=this.stack[this.stack.length-1];if(this.data.inReference=!0,R.type==="link"){const H=w.children;R.children=H}else R.alt=I}function d(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function te(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function pe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function J(w){const I=this.resume(),R=this.stack[this.stack.length-1];R.label=I,R.identifier=me(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function we(w){this.data.characterReferenceType=w.type}function ee(w){const I=this.sliceSerialize(w),R=this.data.characterReferenceType;let H;R?(H=Rr(I,R==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=mn(I);const q=this.stack[this.stack.length-1];q.value+=H}function Ae(w){const I=this.stack.pop();I.position.end=Ie(w.end)}function ge(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(w)}function ke(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(w)}function Ce(){return{type:"blockquote",children:[]}}function Re(){return{type:"code",lang:null,meta:null,value:""}}function Ee(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Et(){return{type:"emphasis",children:[]}}function st(){return{type:"heading",depth:0,children:[]}}function ut(){return{type:"break"}}function Ne(){return{type:"html",value:""}}function It(){return{type:"image",title:null,url:"",alt:null}}function Q(){return{type:"link",title:null,url:"",children:[]}}function Pe(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Oe(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Lt(){return{type:"paragraph",children:[]}}function qe(){return{type:"strong",children:[]}}function Pi(){return{type:"text",value:""}}function zi(){return{type:"thematicBreak"}}}function Ie(e){return{line:e.line,column:e.column,offset:e.offset}}function qr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?qr(e,r):Aa(e,r)}}function Aa(e,t){let n;for(n in t)if($r.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Gn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ke({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ke({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ke({start:t.start,end:t.end})+") is still open")}function Ta(e){const t=this;t.parser=n;function n(r){return Ia(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Pa(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function za(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
-
`}]}function Ma(e,t){const n=t.value?t.value+`
|
|
6
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Da(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fa(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ra(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$e(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function Na(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oa(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Yr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function _a(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yr(e,t);const i={src:$e(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function ja(e,t){const n={src:$e(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ba(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Va(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Yr(e,t);const i={href:$e(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ua(e,t){const n={href:$e(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ha(e,t,n){const r=e.all(t),i=n?Wa(n):Xr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
7
|
-
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
|
|
8
|
-
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function Wa(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Xr(n[r])}return t}function Xr(e){const t=e.spread;return t??e.children.length>1}function $a(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function qa(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ya(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Xa(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ga(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=cn(t.children[1]),s=Lr(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Qa(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],p={},h=l?l[s]:void 0;h&&(p.align=h);let g={type:"element",tagName:o,properties:p,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Za(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Qn=9,Zn=32;function Ja(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Jn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Jn(t.slice(i),i>0,!1)),o.join("")}function Jn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Qn||o===Zn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Qn||o===Zn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ka(e,t){const n={type:"text",value:Ja(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function es(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ts={blockquote:Pa,break:za,code:Ma,delete:Da,emphasis:Fa,footnoteReference:Ra,heading:Na,html:Oa,imageReference:_a,image:ja,inlineCode:Ba,linkReference:Va,link:Ua,listItem:Ha,list:$a,paragraph:qa,root:Ya,strong:Xa,table:Ga,tableCell:Za,tableRow:Qa,text:Ka,thematicBreak:es,toml:ct,yaml:ct,definition:ct,footnoteDefinition:ct};function ct(){}const Gr=-1,bt=0,tt=1,gt=2,kn=3,xn=4,yn=5,wn=6,Qr=7,Zr=8,Kn=typeof self=="object"?self:globalThis,ns=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case bt:case Gr:return n(l,i);case tt:{const a=n([],i);for(const s of l)a.push(r(s));return a}case gt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case kn:return n(new Date(l),i);case xn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case yn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case wn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case Qr:{const{name:a,message:s}=l;return n(new Kn[a](s),i)}case Zr:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new Kn[o](l),i)};return r},er=e=>ns(new Map,e)(0),Be="",{toString:rs}={},{keys:is}=Object,Je=e=>{const t=typeof e;if(t!=="object"||!e)return[bt,t];const n=rs.call(e).slice(8,-1);switch(n){case"Array":return[tt,Be];case"Object":return[gt,Be];case"Date":return[kn,Be];case"RegExp":return[xn,Be];case"Map":return[yn,Be];case"Set":return[wn,Be];case"DataView":return[tt,n]}return n.includes("Array")?[tt,n]:n.includes("Error")?[Qr,n]:[gt,n]},ft=([e,t])=>e===bt&&(t==="function"||t==="symbol"),ls=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Je(l);switch(a){case bt:{let f=l;switch(s){case"bigint":a=Zr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([Gr],l)}return i([a,f],l)}case tt:{if(s){let p=l;return s==="DataView"?p=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(l)),i([s,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case gt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of is(l))(e||!ft(Je(l[p])))&&f.push([o(p),o(l[p])]);return c}case kn:return i([a,l.toISOString()],l);case xn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case yn:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(ft(Je(p))||ft(Je(h))))&&f.push([o(p),o(h)]);return c}case wn:{const f=[],c=i([a,f],l);for(const p of l)(e||!ft(Je(p)))&&f.push(o(p));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},tr=(e,{json:t,lossy:n}={})=>{const r=[];return ls(!(t||n),!!t,new Map,r)(e),r},kt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?er(tr(e,t)):structuredClone(e):(e,t)=>er(tr(e,t));function os(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function as(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ss(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||os,r=e.options.footnoteBackLabel||as,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=$e(c.toLowerCase());let h=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++h<=b;){g.length>0&&g.push({type:"text",value:" "});let E=typeof n=="string"?n:n(s,h);typeof E=="string"&&(E={type:"text",value:E}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,h),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const E=S.children[S.children.length-1];E&&E.type==="text"?E.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else f.push(...g);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...kt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
9
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
10
|
-
`}]}}const St=(function(e){if(e==null)return hs;if(typeof e=="function")return vt(e);if(typeof e=="object")return Array.isArray(e)?us(e):cs(e);if(typeof e=="string")return fs(e);throw new Error("Expected function, string, or object as test")});function us(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=St(e[n]);return vt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function cs(e){const t=e;return vt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function fs(e){return vt(t);function t(n){return n&&n.type===e}}function vt(e){return t;function t(n,r,i){return!!(ps(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function hs(){return!0}function ps(e){return e!==null&&typeof e=="object"&&"type"in e}const Jr=[],ds=!0,en=!1,ms="skip";function Kr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=St(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Jr,g,b,S;if((!t||o(s,u,f[f.length-1]||void 0))&&(h=gs(n(s,f)),h[0]===en))return h;if("children"in s&&s.children){const k=s;if(k.children&&h[0]!==ms)for(b=(r?k.children.length:-1)+l,S=f.concat(k);b>-1&&b<k.children.length;){const E=k.children[b];if(g=a(E,b,S)(),g[0]===en)return g;b=typeof g[1]=="number"?g[1]:b+l}}return h}}}function gs(e){return Array.isArray(e)?e:typeof e=="number"?[ds,e]:e==null?Jr:[e]}function bn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Kr(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const tn={}.hasOwnProperty,ks={};function xs(e,t){const n=t||ks,r=new Map,i=new Map,o=new Map,l={...ts,...n.handlers},a={all:u,applyData:ws,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:ys,wrap:Ss};return bn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function s(f,c){const p=f.type,h=a.handlers[p];if(tn.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:b,...S}=f,k=kt(S);return k.children=a.all(f),k}return kt(f)}return(a.options.unknownHandler||bs)(a,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const g=a.one(p[h],f);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=nr(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=nr(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function ys(e,t){e.position&&(t.position=ol(e))}function ws(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,kt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function bs(e,t){const n=t.data||{},r="value"in t&&!(tn.call(n,"hProperties")||tn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ss(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
11
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
12
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
13
|
-
`}),n}function nr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function rr(e,t){const n=xs(e,t),r=n.one(e,void 0),i=ss(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
14
|
-
`},i),o}function vs(e,t){return e&&"run"in e?async function(n,r){const i=rr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return rr(n,{file:r,...e||t})}}function ir(e){if(e)throw e}var Ft,lr;function Cs(){if(lr)return Ft;lr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ft=function s(){var u,f,c,p,h,g,b=arguments[0],S=1,k=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},S=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});S<k;++S)if(u=arguments[S],u!=null)for(f in u)c=a(b,f),p=a(u,f),b!==p&&(E&&p&&(o(p)||(h=i(p)))?(h?(h=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(b,{name:f,newValue:s(E,g,p)})):typeof p<"u"&&l(b,{name:f,newValue:p}));return b},Ft}var Es=Cs();const Rt=yr(Es);function nn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Is(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Ls(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ls(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const xe={basename:As,dirname:Ts,extname:Ps,join:zs,sep:"/"};function As(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');at(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Ts(e){if(at(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ps(e){at(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function zs(...e){let t=-1,n;for(;++t<e.length;)at(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ms(n)}function Ms(e){at(e);const t=e.codePointAt(0)===47;let n=Ds(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ds(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function at(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fs={cwd:Rs};function Rs(){return"/"}function rn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ns(e){if(typeof e=="string")e=new URL(e);else if(!rn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Os(e)}function Os(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Nt=["history","path","basename","stem","extname","dirname"];class ei{constructor(t){let n;t?rn(t)?n={path:t}:typeof t=="string"||_s(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Fs.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Nt.length;){const o=Nt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Nt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?xe.basename(this.path):void 0}set basename(t){_t(t,"basename"),Ot(t,"basename"),this.path=xe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xe.dirname(this.path):void 0}set dirname(t){or(this.basename,"dirname"),this.path=xe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xe.extname(this.path):void 0}set extname(t){if(Ot(t,"extname"),or(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=xe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){rn(t)&&(t=Ns(t)),_t(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xe.basename(this.path,this.extname):void 0}set stem(t){_t(t,"stem"),Ot(t,"stem"),this.path=xe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new re(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ot(e,t){if(e&&e.includes(xe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xe.sep+"`")}function _t(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function or(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function _s(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const js=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Bs={}.hasOwnProperty;class Sn extends js{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=Is()}copy(){const t=new Sn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Vt("data",this.frozen),this.namespace[t]=n,this):Bs.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ht(t),r=this.parser||this.Parser;return jt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),jt("process",this.parser||this.Parser),Bt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=ht(t),s=r.parse(a);r.run(s,a,function(f,c,p){if(f||!c||!p)return u(f);const h=c,g=r.stringify(h,p);Hs(g)?p.value=g:p.result=g,u(f,p)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),jt("processSync",this.parser||this.Parser),Bt("processSync",this.compiler||this.Compiler),this.process(t,i),sr("processSync","process",n),r;function i(o,l){n=!0,ir(o),r=l}}run(t,n,r){ar(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=ht(n);i.run(t,s,u);function u(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),sr("runSync","run",r),i;function o(l,a){ir(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=ht(n),i=this.compiler||this.Compiler;return Bt("stringify",i),ar(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Vt("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Rt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[h,...g]=f;const b=r[p][1];nn(b)&&nn(h)&&(h=Rt(!0,b,h)),r[p]=[u,h,...g]}}}}const Vs=new Sn().freeze();function jt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ar(e){if(!nn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ht(e){return Us(e)?e:new ei(e)}function Us(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Hs(e){return typeof e=="string"||Ws(e)}function Ws(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $s="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ur=[],cr={allowDangerousHtml:!0},qs=/^(https?|ircs?|mailto|xmpp)$/i,Ys=[{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 Xs(e){const t=Gs(e),n=Qs(e);return Zs(t.runSync(t.parse(n),n),e)}function Gs(e){const t=e.rehypePlugins||ur,n=e.remarkPlugins||ur,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cr}:cr;return Vs().use(Ta).use(n).use(vs,r).use(t)}function Qs(e){const t=e.children||"",n=new ei;return typeof t=="string"&&(n.value=t),n}function Zs(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||Js;for(const f of Ys)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+$s+f.id,void 0);return bn(e,u),fl(e,{Fragment:z.Fragment,components:i,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function u(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in zt)if(Object.hasOwn(zt,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],b=zt[h];(b===null||b.includes(f.tagName))&&(f.properties[h]=s(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function Js(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||qs.test(e.slice(0,t))?e:""}function fr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ks(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eu(e,t,n){const i=St((n||{}).ignore||[]),o=tu(t);let l=-1;for(;++l<o.length;)Kr(e,"text",a);function a(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return s(u,f)}function s(u,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let g=0;const S=c.children.indexOf(u);let k=!1,E=[];p.lastIndex=0;let v=p.exec(u.value);for(;v;){const F=v.index,D={index:v.index,input:v.input,stack:[...f,u]};let y=h(...v,D);if(typeof y=="string"&&(y=y.length>0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=F+1:(g!==F&&E.push({type:"text",value:u.value.slice(g,F)}),Array.isArray(y)?E.push(...y):y&&E.push(y),g=F+v[0].length,k=!0),!p.global)break;v=p.exec(u.value)}return k?(g<u.value.length&&E.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function tu(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([nu(i[0]),ru(i[1])])}return t}function nu(e){return typeof e=="string"?new RegExp(Ks(e),"g"):e}function ru(e){return typeof e=="function"?e:function(){return e}}const Ut="phrasing",Ht=["autolink","link","image","label"];function iu(){return{transforms:[fu],enter:{literalAutolink:ou,literalAutolinkEmail:Wt,literalAutolinkHttp:Wt,literalAutolinkWww:Wt},exit:{literalAutolink:cu,literalAutolinkEmail:uu,literalAutolinkHttp:au,literalAutolinkWww:su}}}function lu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ut,notInConstruct:Ht},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ut,notInConstruct:Ht},{character:":",before:"[ps]",after:"\\/",inConstruct:Ut,notInConstruct:Ht}]}}function ou(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Wt(e){this.config.enter.autolinkProtocol.call(this,e)}function au(e){this.config.exit.autolinkProtocol.call(this,e)}function su(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uu(e){this.config.exit.autolinkEmail.call(this,e)}function cu(e){this.exit(e)}function fu(e){eu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,hu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),pu]],{ignore:["link","linkReference"]})}function hu(e,t,n,r,i){let o="";if(!ti(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!du(n)))return!1;const l=mu(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function pu(e,t,n,r){return!ti(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function du(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function mu(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=fr(e,"(");let o=fr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ti(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||De(n)||yt(n))&&(!t||n!==47)}ni.peek=Cu;function gu(){this.buffer()}function ku(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function xu(){this.buffer()}function yu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=me(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bu(e){this.exit(e)}function Su(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=me(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vu(e){this.exit(e)}function Cu(){return"["}function ni(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Eu(){return{enter:{gfmFootnoteCallString:gu,gfmFootnoteCall:ku,gfmFootnoteDefinitionLabelString:xu,gfmFootnoteDefinition:yu},exit:{gfmFootnoteCallString:wu,gfmFootnoteCall:bu,gfmFootnoteDefinitionLabelString:Su,gfmFootnoteDefinition:vu}}}function Iu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ni},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
|
|
15
|
-
`:" ")+o.indentLines(o.containerFlow(r,a.current()),t?ri:Lu))),u(),s}}function Lu(e,t,n){return t===0?e:ri(e,t,n)}function ri(e,t,n){return(n?"":" ")+e}const Au=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ii.peek=Du;function Tu(){return{canContainEols:["delete"],enter:{strikethrough:zu},exit:{strikethrough:Mu}}}function Pu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Au}],handlers:{delete:ii}}}function zu(e){this.enter({type:"delete",children:[]},e)}function Mu(e){this.exit(e)}function ii(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Du(){return"~"}function Fu(e){return e.length}function Ru(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Fu,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],S=[];let k=-1;for(e[f].length>u&&(u=e[f].length);++k<e[f].length;){const E=Nu(e[f][k]);if(n.alignDelimiters!==!1){const v=i(E);S[k]=v,(s[k]===void 0||v>s[k])&&(s[k]=v)}b.push(E)}l[f]=b,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=hr(r[c]);else{const b=hr(r);for(;++c<u;)o[c]=b}c=-1;const p=[],h=[];for(;++c<u;){const b=o[c];let S="",k="";b===99?(S=":",k=":"):b===108?S=":":b===114&&(k=":");let E=n.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-k.length);const v=S+"-".repeat(E)+k;n.alignDelimiters!==!1&&(E=S.length+E+k.length,E>s[c]&&(s[c]=E),h[c]=E),p[c]=v}l.splice(1,0,p),a.splice(1,0,h),f=-1;const g=[];for(;++f<l.length;){const b=l[f],S=a[f];c=-1;const k=[];for(;++c<u;){const E=b[c]||"";let v="",F="";if(n.alignDelimiters!==!1){const D=s[c]-(S[c]||0),y=o[c];y===114?v=" ".repeat(D):y===99?D%2?(v=" ".repeat(D/2+.5),F=" ".repeat(D/2-.5)):(v=" ".repeat(D/2),F=v):F=" ".repeat(D)}n.delimiterStart!==!1&&!c&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||c)&&k.push(" "),n.alignDelimiters!==!1&&k.push(v),k.push(E),n.alignDelimiters!==!1&&k.push(F),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&k.push("|")}g.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return g.join(`
|
|
16
|
-
`)}function Nu(e){return e==null?"":String(e)}function hr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Ou(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),_u);return i(),l}function _u(e,t,n){return">"+(n?"":" ")+e}function ju(e,t){return pr(e,t.inConstruct,!0)&&!pr(e,t.notInConstruct,!1)}function pr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function dr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
17
|
-
`&&ju(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
18
|
-
`}function Bu(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function Vu(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Uu(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Hu(e,t,n,r){const i=Uu(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Vu(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,Wu);return c(),p}const a=n.createTracker(r),s=i.repeat(Math.max(Bu(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
|
|
19
|
-
`,encode:["`"],...a.current()})),c()}return f+=a.move(`
|
|
20
|
-
`),o&&(f+=a.move(o+`
|
|
21
|
-
`)),f+=a.move(s),u(),f}function Wu(e,t,n){return(n?"":" ")+e}function vn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function $u(e,t,n,r){const i=vn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("[");return u+=s.move(n.safe(n.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
22
|
-
`,...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function qu(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function it(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xt(e,t,n){const r=He(e),i=He(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}li.peek=Yu;function li(e,t,n,r){const i=qu(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=xt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=xt(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+it(c));const h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function Yu(e,t,n){return n.options.emphasis||"*"}function Xu(e,t){let n=!1;return bn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,en}),!!((!e.depth||e.depth<3)&&dn(e)&&(t.options.setext||n))}function Gu(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Xu(e,n)){const f=n.enter("headingSetext"),c=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
23
|
-
`,after:`
|
|
24
|
-
`});return c(),f(),p+`
|
|
25
|
-
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
26
|
-
`))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
27
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=it(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}oi.peek=Qu;function oi(e){return e.value||""}function Qu(){return"<"}ai.peek=Zu;function ai(e,t,n,r){const i=vn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function Zu(){return"!"}si.peek=Ju;function si(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function Ju(){return"!"}ui.peek=Ku;function ui(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function Ku(){return"`"}function ci(e,t){const n=dn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fi.peek=ec;function fi(e,t,n,r){const i=vn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(ci(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function ec(e,t,n){return ci(e,n)?"<":"["}hi.peek=tc;function hi(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function tc(){return"["}function Cn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nc(e){const t=Cn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function rc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function pi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ic(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?rc(n):Cn(n);const a=e.ordered?l==="."?")":".":nc(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),pi(n)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function lc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function oc(e,t,n,r){const i=lc(n);let o=n.bulletCurrent||Cn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function ac(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const sc=St(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uc(e,t,n,r){return(e.children.some(function(l){return sc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function cc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}di.peek=fc;function di(e,t,n,r){const i=cc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=xt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=it(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=xt(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+it(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function fc(e,t,n){return n.options.strong||"*"}function hc(e,t,n,r){return n.safe(e.value,r)}function pc(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function dc(e,t,n){const r=(pi(n)+(n.options.ruleSpaces?" ":"")).repeat(pc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const mi={blockquote:Ou,break:dr,code:Hu,definition:$u,emphasis:li,hardBreak:dr,heading:Gu,html:oi,image:ai,imageReference:si,inlineCode:ui,link:fi,linkReference:hi,list:ic,listItem:oc,paragraph:ac,root:uc,strong:di,text:hc,thematicBreak:dc};function mc(){return{enter:{table:gc,tableData:mr,tableHeader:mr,tableRow:xc},exit:{codeText:yc,table:kc,tableData:$t,tableHeader:$t,tableRow:$t}}}function gc(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function kc(e){this.exit(e),this.data.inTable=void 0}function xc(e){this.enter({type:"tableRow",children:[]},e)}function $t(e){this.exit(e)}function mr(e){this.enter({type:"tableCell",children:[]},e)}function yc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,wc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function wc(e,t){return t==="|"?t:e}function bc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
28
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:s,tableRow:a}};function l(h,g,b,S){return u(f(h,b,S),h.align)}function a(h,g,b,S){const k=c(h,b,S),E=u([k]);return E.slice(0,E.indexOf(`
|
|
29
|
-
`))}function s(h,g,b,S){const k=b.enter("tableCell"),E=b.enter("phrasing"),v=b.containerPhrasing(h,{...S,before:o,after:o});return E(),k(),v}function u(h,g){return Ru(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,b){const S=h.children;let k=-1;const E=[],v=g.enter("table");for(;++k<S.length;)E[k]=c(S[k],g,b);return v(),E}function c(h,g,b){const S=h.children;let k=-1;const E=[],v=g.enter("tableRow");for(;++k<S.length;)E[k]=s(S[k],h,g,b);return v(),E}function p(h,g,b){let S=mi.inlineCode(h,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Sc(){return{exit:{taskListCheckValueChecked:gr,taskListCheckValueUnchecked:gr,paragraph:Cc}}}function vc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ec}}}function gr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Cc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ec(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=mi.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function Ic(){return[iu(),Eu(),Tu(),mc(),Sc()]}function Lc(e){return{extensions:[lu(),Iu(e),Pu(),bc(e),vc()]}}const Ac={tokenize:Fc,partial:!0},gi={tokenize:Rc,partial:!0},ki={tokenize:Nc,partial:!0},xi={tokenize:Oc,partial:!0},Tc={tokenize:_c,partial:!0},yi={name:"wwwAutolink",tokenize:Mc,previous:bi},wi={name:"protocolAutolink",tokenize:Dc,previous:Si},ve={name:"emailAutolink",tokenize:zc,previous:vi},ye={};function Pc(){return{text:ye}}let Me=48;for(;Me<123;)ye[Me]=ve,Me++,Me===58?Me=65:Me===91&&(Me=97);ye[43]=ve;ye[45]=ve;ye[46]=ve;ye[95]=ve;ye[72]=[ve,wi];ye[104]=[ve,wi];ye[87]=[ve,yi];ye[119]=[ve,yi];function zc(e,t,n){const r=this;let i,o;return l;function l(c){return!ln(c)||!vi.call(r,r.previous)||En(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return ln(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(Tc,f,u)(c):c===45||c===95||ne(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ie(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function Mc(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!bi.call(r,r.previous)||En(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ac,e.attempt(gi,e.attempt(ki,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Dc(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Si.call(r,r.previous)&&!En(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(ie(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||mt(c)||X(c)||De(c)||yt(c)?n(c):e.attempt(gi,e.attempt(ki,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function Fc(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Rc(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(xi,s,a)(u):u===null||X(u)||De(u)||u!==45&&yt(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Nc(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(xi,t,o)(l):l===null||X(l)||De(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Oc(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||X(a)||De(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||X(a)||De(a)?t(a):r(a)}function o(a){return ie(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):ie(a)?(e.consume(a),l):n(a)}}function _c(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return ne(o)?n(o):t(o)}}function bi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function Si(e){return!ie(e)}function vi(e){return!(e===47||ln(e))}function ln(e){return e===43||e===45||e===46||e===95||ne(e)}function En(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const jc={tokenize:Yc,partial:!0};function Bc(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Wc,continuation:{tokenize:$c},exit:qc}},text:{91:{name:"gfmFootnoteCall",tokenize:Hc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Vc,resolveTo:Uc}}}}function Vc(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=me(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Uc(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Hc(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||X(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(me(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return X(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Wc(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||X(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=me(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return X(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),W(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function $c(e,t,n){return e.check(ot,t,e.attempt(jc,t,n))}function qc(e){e.exit("gfmFootnoteDefinition")}function Yc(e,t,n){const r=this;return W(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Xc(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ce(p,p.length,0,wt(h,l.slice(u+1,s),a)),ce(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ce(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const b=He(u);if(g===126)return c>1?s(g):(l.consume(g),c++,h);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),k=He(g);return S._open=!k||k===2&&!!b,S._close=!b||b===2&&!!k,a(g)}}}class Gc{constructor(){this.map=[]}add(t,n,r){Qc(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Qc(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Zc(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Jc(){return{flow:{null:{name:"table",tokenize:Kc,resolveAll:ef}}}}function Kc(e,t,n){const r=this;let i=0,o=0,l;return a;function a(x){let A=r.events.length-1;for(;A>-1;){const P=r.events[A][1].type;if(P==="lineEnding"||P==="linePrefix")A--;else break}const T=A>-1?r.events[A][1].type:null,U=T==="tableHead"||T==="tableRow"?y:s;return U===y&&r.parser.lazy[r.now().line]?n(x):U(x)}function s(x){return e.enter("tableHead"),e.enter("tableRow"),u(x)}function u(x){return x===124||(l=!0,o+=1),f(x)}function f(x){return x===null?n(x):M(x)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):n(x):B(x)?W(e,f,"whitespace")(x):(o+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(x)))}function c(x){return x===null||x===124||X(x)?(e.exit("data"),f(x)):(e.consume(x),x===92?p:c)}function p(x){return x===92||x===124?(e.consume(x),c):c(x)}function h(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),l=!1,B(x)?W(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):g(x))}function g(x){return x===45||x===58?S(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),b):D(x)}function b(x){return B(x)?W(e,S,"whitespace")(x):S(x)}function S(x){return x===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),k):x===45?(o+=1,k(x)):x===null||M(x)?F(x):D(x)}function k(x){return x===45?(e.enter("tableDelimiterFiller"),E(x)):D(x)}function E(x){return x===45?(e.consume(x),E):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(x))}function v(x){return B(x)?W(e,F,"whitespace")(x):F(x)}function F(x){return x===124?g(x):x===null||M(x)?!l||i!==o?D(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):D(x)}function D(x){return n(x)}function y(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||M(x)?(e.exit("tableRow"),t(x)):B(x)?W(e,N,"whitespace")(x):(e.enter("data"),V(x))}function V(x){return x===null||x===124||X(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?_:V)}function _(x){return x===92||x===124?(e.consume(x),V):V(x)}}function ef(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new Gc;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(kr(p,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=pt(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=pt(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=pt(p,t,o,i,n,c)):l[1]!==0&&(c=pt(p,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&kr(p,t,s,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Zc(t.events,n))}return e}function pt(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Ve(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Ve(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Ve(t.events,n[2]),f=Ve(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Ve(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function kr(e,t,n,r,i){const o=[],l=Ve(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ve(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const tf={name:"tasklistCheck",tokenize:rf};function nf(){return{text:{91:tf}}}function rf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return X(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return M(s)?t(s):B(s)?e.check({tokenize:lf},t,n)(s):n(s)}}function lf(e,t,n){return W(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function of(e){return Fr([Pc(),Bc(),Xc(e),Jc(),nf()])}const af={};function sf(e){const t=this,n=e||af,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(of(n)),o.push(Ic()),l.push(Lc(n))}const uf=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","readonly","return","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]),cf=new Set(["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","False","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","try","while","with","yield"]),ff=new Set(["case","do","done","elif","else","esac","export","fi","for","function","if","in","local","readonly","return","then","until","while"]),hf=new Set(["add","alter","and","as","asc","between","by","create","delete","desc","drop","from","group","having","insert","into","join","left","like","limit","not","null","offset","on","or","order","right","select","set","table","union","update","values","where"]),pf=new Set(["add","arg","cmd","copy","entrypoint","env","expose","from","healthcheck","label","maintainer","onbuild","run","shell","stopsignal","user","volume","workdir","as"]),df=new Set(["trace","debug","info","warn","warning","error","fatal"]);function Qf({workspaceId:e,filePath:t,open:n,onClose:r,onSaved:i,diffContent:o}){const[l,a]=Y.useState(null),[s,u]=Y.useState(""),[f,c]=Y.useState(!1),[p,h]=Y.useState(!1),[g,b]=Y.useState("preview"),[S,k]=Y.useState("regular"),[E,v]=Y.useState(0),[F,D]=Y.useState("fit"),[y,N]=Y.useState(1),[V,_]=Y.useState(1),[x,A]=Y.useState(110),[T,U]=Y.useState(!0),{showToast:P}=Fi(),L=Ri(),$=Y.useRef(r),Z=Y.useRef(P),le=Y.useMemo(()=>Ln(t),[t]),he=Y.useMemo(()=>Hf(o),[o]),d=(l==null?void 0:l.kind)??null,te=!!(l!=null&&l.capabilities.canEdit),pe=!!(l!=null&&l.capabilities.canRefresh),m=xf(d,le),J=Y.useMemo(()=>yf(l,L.isDesktop),[L.isDesktop,l]),we=Y.useMemo(()=>an(J,E),[J,E]),ee=Y.useMemo(()=>wf(J,E,V,x,T),[J,E,V,x,T]),Ae=Y.useMemo(()=>an(J,E),[J,E]),ge=(l==null?void 0:l.content)??"",ke=te&&s!==ge,Ce=Ii(d),Re=on(d);if(Y.useEffect(()=>{$.current=r},[r]),Y.useEffect(()=>{Z.current=P},[P]),Y.useEffect(()=>{if(!n){a(null),u(""),c(!1),h(!1),b(Ci(t,null)),Ei({setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:_,setPdfScale:A,setPdfFitWidth:U}),k("regular");return}if(!e||!t)return;const Q=e,Pe=t;let Oe=!1;async function Lt(){c(!0);try{const qe=await At(Q,Pe);Oe||qt(qe,Pe,{preserveMode:!1,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:_,setPdfScale:A,setPdfFitWidth:U})}catch(qe){Oe||(Z.current({title:Yt(qe,j("conversation.filePanelOpenFailed")),tone:"error"}),$.current())}finally{Oe||c(!1)}}return Lt(),()=>{Oe=!0}},[t,n,e]),!n||!t)return null;const Ee=t,Te=e;async function Et(){if(!(!Te||!(l!=null&&l.version)||!te)){h(!0);try{await Ni(Te,Ee,s,l.version);const Q=await At(Te,Ee);qt(Q,Ee,{preserveMode:!1,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:_,setPdfScale:A,setPdfFitWidth:U}),await i(Ee),P({title:j("conversation.filePanelSaveSuccess"),tone:"success"})}catch(Q){P({title:Yt(Q,j("conversation.filePanelSaveFailed")),tone:"error"})}finally{h(!1)}}}async function st(){if(!(!Te||!pe||ke)){c(!0);try{const Q=await At(Te,Ee);qt(Q,Ee,{preserveMode:!0,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:_,setPdfScale:A,setPdfFitWidth:U}),v(Pe=>Pe+1)}catch(Q){P({title:Yt(Q,j("conversation.fileViewerRefreshFailed")),tone:"error"})}finally{c(!1)}}}async function ut(){if(!J)return;const Q=await L.bridge.openExternal(J);Q.ok||P({title:Q.detail??j("conversation.fileViewerOpenExternalFailed"),tone:"error"})}const Ne=gf({canShowPreviewTab:Ce,canShowCodeTab:Re,canEdit:te}),It=kf({preview:l,isDirty:ke,handleRefreshPreview:st,handleOpenExternal:ut,imageScaleMode:F,imageScale:y,setImageScale:N,setImageScaleMode:D,pdfPage:V,setPdfPage:_,pdfScale:x,setPdfScale:A,pdfFitWidth:T,setPdfFitWidth:U});return z.jsxs(Di,{open:n,title:t,description:j("conversation.fileViewerHint").replace("{language}",m),size:S,layout:"viewer",className:`file-viewer-modal${L.isDesktop&&S!=="full"?" is-resizable":""}`,bodyClassName:"file-viewer-modal-body",onClose:r,children:[z.jsxs("div",{className:"file-viewer-toolbar",children:[z.jsxs("div",{className:"file-viewer-toolbar-start",children:[z.jsxs("div",{className:"file-viewer-tabs",role:"tablist","aria-label":j("conversation.fileViewerModeLabel"),children:[Ne.includes("preview")?z.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="preview",role:"tab","aria-selected":g==="preview",onClick:()=>b("preview"),children:j("conversation.fileViewerPreview")}):null,Ne.includes("code")?z.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="code",role:"tab","aria-selected":g==="code",onClick:()=>b("code"),children:j("conversation.fileViewerCode")}):null,Ne.includes("edit")?z.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="edit",role:"tab","aria-selected":g==="edit",onClick:()=>b("edit"),disabled:!te,children:j("conversation.fileViewerEdit")}):null]}),z.jsx("span",{className:"file-viewer-language",children:m})]}),z.jsxs("div",{className:"file-viewer-toolbar-end",children:[z.jsxs("div",{className:"file-viewer-size-group",role:"group","aria-label":j("conversation.fileViewerSizeLabel"),children:[z.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="regular",onClick:()=>k("regular"),children:j("conversation.fileViewerSizeDefault")}),z.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="xwide",onClick:()=>k("xwide"),children:j("conversation.fileViewerSizeWide")}),z.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="full",onClick:()=>k("full"),children:j("conversation.fileViewerSizeFull")})]}),z.jsx("div",{className:"file-viewer-actions",children:It.map(Q=>z.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":Q.active?"true":void 0,onClick:()=>void Q.onClick(),disabled:Q.disabled,children:Q.label},Q.id))}),te?z.jsx("button",{type:"button",className:"primary-button",onClick:()=>void Et(),disabled:!ke||p,children:p?j("conversation.filePanelSaving"):j("conversation.filePanelSave")}):null]})]}),z.jsx("div",{className:"file-viewer-body",children:f?z.jsx("p",{className:"status-text",children:j("common.loading")}):(l==null?void 0:l.supported)===!1?z.jsx("p",{className:"status-text",children:l.reason??j("conversation.filePanelUnsupported")}):g==="edit"?z.jsx("textarea",{className:"file-viewer-editor","data-testid":"file-viewer-editor",value:s,onChange:Q=>u(Q.target.value),spellCheck:!1}):g==="preview"&&d==="html"?z.jsx(bf,{src:Ae,filePath:t}):g==="preview"&&d==="image"?z.jsx(Sf,{src:we,filePath:t,scale:y,scaleMode:F}):g==="preview"&&d==="pdf"?z.jsx(vf,{src:ee,filePath:t}):g==="preview"&&d==="markdown"?z.jsx(Cf,{content:s}):z.jsx(Li,{content:s,language:le,overviewMarkers:he})})]})}function Ci(e,t){return t==="markdown"||t==="html"||t==="image"||t==="pdf"||Bf(e??"")||Vf(e??"")?"preview":"code"}function qt(e,t,n){n.setPreview(e),n.setEditorContent(e.content??""),n.setMode(r=>n.preserveMode&&mf(r,e.kind)?r:Ci(t,e.kind)),Ei(n)}function Ei(e){e.setResourceRefreshVersion(0),e.setImageScale(1),e.setImageScaleMode("fit"),e.setPdfPage(1),e.setPdfScale(110),e.setPdfFitWidth(!0)}function Ii(e){return e==="markdown"||e==="html"||e==="image"||e==="pdf"}function on(e){return e==="text"||e==="markdown"||e==="html"}function mf(e,t){return e==="preview"?Ii(t):on(t)}function gf(e){const t=[];return e.canShowPreviewTab&&t.push("preview"),e.canShowCodeTab?(t.push("code"),t.push("edit")):e.canEdit&&t.push("edit"),t}function kf(e){var r;if(!((r=e.preview)!=null&&r.supported))return[];const t=[],n=!e.preview.capabilities.canRefresh||e.isDirty;return e.preview.kind==="image"&&t.push({id:"image-zoom-out",label:j("conversation.fileViewerZoomOut"),onClick:()=>{e.setImageScaleMode("custom"),e.setImageScale(i=>Math.max(.25,xr(i-.25)))}},{id:"image-zoom-in",label:j("conversation.fileViewerZoomIn"),onClick:()=>{e.setImageScaleMode("custom"),e.setImageScale(i=>Math.min(4,xr(i+.25)))}},{id:"image-fit",label:j("conversation.fileViewerFit"),active:e.imageScaleMode==="fit",onClick:()=>{e.setImageScaleMode("fit"),e.setImageScale(1)}},{id:"image-actual",label:j("conversation.fileViewerActualSize"),active:e.imageScaleMode==="actual",onClick:()=>{e.setImageScaleMode("actual"),e.setImageScale(1)}},{id:"image-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),e.preview.kind==="pdf"&&t.push({id:"pdf-prev-page",label:j("conversation.fileViewerPreviousPage"),disabled:e.pdfPage<=1,onClick:()=>e.setPdfPage(i=>Math.max(1,i-1))},{id:"pdf-page-indicator",label:j("conversation.fileViewerPageIndicator").replace("{page}",String(e.pdfPage)),disabled:!0,onClick:()=>{}},{id:"pdf-next-page",label:j("conversation.fileViewerNextPage"),onClick:()=>e.setPdfPage(i=>i+1)},{id:"pdf-zoom-out",label:j("conversation.fileViewerZoomOut"),onClick:()=>{e.setPdfFitWidth(!1),e.setPdfScale(i=>Math.max(50,Math.round(i-10)))}},{id:"pdf-zoom-in",label:j("conversation.fileViewerZoomIn"),onClick:()=>{e.setPdfFitWidth(!1),e.setPdfScale(i=>Math.min(300,Math.round(i+10)))}},{id:"pdf-fit-width",label:j("conversation.fileViewerFitWidth"),active:e.pdfFitWidth,onClick:()=>e.setPdfFitWidth(!0)},{id:"pdf-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),(e.preview.kind==="html"||e.preview.kind==="markdown"||e.preview.kind==="text")&&t.push({id:"text-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),e.preview.previewUrl&&t.push({id:"open-external",label:j("conversation.fileViewerOpenExternal"),onClick:e.handleOpenExternal}),t}function xf(e,t){switch(e){case"image":return j("conversation.fileViewerImage");case"pdf":return j("conversation.fileViewerPdf");case"html":return"HTML";case"markdown":return"Markdown";default:return Ti(t)}}function an(e,t){if(!e)return null;const n=new URL(e,window.location.origin);return n.searchParams.set("_preview",String(t)),n.hash="",n.toString()}function yf(e,t){var n;return e?!t&&e.previewPath&&typeof window<"u"&&((n=window.location)!=null&&n.origin)?new URL(e.previewPath,window.location.origin).toString():e.previewUrl??null:null}function wf(e,t,n,r,i){const o=an(e,t);if(!o)return null;const l=new URL(o,window.location.origin),a=new URLSearchParams;return a.set("page",String(n)),a.set("zoom",i?"page-width":String(r)),l.hash=a.toString(),l.toString()}function xr(e){return Math.round(e*100)/100}function bf({src:e,filePath:t}){return e?z.jsx("div",{className:"file-viewer-html-frame-shell",children:z.jsx("iframe",{className:"file-viewer-html-frame","data-testid":"file-viewer-html-preview",title:t,src:e,sandbox:"allow-forms allow-modals allow-scripts"},e)}):z.jsx("p",{className:"status-text",children:j("conversation.fileViewerHtmlPreviewUnavailable")})}function Sf({src:e,filePath:t,scale:n,scaleMode:r}){return e?z.jsx("div",{className:"file-viewer-media-shell","data-mode":r,children:z.jsx("div",{className:"file-viewer-image-stage",children:z.jsx("img",{className:"file-viewer-image","data-testid":"file-viewer-image-preview","data-mode":r,src:e,alt:t,style:r==="fit"?void 0:{transform:`scale(${n})`}})})}):z.jsx("p",{className:"status-text",children:j("conversation.fileViewerImageUnavailable")})}function vf({src:e,filePath:t}){return e?z.jsx("div",{className:"file-viewer-pdf-shell",children:z.jsx("iframe",{className:"file-viewer-pdf-frame","data-testid":"file-viewer-pdf-preview",title:t,src:e},e)}):z.jsx("p",{className:"status-text",children:j("conversation.fileViewerPdfUnavailable")})}function Cf({content:e}){return z.jsx("div",{className:"markdown-content file-viewer-markdown",children:z.jsx(Xs,{remarkPlugins:[sf],components:{code(t){const n=typeof t.className=="string"?t.className:"",r=/language-([\w-]+)/.exec(n);return r?z.jsx(Li,{content:String(t.children).replace(/\n$/,""),language:An(r[1]??"plain")}):z.jsx("code",{className:n||void 0,children:t.children})}},children:e})})}function Li({content:e,language:t,overviewMarkers:n=[]}){const r=e.split(/\r?\n/),i=Y.useRef(null),o=Y.useMemo(()=>{const l=new Map;for(const a of n)for(let s=0;s<a.span;s++)l.set(a.line+s,a.kind);return l},[n]);return z.jsxs("div",{className:"file-viewer-code-block",children:[z.jsx("div",{className:"file-viewer-code-header",children:Ti(t)}),z.jsxs("div",{className:"file-viewer-scroll-shell",children:[z.jsx("div",{className:"file-viewer-code-body",ref:i,children:r.map((l,a)=>{const s=Ef(l,t),u=a+1,f=o.get(u);return z.jsxs("div",{className:`file-viewer-code-line${f?` diff-line-${f}`:""}`,children:[z.jsx("span",{className:"file-viewer-code-gutter",children:u}),z.jsx("code",{className:"file-viewer-code-content",children:s.length?s.map((c,p)=>z.jsx("span",{className:`code-token ${c.kind}`,children:c.text},`${a}-${p}-${c.text}`)):z.jsx("span",{className:"code-token plain",children:" "})})]},`${a}-${l}`)})}),z.jsx($f,{markers:n,totalLines:r.length,scrollContainerRef:i})]})]})}function Ef(e,t){const n=An(t);return n==="json"?If(e):n==="yaml"?Pf(e):n==="toml"?zf(e):n==="ini"?Ai(e):n==="env"?Mf(e):n==="properties"?Df(e):n==="conf"?Ff(e):n==="editorconfig"?Rf(e):n==="dockerfile"?Nf(e):n==="gitignore"?Of(e):n==="log"?_f(e):n==="python"?nt(e,cf,"#"):n==="shell"?nt(e,ff,"#"):n==="sql"?Tf(e):n==="html"||n==="xml"?Lf(e):n==="css"?Af(e):n==="markdown"?[{text:e,kind:"plain"}]:nt(e,uf,"//")}function nt(e,t,n){const r=[];let i=0;for(;i<e.length;){const o=e.slice(i);if(o.startsWith(n)){r.push({text:o,kind:"comment"});break}const l=/^(?:'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"|`[^`\\]*(?:\\.[^`\\]*)*`)/.exec(o);if(l){r.push({text:l[0],kind:"string"}),i+=l[0].length;continue}const a=/^(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/.exec(o);if(a){r.push({text:a[0],kind:"number"}),i+=a[0].length;continue}const s=/^[A-Za-z_][\w$-]*/.exec(o);if(s){const f=s[0],c=f.toLowerCase();f==="true"||f==="false"||c==="true"||c==="false"?r.push({text:f,kind:"boolean"}):f==="null"||f==="None"||c==="none"?r.push({text:f,kind:"null"}):t.has(f)||t.has(c)?r.push({text:f,kind:"keyword"}):r.push({text:f,kind:"plain"}),i+=f.length;continue}const u=/^(?:===|!==|==|!=|<=|>=|=>|&&|\|\||[+\-*/%=<>!?:|&^~]+)/.exec(o);if(u){r.push({text:u[0],kind:"operator"}),i+=u[0].length;continue}r.push({text:o[0]??"",kind:"plain"}),i+=1}return r}function If(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=/^"(?:[^"\\]|\\.)*"/.exec(r);if(i){const s=e.slice(n+i[0].length).trimStart()[0];t.push({text:i[0],kind:s===":"?"attr":"string"}),n+=i[0].length;continue}const o=/^(?:-?\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i.exec(r);if(o){t.push({text:o[0],kind:"number"}),n+=o[0].length;continue}const l=/^(?:true|false|null)\b/.exec(r);if(l){const s=l[0]==="null"?"null":"boolean";t.push({text:l[0],kind:s}),n+=l[0].length;continue}const a=/^(?::|,|\{|\}|\[|\])/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Lf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("<!--")){t.push({text:r,kind:"comment"});break}const i=/^(<\/?[\w:-]+)/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^([\w:-]+)(=)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=/^(?:'[^']*'|"[^"]*")/.exec(r);if(l){t.push({text:l[0],kind:"string"}),n+=l[0].length;continue}const a=/^(?:\/?>)/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Af(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("/*")){t.push({text:r,kind:"comment"});break}const i=/^(?:'[^']*'|"[^"]*")/.exec(r);if(i){t.push({text:i[0],kind:"string"}),n+=i[0].length;continue}const o=/^([A-Za-z-]+)(\s*:)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=/^(?:#(?:[\da-fA-F]{3,8})|\d+(?:\.\d+)?(?:px|rem|em|vh|vw|%)?)/.exec(r);if(l){t.push({text:l[0],kind:"number"}),n+=l[0].length;continue}const a=/^(?:@media|@supports|@import|@keyframes)\b/.exec(r);if(a){t.push({text:a[0],kind:"keyword"}),n+=a[0].length;continue}const s=/^(?:[{}:;(),.>])/.exec(r);if(s){t.push({text:s[0],kind:"operator"}),n+=s[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Tf(e){return nt(e,hf,"--")}function Pf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^([A-Za-z0-9_.-]+)(\s*:)/.exec(r);if(i){t.push({text:i[1]??"",kind:"attr"}),t.push({text:i[2]??"",kind:"operator"}),n+=i[0].length;continue}const o=/^(?:'[^']*'|"[^"]*")/.exec(r);if(o){t.push({text:o[0],kind:"string"}),n+=o[0].length;continue}const l=/^(?:-?\d+(?:\.\d+)?)/.exec(r);if(l){t.push({text:l[0],kind:"number"}),n+=l[0].length;continue}const a=/^(?:true|false|yes|no|null|~)\b/i.exec(r);if(a){const u=a[0].toLowerCase(),f=u==="null"||u==="~"?"null":"boolean";t.push({text:a[0],kind:f}),n+=a[0].length;continue}const s=/^(?:[-?:,[\]{}|>])/.exec(r);if(s){t.push({text:s[0],kind:"operator"}),n+=s[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function zf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^(\[\[?[^\]]+\]?\])/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^([A-Za-z0-9_.-]+)(\s*=)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=Ct(r,{trueValues:["true"],falseValues:["false"],nullValues:[]});if(l){t.push(...l.tokens),n+=l.length;continue}const a=/^(?:[,[\]{}])/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Ai(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=r.trimStart();if(i.startsWith(";")||i.startsWith("#")){t.push({text:r,kind:"comment"});break}const o=/^(\[[^\]]+\])/.exec(r);if(o){t.push({text:o[0],kind:"tag"}),n+=o[0].length;continue}const l=/^([A-Za-z0-9_.-]+)(\s*[=:])/.exec(r);if(l){t.push({text:l[1]??"",kind:"attr"}),t.push({text:l[2]??"",kind:"operator"}),n+=l[0].length;continue}const a=Ct(r,{trueValues:["true","yes","on"],falseValues:["false","no","off"],nullValues:["null"]});if(a){t.push(...a.tokens),n+=a.length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Mf(e){if(e.trimStart().startsWith("#"))return[{text:e,kind:"comment"}];const n=/^(\s*)(export)(\s+)/.exec(e),r=n?n[0].length:0,i=[];n&&(i.push({text:n[1]??"",kind:"plain"}),i.push({text:n[2]??"",kind:"keyword"}),i.push({text:n[3]??"",kind:"plain"}));const o=e.slice(r),l=/^([A-Za-z_][A-Za-z0-9_]*)(=)/.exec(o);if(!l)return Ai(e);i.push({text:l[1]??"",kind:"attr"}),i.push({text:l[2]??"",kind:"operator"});const a=o.slice(l[0].length),s=Ct(a,{trueValues:["true"],falseValues:["false"],nullValues:["null"]});return s?(i.push(...s.tokens),i):(i.push({text:a,kind:"plain"}),i)}function Df(e){return In(e,{commentPrefixes:["#","!"],allowSection:!1,delimiters:["=",":"]})}function Ff(e){return In(e,{commentPrefixes:["#",";"],allowSection:!0,delimiters:["=",":"]})}function Rf(e){return In(e,{commentPrefixes:["#",";"],allowSection:!0,delimiters:["="]})}function Nf(e){return nt(e,pf,"#")}function Of(e){const t=e.trimStart();if(!t)return[];if(t.startsWith("#"))return[{text:e,kind:"comment"}];if(t.startsWith("!")){const n=e.length-t.length,r=e.slice(0,n),i=t.slice(1);return[{text:r,kind:"plain"},{text:"!",kind:"operator"},{text:i,kind:"string"}]}return[{text:e,kind:"string"}]}function _f(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^(?:\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:[.,]\d{3,6})?(?:Z|[+-]\d{2}:\d{2})?)/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^(?:\[(TRACE|DEBUG|INFO|WARN|WARNING|ERROR|FATAL)\])/.exec(r);if(o){t.push({text:r.slice(0,o[0].length),kind:"keyword"}),n+=o[0].length;continue}const l=/^[A-Za-z_][\w-]*/.exec(r);if(l){const s=l[0];df.has(s.toLowerCase())?t.push({text:s,kind:"keyword"}):t.push({text:s,kind:"plain"}),n+=s.length;continue}const a=/^(?:\d+(?:\.\d+)?)/.exec(r);if(a){t.push({text:a[0],kind:"number"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function In(e,t){const n=e.trimStart();if(t.commentPrefixes.some(s=>n.startsWith(s)))return[{text:e,kind:"comment"}];if(t.allowSection){const s=/^(\[[^\]]+\])/.exec(e);if(s)return[{text:s[0],kind:"tag"}]}const r=/^([A-Za-z0-9_.\-*?]+)(\s*(?:=|:))/.exec(e);if(!r)return[{text:e,kind:"plain"}];const i=(r[2]??"").trim();if(!t.delimiters.includes(i))return[{text:e,kind:"plain"}];const o=[{text:r[1]??"",kind:"attr"},{text:r[2]??"",kind:"operator"}],l=e.slice(r[0].length),a=jf(l);return a.length&&o.push(...a),o}function jf(e){if(!e)return[];const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=Ct(r,{trueValues:["true","yes","on"],falseValues:["false","no","off"],nullValues:["null"]});if(i){t.push(...i.tokens),n+=i.length;continue}if(r.startsWith("#")||r.startsWith(";")){t.push({text:r,kind:"comment"});break}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Ct(e,t){const n=/^(?:'[^']*'|"[^"]*")/.exec(e);if(n)return{tokens:[{text:n[0],kind:"string"}],length:n[0].length};const r=/^(?:-?\d+(?:\.\d+)?)/.exec(e);if(r)return{tokens:[{text:r[0],kind:"number"}],length:r[0].length};const i=/^[A-Za-z0-9_.:+/-]+/.exec(e);if(!i)return null;const o=i[0],l=o.toLowerCase();return t.trueValues.includes(l)?{tokens:[{text:o,kind:"boolean"}],length:o.length}:t.falseValues.includes(l)?{tokens:[{text:o,kind:"boolean"}],length:o.length}:t.nullValues.includes(l)?{tokens:[{text:o,kind:"null"}],length:o.length}:{tokens:[{text:o,kind:"plain"}],length:o.length}}function Ln(e){var r,i;if(!e)return"plain";const t=((r=e.split(/[\\/]/).pop())==null?void 0:r.toLowerCase())??"";if(t===".env"||t.startsWith(".env."))return"env";if(t===".editorconfig")return"editorconfig";if(t==="dockerfile"||t.endsWith(".dockerfile"))return"dockerfile";if(t===".gitignore")return"gitignore";switch(((i=e.split(".").pop())==null?void 0:i.toLowerCase())??""){case"md":case"markdown":return"markdown";case"ts":case"tsx":return"typescript";case"js":case"jsx":case"mjs":case"cjs":return"javascript";case"json":return"json";case"log":return"log";case"properties":return"properties";case"toml":return"toml";case"ini":return"ini";case"conf":return"conf";case"dockerfile":return"dockerfile";case"css":case"scss":case"less":return"css";case"html":case"htm":return"html";case"xml":case"svg":return"xml";case"py":return"python";case"sh":case"bash":case"zsh":return"shell";case"sql":return"sql";case"yml":case"yaml":return"yaml";case"rs":return"rust";case"go":return"go";case"java":return"java";case"c":case"h":case"cpp":case"cc":case"hpp":return"cpp";default:return"plain"}}function An(e){const t=e.toLowerCase();switch(t){case"ts":case"tsx":case"typescript":return"typescript";case"js":case"jsx":case"javascript":return"javascript";case"bash":case"shell":case"sh":case"zsh":return"shell";case"md":case"markdown":return"markdown";case"properties":return"properties";case"toml":return"toml";case"ini":return"ini";case"env":return"env";case"conf":return"conf";case"editorconfig":return"editorconfig";case"dockerfile":return"dockerfile";case"gitignore":return"gitignore";case"log":return"log";default:return t}}function Ti(e){switch(An(e)){case"typescript":return"TypeScript";case"javascript":return"JavaScript";case"markdown":return"Markdown";case"json":return"JSON";case"properties":return"Properties";case"toml":return"TOML";case"ini":return"INI";case"env":return"ENV";case"conf":return"CONF";case"editorconfig":return"EditorConfig";case"dockerfile":return"Dockerfile";case"gitignore":return"GitIgnore";case"log":return"Log";case"css":return"CSS";case"html":return"HTML";case"xml":return"XML";case"python":return"Python";case"shell":return"Shell";case"sql":return"SQL";case"yaml":return"YAML";case"rust":return"Rust";case"go":return"Go";case"java":return"Java";case"cpp":return"C/C++";default:return j("conversation.fileViewerPlainText")}}function Bf(e){return Ln(e)==="markdown"}function Vf(e){return Ln(e)==="html"}function Yt(e,t){return e instanceof Mi?e.message:t}function Uf(e){const t=[],n=e.replace(/\r\n/g,`
|
|
30
|
-
`).split(`
|
|
31
|
-
`);let r=0,i=0;for(const o of n){if(o.startsWith("diff --git")||o.startsWith("index ")||o.startsWith("--- ")||o.startsWith("+++ ")){t.push({kind:"meta",text:o,oldLineNo:null,newLineNo:null});continue}const l=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(o);if(l){r=parseInt(l[1],10),i=parseInt(l[2],10),t.push({kind:"hunk",text:o,oldLineNo:null,newLineNo:null});continue}if(o.startsWith(" ")||o===""){t.push({kind:"context",text:o.slice(1),oldLineNo:r,newLineNo:i}),r++,i++;continue}if(o.startsWith("+")){t.push({kind:"add",text:o.slice(1),oldLineNo:null,newLineNo:i}),i++;continue}if(o.startsWith("-")){t.push({kind:"remove",text:o.slice(1),oldLineNo:r,newLineNo:null}),r++;continue}t.push({kind:"meta",text:o,oldLineNo:null,newLineNo:null})}return t}function Hf(e){if(!(e!=null&&e.trim()))return[];const t=Uf(e),n=[];let r=0,i=[];function o(){if(i.length===0){r=0;return}const l=r>0?"modify":"add";Wf(n,i,l),r=0,i=[]}for(const l of t){if(l.kind==="remove"){r+=1;continue}if(l.kind==="add"){l.newLineNo!==null&&i.push(l.newLineNo);continue}o()}return o(),n}function Wf(e,t,n){const r=t.filter(l=>l>0);if(r.length===0)return;let i=r[0]??1,o=i;for(let l=1;l<r.length;l+=1){const a=r[l]??o;if(a===o+1){o=a;continue}e.push({line:i,span:o-i+1,kind:n}),i=a,o=a}e.push({line:i,span:o-i+1,kind:n})}function $f({markers:e,totalLines:t,scrollContainerRef:n}){const[r,i]=Y.useState({top:0,height:0});if(Y.useEffect(()=>{const l=n.current;if(!l){i({top:0,height:0});return}const a=l;function s(){const{clientHeight:u,scrollHeight:f,scrollTop:c}=a;if(f<=0||u<=0||f<=u){i({top:0,height:0});return}const p=u/f,h=Math.min(100,Math.max(12,p*100)),g=f-u,b=Math.max(0,100-h),S=g<=0?0:c/g*b;i({top:S,height:h})}return s(),a.addEventListener("scroll",s,{passive:!0}),window.addEventListener("resize",s),()=>{a.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[n]),e.length===0&&r.height===0)return null;const o=Math.max(t,1);return z.jsxs("div",{className:"file-overview-ruler","data-testid":"file-overview-ruler","aria-hidden":"true",children:[e.map(l=>{const a=(l.line-1)/o*100,s=Math.max(2,l.span/o*100);return z.jsx("div",{className:`file-overview-marker is-${l.kind}`,"data-kind":l.kind,style:{top:`${a}%`,height:`${s}%`}},`${l.kind}-${l.line}-${l.span}`)}),r.height>0?z.jsx("div",{className:"file-overview-viewport",style:{top:`${r.top}%`,height:`${r.height}%`}}):null]})}function Zf(e){const t=e.toLowerCase();if(t===".env"||t.startsWith(".env."))return"ENV";if(t.endsWith(".d.ts"))return"DTS";switch(t.includes(".")?t.slice(t.lastIndexOf(".")+1):""){case"ts":return"TS";case"tsx":return"TSX";case"js":return"JS";case"jsx":return"JSX";case"json":return"{}";case"md":return"MD";case"css":return"CSS";case"scss":return"SASS";case"html":return"HTML";case"yml":case"yaml":return"YAML";case"png":case"jpg":case"jpeg":case"gif":case"svg":case"webp":return"IMG";case"txt":return"TXT";default:return"FILE"}}function Jf(e){const t=e.toLowerCase();return t===".env"||t.startsWith(".env.")?"env":t.endsWith(".md")?"md":t.endsWith(".css")||t.endsWith(".scss")?"style":t.endsWith(".png")||t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".gif")||t.endsWith(".svg")||t.endsWith(".webp")?"image":t.endsWith(".ts")||t.endsWith(".tsx")||t.endsWith(".js")||t.endsWith(".jsx")?"code":t.endsWith(".json")||t.endsWith(".yml")||t.endsWith(".yaml")?"data":"default"}export{Qf as F,Xs as M,Zf as a,Jf as b,sf as r};
|