clitrigger 0.2.65 → 0.2.66

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.
Files changed (46) hide show
  1. package/README.md +118 -184
  2. package/README_KR.md +114 -180
  3. package/dist/client/assets/{AnalyticsPanel-BILFB_-1.js → AnalyticsPanel-ntVVoM9O.js} +1 -1
  4. package/dist/client/assets/CalendarGrid-8sSzdBes.js +16 -0
  5. package/dist/client/assets/DiscussionDetail-C8Jd-XNF.js +8 -0
  6. package/dist/client/assets/DiscussionForm-DaOo6Qn4.js +34 -0
  7. package/dist/client/assets/EmptyState-D4nAcalF.js +1 -0
  8. package/dist/client/assets/FloatingComposerController-5A3GJtK4-BKGtaowy.js +1 -0
  9. package/dist/client/assets/LogViewer-BC9BUbyo.js +6 -0
  10. package/dist/client/assets/MarkdownContent-CHKH6BNR.js +29 -0
  11. package/dist/client/assets/PersonalAgenda-SY8iVky-.js +7 -0
  12. package/dist/client/assets/{PlannerPageEditor-Qiwpi1s4.js → PlannerPageEditor-BR1YXV1Y.js} +6 -6
  13. package/dist/client/assets/ProjectDetail-NmmSdopm.js +181 -0
  14. package/dist/client/assets/ProjectList-CcCAHjcA.js +6 -0
  15. package/dist/client/assets/ReviewQueue-DJKmru0O.js +11 -0
  16. package/dist/client/assets/TaskGraph-BeJAKmMa.js +2 -0
  17. package/dist/client/assets/{VaultLayout-0umIr6Qr.js → VaultLayout-B6EUh-n3.js} +20 -20
  18. package/dist/client/assets/folder-git-2-DTO9mjAn.js +6 -0
  19. package/dist/client/assets/index-B0DZbgpK.js +427 -0
  20. package/dist/client/assets/index-gug7OXWO.css +32 -0
  21. package/dist/client/assets/rotate-ccw-Ce-MeCWv.js +11 -0
  22. package/dist/client/assets/{style-X9FtoKKq.js → style-BGCiJv3W.js} +1 -1
  23. package/dist/client/assets/{with-selector-DyExB9Zl.js → with-selector-DaFJ9d0-.js} +1 -1
  24. package/dist/client/index.html +2 -2
  25. package/dist/server/db/queries.d.ts +2 -0
  26. package/dist/server/db/queries.d.ts.map +1 -1
  27. package/dist/server/db/queries.js +5 -0
  28. package/dist/server/db/queries.js.map +1 -1
  29. package/dist/server/index.d.ts.map +1 -1
  30. package/dist/server/index.js +4 -1
  31. package/dist/server/index.js.map +1 -1
  32. package/dist/server/routes/logs.d.ts.map +1 -1
  33. package/dist/server/routes/logs.js +4 -2
  34. package/dist/server/routes/logs.js.map +1 -1
  35. package/dist/server/services/claude-manager.d.ts +0 -4
  36. package/dist/server/services/claude-manager.d.ts.map +1 -1
  37. package/dist/server/services/claude-manager.js +2 -22
  38. package/dist/server/services/claude-manager.js.map +1 -1
  39. package/dist/server/services/log-streamer.d.ts.map +1 -1
  40. package/dist/server/services/log-streamer.js +2 -0
  41. package/dist/server/services/log-streamer.js.map +1 -1
  42. package/package.json +2 -2
  43. package/dist/client/assets/FloatingComposerController-5A3GJtK4-BWTTg1eK.js +0 -1
  44. package/dist/client/assets/TaskGraph-7R6N_9W4.js +0 -2
  45. package/dist/client/assets/index-C0pXRm5D.css +0 -32
  46. package/dist/client/assets/index-D7UChvET.js +0 -715
@@ -0,0 +1,29 @@
1
+ import{bc as ir,j as Y,r as Dn}from"./index-B0DZbgpK.js";function yi(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wi={};function ht(e,t){return(wi.jsx?bi:xi).test(e)}const Si=/[ \t\n\f\r]/g;function Ci(e){return typeof e=="object"?e.type==="text"?pt(e.value):!1:pt(e)}function pt(e){return e.replace(Si,"")===""}class Qe{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Qe.prototype.normal={};Qe.prototype.property={};Qe.prototype.space=void 0;function lr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qe(n,r,t)}function Ln(e){return e.toLowerCase()}class ne{constructor(t,n){this.attribute=n,this.property=t}}ne.prototype.attribute="";ne.prototype.booleanish=!1;ne.prototype.boolean=!1;ne.prototype.commaOrSpaceSeparated=!1;ne.prototype.commaSeparated=!1;ne.prototype.defined=!1;ne.prototype.mustUseProperty=!1;ne.prototype.number=!1;ne.prototype.overloadedBoolean=!1;ne.prototype.property="";ne.prototype.spaceSeparated=!1;ne.prototype.space=void 0;let Ei=0;const _=Ie(),X=Ie(),Fn=Ie(),E=Ie(),W=Ie(),Fe=Ie(),re=Ie();function Ie(){return 2**++Ei}const Rn=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:X,commaOrSpaceSeparated:re,commaSeparated:Fe,number:E,overloadedBoolean:Fn,spaceSeparated:W},Symbol.toStringTag,{value:"Module"})),mn=Object.keys(Rn);class qn extends ne{constructor(t,n,r,i){let o=-1;if(super(t,n),mt(this,"space",i),typeof r=="number")for(;++o<mn.length;){const l=mn[o];mt(this,mn[o],(r&Rn[l])===Rn[l])}}}qn.prototype.defined=!0;function mt(e,t,n){n&&(e[t]=n)}function _e(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new qn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ln(r)]=r,n[Ln(o.attribute)]=r}return new Qe(t,n,e.space)}const or=_e({properties:{ariaActiveDescendant:null,ariaAtomic:X,ariaAutoComplete:null,ariaBusy:X,ariaChecked:X,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:X,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:X,ariaFlowTo:W,ariaGrabbed:X,ariaHasPopup:null,ariaHidden:X,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:E,ariaLive:null,ariaModal:X,ariaMultiLine:X,ariaMultiSelectable:X,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:X,ariaReadOnly:X,ariaRelevant:null,ariaRequired:X,ariaRoleDescription:W,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:X,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ar(e,t){return t in e?e[t]:t}function ur(e,t){return ar(e,t.toLowerCase())}const Ii=_e({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fe,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:W,autoFocus:_,autoPlay:_,blocking:W,capture:null,charSet:null,checked:_,cite:null,className:W,cols:E,colSpan:null,content:null,contentEditable:X,controls:_,controlsList:W,coords:E|Fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:Fn,draggable:X,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:W,height:E,hidden:Fn,high:E,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:W,itemRef:W,itemScope:_,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,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:_,optimum:E,pattern:null,ping:W,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:W,required:_,reversed:_,rows:E,rowSpan:E,sandbox:W,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:X,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:X,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:X,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:ur}),Ai=_e({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:re,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:W,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:Fe,g2:Fe,glyphName:Fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:re,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,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:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:re,rev:re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:re,requiredFeatures:re,requiredFonts:re,requiredFormats:re,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:re,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:re,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:re,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ar}),sr=_e({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cr=_e({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ur}),fr=_e({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ti={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"},Pi=/[A-Z]/g,gt=/-[a-z]/g,vi=/^data[-\w.:]+$/i;function zi(e,t){const n=Ln(t);let r=t,i=ne;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vi.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(gt,Li);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!gt.test(o)){let l=o.replace(Pi,Di);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=qn}return new i(r,t)}function Di(e){return"-"+e.toLowerCase()}function Li(e){return e.charAt(1).toUpperCase()}const Fi=lr([or,Ii,sr,cr,fr],"html"),$n=lr([or,Ai,sr,cr,fr],"svg");function Ri(e){return e.join(" ").trim()}var ve={},gn,dt;function _i(){if(dt)return gn;dt=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
2
+ `,s="/",f="*",c="",p="comment",h="declaration";function d(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var I=1,C=1;function F(D){var T=D.match(t);T&&(I+=T.length);var q=D.lastIndexOf(u);C=~q?D.length-q:C+D.length}function R(){var D={line:I,column:C};return function(T){return T.position=new b(D),j(),T}}function b(D){this.start=D,this.end={line:I,column:C},this.source=k.source}b.prototype.content=S;function M(D){var T=new Error(k.source+":"+I+":"+C+": "+D);if(T.reason=D,T.filename=k.source,T.line=I,T.column=C,T.source=S,!k.silent)throw T}function H(D){var T=D.exec(S);if(T){var q=T[0];return F(q),S=S.slice(q.length),T}}function j(){H(n)}function y(D){var T;for(D=D||[];T=P();)T!==!1&&D.push(T);return D}function P(){var D=R();if(!(s!=S.charAt(0)||f!=S.charAt(1))){for(var T=2;c!=S.charAt(T)&&(f!=S.charAt(T)||s!=S.charAt(T+1));)++T;if(T+=2,c===S.charAt(T-1))return M("End of comment missing");var q=S.slice(2,T-2);return C+=2,F(q),S=S.slice(T),C+=2,D({type:p,comment:q})}}function v(){var D=R(),T=H(r);if(T){if(P(),!H(i))return M("property missing ':'");var q=H(o),Q=D({type:h,property:w(T[0].replace(e,c)),value:q?w(q[0].replace(e,c)):c});return H(l),Q}}function U(){var D=[];y(D);for(var T;T=v();)T!==!1&&(D.push(T),y(D));return D}return j(),U()}function w(S){return S?S.replace(a,c):c}return gn=d,gn}var kt;function Oi(){if(kt)return ve;kt=1;var e=ve&&ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ve,"__esModule",{value:!0}),ve.default=n;const t=e(_i());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(u=>{if(u.type!=="declaration")return;const{property:s,value:f}=u;a?i(s,f,u):f&&(o=o||{},o[s]=f)}),o}return ve}var je={},yt;function Mi(){if(yt)return je;yt=1,Object.defineProperty(je,"__esModule",{value:!0}),je.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(s){return!s||n.test(s)||e.test(s)},l=function(s,f){return f.toUpperCase()},a=function(s,f){return"".concat(f,"-")},u=function(s,f){return f===void 0&&(f={}),o(s)?s:(s=s.toLowerCase(),f.reactCompat?s=s.replace(i,a):s=s.replace(r,a),s.replace(t,l))};return je.camelCase=u,je}var He,xt;function Ni(){if(xt)return He;xt=1;var e=He&&He.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Oi()),n=Mi();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,u){a&&u&&(l[(0,n.camelCase)(a,o)]=u)}),l}return r.default=r,He=r,He}var Bi=Ni();const ji=ir(Bi),hr=pr("end"),Vn=pr("start");function pr(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 Hi(e){const t=Vn(e),n=hr(e);if(t&&n)return{start:t,end:n}}function $e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bt(e.position):"start"in e||"end"in e?bt(e):"line"in e||"column"in e?_n(e):""}function _n(e){return wt(e&&e.line)+":"+wt(e&&e.column)}function bt(e){return _n(e&&e.start)+"-"+_n(e&&e.end)}function wt(e){return e&&typeof e=="number"?e:1}class J extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=$e(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}J.prototype.file="";J.prototype.name="";J.prototype.reason="";J.prototype.message="";J.prototype.stack="";J.prototype.column=void 0;J.prototype.line=void 0;J.prototype.ancestors=void 0;J.prototype.cause=void 0;J.prototype.fatal=void 0;J.prototype.place=void 0;J.prototype.ruleId=void 0;J.prototype.source=void 0;const Wn={}.hasOwnProperty,Ui=new Map,qi=/[A-Z]/g,$i=new Set(["table","tbody","thead","tfoot","tr"]),Vi=new Set(["td","th"]),mr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Wi(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=el(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=Zi(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"?$n:Fi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=gr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function gr(e,t,n){if(t.type==="element")return Yi(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Xi(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Gi(e,t,n);if(t.type==="mdxjsEsm")return Qi(e,t);if(t.type==="root")return Ki(e,t,n);if(t.type==="text")return Ji(e,t)}function Yi(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=$n,e.schema=i),e.ancestors.push(t);const o=kr(e,t.tagName,!1),l=nl(e,t);let a=Xn(e,t);return $i.has(t.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Ci(u):!0})),dr(e,l,o,t),Yn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Xi(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)}Ye(e,t.position)}function Qi(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ye(e,t.position)}function Gi(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=$n,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:kr(e,t.name,!0),l=tl(e,t),a=Xn(e,t);return dr(e,l,o,t),Yn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Ki(e,t,n){const r={};return Yn(r,Xn(e,t)),e.create(t,e.Fragment,r,n)}function Ji(e,t){return t.value}function dr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zi(e,t,n){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?n:t;return a?s(o,l,a):s(o,l)}}function el(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),u=Vn(r);return t(i,o,l,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function nl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Wn.call(t.properties,i)){const o=rl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Vi.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 tl(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 Ye(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 Ye(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Xn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ui;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const s=i.get(u)||0;l=u+"-"+s,i.set(u,s+1)}}const a=gr(e,o,l);a!==void 0&&n.push(a)}return n}function rl(e,t,n){const r=zi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?yi(n):Ri(n)),r.property==="style"){let i=typeof n=="object"?n:il(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ll(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ti[r.property]||r.property:r.attribute,n]}}function il(e,t){try{return ji(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new J("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=mr+"#cannot-parse-style-attribute",i}}function kr(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=ht(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=ht(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Wn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ye(e)}function Ye(e,t){const n=new J("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=mr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ll(e){const t={};let n;for(n in e)Wn.call(e,n)&&(t[ol(n)]=e[n]);return t}function ol(e){let t=e.replace(qi,al);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function al(e){return"-"+e.toLowerCase()}const dn={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"]},ul={};function Qn(e,t){const n=ul,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return yr(e,r,i)}function yr(e,t,n){if(sl(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 St(e.children,t,n)}return Array.isArray(e)?St(e,t,n):""}function St(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=yr(e[i],t,n);return r.join("")}function sl(e){return!!(e&&typeof e=="object")}const Ct=document.createElement("i");function Gn(e){const t="&"+e+";";Ct.innerHTML=t;const n=Ct.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ie(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function le(e,t){return e.length>0?(ie(e,e.length,0,t),e):t}const Et={}.hasOwnProperty;function xr(e){const t={};let n=-1;for(;++n<e.length;)cl(t,e[n]);return t}function cl(e,t){let n;for(n in t){const i=(Et.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Et.call(i,l)||(i[l]=[]);const a=o[l];fl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function fl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ie(e,0,0,r)}function br(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 ce(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Z=be(/[A-Za-z]/),K=be(/[\dA-Za-z]/),hl=be(/[#-'*+\--9=?A-Z^-~]/);function ln(e){return e!==null&&(e<32||e===127)}const On=be(/\d/),pl=be(/[\dA-Fa-f]/),ml=be(/[!-/:-@[-`{-~]/);function z(e){return e!==null&&e<-2}function V(e){return e!==null&&(e<0||e===32)}function O(e){return e===-2||e===-1||e===32}const sn=be(new RegExp("\\p{P}|\\p{S}","u")),Ee=be(/\s/);function be(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Oe(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&K(e.charCodeAt(n+1))&&K(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function B(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(u){return O(u)?(e.enter(n),a(u)):t(u)}function a(u){return O(u)&&o++<i?(e.consume(u),a):(e.exit(n),t(u))}}const gl={tokenize:dl};function dl(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"),B(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const kl={tokenize:yl},It={tokenize:xl};function yl(e){const t=this,n=[];let r=0,i,o,l;return a;function a(C){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,u,s)(C)}return s(C)}function u(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const F=t.events.length;let R=F,b;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){b=t.events[R][1].end;break}k(r);let M=F;for(;M<t.events.length;)t.events[M][1].end={...b},M++;return ie(t.events,R+1,0,t.events.slice(F)),t.events.length=M,s(C)}return a(C)}function s(C){if(r===n.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return d(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(It,f,c)(C)}function f(C){return i&&I(),k(r),p(C)}function c(C){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,d(C)}function p(C){return t.containerState={},e.attempt(It,h,d)(C)}function h(C){return r++,n.push([t.currentConstruct,t.containerState]),p(C)}function d(C){if(C===null){i&&I(),k(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),w(C)}function w(C){if(C===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(C);return}return z(C)?(e.consume(C),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(C),w)}function S(C,F){const R=t.sliceStream(C);if(F&&R.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(R),t.parser.lazy[C.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const M=t.events.length;let H=M,j,y;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(j){y=t.events[H][1].end;break}j=!0}for(k(r),b=M;b<t.events.length;)t.events[b][1].end={...y},b++;ie(t.events,H+1,0,t.events.slice(M)),t.events.length=b}}function k(C){let F=n.length;for(;F-- >C;){const R=n[F];t.containerState=R[1],R[0].exit.call(t,e)}n.length=C}function I(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function xl(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Re(e){if(e===null||V(e)||Ee(e))return 1;if(sn(e))return 2}function cn(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 Mn={name:"attention",resolveAll:bl,tokenize:wl};function bl(e,t){let n=-1,r,i,o,l,a,u,s,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};At(c,-u),At(p,u),l={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},s=[],e[r][1].end.offset-e[r][1].start.offset&&(s=le(s,[["enter",e[r][1],t],["exit",e[r][1],t]])),s=le(s,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),s=le(s,cn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),s=le(s,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,s=le(s,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ie(e,r-1,n-r+3,s),n=r+s.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Re(r);let o;return l;function l(u){return o=u,e.enter("attentionSequence"),a(u)}function a(u){if(u===o)return e.consume(u),a;const s=e.exit("attentionSequence"),f=Re(u),c=!f||f===2&&i||n.includes(u),p=!i||i===2&&f||n.includes(r);return s._open=!!(o===42?c:c&&(i||!p)),s._close=!!(o===42?p:p&&(f||!c)),t(u)}}function At(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Sl={name:"autolink",tokenize:Cl};function Cl(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Z(h)?(e.consume(h),l):h===64?n(h):s(h)}function l(h){return h===43||h===45||h===46||K(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||K(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ln(h)?n(h):(e.consume(h),u)}function s(h){return h===64?(e.consume(h),f):hl(h)?(e.consume(h),s):n(h)}function f(h){return K(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||K(h))&&r++<63){const d=h===45?p:c;return e.consume(h),d}return n(h)}}const Ge={partial:!0,tokenize:El};function El(e,t,n){return r;function r(o){return O(o)?B(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?t(o):n(o)}}const wr={continuation:{tokenize:Al},exit:Tl,name:"blockQuote",tokenize:Il};function Il(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 O(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Al(e,t,n){const r=this;return i;function i(l){return O(l)?B(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(wr,t,n)(l)}}function Tl(e){e.exit("blockQuote")}const Sr={name:"characterEscape",tokenize:Pl};function Pl(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 ml(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Cr={name:"characterReference",tokenize:vl};function vl(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=K,f(c))}function s(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=pl,f):(e.enter("characterReferenceValue"),o=7,l=On,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===K&&!Gn(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 Tt={partial:!0,tokenize:Dl},Pt={concrete:!0,name:"codeFenced",tokenize:zl};function zl(e,t,n){const r=this,i={partial:!0,tokenize:R};let o=0,l=0,a;return u;function u(b){return s(b)}function s(b){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),O(b)?B(e,c,"whitespace")(b):c(b))}function c(b){return b===null||z(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(Tt,w,F)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,h,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),p)}function h(b){return b===null||z(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||z(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?n(b):(e.consume(b),d)}function w(b){return e.attempt(i,F,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return o>0&&O(b)?B(e,I,"linePrefix",o+1)(b):I(b)}function I(b){return b===null||z(b)?e.check(Tt,w,F)(b):(e.enter("codeFlowValue"),C(b))}function C(b){return b===null||z(b)?(e.exit("codeFlowValue"),I(b)):(e.consume(b),C)}function F(b){return e.exit("codeFenced"),t(b)}function R(b,M,H){let j=0;return y;function y(T){return b.enter("lineEnding"),b.consume(T),b.exit("lineEnding"),P}function P(T){return b.enter("codeFencedFence"),O(T)?B(b,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):v(T)}function v(T){return T===a?(b.enter("codeFencedFenceSequence"),U(T)):H(T)}function U(T){return T===a?(j++,b.consume(T),U):j>=l?(b.exit("codeFencedFenceSequence"),O(T)?B(b,D,"whitespace")(T):D(T)):H(T)}function D(T){return T===null||z(T)?(b.exit("codeFencedFence"),M(T)):H(T)}}}function Dl(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const kn={name:"codeIndented",tokenize:Fl},Ll={partial:!0,tokenize:Rl};function Fl(e,t,n){const r=this;return i;function i(s){return e.enter("codeIndented"),B(e,o,"linePrefix",5)(s)}function o(s){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(s):n(s)}function l(s){return s===null?u(s):z(s)?e.attempt(Ll,l,u)(s):(e.enter("codeFlowValue"),a(s))}function a(s){return s===null||z(s)?(e.exit("codeFlowValue"),l(s)):(e.consume(s),a)}function u(s){return e.exit("codeIndented"),t(s)}}function Rl(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):B(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):z(l)?i(l):n(l)}}const _l={name:"codeText",previous:Ml,resolve:Ol,tokenize:Nl};function Ol(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 Ml(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Nl(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):z(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),s(c))}function s(c){return c===null||c===32||c===96||z(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),s)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",s(c))}}class Bl{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&&Ue(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),Ue(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ue(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);Ue(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ue(this.left,n.reverse())}}}function Ue(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 Er(e){const t={};let n=-1,r,i,o,l,a,u,s;const f=new Bl(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,jl(f,n)),n=t[n],s=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ie(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function jl(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,u=[],s={};let f,c,p=-1,h=n,d=0,w=0;const S=[w];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&&(w=p+1,S.push(w),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]),I=o.pop();u.push([I,I+k.length-1]),e.splice(I,2,k)}for(u.reverse(),p=-1;++p<u.length;)s[d+u[p][0]]=d+u[p][1],d+=u[p][1]-u[p][0]-1;return s}const Hl={resolve:ql,tokenize:$l},Ul={partial:!0,tokenize:Vl};function ql(e){return Er(e),e}function $l(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):z(a)?e.check(Ul,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 Vl(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),B(e,o,"linePrefix")}function o(l){if(l===null||z(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 Ir(e,t,n,r,i,o,l,a,u){const s=u||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),p):k===null||k===32||k===41||ln(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),w(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||z(k)?n(k):(e.consume(k),k===92?d:h)}function d(k){return k===60||k===62||k===92?(e.consume(k),h):h(k)}function w(k){return!f&&(k===null||k===41||V(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):f<s&&k===40?(e.consume(k),f++,w):k===41?(e.consume(k),f--,w):k===null||k===32||k===40||ln(k)?n(k):(e.consume(k),k===92?S:w)}function S(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function Ar(e,t,n,r,i,o){const l=this;let a=0,u;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!u||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):z(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||z(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),u||(u=!O(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function Tr(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,u):n(p)}function u(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),u(l)):p===null?n(p):z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),B(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||z(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Ve(e,t){let n;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):O(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Wl={name:"definition",tokenize:Xl},Yl={partial:!0,tokenize:Ql};function Xl(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Ar.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return V(h)?Ve(e,s)(h):s(h)}function s(h){return Ir(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Yl,c,c)(h)}function c(h){return O(h)?B(e,p,"whitespace")(h):p(h)}function p(h){return h===null||z(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Ql(e,t,n){return r;function r(a){return V(a)?Ve(e,i)(a):n(a)}function i(a){return Tr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return O(a)?B(e,l,"whitespace")(a):l(a)}function l(a){return a===null||z(a)?t(a):n(a)}}const Gl={name:"hardBreakEscape",tokenize:Kl};function Kl(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return z(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Jl={name:"headingAtx",resolve:Zl,tokenize:eo};function Zl(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ie(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function eo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||V(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||z(f)?(e.exit("atxHeading"),t(f)):O(f)?B(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||V(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const no=["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"],vt=["pre","script","style","textarea"],to={concrete:!0,name:"htmlFlow",resolveTo:lo,tokenize:oo},ro={partial:!0,tokenize:uo},io={partial:!0,tokenize:ao};function lo(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 oo(e,t,n){const r=this;let i,o,l,a,u;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,w):g===63?(e.consume(g),i=3,r.interrupt?t:m):Z(g)?(e.consume(g),l=String.fromCharCode(g),S):n(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,d):Z(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function h(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const ue="CDATA[";return g===ue.charCodeAt(a++)?(e.consume(g),a===ue.length?r.interrupt?t:v:d):n(g)}function w(g){return Z(g)?(e.consume(g),l=String.fromCharCode(g),S):n(g)}function S(g){if(g===null||g===47||g===62||V(g)){const ue=g===47,we=l.toLowerCase();return!ue&&!o&&vt.includes(we)?(i=1,r.interrupt?t(g):v(g)):no.includes(l.toLowerCase())?(i=6,ue?(e.consume(g),k):r.interrupt?t(g):v(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?I(g):C(g))}return g===45||K(g)?(e.consume(g),l+=String.fromCharCode(g),S):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:v):n(g)}function I(g){return O(g)?(e.consume(g),I):y(g)}function C(g){return g===47?(e.consume(g),y):g===58||g===95||Z(g)?(e.consume(g),F):O(g)?(e.consume(g),C):y(g)}function F(g){return g===45||g===46||g===58||g===95||K(g)?(e.consume(g),F):R(g)}function R(g){return g===61?(e.consume(g),b):O(g)?(e.consume(g),R):C(g)}function b(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),u=g,M):O(g)?(e.consume(g),b):H(g)}function M(g){return g===u?(e.consume(g),u=null,j):g===null||z(g)?n(g):(e.consume(g),M)}function H(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||V(g)?R(g):(e.consume(g),H)}function j(g){return g===47||g===62||O(g)?C(g):n(g)}function y(g){return g===62?(e.consume(g),P):n(g)}function P(g){return g===null||z(g)?v(g):O(g)?(e.consume(g),P):n(g)}function v(g){return g===45&&i===2?(e.consume(g),q):g===60&&i===1?(e.consume(g),Q):g===62&&i===4?(e.consume(g),ae):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),pe):z(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ro,me,U)(g)):g===null||z(g)?(e.exit("htmlFlowData"),U(g)):(e.consume(g),v)}function U(g){return e.check(io,D,me)(g)}function D(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),T}function T(g){return g===null||z(g)?U(g):(e.enter("htmlFlowData"),v(g))}function q(g){return g===45?(e.consume(g),m):v(g)}function Q(g){return g===47?(e.consume(g),l="",oe):v(g)}function oe(g){if(g===62){const ue=l.toLowerCase();return vt.includes(ue)?(e.consume(g),ae):v(g)}return Z(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),oe):v(g)}function pe(g){return g===93?(e.consume(g),m):v(g)}function m(g){return g===62?(e.consume(g),ae):g===45&&i===2?(e.consume(g),m):v(g)}function ae(g){return g===null||z(g)?(e.exit("htmlFlowData"),me(g)):(e.consume(g),ae)}function me(g){return e.exit("htmlFlow"),t(g)}}function ao(e,t,n){const r=this;return i;function i(l){return z(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 uo(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,t,n)}}const so={name:"htmlText",tokenize:co};function co(e,t,n){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),s):m===47?(e.consume(m),R):m===63?(e.consume(m),C):Z(m)?(e.consume(m),H):n(m)}function s(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,d):Z(m)?(e.consume(m),I):n(m)}function f(m){return m===45?(e.consume(m),h):n(m)}function c(m){return m===null?n(m):m===45?(e.consume(m),p):z(m)?(l=c,Q(m)):(e.consume(m),c)}function p(m){return m===45?(e.consume(m),h):c(m)}function h(m){return m===62?q(m):m===45?p(m):c(m)}function d(m){const ae="CDATA[";return m===ae.charCodeAt(o++)?(e.consume(m),o===ae.length?w:d):n(m)}function w(m){return m===null?n(m):m===93?(e.consume(m),S):z(m)?(l=w,Q(m)):(e.consume(m),w)}function S(m){return m===93?(e.consume(m),k):w(m)}function k(m){return m===62?q(m):m===93?(e.consume(m),k):w(m)}function I(m){return m===null||m===62?q(m):z(m)?(l=I,Q(m)):(e.consume(m),I)}function C(m){return m===null?n(m):m===63?(e.consume(m),F):z(m)?(l=C,Q(m)):(e.consume(m),C)}function F(m){return m===62?q(m):C(m)}function R(m){return Z(m)?(e.consume(m),b):n(m)}function b(m){return m===45||K(m)?(e.consume(m),b):M(m)}function M(m){return z(m)?(l=M,Q(m)):O(m)?(e.consume(m),M):q(m)}function H(m){return m===45||K(m)?(e.consume(m),H):m===47||m===62||V(m)?j(m):n(m)}function j(m){return m===47?(e.consume(m),q):m===58||m===95||Z(m)?(e.consume(m),y):z(m)?(l=j,Q(m)):O(m)?(e.consume(m),j):q(m)}function y(m){return m===45||m===46||m===58||m===95||K(m)?(e.consume(m),y):P(m)}function P(m){return m===61?(e.consume(m),v):z(m)?(l=P,Q(m)):O(m)?(e.consume(m),P):j(m)}function v(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,U):z(m)?(l=v,Q(m)):O(m)?(e.consume(m),v):(e.consume(m),D)}function U(m){return m===i?(e.consume(m),i=void 0,T):m===null?n(m):z(m)?(l=U,Q(m)):(e.consume(m),U)}function D(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||V(m)?j(m):(e.consume(m),D)}function T(m){return m===47||m===62||V(m)?j(m):n(m)}function q(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),oe}function oe(m){return O(m)?B(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):pe(m)}function pe(m){return e.enter("htmlTextData"),l(m)}}const Kn={name:"labelEnd",resolveAll:mo,resolveTo:go,tokenize:ko},fo={tokenize:yo},ho={tokenize:xo},po={tokenize:bo};function mo(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ie(e,0,e.length,n),e}function go(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",u,t],["enter",s,t]],a=le(a,e.slice(o+1,o+r+3)),a=le(a,[["enter",f,t]]),a=le(a,cn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=le(a,[["exit",f,t],e[l-2],e[l-1],["exit",s,t]]),a=le(a,e.slice(l+1)),a=le(a,[["exit",u,t]]),ie(e,o,e.length,a),e}function ko(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(ce(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(fo,f,l?f:c)(p):p===91?e.attempt(ho,f,l?s:c)(p):l?f(p):c(p)}function s(p){return e.attempt(po,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function yo(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return V(c)?Ve(e,o)(c):o(c)}function o(c){return c===41?f(c):Ir(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return V(c)?Ve(e,u)(c):f(c)}function a(c){return n(c)}function u(c){return c===34||c===39||c===40?Tr(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return V(c)?Ve(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function xo(e,t,n){const r=this;return i;function i(a){return Ar.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ce(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function bo(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 wo={name:"labelStartImage",resolveAll:Kn.resolveAll,tokenize:So};function So(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 Co={name:"labelStartLink",resolveAll:Kn.resolveAll,tokenize:Eo};function Eo(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 yn={name:"lineEnding",tokenize:Io};function Io(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const rn={name:"thematicBreak",tokenize:Ao};function Ao(e,t,n){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),u(s)):r>=3&&(s===null||z(s))?(e.exit("thematicBreak"),t(s)):n(s)}function u(s){return s===i?(e.consume(s),r++,u):(e.exit("thematicBreakSequence"),O(s)?B(e,a,"whitespace")(s):a(s))}}const ee={continuation:{tokenize:zo},exit:Lo,name:"list",tokenize:vo},To={partial:!0,tokenize:Fo},Po={partial:!0,tokenize:Do};function vo(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:On(h)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(rn,n,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return On(h)&&++l<10?(e.consume(h),u):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):n(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ge,r.interrupt?n:f,e.attempt(To,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return O(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 zo(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!O(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(Po,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Do(e,t,n){const r=this;return B(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 Lo(e){e.exit(this.containerState.type)}function Fo(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!O(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const zt={name:"setextUnderline",resolveTo:Ro,tokenize:_o};function Ro(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 _o(e,t,n){const r=this;let i;return o;function o(s){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=s,l(s)):n(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),O(s)?B(e,u,"lineSuffix")(s):u(s))}function u(s){return s===null||z(s)?(e.exit("setextHeadingLine"),t(s)):n(s)}}const Oo={tokenize:Mo};function Mo(e){const t=this,n=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Hl,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 No={resolveAll:vr()},Bo=Pr("string"),jo=Pr("text");function Pr(e){return{resolveAll:vr(e==="text"?Ho:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function vr(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 Ho(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,u;for(;o--;){const s=i[o];if(typeof s=="string"){for(l=s.length;s.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(s===-2)u=!0,a++;else if(s!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const s={type:n===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...s.start},r.start.offset===r.end.offset?Object.assign(r,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}const Uo={42:ee,43:ee,45:ee,48:ee,49:ee,50:ee,51:ee,52:ee,53:ee,54:ee,55:ee,56:ee,57:ee,62:wr},qo={91:Wl},$o={[-2]:kn,[-1]:kn,32:kn},Vo={35:Jl,42:rn,45:[zt,rn],60:to,61:zt,95:rn,96:Pt,126:Pt},Wo={38:Cr,92:Sr},Yo={[-5]:yn,[-4]:yn,[-3]:yn,33:wo,38:Cr,42:Mn,60:[Sl,so],91:Co,92:[Gl,Sr],93:Kn,95:Mn,96:_l},Xo={null:[Mn,No]},Qo={null:[42,95]},Go={null:[]},Ko=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Qo,contentInitial:qo,disable:Go,document:Uo,flow:Vo,flowInitial:$o,insideSpan:Xo,string:Wo,text:Yo},Symbol.toStringTag,{value:"Module"}));function Jo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const u={attempt:M(R),check:M(b),consume:I,enter:C,exit:F,interrupt:M(b,{interrupt:!0})},s={code:null,containerState:{},defineSkip:w,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(s,u);return t.resolveAll&&o.push(t),s;function c(P){return l=le(l,P),S(),l[l.length-1]!==null?[]:(H(t,0),s.events=cn(o,s.events,s),s.events)}function p(P,v){return ea(h(P),v)}function h(P){return Zo(l,P)}function d(){const{_bufferIndex:P,_index:v,line:U,column:D,offset:T}=r;return{_bufferIndex:P,_index:v,line:U,column:D,offset:T}}function w(P){i[P.line]=P.column,y()}function S(){let P;for(;r._index<l.length;){const v=l[r._index];if(typeof v=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<v.length;)k(v.charCodeAt(r._bufferIndex));else k(v)}}function k(P){f=f(P)}function I(P){z(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,y()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=P}function C(P,v){const U=v||{};return U.type=P,U.start=d(),s.events.push(["enter",U,s]),a.push(U),U}function F(P){const v=a.pop();return v.end=d(),s.events.push(["exit",v,s]),v}function R(P,v){H(P,v.from)}function b(P,v){v.restore()}function M(P,v){return U;function U(D,T,q){let Q,oe,pe,m;return Array.isArray(D)?me(D):"tokenize"in D?me([D]):ae(D);function ae(G){return Me;function Me(ye){const Ae=ye!==null&&G[ye],Te=ye!==null&&G.null,Je=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return me(Je)(ye)}}function me(G){return Q=G,oe=0,G.length===0?q:g(G[oe])}function g(G){return Me;function Me(ye){return m=j(),pe=G,G.partial||(s.currentConstruct=G),G.name&&s.parser.constructs.disable.null.includes(G.name)?we():G.tokenize.call(v?Object.assign(Object.create(s),v):s,u,ue,we)(ye)}}function ue(G){return P(pe,m),T}function we(G){return m.restore(),++oe<Q.length?g(Q[oe]):q}}}function H(P,v){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ie(s.events,v,s.events.length-v,P.resolve(s.events.slice(v),s)),P.resolveTo&&(s.events=P.resolveTo(s.events,s))}function j(){const P=d(),v=s.previous,U=s.currentConstruct,D=s.events.length,T=Array.from(a);return{from:D,restore:q};function q(){r=P,s.previous=v,s.currentConstruct=U,s.events.length=D,a=T,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Zo(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 ea(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 na(e){const r={constructs:xr([Ko,...(e||{}).extensions||[]]),content:i(gl),defined:[],document:i(kl),flow:i(Oo),lazy:{},string:i(Bo),text:i(jo)};return r;function i(o){return l;function l(a){return Jo(r,o,a)}}}function ta(e){for(;!Er(e););return e}const Dt=/[\0\t\n\r]/g;function ra(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const u=[];let s,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Dt.lastIndex=c,s=Dt.exec(o),p=s&&s.index!==void 0?s.index:o.length,h=o.charCodeAt(p),!s){t=o.slice(c);break}if(h===10&&c===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<p&&(u.push(o.slice(c,p)),e+=p-c),h){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const ia=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function la(e){return e.replace(ia,oa)}function oa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return br(n.slice(o?2:1),o?16:10)}return Gn(n)||e}const zr={}.hasOwnProperty;function aa(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ua(n)(ta(na(n).document().write(ra()(e,t,!0))))}function ua(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ct),autolinkProtocol:j,autolinkEmail:j,atxHeading:o(at),blockQuote:o(Te),characterEscape:j,characterReference:j,codeFenced:o(Je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Je,l),codeText:o(si,l),codeTextData:j,data:j,codeFlowValue:j,definition:o(ci),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(fi),hardBreakEscape:o(ut),hardBreakTrailing:o(ut),htmlFlow:o(st,l),htmlFlowData:j,htmlText:o(st,l),htmlTextData:j,image:o(hi),label:l,link:o(ct),listItem:o(pi),listItemValue:p,listOrdered:o(ft,c),listUnordered:o(ft),paragraph:o(mi),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(at),strong:o(gi),thematicBreak:o(ki)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:Ae,autolinkProtocol:ye,blockQuote:u(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:G,characterReference:Me,codeFenced:u(S),codeFencedFence:w,codeFencedFenceInfo:h,codeFencedFenceMeta:d,codeFlowValue:y,codeIndented:u(k),codeText:u(T),codeTextData:y,data:y,definition:u(),definitionDestinationString:F,definitionLabelString:I,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(v),hardBreakTrailing:u(v),htmlFlow:u(U),htmlFlowData:y,htmlText:u(D),htmlTextData:y,image:u(Q),label:pe,labelText:oe,lineEnding:P,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ue,resourceDestinationString:m,resourceTitleString:ae,resource:me,setextHeading:u(H),setextHeadingLineSequence:M,setextHeadingText:b,strong:u(),thematicBreak:u()}};Dr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(x){let A={type:"root",children:[]};const L={stack:[A],tokenStack:[],config:t,enter:a,exit:s,buffer:l,resume:f,data:n},N=[];let $=-1;for(;++$<x.length;)if(x[$][1].type==="listOrdered"||x[$][1].type==="listUnordered")if(x[$][0]==="enter")N.push($);else{const se=N.pop();$=i(x,se,$)}for($=-1;++$<x.length;){const se=t[x[$][0]];zr.call(se,x[$][1].type)&&se[x[$][1].type].call(Object.assign({sliceSerialize:x[$][2].sliceSerialize},L),x[$][1])}if(L.tokenStack.length>0){const se=L.tokenStack[L.tokenStack.length-1];(se[1]||Lt).call(L,void 0,se[0])}for(A.position={start:xe(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:xe(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$<t.transforms.length;)A=t.transforms[$](A)||A;return A}function i(x,A,L){let N=A-1,$=-1,se=!1,Se,ge,Ne,Be;for(;++N<=L;){const te=x[N];switch(te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{te[0]==="enter"?$++:$--,Be=void 0;break}case"lineEndingBlank":{te[0]==="enter"&&(Se&&!Be&&!$&&!Ne&&(Ne=N),Be=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Be=void 0}if(!$&&te[0]==="enter"&&te[1].type==="listItemPrefix"||$===-1&&te[0]==="exit"&&(te[1].type==="listUnordered"||te[1].type==="listOrdered")){if(Se){let Pe=N;for(ge=void 0;Pe--;){const de=x[Pe];if(de[1].type==="lineEnding"||de[1].type==="lineEndingBlank"){if(de[0]==="exit")continue;ge&&(x[ge][1].type="lineEndingBlank",se=!0),de[1].type="lineEnding",ge=Pe}else if(!(de[1].type==="linePrefix"||de[1].type==="blockQuotePrefix"||de[1].type==="blockQuotePrefixWhitespace"||de[1].type==="blockQuoteMarker"||de[1].type==="listItemIndent"))break}Ne&&(!ge||Ne<ge)&&(Se._spread=!0),Se.end=Object.assign({},ge?x[ge][1].start:te[1].end),x.splice(ge||N,0,["exit",Se,te[2]]),N++,L++}if(te[1].type==="listItemPrefix"){const Pe={type:"listItem",_spread:!1,start:Object.assign({},te[1].start),end:void 0};Se=Pe,x.splice(N,0,["enter",Pe,te[2]]),N++,L++,Ne=void 0,Be=!0}}}return x[A][1]._spread=se,L}function o(x,A){return L;function L(N){a.call(this,x(N),N),A&&A.call(this,N)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(x,A,L){this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([A,L||void 0]),x.position={start:xe(A.start),end:void 0}}function u(x){return A;function A(L){x&&x.call(this,L),s.call(this,L)}}function s(x,A){const L=this.stack.pop(),N=this.tokenStack.pop();if(N)N[0].type!==x.type&&(A?A.call(this,x,N[0]):(N[1]||Lt).call(this,x,N[0]));else throw new Error("Cannot close `"+x.type+"` ("+$e({start:x.start,end:x.end})+"): it’s not open");L.position.end=xe(x.end)}function f(){return Qn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(x){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(x),10),this.data.expectingFirstListItemValue=void 0}}function h(){const x=this.resume(),A=this.stack[this.stack.length-1];A.lang=x}function d(){const x=this.resume(),A=this.stack[this.stack.length-1];A.meta=x}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const x=this.resume(),A=this.stack[this.stack.length-1];A.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const x=this.resume(),A=this.stack[this.stack.length-1];A.value=x.replace(/(\r?\n|\r)$/g,"")}function I(x){const A=this.resume(),L=this.stack[this.stack.length-1];L.label=A,L.identifier=ce(this.sliceSerialize(x)).toLowerCase()}function C(){const x=this.resume(),A=this.stack[this.stack.length-1];A.title=x}function F(){const x=this.resume(),A=this.stack[this.stack.length-1];A.url=x}function R(x){const A=this.stack[this.stack.length-1];if(!A.depth){const L=this.sliceSerialize(x).length;A.depth=L}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function M(x){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(x).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function j(x){const L=this.stack[this.stack.length-1].children;let N=L[L.length-1];(!N||N.type!=="text")&&(N=di(),N.position={start:xe(x.start),end:void 0},L.push(N)),this.stack.push(N)}function y(x){const A=this.stack.pop();A.value+=this.sliceSerialize(x),A.position.end=xe(x.end)}function P(x){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const L=A.children[A.children.length-1];L.position.end=xe(x.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(A.type)&&(j.call(this,x),y.call(this,x))}function v(){this.data.atHardBreak=!0}function U(){const x=this.resume(),A=this.stack[this.stack.length-1];A.value=x}function D(){const x=this.resume(),A=this.stack[this.stack.length-1];A.value=x}function T(){const x=this.resume(),A=this.stack[this.stack.length-1];A.value=x}function q(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=A,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function Q(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=A,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function oe(x){const A=this.sliceSerialize(x),L=this.stack[this.stack.length-2];L.label=la(A),L.identifier=ce(A).toLowerCase()}function pe(){const x=this.stack[this.stack.length-1],A=this.resume(),L=this.stack[this.stack.length-1];if(this.data.inReference=!0,L.type==="link"){const N=x.children;L.children=N}else L.alt=A}function m(){const x=this.resume(),A=this.stack[this.stack.length-1];A.url=x}function ae(){const x=this.resume(),A=this.stack[this.stack.length-1];A.title=x}function me(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function ue(x){const A=this.resume(),L=this.stack[this.stack.length-1];L.label=A,L.identifier=ce(this.sliceSerialize(x)).toLowerCase(),this.data.referenceType="full"}function we(x){this.data.characterReferenceType=x.type}function G(x){const A=this.sliceSerialize(x),L=this.data.characterReferenceType;let N;L?(N=br(A,L==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):N=Gn(A);const $=this.stack[this.stack.length-1];$.value+=N}function Me(x){const A=this.stack.pop();A.position.end=xe(x.end)}function ye(x){y.call(this,x);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(x)}function Ae(x){y.call(this,x);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(x)}function Te(){return{type:"blockquote",children:[]}}function Je(){return{type:"code",lang:null,meta:null,value:""}}function si(){return{type:"inlineCode",value:""}}function ci(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fi(){return{type:"emphasis",children:[]}}function at(){return{type:"heading",depth:0,children:[]}}function ut(){return{type:"break"}}function st(){return{type:"html",value:""}}function hi(){return{type:"image",title:null,url:"",alt:null}}function ct(){return{type:"link",title:null,url:"",children:[]}}function ft(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function pi(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function mi(){return{type:"paragraph",children:[]}}function gi(){return{type:"strong",children:[]}}function di(){return{type:"text",value:""}}function ki(){return{type:"thematicBreak"}}}function xe(e){return{line:e.line,column:e.column,offset:e.offset}}function Dr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Dr(e,r):sa(e,r)}}function sa(e,t){let n;for(n in t)if(zr.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 Lt(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$e({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$e({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$e({start:t.start,end:t.end})+") is still open")}function ca(e){const t=this;t.parser=n;function n(r){return aa(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fa(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 ha(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function pa(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 ma(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ga(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function da(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Oe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,s),e.applyData(t,s)}function ka(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 ya(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Lr(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 xa(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lr(e,t);const i={src:Oe(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function ba(e,t){const n={src:Oe(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function wa(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 Sa(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lr(e,t);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ca(e,t){const n={href:Oe(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ea(e,t,n){const r=e.all(t),i=n?Ia(n):Fr(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 u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&l.push({type:"text",value:`
8
+ `});const s={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,s),e.applyData(t,s)}function Ia(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=Fr(n[r])}return t}function Fr(e){const t=e.spread;return t??e.children.length>1}function Aa(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 Ta(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pa(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function va(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function za(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=Vn(t.children[1]),u=hr(t.children[t.children.length-1]);a&&u&&(l.position={start:a,end:u}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Da(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let u=-1;const s=[];for(;++u<a;){const c=t.children[u],p={},h=l?l[u]:void 0;h&&(p.align=h);let d={type:"element",tagName:o,properties:p,children:[]};c&&(d.children=e.all(c),e.patch(c,d),d=e.applyData(c,d)),s.push(d)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,f),e.applyData(t,f)}function La(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ft=9,Rt=32;function Fa(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(_t(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(_t(t.slice(i),i>0,!1)),o.join("")}function _t(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Ft||o===Rt;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Ft||o===Rt;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ra(e,t){const n={type:"text",value:Fa(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function _a(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Oa={blockquote:fa,break:ha,code:pa,delete:ma,emphasis:ga,footnoteReference:da,heading:ka,html:ya,imageReference:xa,image:ba,inlineCode:wa,linkReference:Sa,link:Ca,listItem:Ea,list:Aa,paragraph:Ta,root:Pa,strong:va,table:za,tableCell:La,tableRow:Da,text:Ra,thematicBreak:_a,toml:Ze,yaml:Ze,definition:Ze,footnoteDefinition:Ze};function Ze(){}const Rr=-1,fn=0,We=1,on=2,Jn=3,Zn=4,et=5,nt=6,_r=7,Or=8,Ot=typeof self=="object"?self:globalThis,Ma=(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 fn:case Rr:return n(l,i);case We:{const a=n([],i);for(const u of l)a.push(r(u));return a}case on:{const a=n({},i);for(const[u,s]of l)a[r(u)]=r(s);return a}case Jn:return n(new Date(l),i);case Zn:{const{source:a,flags:u}=l;return n(new RegExp(a,u),i)}case et:{const a=n(new Map,i);for(const[u,s]of l)a.set(r(u),r(s));return a}case nt:{const a=n(new Set,i);for(const u of l)a.add(r(u));return a}case _r:{const{name:a,message:u}=l;return n(new Ot[a](u),i)}case Or: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 Ot[o](l),i)};return r},Mt=e=>Ma(new Map,e)(0),ze="",{toString:Na}={},{keys:Ba}=Object,qe=e=>{const t=typeof e;if(t!=="object"||!e)return[fn,t];const n=Na.call(e).slice(8,-1);switch(n){case"Array":return[We,ze];case"Object":return[on,ze];case"Date":return[Jn,ze];case"RegExp":return[Zn,ze];case"Map":return[et,ze];case"Set":return[nt,ze];case"DataView":return[We,n]}return n.includes("Array")?[We,n]:n.includes("Error")?[_r,n]:[on,n]},en=([e,t])=>e===fn&&(t==="function"||t==="symbol"),ja=(e,t,n,r)=>{const i=(l,a)=>{const u=r.push(l)-1;return n.set(a,u),u},o=l=>{if(n.has(l))return n.get(l);let[a,u]=qe(l);switch(a){case fn:{let f=l;switch(u){case"bigint":a=Or,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([Rr],l)}return i([a,f],l)}case We:{if(u){let p=l;return u==="DataView"?p=new Uint8Array(l.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(l)),i([u,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case on:{if(u)switch(u){case"BigInt":return i([u,l.toString()],l);case"Boolean":case"Number":case"String":return i([u,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of Ba(l))(e||!en(qe(l[p])))&&f.push([o(p),o(l[p])]);return c}case Jn:return i([a,l.toISOString()],l);case Zn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case et:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(en(qe(p))||en(qe(h))))&&f.push([o(p),o(h)]);return c}case nt:{const f=[],c=i([a,f],l);for(const p of l)(e||!en(qe(p)))&&f.push(o(p));return c}}const{message:s}=l;return i([a,{name:u,message:s}],l)};return o},Nt=(e,{json:t,lossy:n}={})=>{const r=[];return ja(!(t||n),!!t,new Map,r)(e),r},an=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Mt(Nt(e,t)):structuredClone(e):(e,t)=>Mt(Nt(e,t));function Ha(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 Ua(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qa(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Ha,r=e.options.footnoteBackLabel||Ua,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const s=e.footnoteById.get(e.footnoteOrder[u]);if(!s)continue;const f=e.all(s),c=String(s.identifier).toUpperCase(),p=Oe(c.toLowerCase());let h=0;const d=[],w=e.footnoteCounts.get(c);for(;w!==void 0&&++h<=w;){d.length>0&&d.push({type:"text",value:" "});let I=typeof n=="string"?n:n(u,h);typeof I=="string"&&(I={type:"text",value:I}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const I=S.children[S.children.length-1];I&&I.type==="text"?I.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...d)}else f.push(...d);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(s,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...an(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
+ `}]}}const hn=(function(e){if(e==null)return Ya;if(typeof e=="function")return pn(e);if(typeof e=="object")return Array.isArray(e)?$a(e):Va(e);if(typeof e=="string")return Wa(e);throw new Error("Expected function, string, or object as test")});function $a(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=hn(e[n]);return pn(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Va(e){const t=e;return pn(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Wa(e){return pn(t);function t(n){return n&&n.type===e}}function pn(e){return t;function t(n,r,i){return!!(Xa(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ya(){return!0}function Xa(e){return e!==null&&typeof e=="object"&&"type"in e}const Mr=[],Qa=!0,Nn=!1,Ga="skip";function Nr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=hn(i),l=r?-1:1;a(e,void 0,[])();function a(u,s,f){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Mr,d,w,S;if((!t||o(u,s,f[f.length-1]||void 0))&&(h=Ka(n(u,f)),h[0]===Nn))return h;if("children"in u&&u.children){const k=u;if(k.children&&h[0]!==Ga)for(w=(r?k.children.length:-1)+l,S=f.concat(k);w>-1&&w<k.children.length;){const I=k.children[w];if(d=a(I,w,S)(),d[0]===Nn)return d;w=typeof d[1]=="number"?d[1]:w+l}}return h}}}function Ka(e){return Array.isArray(e)?e:typeof e=="number"?[Qa,e]:e==null?Mr:[e]}function tt(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),Nr(e,o,a,i);function a(u,s){const f=s[s.length-1],c=f?f.children.indexOf(u):void 0;return l(u,c,f)}}const Bn={}.hasOwnProperty,Ja={};function Za(e,t){const n=t||Ja,r=new Map,i=new Map,o=new Map,l={...Oa,...n.handlers},a={all:s,applyData:nu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:u,options:n,patch:eu,wrap:ru};return tt(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function u(f,c){const p=f.type,h=a.handlers[p];if(Bn.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:w,...S}=f,k=an(S);return k.children=a.all(f),k}return an(f)}return(a.options.unknownHandler||tu)(a,f,c)}function s(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const d=a.one(p[h],f);if(d){if(h&&p[h-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=Bt(d.value)),!Array.isArray(d)&&d.type==="element")){const w=d.children[0];w&&w.type==="text"&&(w.value=Bt(w.value))}Array.isArray(d)?c.push(...d):c.push(d)}}}return c}}function eu(e,t){e.position&&(t.position=Hi(e))}function nu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,an(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function tu(e,t){const n=t.data||{},r="value"in t&&!(Bn.call(n,"hProperties")||Bn.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 ru(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 Bt(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jt(e,t){const n=Za(e,t),r=n.one(e,void 0),i=qa(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 iu(e,t){return e&&"run"in e?async function(n,r){const i=jt(n,{file:r,...t});await e.run(i,r)}:function(n,r){return jt(n,{file:r,...e||t})}}function Ht(e){if(e)throw e}var xn,Ut;function lu(){if(Ut)return xn;Ut=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):t.call(s)==="[object Array]"},o=function(s){if(!s||t.call(s)!=="[object Object]")return!1;var f=e.call(s,"constructor"),c=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!f&&!c)return!1;var p;for(p in s);return typeof p>"u"||e.call(s,p)},l=function(s,f){n&&f.name==="__proto__"?n(s,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):s[f.name]=f.newValue},a=function(s,f){if(f==="__proto__")if(e.call(s,f)){if(r)return r(s,f).value}else return;return s[f]};return xn=function u(){var s,f,c,p,h,d,w=arguments[0],S=1,k=arguments.length,I=!1;for(typeof w=="boolean"&&(I=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<k;++S)if(s=arguments[S],s!=null)for(f in s)c=a(w,f),p=a(s,f),w!==p&&(I&&p&&(o(p)||(h=i(p)))?(h?(h=!1,d=c&&i(c)?c:[]):d=c&&o(c)?c:{},l(w,{name:f,newValue:u(I,d,p)})):typeof p<"u"&&l(w,{name:f,newValue:p}));return w},xn}var ou=lu();const bn=ir(ou);function jn(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 au(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(u,...s){const f=e[++o];let c=-1;if(u){l(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?uu(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function uu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let u;a&&l.push(i);try{u=e.apply(this,l)}catch(s){const f=s;if(a&&n)throw f;return i(f)}a||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const fe={basename:su,dirname:cu,extname:fu,join:hu,sep:"/"};function su(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ke(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 cu(e){if(Ke(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 fu(e){Ke(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 hu(...e){let t=-1,n;for(;++t<e.length;)Ke(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":pu(n)}function pu(e){Ke(e);const t=e.codePointAt(0)===47;let n=mu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function mu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,u;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Ke(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const gu={cwd:du};function du(){return"/"}function Hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ku(e){if(typeof e=="string")e=new URL(e);else if(!Hn(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 yu(e)}function yu(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 wn=["history","path","basename","stem","extname","dirname"];class Br{constructor(t){let n;t?Hn(t)?n={path:t}:typeof t=="string"||xu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":gu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<wn.length;){const o=wn[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)wn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?fe.basename(this.path):void 0}set basename(t){Cn(t,"basename"),Sn(t,"basename"),this.path=fe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?fe.dirname(this.path):void 0}set dirname(t){qt(this.basename,"dirname"),this.path=fe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?fe.extname(this.path):void 0}set extname(t){if(Sn(t,"extname"),qt(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=fe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hn(t)&&(t=ku(t)),Cn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?fe.basename(this.path,this.extname):void 0}set stem(t){Cn(t,"stem"),Sn(t,"stem"),this.path=fe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new J(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sn(e,t){if(e&&e.includes(fe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+fe.sep+"`")}function Cn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qt(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function xu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),wu={}.hasOwnProperty;class rt extends bu{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=au()}copy(){const t=new rt;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(bn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(An("data",this.frozen),this.namespace[t]=n,this):wu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(An("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=nn(t),r=this.parser||this.Parser;return En("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),En("process",this.parser||this.Parser),In("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=nn(t),u=r.parse(a);r.run(u,a,function(f,c,p){if(f||!c||!p)return s(f);const h=c,d=r.stringify(h,p);Eu(d)?p.value=d:p.result=d,s(f,p)});function s(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),En("processSync",this.parser||this.Parser),In("processSync",this.compiler||this.Compiler),this.process(t,i),Vt("processSync","process",n),r;function i(o,l){n=!0,Ht(o),r=l}}run(t,n,r){$t(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const u=nn(n);i.run(t,u,s);function s(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Vt("runSync","run",r),i;function o(l,a){Ht(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=nn(n),i=this.compiler||this.Compiler;return In("stringify",i),$t(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(An("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...c]=s;u(f,c)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(s.plugins),s.settings&&(i.settings=bn(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const c=s[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===s){p=c;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...d]=f;const w=r[p][1];jn(w)&&jn(h)&&(h=bn(!0,w,h)),r[p]=[s,h,...d]}}}}const Su=new rt().freeze();function En(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function In(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function An(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 $t(e){if(!jn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vt(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function nn(e){return Cu(e)?e:new Br(e)}function Cu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Eu(e){return typeof e=="string"||Iu(e)}function Iu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Au="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Wt=[],Yt={allowDangerousHtml:!0},Tu=/^(https?|ircs?|mailto|xmpp)$/i,Pu=[{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 vu(e){const t=zu(e),n=Du(e);return Lu(t.runSync(t.parse(n),n),e)}function zu(e){const t=e.rehypePlugins||Wt,n=e.remarkPlugins||Wt,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Yt}:Yt;return Su().use(ca).use(n).use(iu,r).use(t)}function Du(e){const t=e.children||"",n=new Br;return typeof t=="string"&&(n.value=t),n}function Lu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,u=t.urlTransform||Fu;for(const f of Pu)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Au+f.id,void 0);return tt(e,s),Wi(e,{Fragment:Y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Y.jsx,jsxs:Y.jsxs,passKeys:!0,passNode:!0});function s(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in dn)if(Object.hasOwn(dn,h)&&Object.hasOwn(f.properties,h)){const d=f.properties[h],w=dn[h];(w===null||w.includes(f.tagName))&&(f.properties[h]=u(String(d||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function Fu(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||Tu.test(e.slice(0,t))?e:""}function Xt(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 Ru(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _u(e,t,n){const i=hn((n||{}).ignore||[]),o=Ou(t);let l=-1;for(;++l<o.length;)Nr(e,"text",a);function a(s,f){let c=-1,p;for(;++c<f.length;){const h=f[c],d=p?p.children:void 0;if(i(h,d?d.indexOf(h):void 0,p))return;p=h}if(p)return u(s,f)}function u(s,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let d=0;const S=c.children.indexOf(s);let k=!1,I=[];p.lastIndex=0;let C=p.exec(s.value);for(;C;){const F=C.index,R={index:C.index,input:C.input,stack:[...f,s]};let b=h(...C,R);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=F+1:(d!==F&&I.push({type:"text",value:s.value.slice(d,F)}),Array.isArray(b)?I.push(...b):b&&I.push(b),d=F+C[0].length,k=!0),!p.global)break;C=p.exec(s.value)}return k?(d<s.value.length&&I.push({type:"text",value:s.value.slice(d)}),c.children.splice(S,1,...I)):I=[s],S+I.length}}function Ou(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([Mu(i[0]),Nu(i[1])])}return t}function Mu(e){return typeof e=="string"?new RegExp(Ru(e),"g"):e}function Nu(e){return typeof e=="function"?e:function(){return e}}const Tn="phrasing",Pn=["autolink","link","image","label"];function Bu(){return{transforms:[Wu],enter:{literalAutolink:Hu,literalAutolinkEmail:vn,literalAutolinkHttp:vn,literalAutolinkWww:vn},exit:{literalAutolink:Vu,literalAutolinkEmail:$u,literalAutolinkHttp:Uu,literalAutolinkWww:qu}}}function ju(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tn,notInConstruct:Pn},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tn,notInConstruct:Pn},{character:":",before:"[ps]",after:"\\/",inConstruct:Tn,notInConstruct:Pn}]}}function Hu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vn(e){this.config.enter.autolinkProtocol.call(this,e)}function Uu(e){this.config.exit.autolinkProtocol.call(this,e)}function qu(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 $u(e){this.config.exit.autolinkEmail.call(this,e)}function Vu(e){this.exit(e)}function Wu(e){_u(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Yu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Xu]],{ignore:["link","linkReference"]})}function Yu(e,t,n,r,i){let o="";if(!jr(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Qu(n)))return!1;const l=Gu(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 Xu(e,t,n,r){return!jr(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qu(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 Gu(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=Xt(e,"(");let o=Xt(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 jr(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ee(n)||sn(n))&&(!t||n!==47)}Hr.peek=ls;function Ku(){this.buffer()}function Ju(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zu(){this.buffer()}function es(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ns(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ce(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ts(e){this.exit(e)}function rs(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ce(this.sliceSerialize(e)).toLowerCase(),n.label=t}function is(e){this.exit(e)}function ls(){return"["}function Hr(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 os(){return{enter:{gfmFootnoteCallString:Ku,gfmFootnoteCall:Ju,gfmFootnoteDefinitionLabelString:Zu,gfmFootnoteDefinition:es},exit:{gfmFootnoteCallString:ns,gfmFootnoteCall:ts,gfmFootnoteDefinitionLabelString:rs,gfmFootnoteDefinition:is}}}function as(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hr},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let u=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return u+=a.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),u+=a.move((t?`
15
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?Ur:us))),s(),u}}function us(e,t,n){return t===0?e:Ur(e,t,n)}function Ur(e,t,n){return(n?"":" ")+e}const ss=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qr.peek=ms;function cs(){return{canContainEols:["delete"],enter:{strikethrough:hs},exit:{strikethrough:ps}}}function fs(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ss}],handlers:{delete:qr}}}function hs(e){this.enter({type:"delete",children:[]},e)}function ps(e){this.exit(e)}function qr(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 ms(){return"~"}function gs(e){return e.length}function ds(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||gs,o=[],l=[],a=[],u=[];let s=0,f=-1;for(;++f<e.length;){const w=[],S=[];let k=-1;for(e[f].length>s&&(s=e[f].length);++k<e[f].length;){const I=ks(e[f][k]);if(n.alignDelimiters!==!1){const C=i(I);S[k]=C,(u[k]===void 0||C>u[k])&&(u[k]=C)}w.push(I)}l[f]=w,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<s;)o[c]=Qt(r[c]);else{const w=Qt(r);for(;++c<s;)o[c]=w}c=-1;const p=[],h=[];for(;++c<s;){const w=o[c];let S="",k="";w===99?(S=":",k=":"):w===108?S=":":w===114&&(k=":");let I=n.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-k.length);const C=S+"-".repeat(I)+k;n.alignDelimiters!==!1&&(I=S.length+I+k.length,I>u[c]&&(u[c]=I),h[c]=I),p[c]=C}l.splice(1,0,p),a.splice(1,0,h),f=-1;const d=[];for(;++f<l.length;){const w=l[f],S=a[f];c=-1;const k=[];for(;++c<s;){const I=w[c]||"";let C="",F="";if(n.alignDelimiters!==!1){const R=u[c]-(S[c]||0),b=o[c];b===114?C=" ".repeat(R):b===99?R%2?(C=" ".repeat(R/2+.5),F=" ".repeat(R/2-.5)):(C=" ".repeat(R/2),F=C):F=" ".repeat(R)}n.delimiterStart!==!1&&!c&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||c)&&k.push(" "),n.alignDelimiters!==!1&&k.push(C),k.push(I),n.alignDelimiters!==!1&&k.push(F),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||c!==s-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
16
+ `)}function ks(e){return e==null?"":String(e)}function Qt(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 ys(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()),xs);return i(),l}function xs(e,t,n){return">"+(n?"":" ")+e}function bs(e,t){return Gt(e,t.inConstruct,!0)&&!Gt(e,t.notInConstruct,!1)}function Gt(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 Kt(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&bs(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function ws(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 Ss(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 Cs(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 Es(e,t,n,r){const i=Cs(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Ss(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,Is);return c(),p}const a=n.createTracker(r),u=i.repeat(Math.max(ws(o,i)+1,3)),s=n.enter("codeFenced");let f=a.move(u);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
19
+ `,encode:["`"],...a.current()})),c()}return f+=a.move(`
20
+ `),o&&(f+=a.move(o+`
21
+ `)),f+=a.move(u),s(),f}function Is(e,t,n){return(n?"":" ")+e}function it(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 As(e,t,n,r){const i=it(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("[");return s+=u.move(n.safe(n.associationId(e),{before:s,after:"]",...u.current()})),s+=u.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":`
22
+ `,...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),l(),s}function Ts(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 Xe(e){return"&#x"+e.toString(16).toUpperCase()+";"}function un(e,t,n){const r=Re(e),i=Re(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}$r.peek=Ps;function $r(e,t,n,r){const i=Ts(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=Xe(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+Xe(c));const h=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function Ps(e,t,n){return n.options.emphasis||"*"}function vs(e,t){let n=!1;return tt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Nn}),!!((!e.depth||e.depth<3)&&Qn(e)&&(t.options.setext||n))}function zs(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(vs(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"),u=n.enter("phrasing");o.move(l+" ");let s=n.containerPhrasing(e,{before:"# ",after:`
27
+ `,...o.current()});return/^[\t ]/.test(s)&&(s=Xe(s.charCodeAt(0))+s.slice(1)),s=s?l+" "+s:l,n.options.closeAtx&&(s+=" "+l),u(),a(),s}Vr.peek=Ds;function Vr(e){return e.value||""}function Ds(){return"<"}Wr.peek=Ls;function Wr(e,t,n,r){const i=it(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const u=n.createTracker(r);let s=u.move("![");return s+=u.move(n.safe(e.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(e.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(a=n.enter("destinationRaw"),s+=u.move(n.safe(e.url,{before:s,after:e.title?" ":")",...u.current()}))),a(),e.title&&(a=n.enter(`title${o}`),s+=u.move(" "+i),s+=u.move(n.safe(e.title,{before:s,after:i,...u.current()})),s+=u.move(i),a()),s+=u.move(")"),l(),s}function Ls(){return"!"}Yr.peek=Fs;function Yr(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");const s=n.safe(e.alt,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Fs(){return"!"}Xr.peek=Rs;function Xr(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let u;if(l.atBreak)for(;u=a.exec(r);){let s=u.index;r.charCodeAt(s)===10&&r.charCodeAt(s-1)===13&&s--,r=r.slice(0,s)+" "+r.slice(u.index+1)}}return i+r+i}function Rs(){return"`"}function Qr(e,t){const n=Qn(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))}Gr.peek=_s;function Gr(e,t,n,r){const i=it(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,u;if(Qr(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),u=n.enter("label");let s=l.move("[");return s+=l.move(n.containerPhrasing(e,{before:s,after:"](",...l.current()})),s+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),s+=l.move("<"),s+=l.move(n.safe(e.url,{before:s,after:">",...l.current()})),s+=l.move(">")):(u=n.enter("destinationRaw"),s+=l.move(n.safe(e.url,{before:s,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${o}`),s+=l.move(" "+i),s+=l.move(n.safe(e.title,{before:s,after:i,...l.current()})),s+=l.move(i),u()),s+=l.move(")"),a(),s}function _s(e,t,n){return Qr(e,n)?"<":"["}Kr.peek=Os;function Kr(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");const s=n.containerPhrasing(e,{before:u,after:"]",...a.current()});u+=a.move(s+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!s||s!==c?u+=a.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Os(){return"["}function lt(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 Ms(e){const t=lt(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 Ns(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 Jr(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 Bs(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Ns(n):lt(n);const a=e.ordered?l==="."?")":".":Ms(n);let u=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Jr(n)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(l=a),n.bulletCurrent=l;const s=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),s}function js(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 Hs(e,t,n,r){const i=js(n);let o=n.bulletCurrent||lt(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const u=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,a.current()),f);return u(),s;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function Us(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const qs=hn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $s(e,t,n,r){return(e.children.some(function(l){return qs(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Vs(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Zr.peek=Ws;function Zr(e,t,n,r){const i=Vs(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let u=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const s=u.charCodeAt(0),f=un(r.before.charCodeAt(r.before.length-1),s,i);f.inside&&(u=Xe(s)+u.slice(1));const c=u.charCodeAt(u.length-1),p=un(r.after.charCodeAt(0),c,i);p.inside&&(u=u.slice(0,-1)+Xe(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+u+h}function Ws(e,t,n){return n.options.strong||"*"}function Ys(e,t,n,r){return n.safe(e.value,r)}function Xs(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 Qs(e,t,n){const r=(Jr(n)+(n.options.ruleSpaces?" ":"")).repeat(Xs(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ei={blockquote:ys,break:Kt,code:Es,definition:As,emphasis:$r,hardBreak:Kt,heading:zs,html:Vr,image:Wr,imageReference:Yr,inlineCode:Xr,link:Gr,linkReference:Kr,list:Bs,listItem:Hs,paragraph:Us,root:$s,strong:Zr,text:Ys,thematicBreak:Qs};function Gs(){return{enter:{table:Ks,tableData:Jt,tableHeader:Jt,tableRow:Zs},exit:{codeText:ec,table:Js,tableData:zn,tableHeader:zn,tableRow:zn}}}function Ks(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 Js(e){this.exit(e),this.data.inTable=void 0}function Zs(e){this.enter({type:"tableRow",children:[]},e)}function zn(e){this.exit(e)}function Jt(e){this.enter({type:"tableCell",children:[]},e)}function ec(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,nc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function nc(e,t){return t==="|"?t:e}function tc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:u,tableRow:a}};function l(h,d,w,S){return s(f(h,w,S),h.align)}function a(h,d,w,S){const k=c(h,w,S),I=s([k]);return I.slice(0,I.indexOf(`
29
+ `))}function u(h,d,w,S){const k=w.enter("tableCell"),I=w.enter("phrasing"),C=w.containerPhrasing(h,{...S,before:o,after:o});return I(),k(),C}function s(h,d){return ds(h,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function f(h,d,w){const S=h.children;let k=-1;const I=[],C=d.enter("table");for(;++k<S.length;)I[k]=c(S[k],d,w);return C(),I}function c(h,d,w){const S=h.children;let k=-1;const I=[],C=d.enter("tableRow");for(;++k<S.length;)I[k]=u(S[k],h,d,w);return C(),I}function p(h,d,w){let S=ei.inlineCode(h,d,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function rc(){return{exit:{taskListCheckValueChecked:Zt,taskListCheckValueUnchecked:Zt,paragraph:lc}}}function ic(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oc}}}function Zt(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lc(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 oc(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let u=ei.listItem(e,t,n,{...r,...a.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+l}}function ac(){return[Bu(),os(),cs(),Gs(),rc()]}function uc(e){return{extensions:[ju(),as(e),fs(),tc(e),ic()]}}const sc={tokenize:gc,partial:!0},ni={tokenize:dc,partial:!0},ti={tokenize:kc,partial:!0},ri={tokenize:yc,partial:!0},cc={tokenize:xc,partial:!0},ii={name:"wwwAutolink",tokenize:pc,previous:oi},li={name:"protocolAutolink",tokenize:mc,previous:ai},ke={name:"emailAutolink",tokenize:hc,previous:ui},he={};function fc(){return{text:he}}let Ce=48;for(;Ce<123;)he[Ce]=ke,Ce++,Ce===58?Ce=65:Ce===91&&(Ce=97);he[43]=ke;he[45]=ke;he[46]=ke;he[95]=ke;he[72]=[ke,li];he[104]=[ke,li];he[87]=[ke,ii];he[119]=[ke,ii];function hc(e,t,n){const r=this;let i,o;return l;function l(c){return!Un(c)||!ui.call(r,r.previous)||ot(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return Un(c)?(e.consume(c),a):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(cc,f,s)(c):c===45||c===95||K(c)?(o=!0,e.consume(c),u):f(c)}function s(c){return e.consume(c),i=!0,u}function f(c){return o&&i&&Z(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function pc(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!oi.call(r,r.previous)||ot(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sc,e.attempt(ni,e.attempt(ti,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function mc(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&ai.call(r,r.previous)&&!ot(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(Z(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),o?s:(o=!0,u)):n(c)}function s(c){return c===null||ln(c)||V(c)||Ee(c)||sn(c)?n(c):e.attempt(ni,e.attempt(ti,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function gc(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 dc(e,t,n){let r,i,o;return l;function l(s){return s===46||s===95?e.check(ri,u,a)(s):s===null||V(s)||Ee(s)||s!==45&&sn(s)?u(s):(o=!0,e.consume(s),l)}function a(s){return s===95?r=!0:(i=r,r=void 0),e.consume(s),l}function u(s){return i||r||!o?n(s):t(s)}}function kc(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(ri,t,o)(l):l===null||V(l)||Ee(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function yc(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||V(a)||Ee(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||V(a)||Ee(a)?t(a):r(a)}function o(a){return Z(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):Z(a)?(e.consume(a),l):n(a)}}function xc(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return K(o)?n(o):t(o)}}function oi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||V(e)}function ai(e){return!Z(e)}function ui(e){return!(e===47||Un(e))}function Un(e){return e===43||e===45||e===46||e===95||K(e)}function ot(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 bc={tokenize:Pc,partial:!0};function wc(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ic,continuation:{tokenize:Ac},exit:Tc}},text:{91:{name:"gfmFootnoteCall",tokenize:Ec},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Sc,resolveTo:Cc}}}}function Sc(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){l=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!l||!l._balanced)return n(u);const s=ce(r.sliceSerialize({start:l.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Cc(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 Ec(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(c){if(o>999||c===93&&!l||c===null||c===91||V(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ce(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return V(c)||(l=!0),o++,e.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,s):s(c)}}function Ic(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return u;function u(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(d)}function f(d){if(l>999||d===93&&!a||d===null||d===91||V(d))return n(d);if(d===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=ce(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return V(d)||(a=!0),l++,e.consume(d),d===92?c:f}function c(d){return d===91||d===92||d===93?(e.consume(d),l++,f):f(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(o)||i.push(o),B(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function Ac(e,t,n){return e.check(Ge,t,e.attempt(bc,t,n))}function Tc(e){e.exit("gfmFootnoteDefinition")}function Pc(e,t,n){const r=this;return B(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 vc(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let u=-1;for(;++u<l.length;)if(l[u][0]==="enter"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._close){let s=u;for(;s--;)if(l[s][0]==="exit"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._open&&l[u][1].end.offset-l[u][1].start.offset===l[s][1].end.offset-l[s][1].start.offset){l[u][1].type="strikethroughSequence",l[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[s][1].start),end:Object.assign({},l[u][1].end)},c={type:"strikethroughText",start:Object.assign({},l[s][1].end),end:Object.assign({},l[u][1].start)},p=[["enter",f,a],["enter",l[s][1],a],["exit",l[s][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ie(p,p.length,0,cn(h,l.slice(s+1,u),a)),ie(p,p.length,0,[["exit",c,a],["enter",l[u][1],a],["exit",l[u][1],a],["exit",f,a]]),ie(l,s-1,u-s+3,p),u=s+p.length-2;break}}for(u=-1;++u<l.length;)l[u][1].type==="strikethroughSequenceTemporary"&&(l[u][1].type="data");return l}function o(l,a,u){const s=this.previous,f=this.events;let c=0;return p;function p(d){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(d):(l.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const w=Re(s);if(d===126)return c>1?u(d):(l.consume(d),c++,h);if(c<2&&!n)return u(d);const S=l.exit("strikethroughSequenceTemporary"),k=Re(d);return S._open=!k||k===2&&!!w,S._close=!w||w===2&&!!k,a(d)}}}class zc{constructor(){this.map=[]}add(t,n,r){Dc(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 Dc(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 Lc(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 Fc(){return{flow:{null:{name:"table",tokenize:Rc,resolveAll:_c}}}}function Rc(e,t,n){const r=this;let i=0,o=0,l;return a;function a(y){let P=r.events.length-1;for(;P>-1;){const D=r.events[P][1].type;if(D==="lineEnding"||D==="linePrefix")P--;else break}const v=P>-1?r.events[P][1].type:null,U=v==="tableHead"||v==="tableRow"?b:u;return U===b&&r.parser.lazy[r.now().line]?n(y):U(y)}function u(y){return e.enter("tableHead"),e.enter("tableRow"),s(y)}function s(y){return y===124||(l=!0,o+=1),f(y)}function f(y){return y===null?n(y):z(y)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):n(y):O(y)?B(e,f,"whitespace")(y):(o+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||V(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?p:c)}function p(y){return y===92||y===124?(e.consume(y),c):c(y)}function h(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),l=!1,O(y)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):d(y))}function d(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),w):R(y)}function w(y){return O(y)?B(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),k):y===45?(o+=1,k(y)):y===null||z(y)?F(y):R(y)}function k(y){return y===45?(e.enter("tableDelimiterFiller"),I(y)):R(y)}function I(y){return y===45?(e.consume(y),I):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(y))}function C(y){return O(y)?B(e,F,"whitespace")(y):F(y)}function F(y){return y===124?d(y):y===null||z(y)?!l||i!==o?R(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):R(y)}function R(y){return n(y)}function b(y){return e.enter("tableRow"),M(y)}function M(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),M):y===null||z(y)?(e.exit("tableRow"),t(y)):O(y)?B(e,M,"whitespace")(y):(e.enter("data"),H(y))}function H(y){return y===null||y===124||V(y)?(e.exit("data"),M(y)):(e.consume(y),y===92?j:H)}function j(y){return y===92||y===124?(e.consume(y),H):H(y)}}function _c(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,u=0,s,f,c;const p=new zc;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(a=!1,u!==0&&(er(p,t,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",s,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",f,t]])),i=d.type==="tableDelimiterRow"?2:f?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=tn(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=tn(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):d.type==="tableHead"?(a=!0,u=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(u=n,o[1]!==0?(l[0]=l[1],c=tn(p,t,o,i,n,c)):l[1]!==0&&(c=tn(p,t,l,i,n,c)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(l[3]=n)}for(u!==0&&er(p,t,u,s,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Lc(t.events,n))}return e}function tn(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Le(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=Le(t.events,n[1]);if(o={type:l,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const s=Le(t.events,n[2]),f=Le(t.events,n[3]),c={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,w=n[3]-n[2]-1;e.add(d,w,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Le(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function er(e,t,n,r,i){const o=[],l=Le(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 Le(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Oc={name:"tasklistCheck",tokenize:Nc};function Mc(){return{text:{91:Oc}}}function Nc(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return V(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),l):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),l):n(u)}function l(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(u)}function a(u){return z(u)?t(u):O(u)?e.check({tokenize:Bc},t,n)(u):n(u)}}function Bc(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function jc(e){return xr([fc(),wc(),vc(e),Fc(),Mc()])}const Hc={};function Uc(e){const t=this,n=e||Hc,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(jc(n)),o.push(ac()),l.push(uc(n))}const nr=/\[\[([^\]\n|#]+)(?:#[^\]\n|]+)?(?:\|([^\]\n]+))?\]\]/g;function qc({title:e,alias:t,resolvedId:n,onSelect:r,onCreate:i}){const o=t||e;return n?Y.jsx("button",{type:"button",onClick:l=>{l.preventDefault(),l.stopPropagation(),r==null||r(n)},className:"text-accent hover:underline font-medium",children:o}):Y.jsx("button",{type:"button",onClick:l=>{l.preventDefault(),l.stopPropagation(),i==null||i(e)},className:"text-warm-500 underline decoration-dashed hover:text-warm-700",title:`Create node "${e}"`,children:o})}function tr(e,t,n,r){var u;const i=[];nr.lastIndex=0;let o=0,l=0,a;for(;(a=nr.exec(e))!==null;){const s=a[1].trim();if(!s)continue;const f=e.slice(o,a.index);f&&i.push(Y.jsx(Dn.Fragment,{children:f},`t-${l++}`));const c=t.get(s.toLowerCase())??null;i.push(Y.jsx(qc,{title:s,alias:((u=a[2])==null?void 0:u.trim())||void 0,resolvedId:c,onSelect:n,onCreate:r},`wl-${l++}`)),o=a.index+a[0].length}return o<e.length&&i.push(Y.jsx(Dn.Fragment,{children:e.slice(o)},`t-${l++}`)),i.length>0?i:[e]}function De(e,t,n,r){return typeof e=="string"?tr(e,t,n,r):Array.isArray(e)?e.map((i,o)=>typeof i=="string"?Y.jsx(Dn.Fragment,{children:tr(i,t,n,r)},o):i):e}function rr(e){return!(!e||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#"))}function Vc({content:e,className:t,memoryNodes:n,onSelectMemoryNode:r,onCreateMemoryNode:i,onLinkClick:o,resolveImageSrc:l,onCheckboxToggle:a}){const u=new Map;if(n)for(const f of n)u.set(f.title.toLowerCase(),f.id);const s=n!==void 0;return Y.jsx("div",{className:`markdown-content ${t??""}`,children:Y.jsx(vu,{remarkPlugins:[Uc],components:{a:({href:f,children:c})=>o&&rr(f)?Y.jsx("button",{type:"button",className:"text-accent hover:underline",onClick:p=>{p.preventDefault(),p.stopPropagation(),o(f)},children:c}):Y.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",children:c}),...l?{img:f=>{const c=typeof f.src=="string"&&rr(f.src)?l(f.src):f.src;return Y.jsx("img",{...f,src:c,className:"max-w-full"})}}:{},...a?{input:f=>f.type!=="checkbox"?Y.jsx("input",{...f}):Y.jsx("input",{...f,disabled:!1,className:"cursor-pointer",onChange:c=>{const p=c.currentTarget,h=p.closest(".markdown-content");if(!h)return;const d=h.querySelectorAll('input[type="checkbox"]'),w=Array.from(d).indexOf(p);w<0||a(w,p.checked)}})}:{},...s?{p:({children:f})=>Y.jsx("p",{children:De(f,u,r,i)}),li:({children:f})=>Y.jsx("li",{children:De(f,u,r,i)}),em:({children:f})=>Y.jsx("em",{children:De(f,u,r,i)}),strong:({children:f})=>Y.jsx("strong",{children:De(f,u,r,i)}),td:({children:f})=>Y.jsx("td",{children:De(f,u,r,i)}),th:({children:f})=>Y.jsx("th",{children:De(f,u,r,i)})}:{}},children:e})})}export{Vc as M};
@@ -0,0 +1,7 @@
1
+ import{c as es,o as X,p as H,q as Dt,s as _t,a as Pe,r as n,j as t,Z as ts,d as ss,u as as,g as os,bd as rs,v as jt,U as ae,B as ns,P as Ue,$ as ze,aN as Ye,X as fe,L as ls,aT as cs,aO as is,M as Et,aD as It}from"./index-B0DZbgpK.js";import{y as pe,f as ds,j as vt,u as us,g as ms,H as xs,h as ps,i as gs,D as bt,C as hs,a as fs,d as ys,c as js,I as vs,e as bs,s as ks}from"./CalendarGrid-8sSzdBes.js";import{C as Ns,R as kt}from"./rotate-ccw-Ce-MeCWv.js";import{F as Cs}from"./folder-git-2-DTO9mjAn.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ws=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],Ss=es("folder-input",ws);function Ds(){return X("/api/personal-items")}function _s(s){return H("/api/personal-items",s)}function We(s,u){return _t(`/api/personal-items/${s}`,u)}function Es(s){return Dt(`/api/personal-items/${s}`)}function Is(s){return H("/api/personal-items/bulk-delete",s)}function $s(s,u){return H(`/api/personal-items/${s}/images`,{images:u})}function Ts(s,u){return Dt(`/api/personal-items/${s}/images/${u}`)}function Nt(s,u){return`/api/personal-items/${s}/images/${u}`}function Ms(s,u){return X(`/api/agenda?from=${encodeURIComponent(s)}&to=${encodeURIComponent(u)}`)}function Ls(s,u){return X(`/api/agenda/jira?from=${encodeURIComponent(s)}&to=${encodeURIComponent(u)}`)}function zs(){return X("/api/agenda/jira-config")}function qe(s){return _t("/api/agenda/jira-config",s)}function Ps(){return X("/api/agenda/jira-test")}function Fs(){return X("/api/agenda/jira/statuses")}function Rs(){return X("/api/agenda/jira/dismissed")}function Ks(s){return H("/api/agenda/jira/dismiss",{key:s})}function As(s){return H("/api/agenda/jira/undismiss",{key:s})}function Ct(s){return H("/api/agenda/jira/import",{key:s.key,summary:s.summary,duedate:s.duedate,url:s.url})}function Js(s,u){return H(`/api/personal-items/${s}/move-to-planner`,{project_id:u})}function Hs(s,u){return H("/api/agenda/jira/import-to-planner",{project_id:u,key:s.key,summary:s.summary,duedate:s.duedate,url:s.url})}function Le({projects:s,onMove:u,title:I}){const{t:i}=Pe(),[x,y]=n.useState(!1),[v,R]=n.useState(!1),[k,P]=n.useState({top:0,left:0}),m=n.useRef(null),M=n.useRef(null),p=n.useCallback(()=>{if(!m.current)return;const j=m.current.getBoundingClientRect(),g=window.innerWidth,T=window.innerHeight;let N=j.bottom+4;const b=M.current;if(b){const w=b.offsetWidth,h=b.offsetHeight;let D=j.right-w;D<8&&(D=8),D+w>g-8&&(D=g-8-w),N+h>T-8&&(N=j.top-h-4),P({top:N,left:D}),R(!0)}else P({top:N,left:Math.max(8,j.right-180)})},[]);return n.useEffect(()=>{if(!x){R(!1);return}p();const j=requestAnimationFrame(p),g=T=>{var b,w;const N=T.target;(b=m.current)!=null&&b.contains(N)||(w=M.current)!=null&&w.contains(N)||y(!1)};return document.addEventListener("mousedown",g),window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{cancelAnimationFrame(j),document.removeEventListener("mousedown",g),window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[x,p]),t.jsxs(t.Fragment,{children:[t.jsx("button",{ref:m,onClick:j=>{j.stopPropagation(),y(g=>!g)},className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",title:I,children:t.jsx(Ss,{size:14,style:{color:"var(--color-text-muted)"}})}),x&&ts.createPortal(t.jsxs("div",{ref:M,className:"fixed z-tooltip min-w-[180px] max-h-[280px] overflow-auto rounded-xl py-1 shadow-elevated",style:{top:k.top,left:k.left,opacity:v?1:0,backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[t.jsx("div",{className:"px-3 py-1 text-2xs uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:I}),s.length===0&&t.jsx("div",{className:"px-3 py-1.5 text-xs",style:{color:"var(--color-text-muted)"},children:i("agenda.noProjects")}),s.map(j=>t.jsx("button",{onClick:g=>{g.stopPropagation(),y(!1),u(j.id)},className:"block w-full px-3 py-1.5 text-xs text-left hover:bg-warm-100 rounded-md transition-colors truncate",style:{color:"var(--color-text-primary)"},title:j.name,children:j.name},j.id))]}),document.body)]})}function J(s){if(!s)return[];try{const u=JSON.parse(s);return Array.isArray(u)?u.filter(I=>typeof I=="string"):[]}catch{return[]}}const wt=[210,145,35,320,265,0,175,95];function ge(s){let u=0;for(let i=0;i<s.length;i++)u=u*31+s.charCodeAt(i)>>>0;const I=wt[u%wt.length];return{bg:`hsla(${I}, 60%, 50%, 0.18)`,fg:`hsl(${I}, 65%, 70%)`}}const z={bg:"rgba(38,132,255,0.18)",fg:"rgb(101,164,255)"};function he(s){switch(s){case"jira":return z;case"personal":return{bg:"hsla(238, 70%, 60%, 0.18)",fg:"hsl(238, 70%, 72%)"};case"schedule":return{bg:"hsla(160, 60%, 45%, 0.18)",fg:"hsl(160, 60%, 62%)"};case"planner":return{bg:"hsla(35, 80%, 55%, 0.20)",fg:"hsl(35, 85%, 66%)"}}}const St={personal:0,schedule:1,planner:2,jira:3},Bs={bg:"hsla(145, 60%, 48%, 0.18)",fg:"hsl(145, 60%, 66%)"},Xe={bg:"hsla(218, 32%, 56%, 0.20)",fg:"hsl(218, 36%, 78%)"};let Os=0;function Vs(){const{t:s,lang:u}=Pe(),{confirm:I}=ss(),i=as(),[x,y]=n.useState("month"),[v,R]=n.useState({key:"date",dir:"asc"}),[k,P]=n.useState(()=>new Date),[m,M]=n.useState([]),[p,j]=n.useState({personal:[],schedules:[],planner:[]}),[g,T]=n.useState([]),[N,b]=n.useState([]),[w,h]=n.useState(!1),[D,Y]=n.useState(null),[K,G]=n.useState(null),[V,B]=n.useState(!1),[ye,oe]=n.useState(!1),[O,je]=n.useState([]),[f,Q]=n.useState({personal:!0,schedule:!0,planner:!0,jira:!0}),[Z,ee]=n.useState(!0),[$,re]=n.useState(()=>pe(new Date)),[A,te]=n.useState(null),[Fe,ne]=n.useState(!1),[_,F]=n.useState(!1),[c,U]=n.useState(null),[le,Re]=n.useState(""),[ve,Ke]=n.useState(""),[W,Ae]=n.useState(""),[se,be]=n.useState(""),[ke,Je]=n.useState(!1),[q,Ne]=n.useState([]),[Ce,we]=n.useState(""),[Se,ce]=n.useState([]),[Ge,ie]=n.useState([]),[Ve,He]=n.useState(null),Qe=n.useRef(null),[C,Ze]=n.useState(null),et=260,tt=760,st=n.useRef(null),[Be,$t]=n.useState(()=>{const e=parseInt(localStorage.getItem("agendaPanelWidth")||"",10);return Number.isFinite(e)&&e>=et&&e<=tt?e:320});n.useEffect(()=>{try{localStorage.setItem("agendaPanelWidth",String(Be))}catch{}},[Be]);const at=64,ot=280,Tt=6,[de,Mt]=n.useState(()=>{const e=parseInt(localStorage.getItem("agendaCellHeight")||"",10);return Number.isFinite(e)&&e>=at&&e<=ot?e:92});n.useEffect(()=>{try{localStorage.setItem("agendaCellHeight",String(Math.round(de)))}catch{}},[de]);const Lt=e=>{e.preventDefault();const a=e.clientY,r=de,o=d=>{Mt(Math.min(ot,Math.max(at,r+(d.clientY-a)/Tt)))},l=()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",l),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="ns-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",o),window.addEventListener("pointerup",l)},zt=e=>{e.preventDefault();const a=o=>{var d;const l=(d=st.current)==null?void 0:d.getBoundingClientRect();l&&$t(Math.min(tt,Math.max(et,l.right-o.clientX)))},r=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",r),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",a),window.addEventListener("pointerup",r)},{rangeStart:De,rangeEnd:_e,gridDays:Pt,cols:Ft,dimOutOfMonth:Rt}=ds(x,k),S=n.useCallback(async()=>{ee(!0);try{const[e,a]=await Promise.all([Ds(),Ms(De,_e)]);M(e),j(a)}catch{}finally{ee(!1)}try{const{issues:e}=await Ls(De,_e);T(e),Y(null)}catch(e){T([]),Y(e instanceof Error?e.message:"Jira fetch failed")}try{const{keys:e}=await Rs();b(e)}catch{}},[De,_e]);n.useEffect(()=>{S()},[S]),n.useEffect(()=>{zs().then(G).catch(()=>G(null))},[]);const Ee=!!(K!=null&&K.enabled&&K.hasToken);n.useEffect(()=>{os().then(je).catch(()=>je([]))},[]);const rt=(e,a)=>Js(e.id,a).then(S),nt=(e,a)=>Hs(e,a).then(S),lt=e=>Ks(e).then(S),Kt=e=>As(e).then(S);n.useEffect(()=>{x==="day"&&re(pe(k))},[x,k]);const L=n.useCallback(e=>!C||J(e.tags).includes(C),[C]),Ie=n.useMemo(()=>{const e=new Map,a=(o,l)=>{const d=e.get(o)??[];d.push(l),e.set(o,d)},r=o=>{const l=new Date(o+"T00:00");return l.setDate(l.getDate()+1),pe(l)};for(const o of f.personal?m:[]){if(!o.start_at||!L(o))continue;const l=o.start_at.slice(0,10),d=(o.end_at||o.start_at).slice(0,10);if(!(x==="month"&&d>l))if(x==="month"||d<=l)a(l,{kind:"personal",id:o.id,title:o.title,done:o.status==="done"});else for(let E=l;E<=d;E=r(E))a(E,{kind:"personal",id:o.id,title:o.title,done:o.status==="done"})}for(const o of C||!f.schedule?[]:p.schedules){if(!o.at)continue;const l=vt(o.at),d=new Date(o.at).toTimeString().slice(0,5);a(l,{kind:"schedule",id:o.id,title:`${o.project_name} · ${o.title}`,time:d,projectId:o.project_id,deepLinkTab:"schedules"})}for(const o of C||!f.planner?[]:p.planner){const l=o.due_date.slice(0,10);a(l,{kind:"planner",id:o.id,title:`${o.project_name} · ${o.title}`,done:o.status==="done",projectId:o.project_id,deepLinkTab:"planner"})}for(const o of C||!f.jira?[]:g)o.duedate&&a(o.duedate.slice(0,10),{kind:"jira",id:o.key,title:`${o.key} · ${o.summary}`,url:o.url});return e},[m,p,g,C,L,f,x]),At=n.useMemo(()=>{const e=new Map;for(const[a,r]of Ie)e.set(a,r.map(o=>({key:`${o.kind}-${o.id}`,title:o.title,time:o.time,prefix:o.kind!=="personal"?"· ":void 0,bg:he(o.kind).bg,fg:o.done?"var(--color-text-muted)":he(o.kind).fg,done:o.done,payload:o,draggable:o.kind==="personal"})));return e},[Ie]),Jt=n.useMemo(()=>{if(!f.personal)return[];const e=he("personal");return m.filter(a=>{if(!a.start_at||!L(a))return!1;const r=a.start_at.slice(0,10);return(a.end_at||a.start_at).slice(0,10)>r}).map(a=>({key:`personal-bar-${a.id}`,title:a.title,startKey:a.start_at.slice(0,10),endKey:(a.end_at||a.start_at).slice(0,10),bg:e.bg,fg:a.status==="done"?"var(--color-text-muted)":e.fg,done:a.status==="done",payload:a}))},[m,L,f.personal]),ct=n.useMemo(()=>m.filter(e=>!e.start_at&&L(e)),[m,L]),it=n.useMemo(()=>{const e=new Set;for(const a of m)for(const r of J(a.tags))e.add(r);return Array.from(e).sort()},[m]),dt=n.useMemo(()=>{const e=[];for(const o of f.personal?m:[])L(o)&&e.push({kind:"personal",id:o.id,title:o.title,dateKey:o.start_at?o.start_at.slice(0,10):null,endKey:o.end_at&&o.start_at&&o.end_at.slice(0,10)>o.start_at.slice(0,10)?o.end_at.slice(0,10):null,time:null,status:o.status,item:o});for(const o of C||!f.schedule?[]:p.schedules)e.push({kind:"schedule",id:o.id,title:`${o.project_name} · ${o.title}`,dateKey:o.at?vt(o.at):null,time:o.at?new Date(o.at).toTimeString().slice(0,5):null,projectId:o.project_id,deepLinkTab:"schedules"});for(const o of C||!f.planner?[]:p.planner)e.push({kind:"planner",id:o.id,title:`${o.project_name} · ${o.title}`,dateKey:o.due_date.slice(0,10),time:null,status:o.status,projectId:o.project_id,deepLinkTab:"planner"});for(const o of C||!f.jira?[]:g)e.push({kind:"jira",id:o.key,title:`${o.key} · ${o.summary}`,dateKey:o.duedate?o.duedate.slice(0,10):null,time:null,status:o.status,url:o.url});const a=(o,l)=>{if(!o.dateKey&&!l.dateKey)return 0;if(!o.dateKey)return 1;if(!l.dateKey)return-1;const d=o.dateKey<l.dateKey?-1:o.dateKey>l.dateKey?1:0;return d!==0?d:(o.time||"").localeCompare(l.time||"")},r=v.dir==="asc"?1:-1;return e.sort((o,l)=>{let d=0;if(v.key==="kind")d=St[o.kind]-St[l.kind];else if(v.key==="status"){const E=o.status||"",Oe=l.status||"";if(!E&&!Oe)d=0;else if(E)if(Oe)d=E.localeCompare(Oe);else return-1;else return 1}else return a(o,l)*r;return d!==0?d*r:a(o,l)}),e},[m,p,g,C,L,f,v]),Ht=us(),Bt=pe(new Date),Ot=k.getMonth(),Ut=x==="month"?Math.max(1,Math.floor((de-28)/18)):99,ut=e=>P(a=>ks(a,x,e)),Wt=()=>{P(new Date),re(pe(new Date))},qt=ms(k,x,u),$e=e=>{U(null),Re(""),Ke(""),Ae(e??$),be(e??$),Je(!1),Ne(C?[C]:[]),we(""),ce([]),ie([]),ne(!0)},ue=e=>{U(e),Re(e.title),Ke(e.description??""),Ae(e.start_at?e.start_at.slice(0,10):""),be(e.end_at||e.start_at?(e.end_at||e.start_at).slice(0,10):""),Je(e.status==="done"),Ne(J(e.tags)),we(""),ce([]);try{ie(e.images?JSON.parse(e.images):[])}catch{ie([])}ne(!0)},mt=e=>{const a=e.trim();a&&(Ne(r=>r.includes(a)?r:[...r,a]),we(""))},xt=e=>Ne(a=>a.filter(r=>r!==e)),Te=()=>{ne(!1),U(null),F(!1),ce([]),ie([])},me=n.useCallback(e=>{const a=Array.from(e).filter(r=>r.type.startsWith("image/"));for(const r of a){const o=new FileReader;o.onload=()=>{const l=o.result,d=`pending-${++Os}`;ce(E=>[...E,{id:d,name:r.name,data:l,preview:l}])},o.readAsDataURL(r)}},[]),Xt=n.useCallback(e=>{var o;const a=(o=e.clipboardData)==null?void 0:o.items;if(!a)return;const r=[];for(let l=0;l<a.length;l++)if(a[l].type.startsWith("image/")){const d=a[l].getAsFile();d&&r.push(d)}r.length!==0&&(e.preventDefault(),me(r))},[me]),Yt=n.useCallback(e=>{var a;e.preventDefault(),e.stopPropagation(),(a=e.dataTransfer)!=null&&a.files&&me(e.dataTransfer.files)},[me]),Gt=e=>ce(a=>a.filter(r=>r.id!==e)),Vt=e=>{c&&Ts(c.id,e),ie(a=>a.filter(r=>r.id!==e))},Qt=Ge.length+Se.length,pt=!!(le.trim()||ve.trim()),gt=async()=>{if(!pt)return;const e=le.trim()||ve.trim().split(`
7
+ `)[0].slice(0,80)||s("agenda.untitled"),a=W||null,r=W?se&&se>=W?se:W:null,o=q.length?q:null,l={title:e,description:ve.trim()||void 0,start_at:a,end_at:r,tags:o};let d;c?(await We(c.id,{...l,status:ke?"done":"pending"}),d=c.id):d=(await _s(l)).id,Se.length>0&&await $s(d,Se.map(E=>({name:E.name,data:E.data}))),Te(),S()},ht=async e=>{await We(e.id,{status:e.status==="done"?"pending":"done"}),S()},ft=(e,a,r)=>{M(o=>o.map(l=>l.id===e?{...l,start_at:a,end_at:r}:l)),We(e,{start_at:a,end_at:r}).then(S)},Me=async e=>await I({message:s("agenda.confirmDelete"),danger:!0})?(await Es(e.id),S(),!0):!1,xe=(e,a)=>{a.preventDefault(),a.stopPropagation(),te({x:a.clientX,y:a.clientY,dateKey:"",item:e})},Zt=e=>{if(e.kind==="personal"){const a=m.find(r=>r.id===e.id);a&&ue(a)}else e.kind==="jira"?e.url&&window.open(e.url,"_blank","noopener,noreferrer"):e.projectId&&e.deepLinkTab&&i(`/projects/${e.projectId}?tab=${e.deepLinkTab}`)},yt=n.useMemo(()=>{const e=Ie.get($)??[];return!f.personal||x!=="month"?e:[...m.filter(r=>{if(!r.start_at||!L(r))return!1;const o=r.start_at.slice(0,10),l=(r.end_at||r.start_at).slice(0,10);return l>o&&o<=$&&l>=$}).map(r=>({kind:"personal",id:r.id,title:r.title,done:r.status==="done"})),...e]},[Ie,$,m,L,f.personal,x]);return t.jsxs("div",{ref:st,className:"flex h-full overflow-hidden",children:[t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:[t.jsxs("div",{className:"px-6 pt-6 pb-3 flex items-center justify-between flex-wrap gap-3",children:[t.jsxs("div",{children:[t.jsxs("h1",{className:"text-xl font-semibold flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[t.jsx(rs,{size:20}),s("agenda.title")]}),t.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--color-text-muted)"},children:s("agenda.subtitle")})]}),t.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t.jsx("div",{className:"flex gap-0.5 p-0.5 rounded-lg",style:{backgroundColor:"var(--color-bg-tertiary)"},children:["month","week","day","table"].map(e=>t.jsx("button",{onClick:()=>y(e),className:"px-2.5 py-1 text-xs rounded-md transition-all",style:x===e?{backgroundColor:"var(--color-bg-card)",color:"var(--color-text-primary)",fontWeight:600}:{color:"var(--color-text-tertiary)"},children:s(`agenda.view.${e}`)},e))}),t.jsx("button",{onClick:()=>ut(-1),className:"btn-ghost p-1.5","aria-label":"prev",children:t.jsx(Ns,{size:16})}),t.jsx("span",{className:"text-sm font-medium min-w-[140px] text-center",style:{color:"var(--color-text-primary)"},children:qt}),t.jsx("button",{onClick:()=>ut(1),className:"btn-ghost p-1.5","aria-label":"next",children:t.jsx(jt,{size:16})}),t.jsx("button",{onClick:Wt,className:"btn-ghost text-xs px-2.5 py-1.5",children:s("agenda.today")}),t.jsx(xs,{title:s("agenda.refresh"),body:s("agenda.refreshHelp"),children:t.jsx("button",{onClick:S,className:"btn-ghost p-1.5","aria-label":"refresh",children:t.jsx(kt,{size:14,className:Z?"animate-spin":""})})}),t.jsx("button",{onClick:()=>oe(!0),className:"btn-ghost p-1.5",title:s("agenda.cleanup"),"aria-label":"cleanup-memos",children:t.jsx(ae,{size:14})}),t.jsx("button",{onClick:()=>B(!0),className:"btn-ghost p-1.5",title:s("agenda.jira.settings"),"aria-label":"jira-settings",children:t.jsx(ns,{size:14})})]})]}),t.jsxs("div",{className:"px-6 pb-3 flex items-center gap-1.5 flex-wrap",children:[[{key:"personal",label:s("agenda.source.personal"),color:"var(--color-accent)"},{key:"schedule",label:s("agenda.source.schedule"),color:"var(--color-text-muted)"},{key:"planner",label:s("agenda.source.planner"),color:"var(--color-text-muted)"},...Ee?[{key:"jira",label:s("agenda.source.jira"),color:z.fg}]:[]].map(e=>{const a=f[e.key];return t.jsxs("button",{onClick:()=>Q(r=>({...r,[e.key]:!r[e.key]})),className:"text-2xs px-2 py-0.5 rounded-full flex items-center gap-1 transition-opacity",style:{backgroundColor:"var(--color-bg-secondary)",color:a?"var(--color-text-secondary)":"var(--color-text-muted)",opacity:a?1:.5},children:[t.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:e.color,opacity:a?1:.4}}),e.label]},e.key)}),Ee&&D&&t.jsx("span",{className:"text-2xs px-2 py-0.5 rounded-full cursor-help",style:{backgroundColor:"var(--color-status-error, #f87171)",color:"#fff"},title:D,children:s("agenda.jira.error")})]}),it.length>0&&t.jsxs("div",{className:"px-6 pb-3 flex items-center gap-1.5 flex-wrap",children:[t.jsx("button",{onClick:()=>Ze(null),className:"text-2xs px-2 py-0.5 rounded-full transition-colors",style:C?{backgroundColor:"var(--color-bg-secondary)",color:"var(--color-text-muted)"}:{backgroundColor:"var(--color-accent)",color:"#fff"},children:s("agenda.tags.all")}),it.map(e=>{const a=ge(e),r=C===e;return t.jsxs("button",{onClick:()=>Ze(r?null:e),className:"text-2xs px-2 py-0.5 rounded-full transition-colors",style:{backgroundColor:a.bg,color:a.fg,outline:r?`1px solid ${a.fg}`:"none"},children:["#",e]},e)})]}),t.jsxs("div",{className:"flex-1 overflow-auto px-6 pb-6",children:[x!=="table"&&t.jsx(ps,{view:x,gridDays:Pt,cols:Ft,dimOutOfMonth:Rt,monthIdx:Ot,todayKey:Bt,selectedDate:$,chipsByDay:At,maxChips:Ut,weekdayLabels:Ht,addItemLabel:s("agenda.addItem"),onSelectDate:re,onQuickAdd:$e,onChipClick:e=>Zt(e.payload),onCellContextMenu:(e,a)=>{a.preventDefault(),te({x:a.clientX,y:a.clientY,dateKey:e})},onChipContextMenu:(e,a)=>{const r=e.payload;if(r.kind!=="personal")return;const o=m.find(l=>l.id===r.id);o&&xe(o,a)},bars:Jt,onBarClick:e=>ue(e.payload),onBarContextMenu:(e,a)=>xe(e.payload,a),onBarDrag:(e,a,r)=>ft(e.payload.id,a,r),onChipDrag:(e,a,r)=>{const o=e.payload;o.kind==="personal"&&ft(o.id,a,r)},monthCellHeight:de}),x==="month"&&t.jsx("div",{onPointerDown:Lt,title:s("agenda.resizeCalendar"),className:"mt-1 h-3 flex items-center justify-center cursor-ns-resize group/handle",children:t.jsx("div",{className:"w-16 h-1 rounded-full transition-colors group-hover/handle:bg-accent/50",style:{backgroundColor:"var(--color-border)"}})}),x==="table"&&t.jsxs("div",{className:"rounded-xl overflow-hidden",style:{border:"1px solid var(--color-border)"},onContextMenu:e=>{gs(e)||(e.preventDefault(),te({x:e.clientX,y:e.clientY,dateKey:""}))},children:[t.jsxs("div",{className:"grid items-center px-3 py-2 text-2xs uppercase tracking-wider",style:{gridTemplateColumns:"1fr 150px 96px 72px",backgroundColor:"var(--color-bg-secondary)",color:"var(--color-text-muted)"},children:[t.jsx("span",{children:s("agenda.table.name")}),[["date","agenda.table.date"],["kind","agenda.table.kind"],["status","agenda.table.status"]].map(([e,a])=>{const r=v.key===e;return t.jsxs("button",{onClick:()=>R(o=>({key:e,dir:o.key===e&&o.dir==="asc"?"desc":"asc"})),className:"flex items-center gap-1 uppercase tracking-wider text-left hover:opacity-80 transition-opacity",style:{color:r?"var(--color-text-secondary)":"inherit"},children:[t.jsx("span",{children:s(a)}),t.jsx("span",{style:{opacity:r?1:0},children:v.dir==="asc"?"▲":"▼"})]},e)})]}),dt.length===0&&t.jsx("div",{className:"px-3 py-6 text-xs text-center",style:{color:"var(--color-text-muted)"},children:s("agenda.dayEmpty")}),dt.map(e=>{const a=l=>new Date(l+"T00:00").toLocaleDateString(u,{year:"numeric",month:"short",day:"numeric"}),r=e.dateKey?a(e.dateKey)+(e.endKey?` ~ ${a(e.endKey)}`:e.time?` ${e.time}`:""):"—",o=()=>{e.kind==="personal"&&e.item?ue(e.item):e.kind==="jira"&&e.url?window.open(e.url,"_blank","noopener"):e.projectId&&i(`/projects/${e.projectId}?tab=${e.deepLinkTab}`)};return t.jsxs("div",{onClick:o,onContextMenu:e.item?l=>xe(e.item,l):void 0,className:"grid items-center px-3 py-2.5 text-sm cursor-pointer transition-colors hover:bg-theme-hover",style:{gridTemplateColumns:"1fr 150px 96px 72px",borderTop:"1px solid var(--color-border)"},children:[t.jsxs("span",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[t.jsx("span",{className:"truncate",style:{color:"var(--color-text-primary)",textDecoration:e.status==="done"?"line-through":"none"},title:e.title,children:e.title}),e.item&&J(e.item.tags).slice(0,3).map(l=>{const d=ge(l);return t.jsxs("span",{className:"text-2xs px-1.5 py-0.5 rounded-full flex-shrink-0",style:{backgroundColor:d.bg,color:d.fg},children:["#",l]},l)})]}),t.jsx("span",{className:"text-xs",style:{color:"var(--color-text-secondary)"},children:r}),t.jsx("span",{className:"text-2xs",children:t.jsx("span",{className:"px-1.5 py-0.5 rounded-full font-medium",style:{backgroundColor:he(e.kind).bg,color:he(e.kind).fg},children:s(`agenda.kind.${e.kind}`)})}),t.jsx("span",{className:"text-2xs truncate",children:(()=>{if(e.kind==="jira")return e.status?t.jsx("span",{className:"px-1.5 py-0.5 rounded-full font-medium",style:{backgroundColor:Xe.bg,color:Xe.fg},children:e.status}):t.jsx("span",{style:{color:"var(--color-text-muted)"},children:"—"});if(!e.status)return t.jsx("span",{style:{color:"var(--color-text-muted)"},children:"—"});const l=e.status==="done",d=l?Bs:Xe;return t.jsx("span",{className:"px-1.5 py-0.5 rounded-full font-medium",style:{backgroundColor:d.bg,color:d.fg},children:s(l?"agenda.status.done":"agenda.status.pending")})})()})]},`${e.kind}-${e.id}`)})]})]})]}),t.jsx("div",{onPointerDown:zt,className:"w-1.5 flex-shrink-0 cursor-col-resize hover:bg-accent/40 transition-colors",style:{backgroundColor:"var(--color-border)"},title:s("agenda.resizePanel")}),t.jsxs("div",{className:"flex-shrink-0 flex flex-col overflow-hidden",style:{width:Be},children:[t.jsxs("div",{className:"px-4 pt-5 pb-3 flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold",style:{color:"var(--color-text-primary)"},children:new Date($+"T00:00").toLocaleDateString(u,{month:"long",day:"numeric",weekday:"short"})}),t.jsxs("button",{onClick:()=>$e($),className:"btn-ghost text-xs px-2 py-1 flex items-center gap-1",children:[t.jsx(Ue,{size:14}),s("agenda.add")]})]}),t.jsxs("div",{className:"flex-1 overflow-auto px-4 pb-6 flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[yt.length===0&&t.jsx("p",{className:"text-xs py-2",style:{color:"var(--color-text-muted)"},children:s("agenda.dayEmpty")}),yt.map(e=>{if(e.kind==="personal"){const a=m.find(r=>r.id===e.id);return t.jsxs("div",{onContextMenu:r=>xe(a,r),className:"group flex items-start gap-2 rounded-lg px-2.5 py-2",style:{backgroundColor:"var(--color-bg-secondary)"},children:[t.jsx("button",{onClick:()=>ht(a),className:"mt-0.5 flex-shrink-0",title:s("agenda.toggleDone"),children:t.jsx("span",{className:"w-4 h-4 rounded-md border flex items-center justify-center",style:{borderColor:"var(--color-border)",color:"var(--color-accent)"},children:a.status==="done"&&t.jsx(ze,{size:12})})}),t.jsxs("button",{onClick:()=>ue(a),className:"flex-1 text-left min-w-0",children:[t.jsxs("div",{className:"text-sm truncate",style:{color:"var(--color-text-primary)",textDecoration:a.status==="done"?"line-through":"none"},children:[e.time&&t.jsx("span",{className:"text-2xs mr-1",style:{color:"var(--color-text-muted)"},children:e.time}),a.title]}),a.description&&t.jsx("div",{className:"text-2xs truncate",style:{color:"var(--color-text-muted)"},children:a.description}),J(a.tags).length>0&&t.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:J(a.tags).map(r=>{const o=ge(r);return t.jsxs("span",{className:"text-2xs px-1.5 py-0.5 rounded-full",style:{backgroundColor:o.bg,color:o.fg},children:["#",r]},r)})})]}),t.jsx(Le,{projects:O,onMove:r=>rt(a,r),title:s("agenda.moveToPlanner")}),t.jsx("button",{onClick:()=>Me(a),className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",title:s("agenda.delete"),children:t.jsx(ae,{size:14,style:{color:"var(--color-text-muted)"}})})]},e.id)}if(e.kind==="jira"){const a=g.find(r=>r.key===e.id);return t.jsxs("div",{className:"group flex items-start gap-2 rounded-lg px-2.5 py-2",style:{backgroundColor:z.bg,border:`1px solid ${z.bg}`},children:[t.jsx(Ye,{size:14,className:"mt-0.5 flex-shrink-0",style:{color:z.fg}}),t.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm truncate",style:{color:"var(--color-text-primary)"},title:e.title,children:e.title}),t.jsx("div",{className:"text-2xs",style:{color:z.fg},children:"Jira"})]}),a&&t.jsx(Le,{projects:O,onMove:r=>nt(a,r),title:s("agenda.importToPlanner")}),a&&t.jsx("button",{onClick:()=>Ct(a).then(S),className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",title:s("agenda.jira.import"),children:t.jsx(bt,{size:14,style:{color:"var(--color-text-muted)"}})}),t.jsx("button",{onClick:()=>lt(e.id),className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",title:s("agenda.jira.dismiss"),children:t.jsx(fe,{size:14,style:{color:"var(--color-text-muted)"}})})]},`jira-${e.id}`)}return t.jsxs(ls,{to:`/projects/${e.projectId}?tab=${e.deepLinkTab}`,className:"flex items-start gap-2 rounded-lg px-2.5 py-2 hover:opacity-80 transition-opacity",style:{backgroundColor:"var(--color-bg-secondary)",border:"1px dashed var(--color-border)"},children:[e.kind==="schedule"?t.jsx(hs,{size:14,className:"mt-0.5 flex-shrink-0",style:{color:"var(--color-text-muted)"}}):t.jsx(Cs,{size:14,className:"mt-0.5 flex-shrink-0",style:{color:"var(--color-text-muted)"}}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"text-sm truncate",style:{color:"var(--color-text-secondary)"},children:[e.time&&t.jsx("span",{className:"text-2xs mr-1",style:{color:"var(--color-text-muted)"},children:e.time}),e.title]}),t.jsx("div",{className:"text-2xs",style:{color:"var(--color-text-muted)"},children:e.kind==="schedule"?s("agenda.fromSchedule"):s("agenda.fromPlanner")})]})]},`${e.kind}-${e.id}`)})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[t.jsx("h3",{className:"text-2xs uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:s("agenda.backlog")}),t.jsxs("button",{onClick:()=>$e(""),className:"btn-ghost text-2xs px-1.5 py-0.5 flex items-center gap-1",children:[t.jsx(Ue,{size:12}),s("agenda.memo")]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[ct.length===0&&t.jsx("p",{className:"text-xs py-1",style:{color:"var(--color-text-muted)"},children:s("agenda.backlogEmpty")}),ct.map(e=>t.jsxs("div",{onContextMenu:a=>xe(e,a),className:"group flex items-start gap-2 rounded-lg px-2.5 py-2",style:{backgroundColor:"var(--color-bg-secondary)"},children:[t.jsx("button",{onClick:()=>ht(e),className:"mt-0.5 flex-shrink-0",children:t.jsx("span",{className:"w-4 h-4 rounded-md border flex items-center justify-center",style:{borderColor:"var(--color-border)",color:"var(--color-accent)"},children:e.status==="done"&&t.jsx(ze,{size:12})})}),t.jsxs("button",{onClick:()=>ue(e),className:"flex-1 text-left min-w-0",children:[t.jsx("div",{className:"text-sm truncate",style:{color:"var(--color-text-primary)",textDecoration:e.status==="done"?"line-through":"none"},children:e.title}),e.description&&t.jsx("div",{className:"text-2xs truncate",style:{color:"var(--color-text-muted)"},children:e.description}),J(e.tags).length>0&&t.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:J(e.tags).map(a=>{const r=ge(a);return t.jsxs("span",{className:"text-2xs px-1.5 py-0.5 rounded-full",style:{backgroundColor:r.bg,color:r.fg},children:["#",a]},a)})})]}),t.jsx(Le,{projects:O,onMove:a=>rt(e,a),title:s("agenda.moveToPlanner")}),t.jsx("button",{onClick:()=>Me(e),className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",children:t.jsx(ae,{size:14,style:{color:"var(--color-text-muted)"}})})]},e.id))]})]}),Ee&&f.jira&&!C&&g.some(e=>!e.duedate)&&t.jsxs("div",{children:[t.jsx("h3",{className:"text-2xs uppercase tracking-wider mb-1.5",style:{color:z.fg},children:s("agenda.jira.noDue")}),t.jsx("div",{className:"flex flex-col gap-1.5",children:g.filter(e=>!e.duedate).map(e=>t.jsxs("div",{className:"group flex items-start gap-2 rounded-lg px-2.5 py-2",style:{backgroundColor:z.bg},children:[t.jsx(Ye,{size:14,className:"mt-0.5 flex-shrink-0",style:{color:z.fg}}),t.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"text-sm truncate",style:{color:"var(--color-text-primary)"},title:`${e.key} · ${e.summary}`,children:[e.key," · ",e.summary]}),t.jsx("div",{className:"text-2xs",style:{color:z.fg},children:e.status||"Jira"})]}),t.jsx(Le,{projects:O,onMove:a=>nt(e,a),title:s("agenda.importToPlanner")}),t.jsx("button",{onClick:()=>Ct(e).then(S),className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",title:s("agenda.jira.import"),children:t.jsx(bt,{size:14,style:{color:"var(--color-text-muted)"}})}),t.jsx("button",{onClick:()=>lt(e.key),className:"opacity-0 group-hover:opacity-100 transition-opacity mt-0.5",title:s("agenda.jira.dismiss"),children:t.jsx(fe,{size:14,style:{color:"var(--color-text-muted)"}})})]},`jira-nd-${e.key}`))})]}),Ee&&f.jira&&!C&&N.length>0&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>h(e=>!e),className:"text-2xs uppercase tracking-wider mb-1.5 flex items-center gap-1 hover:opacity-80",style:{color:"var(--color-text-muted)"},children:[s("agenda.jira.dismissedTitle")," (",N.length,")",t.jsx(jt,{size:12,style:{transform:w?"rotate(90deg)":"none",transition:"transform 0.15s"}})]}),w&&t.jsx("div",{className:"flex flex-col gap-1",children:N.map(e=>t.jsxs("div",{className:"group flex items-center gap-2 rounded-lg px-2.5 py-1.5",style:{backgroundColor:"var(--color-bg-secondary)"},children:[t.jsx("span",{className:"flex-1 text-2xs font-mono truncate",style:{color:"var(--color-text-muted)"},children:e}),t.jsx("button",{onClick:()=>Kt(e),className:"opacity-0 group-hover:opacity-100 transition-opacity",title:s("agenda.jira.restore"),children:t.jsx(kt,{size:12,style:{color:"var(--color-text-muted)"}})})]},`jira-dismissed-${e}`))})]})]})]}),A&&t.jsx(fs,{x:A.x,y:A.y,onClose:()=>te(null),children:A.item?t.jsxs("button",{type:"button",className:ys,onClick:()=>Me(A.item),children:[t.jsx(ae,{size:14}),s("agenda.delete")]}):t.jsxs("button",{type:"button",className:js,onClick:()=>$e(A.dateKey),children:[t.jsx(Ue,{size:14}),s("agenda.memo")]})}),Fe&&t.jsx("div",{className:"fixed inset-0 z-tooltip flex items-center justify-center p-6",style:{backgroundColor:"rgba(0,0,0,0.4)"},onClick:Te,children:t.jsxs("div",{className:`rounded-2xl shadow-xl flex flex-col ${_?"w-[94vw] h-[92vh] max-w-[1200px]":"w-full max-w-3xl"}`,style:{backgroundColor:"var(--color-bg-card)",maxHeight:_?"92vh":"88vh"},onClick:e=>e.stopPropagation(),children:[t.jsxs("div",{className:"flex items-center justify-between px-5 pt-4",children:[t.jsx("button",{onClick:()=>F(e=>!e),className:"btn-ghost p-1.5",title:s(_?"agenda.collapse":"agenda.expand"),children:_?t.jsx(cs,{size:16}):t.jsx(is,{size:16})}),t.jsx("span",{className:"text-2xs uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:s(c?"agenda.editTitle":"agenda.addTitle")})]}),t.jsx("div",{className:"flex-1 min-h-0 overflow-auto px-5 pt-2 pb-3",children:t.jsxs("div",{className:`flex flex-col gap-3 h-full ${_?"max-w-[820px] mx-auto w-full pt-2":""}`,children:[t.jsx("input",{autoFocus:!0,value:le,onChange:e=>Re(e.target.value),onKeyDown:e=>{e.key==="Enter"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),gt())},placeholder:s("agenda.titlePlaceholder"),className:`input-field font-semibold ${_?"text-2xl":"text-lg"}`}),t.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t.jsx("input",{type:"date",value:W,onChange:e=>{const a=e.target.value;Ae(a),a&&(!se||se<a)&&be(a)},className:"input-field w-auto"}),t.jsx("span",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:"~"}),t.jsx("input",{type:"date",value:se,min:W||void 0,onChange:e=>be(e.target.value),disabled:!W,className:"input-field w-auto disabled:opacity-40"}),c&&t.jsxs("button",{onClick:()=>Je(e=>!e),className:"btn-ghost text-xs px-2.5 py-1.5 flex items-center gap-1.5",style:ke?{color:"var(--color-accent)"}:void 0,children:[t.jsx("span",{className:"w-4 h-4 rounded-md border flex items-center justify-center",style:{borderColor:"var(--color-border)"},children:ke&&t.jsx(ze,{size:12})}),s(ke?"agenda.status.done":"agenda.status.pending")]})]}),t.jsx("p",{className:"text-2xs",style:{color:"var(--color-text-muted)"},children:s("agenda.dateHint")}),t.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap rounded-lg px-2 py-1.5",style:{border:"1px solid var(--color-border)"},children:[q.map(e=>{const a=ge(e);return t.jsxs("span",{className:"text-2xs px-1.5 py-0.5 rounded-full flex items-center gap-1",style:{backgroundColor:a.bg,color:a.fg},children:["#",e,t.jsx("button",{onClick:()=>xt(e),className:"hover:opacity-70",title:s("agenda.delete"),children:"×"})]},e)}),t.jsx("input",{value:Ce,onChange:e=>we(e.target.value),onKeyDown:e=>{e.key==="Enter"||e.key===","?(e.preventDefault(),mt(Ce)):e.key==="Backspace"&&!Ce&&q.length&&xt(q[q.length-1])},onBlur:()=>mt(Ce),placeholder:q.length?"":s("agenda.tags.placeholder"),className:"flex-1 min-w-[80px] bg-transparent border-none outline-none text-sm",style:{color:"var(--color-text-primary)"}})]}),t.jsx("textarea",{value:ve,onChange:e=>Ke(e.target.value),onPaste:Xt,onDrop:Yt,onDragOver:e=>{e.preventDefault(),e.stopPropagation()},placeholder:s("agenda.descPlaceholder"),className:"input-field flex-1 min-h-[280px] resize-y leading-relaxed"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("button",{type:"button",onClick:()=>{var e;return(e=Qe.current)==null?void 0:e.click()},className:"inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs btn-ghost",children:[t.jsx(vs,{size:14}),s("plannerForm.addImage")]}),t.jsx("span",{className:"text-2xs",style:{color:"var(--color-text-muted)"},children:s("plannerForm.pasteHint")})]}),t.jsx("input",{ref:Qe,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{e.target.files&&me(e.target.files),e.target.value=""}}),Qt>0&&t.jsxs("div",{className:"flex flex-wrap gap-2",children:[Ge.map(e=>t.jsxs("div",{className:"relative group",children:[t.jsx("img",{src:c?Nt(c.id,e.id):"",alt:e.originalName,onClick:()=>c&&He(Nt(c.id,e.id)),className:"h-20 w-20 object-cover rounded-lg cursor-zoom-in",style:{border:"1px solid var(--color-border)"}}),t.jsx("button",{type:"button",onClick:()=>Vt(e.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-status-error text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(fe,{size:12})})]},e.id)),Se.map(e=>t.jsxs("div",{className:"relative group",children:[t.jsx("img",{src:e.preview,alt:e.name,onClick:()=>He(e.preview),className:"h-20 w-20 object-cover rounded-lg cursor-zoom-in",style:{border:"1px solid var(--color-border)"}}),t.jsx("button",{type:"button",onClick:()=>Gt(e.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-status-error text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(fe,{size:12})})]},e.id))]})]})}),t.jsxs("div",{className:"flex justify-end gap-2 px-5 py-4 border-t",style:{borderColor:"var(--color-border)"},children:[c&&t.jsxs("button",{onClick:async()=>{await Me(c)&&Te()},className:"btn-ghost text-sm mr-auto flex items-center gap-1.5",style:{color:"var(--color-status-error, #f87171)"},children:[t.jsx(ae,{size:14}),s("agenda.delete")]}),t.jsx("button",{onClick:Te,className:"btn-ghost text-sm",children:s("agenda.cancel")}),t.jsx("button",{onClick:gt,disabled:!pt,className:"btn-primary text-sm disabled:opacity-40",children:s("agenda.save")})]})]})}),Ve&&t.jsx(bs,{src:Ve,onClose:()=>He(null)}),V&&t.jsx(Ws,{initial:K,onClose:()=>B(!1),onSaved:e=>{G(e),B(!1),S()}}),ye&&t.jsx(Us,{items:m,defaultFrom:De,defaultTo:_e,onClose:()=>oe(!1),onDone:()=>{oe(!1),S()}})]})}function Us({items:s,defaultFrom:u,defaultTo:I,onClose:i,onDone:x}){const{t:y}=Pe(),[v,R]=n.useState(u),[k,P]=n.useState(I),[m,M]=n.useState(!1),[p,j]=n.useState(!1),[g,T]=n.useState(!1),N=n.useCallback(h=>{if(m&&h.status!=="done")return!1;if(!h.start_at)return p;if(!v||!k)return!1;const D=h.start_at.slice(0,10),Y=(h.end_at||h.start_at).slice(0,10);return D<=k&&Y>=v},[v,k,m,p]),b=n.useMemo(()=>s.filter(N).length,[s,N]),w=async()=>{if(b!==0){T(!0);try{await Is({from:v,to:k,done_only:m,include_backlog:p}),x()}catch{T(!1)}}};return t.jsx(Et,{open:!0,onClose:i,size:"md",children:t.jsxs("div",{className:"bg-theme-card border border-theme-border rounded-2xl shadow-elevated flex flex-col overflow-hidden",style:{maxHeight:"90vh"},children:[t.jsxs("div",{className:"px-6 pt-6 pb-2",children:[t.jsxs("h3",{className:"text-base font-semibold flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[t.jsx(ae,{size:16}),y("agenda.cleanup.title")]}),t.jsx("p",{className:"text-xs mt-1",style:{color:"var(--color-text-muted)"},children:y("agenda.cleanup.subtitle")})]}),t.jsxs("div",{className:"px-6 overflow-auto flex flex-col gap-4 py-2",children:[t.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs font-medium mb-1",style:{color:"var(--color-text-secondary)"},children:y("agenda.cleanup.from")}),t.jsx("input",{type:"date",value:v,onChange:h=>R(h.target.value),className:"input-field w-auto"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs font-medium mb-1",style:{color:"var(--color-text-secondary)"},children:y("agenda.cleanup.to")}),t.jsx("input",{type:"date",value:k,onChange:h=>P(h.target.value),className:"input-field w-auto"})]})]}),t.jsxs("label",{className:"flex items-center gap-2 text-sm",style:{color:"var(--color-text-secondary)"},children:[t.jsx("input",{type:"checkbox",checked:m,onChange:h=>M(h.target.checked),className:"rounded-md"}),y("agenda.cleanup.doneOnly")]}),t.jsxs("label",{className:"flex items-center gap-2 text-sm",style:{color:"var(--color-text-secondary)"},children:[t.jsx("input",{type:"checkbox",checked:p,onChange:h=>j(h.target.checked),className:"rounded-md"}),y("agenda.cleanup.includeBacklog")]}),t.jsx("div",{className:"text-sm rounded-lg px-3 py-2",style:{backgroundColor:"var(--color-bg-secondary)",color:b>0?"var(--color-text-primary)":"var(--color-text-muted)"},children:b>0?`${y("agenda.cleanup.previewLabel")}: ${b}${y("agenda.cleanup.unit")}`:y("agenda.cleanup.none")})]}),t.jsxs("div",{className:"flex justify-end gap-2 px-6 py-4 border-t",style:{borderColor:"var(--color-border)"},children:[t.jsx("button",{onClick:i,className:"btn-ghost text-sm",children:y("agenda.cancel")}),t.jsxs(It,{variant:"danger",onClick:w,disabled:g||b===0,className:"text-sm",children:[y("agenda.cleanup.confirm"),b>0?` (${b})`:""]})]})]})})}function Ws({initial:s,onClose:u,onSaved:I}){const{t:i}=Pe(),[x,y]=n.useState(!!(s!=null&&s.enabled)),[v,R]=n.useState((s==null?void 0:s.base_url)??""),[k,P]=n.useState((s==null?void 0:s.email)??""),[m,M]=n.useState(""),[p,j]=n.useState((s==null?void 0:s.assignee_me)??!0),[g,T]=n.useState((s==null?void 0:s.include_done)??!1),[N,b]=n.useState((s==null?void 0:s.projects)??""),[w,h]=n.useState((s==null?void 0:s.statuses)??[]),[D,Y]=n.useState([]),[K,G]=n.useState(!1),[V,B]=n.useState(null),[ye,oe]=n.useState(""),[O,je]=n.useState((s==null?void 0:s.extra_jql)??""),[f,Q]=n.useState(!1),[Z,ee]=n.useState(null),$=()=>({enabled:x,base_url:v.trim(),email:k.trim(),api_token:m||void 0,assignee_me:p,include_done:g,projects:N.trim(),statuses:w,extra_jql:O.trim()}),re=c=>h(U=>U.includes(c)?U.filter(le=>le!==c):[...U,c]),A=async()=>{G(!0),B(null);try{await qe($());const c=await Fs();c.error?B(c.error):Y(c.statuses)}catch(c){B(c instanceof Error?c.message:i("agenda.jira.statusesNeedConn"))}finally{G(!1)}},te=async()=>{Q(!0),ee(null);try{await qe($());const c=await Ps();ee(c.ok?{ok:!0,text:c.user??""}:{ok:!1,text:c.error||"failed"})}catch(c){ee({ok:!1,text:c instanceof Error?c.message:"failed"})}finally{Q(!1)}},Fe=async()=>{Q(!0);try{I(await qe($()))}catch{Q(!1)}},ne="https://id.atlassian.com/manage-profile/security/api-tokens",_="block text-xs font-medium mb-1",F="mt-1 text-2xs leading-relaxed";return t.jsx(Et,{open:!0,onClose:u,size:"md",children:t.jsxs("div",{className:"bg-theme-card border border-theme-border rounded-2xl shadow-elevated flex flex-col overflow-hidden",style:{maxHeight:"90vh"},children:[t.jsxs("div",{className:"px-6 pt-6 pb-2",children:[t.jsx("h3",{className:"text-base font-semibold",style:{color:"var(--color-text-primary)"},children:i("agenda.jira.settings")}),t.jsx("p",{className:"text-xs mt-1",style:{color:"var(--color-text-muted)"},children:i("agenda.jira.subtitle")})]}),t.jsxs("div",{className:"px-6 overflow-auto flex flex-col gap-4 py-2",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm",style:{color:"var(--color-text-secondary)"},children:[t.jsx("input",{type:"checkbox",checked:x,onChange:c=>y(c.target.checked),className:"rounded-md"}),i("agenda.jira.enable")]}),t.jsxs("div",{children:[t.jsx("label",{className:_,style:{color:"var(--color-text-secondary)"},children:i("agenda.jira.baseUrlLabel")}),t.jsx("input",{value:v,onChange:c=>R(c.target.value),placeholder:"https://회사이름.atlassian.net",className:"input-field text-sm font-mono"}),t.jsx("p",{className:F,style:{color:"var(--color-text-muted)"},children:i("agenda.jira.baseUrlHint")})]}),t.jsxs("div",{children:[t.jsx("label",{className:_,style:{color:"var(--color-text-secondary)"},children:i("agenda.jira.emailLabel")}),t.jsx("input",{value:k,onChange:c=>P(c.target.value),placeholder:"you@company.com",className:"input-field text-sm"}),t.jsx("p",{className:F,style:{color:"var(--color-text-muted)"},children:i("agenda.jira.emailHint")})]}),t.jsxs("div",{children:[t.jsx("label",{className:_,style:{color:"var(--color-text-secondary)"},children:i("agenda.jira.tokenLabel")}),t.jsx("input",{type:"password",value:m,onChange:c=>M(c.target.value),placeholder:s!=null&&s.hasToken?i("agenda.jira.tokenSaved"):i("agenda.jira.tokenPlaceholder"),className:"input-field text-sm font-mono"}),t.jsxs("a",{href:ne,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-1.5 text-xs",style:{color:"var(--color-accent)"},children:[t.jsx(Ye,{size:12}),i("agenda.jira.tokenLink")]}),t.jsxs("div",{className:"mt-1.5 text-2xs leading-relaxed rounded-lg px-2.5 py-2",style:{backgroundColor:"var(--color-bg-secondary)",color:"var(--color-text-muted)"},children:[t.jsx("div",{children:i("agenda.jira.tokenStep1")}),t.jsx("div",{children:i("agenda.jira.tokenStep2")}),t.jsx("div",{children:i("agenda.jira.tokenStep3")})]})]}),t.jsxs("div",{className:"pt-2 border-t",style:{borderColor:"var(--color-border)"},children:[t.jsx("label",{className:_,style:{color:"var(--color-text-secondary)"},children:i("agenda.jira.criteria")}),t.jsx("p",{className:F,style:{color:"var(--color-text-muted)",marginBottom:8},children:i("agenda.jira.criteriaHint")}),t.jsxs("label",{className:"flex items-center gap-2 text-sm mb-2",style:{color:"var(--color-text-secondary)"},children:[t.jsx("input",{type:"checkbox",checked:p,onChange:c=>j(c.target.checked),className:"rounded-md"}),i("agenda.jira.assigneeMe")]}),t.jsxs("label",{className:"flex items-center gap-2 text-sm mb-3",style:{color:"var(--color-text-secondary)",opacity:w.length?.4:1},children:[t.jsx("input",{type:"checkbox",checked:g,disabled:w.length>0,onChange:c=>T(c.target.checked),className:"rounded-md"}),i("agenda.jira.includeDone")]}),t.jsx("label",{className:_,style:{color:"var(--color-text-secondary)"},children:i("agenda.jira.projects")}),t.jsx("input",{value:N,onChange:c=>b(c.target.value),placeholder:"ABC, DEF",className:"input-field text-sm font-mono"}),t.jsx("p",{className:F,style:{color:"var(--color-text-muted)"},children:i("agenda.jira.projectsHint")}),t.jsxs("div",{className:"mt-3",children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("label",{className:_,style:{color:"var(--color-text-secondary)",marginBottom:0},children:i("agenda.jira.statuses")}),t.jsx(It,{onClick:A,disabled:K,className:"text-2xs px-2 py-0.5 rounded-md",style:{borderColor:"var(--color-border)",color:"var(--color-accent)"},children:i(K?"agenda.jira.statusesLoading":"agenda.jira.statusesLoad")})]}),t.jsx("p",{className:F,style:{color:"var(--color-text-muted)",marginBottom:6},children:i("agenda.jira.statusesHint")}),D.length>0&&t.jsx("input",{value:ye,onChange:c=>oe(c.target.value),placeholder:i("agenda.jira.statusesSearch"),className:"input-field text-sm mb-2"}),D.length===0?t.jsx("p",{className:"text-2xs",style:{color:V?"var(--color-status-error, #f87171)":"var(--color-text-muted)"},children:V||i("agenda.jira.statusesEmpty")}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"max-h-40 overflow-auto rounded-lg border flex flex-col",style:{borderColor:"var(--color-border)"},children:D.filter(c=>c.name.toLowerCase().includes(ye.trim().toLowerCase())).map(c=>t.jsxs("label",{className:"flex items-center gap-2 text-sm px-2.5 py-1.5 cursor-pointer",style:{color:"var(--color-text-secondary)"},children:[t.jsx("input",{type:"checkbox",checked:w.includes(c.name),onChange:()=>re(c.name),className:"rounded-md"}),t.jsx("span",{children:c.name}),c.category&&t.jsx("span",{className:"text-2xs ml-auto",style:{color:"var(--color-text-muted)"},children:c.category})]},c.name))}),V&&t.jsx("p",{className:"text-2xs mt-1",style:{color:"var(--color-status-error, #f87171)"},children:V})]})]}),t.jsx("label",{className:_+" mt-3",style:{color:"var(--color-text-secondary)"},children:i("agenda.jira.extraJql")}),t.jsx("textarea",{value:O,onChange:c=>je(c.target.value),placeholder:"labels = urgent AND priority >= High",rows:2,className:"input-field text-sm font-mono resize-y"}),t.jsx("p",{className:F,style:{color:"var(--color-text-muted)"},children:i("agenda.jira.extraJqlHint")})]}),Z&&t.jsxs("p",{className:"text-xs flex items-center gap-1",style:{color:Z.ok?"var(--color-status-success, #4ade80)":"var(--color-status-error, #f87171)"},children:[Z.ok?t.jsx(ze,{size:12}):t.jsx(fe,{size:12}),Z.text]})]}),t.jsxs("div",{className:"flex justify-between items-center px-6 py-4 border-t",style:{borderColor:"var(--color-border)"},children:[t.jsx("button",{onClick:te,disabled:f,className:"btn-ghost text-sm disabled:opacity-40",children:i("agenda.jira.test")}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:u,className:"btn-ghost text-sm",children:i("agenda.cancel")}),t.jsx("button",{onClick:Fe,disabled:f,className:"btn-primary text-sm disabled:opacity-40",children:i("agenda.save")})]})]})]})})}export{Vs as default};