soar-chatbot 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -2
- package/dist/ChatBot.d.ts +7 -0
- package/dist/api.d.ts +143 -0
- package/dist/index.cjs +99 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11992 -0
- package/dist/style.css +1 -0
- package/package.json +54 -4
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react/jsx-runtime"),I=require("react"),te=require("antd");function oa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const U=oa(I);function la(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sa=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aa=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ua={};function qi(e,t){return(ua.jsx?aa:sa).test(e)}const ca=/[ \t\n\f\r]/g;function fa(e){return typeof e=="object"?e.type==="text"?Wi(e.value):!1:Wi(e)}function Wi(e){return e.replace(ca,"")===""}class ln{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ln.prototype.normal={};ln.prototype.property={};ln.prototype.space=void 0;function al(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ln(n,r,t)}function Tr(e){return e.toLowerCase()}class Re{constructor(t,n){this.attribute=n,this.property=t}}Re.prototype.attribute="";Re.prototype.booleanish=!1;Re.prototype.boolean=!1;Re.prototype.commaOrSpaceSeparated=!1;Re.prototype.commaSeparated=!1;Re.prototype.defined=!1;Re.prototype.mustUseProperty=!1;Re.prototype.number=!1;Re.prototype.overloadedBoolean=!1;Re.prototype.property="";Re.prototype.spaceSeparated=!1;Re.prototype.space=void 0;let ha=0;const H=Et(),de=Et(),Ar=Et(),N=Et(),ie=Et(),kt=Et(),Le=Et();function Et(){return 2**++ha}const Ir=Object.freeze(Object.defineProperty({__proto__:null,boolean:H,booleanish:de,commaOrSpaceSeparated:Le,commaSeparated:kt,number:N,overloadedBoolean:Ar,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),ar=Object.keys(Ir);class Qr extends Re{constructor(t,n,r,i){let l=-1;if(super(t,n),Yi(this,"space",i),typeof r=="number")for(;++l<ar.length;){const o=ar[l];Yi(this,ar[l],(r&Ir[o])===Ir[o])}}}Qr.prototype.defined=!0;function Yi(e,t,n){n&&(e[t]=n)}function zt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Qr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Tr(r)]=r,n[Tr(l.attribute)]=r}return new ln(t,n,e.space)}const ul=zt({properties:{ariaActiveDescendant:null,ariaAtomic:de,ariaAutoComplete:null,ariaBusy:de,ariaChecked:de,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:de,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:de,ariaFlowTo:ie,ariaGrabbed:de,ariaHasPopup:null,ariaHidden:de,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:N,ariaLive:null,ariaModal:de,ariaMultiLine:de,ariaMultiSelectable:de,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:de,ariaReadOnly:de,ariaRelevant:null,ariaRequired:de,ariaRoleDescription:ie,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:de,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cl(e,t){return t in e?e[t]:t}function fl(e,t){return cl(e,t.toLowerCase())}const pa=zt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:kt,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alpha:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:ie,autoFocus:H,autoPlay:H,blocking:ie,capture:null,charSet:null,checked:H,cite:null,className:ie,closedBy:null,colorSpace:null,cols:N,colSpan:N,command:null,commandFor:null,content:null,contentEditable:de,controls:H,controlsList:ie,coords:N|kt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:Ar,draggable:de,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:ie,height:N,hidden:Ar,high:N,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:ie,itemRef:ie,itemScope:H,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,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:H,optimum:N,pattern:null,ping:ie,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:ie,required:H,reversed:H,rows:N,rowSpan:N,sandbox:ie,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootCustomElementRegistry:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shadowRootSerializable:H,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:de,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:de,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:de,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:H,disablePictureInPicture:H,disableRemotePlayback:H,exportParts:kt,part:ie,prefix:null,property:null,results:N,security:null,unselectable:null},space:"html",transform:fl}),da=zt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Le,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:ie,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:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,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:kt,g2:kt,glyphName:kt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,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:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cl}),hl=zt({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()}}),pl=zt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fl}),dl=zt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ma={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"},ga=/[A-Z]/g,Ki=/-[a-z]/g,ya=/^data[-\w.:]+$/i;function xa(e,t){const n=Tr(t);let r=t,i=Re;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ya.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Ki,wa);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Ki.test(l)){let o=l.replace(ga,ba);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Qr}return new i(r,t)}function ba(e){return"-"+e.toLowerCase()}function wa(e){return e.charAt(1).toUpperCase()}const ka=al([ul,pa,hl,pl,dl],"html"),Zr=al([ul,da,hl,pl,dl],"svg");function Sa(e){return e.join(" ").trim()}var Xi=/\/\*(?:[^*]|\*(?!\/))*\*\//g,Ca=/\n/g,va=/^\s*/,Ea=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,_a=/^:\s*/,Ta=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Aa=/^[;\s]*/,Ia=`
|
|
2
|
+
`,Gi="/",Ji="*",Wt="",Na="comment",ja="declaration";function Pa(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(d){var w=d.match(Ca);w&&(n+=w.length);var E=d.lastIndexOf(Ia);r=~E?d.length-E:r+d.length}function l(){var d={line:n,column:r};return function(w){return w.position=new o(d),u(),w}}function o(d){this.start=d,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(d){var w=new Error(t.source+":"+n+":"+r+": "+d);if(w.reason=d,w.filename=t.source,w.line=n,w.column=r,w.source=e,!t.silent)throw w}function a(d){var w=d.exec(e);if(w){var E=w[0];return i(E),e=e.slice(E.length),w}}function u(){a(va)}function c(d){for(var w;w=f();)d.push(w);return d}function f(){var d=l();if(!(Gi!=e.charAt(0)||Ji!=e.charAt(1))){for(var w=2;Wt!=e.charAt(w)&&(Ji!=e.charAt(w)||Gi!=e.charAt(w+1));)++w;if(w+=2,Wt===e.charAt(w-1))return s("End of comment missing");var E=e.slice(2,w-2);return r+=2,i(E),e=e.slice(w),r+=2,d({type:Na,comment:E})}}function p(){var d=l(),w=a(Ea);if(w){if(f(),!a(_a))return s("property missing ':'");var E=a(Ta),b=d({type:ja,property:w[0].replace(Xi,Wt).trim(),value:E?E[0].replace(Xi,Wt).trim():Wt});return a(Aa),b}}function h(){var d=[];c(d);for(var w;w=p();)d.push(w),c(d);return d}return u(),h()}function Oa(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Pa(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:s}=l;i?t(o,s,l):s&&(n=n??{},n[o]=s)}),n}const ml=gl("end"),ei=gl("start");function gl(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 Da(e){const t=ei(e),n=ml(e);if(t&&n)return{start:t,end:n}}function Qt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qi(e.position):"start"in e||"end"in e?Qi(e):"line"in e||"column"in e?Nr(e):""}function Nr(e){return Zi(e&&e.line)+":"+Zi(e&&e.column)}function Qi(e){return Nr(e&&e.start)+"-"+Nr(e&&e.end)}function Zi(e){return e&&typeof e=="number"?e:1}class Fn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?l.ruleId=r:(l.source=r.slice(0,a),l.ruleId=r.slice(a+1))}if(!l.place&&l.ancestors){const a=l.ancestors[l.ancestors.length-1];a&&(l.place=a.position)}const s=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Qt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(Fn.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const ti={}.hasOwnProperty,za=new Map,Ra=/[A-Z]/g,Ma=/-([a-z])/g,La=new Set(["table","tbody","thead","tfoot","tr"]),Fa=new Set(["td","th"]),yl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ba(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=Ka(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=Ya(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"?Zr:ka,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=xl(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function xl(e,t,n){if(t.type==="element")return $a(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ha(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Va(e,t,n);if(t.type==="mdxjsEsm")return Ua(e,t);if(t.type==="root")return qa(e,t,n);if(t.type==="text")return Wa(e,t)}function $a(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Zr,e.schema=i),e.ancestors.push(t);const l=wl(e,t.tagName,!1),o=Xa(e,t);let s=ri(e,t);return La.has(t.tagName)&&(s=s.filter(function(a){return typeof a=="string"?!fa(a):!0})),bl(e,o,l,t),ni(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function Ha(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)}rn(e,t.position)}function Ua(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rn(e,t.position)}function Va(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Zr,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:wl(e,t.name,!0),o=Ga(e,t),s=ri(e,t);return bl(e,o,l,t),ni(o,s),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function qa(e,t,n){const r={};return ni(r,ri(e,t)),e.create(t,e.Fragment,r,n)}function Wa(e,t){return t.value}function bl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ni(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ya(e,t,n){return r;function r(i,l,o,s){const u=Array.isArray(o.children)?n:t;return s?u(l,o,s):u(l,o)}}function Ka(e,t){return n;function n(r,i,l,o){const s=Array.isArray(l.children),a=ei(r);return t(i,l,o,s,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function Xa(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ti.call(t.properties,i)){const l=Ja(e,i,t.properties[i]);if(l){const[o,s]=l;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&Fa.has(t.tagName)?r=s:n[o]=s}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ga(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else rn(e,t.position);else{const{name:i}=r;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,l=e.evaluater.evaluateExpression(s.expression)}else rn(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function ri(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:za;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const a=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(a){const u=i.get(a)||0;o=a+"-"+u,i.set(a,u+1)}}const s=xl(e,l,o);s!==void 0&&n.push(s)}return n}function Ja(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=xa(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?la(n):Sa(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:Za(n):Qa(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?ma[r.property]||r.property:r.attribute,n]}function Qa(e,t){const n={};try{Oa(t,function(r,i){if(r&&i){let l=r;l.slice(0,2)!=="--"&&(l=l.toLowerCase(),e.stylePropertyNameCase==="dom"&&(l.slice(0,4)==="-ms-"&&(l=l.slice(1)),l=l.replace(Ma,nu))),n[l]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new Fn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=yl+"#cannot-parse-style-attribute",l}return n}function wl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const s=qi(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(l&&s.type==="Literal"),optional:!1}:s}r=o}else r=qi(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ti.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rn(e)}function rn(e,t){const n=new Fn("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=yl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Za(e){const t={};let n;for(n in e)ti.call(e,n)&&(t[eu(n)]=e[n]);return t}function eu(e){if(e.slice(0,2)==="--")return e;let t=e.replace(Ra,tu);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tu(e){return"-"+e.toLowerCase()}function nu(e,t){return t.toUpperCase()}const ur={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"]},ru={};function Bn(e,t){const n=ru,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return kl(e,r,i)}function kl(e,t,n){if(iu(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 eo(e.children,t,n)}return Array.isArray(e)?eo(e,t,n):""}function eo(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=kl(e[i],t,n);return r.join("")}function iu(e){return!!(e&&typeof e=="object")}const to=document.createElement("i");function ii(e){const t="&"+e+";";to.innerHTML=t;const n=to.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ke(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function Ue(e,t){return e.length>0?(Ke(e,e.length,0,t),e):t}const no={}.hasOwnProperty;function Sl(e){const t={};let n=-1;for(;++n<e.length;)ou(t,e[n]);return t}function ou(e,t){let n;for(n in t){const i=(no.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){no.call(i,o)||(i[o]=[]);const s=l[o];lu(i[o],Array.isArray(s)?s:s?[s]:[])}}}function lu(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ke(e,0,0,r)}function Cl(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 Xe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Se=mt(/[A-Za-z]/),Ce=mt(/[\dA-Za-z]/),su=mt(/[#-'*+\--9=?A-Z^-~]/);function On(e){return e!==null&&(e<32||e===127)}const jr=mt(/\d/),au=mt(/[\dA-Fa-f]/),vl=mt(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function K(e){return e===-2||e===-1||e===32}const sn=mt(new RegExp("\\p{P}|\\p{S}","u")),Ct=mt(/\s/);function mt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Rt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&Ce(e.charCodeAt(n+1))&&Ce(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const s=e.charCodeAt(n+1);l<56320&&s>56319&&s<57344?(o=String.fromCharCode(l,s),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Q(e,t,n,r){const i=r?r-1:1/0;let l=0;return o;function o(a){return K(a)?(e.enter(n),s(a)):t(a)}function s(a){return K(a)&&l++<i?(e.consume(a),s):(e.exit(n),t(a))}}function El(e,t,n,r,i,l){let o=0;return s;function s(c){return K(c)?(e.enter(r),a(c)):u(c)}function a(c){return K(c)&&o<l?(e.consume(c),o++,a):(e.exit(r),u(c))}function u(c){return o>=i?t(c):n(c)}}const uu={tokenize:cu};function cu(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Q(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),l(s)}function l(s){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return L(s)?(e.consume(s),e.exit("chunkText"),l):(e.consume(s),o)}}let Dn=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){ro(this,t,n,r,!1)}addBefore(t,n,r){ro(this,t,n,r,!0)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[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 l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}};function ro(e,t,n,r,i){if(n===0&&r.length===0)return;const l=e.index.get(t);if(l){l[1]+=n,i?(r.push(...l[2]),l[2]=r):l[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}const fu={tokenize:hu},io={tokenize:pu};function hu(e){const t=this,n=[];let r=0,i,l,o;return s;function s(S){if(r<n.length){const j=n[r];return t.containerState=j[1],e.attempt(j[0].continuation,a,u)(S)}return u(S)}function a(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const j=t.events.length;let F=j,v;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){v=t.events[F][1].end;break}b(r);let R=j;for(;R<t.events.length;)t.events[R][1].end={...v},R++;const W=new Dn;return W.add(F+1,0,t.events.slice(j)),W.add(j,R-j,[]),W.consume(t.events),u(S)}return s(S)}function u(S){if(r===n.length){if(!i)return p(S);if(i.currentConstruct&&i.currentConstruct.concrete)return d(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(io,c,f)(S)}function c(S){return i&&A(),b(r),p(S)}function f(S){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,d(S)}function p(S){return t.containerState={},e.attempt(io,h,d)(S)}function h(S){return r++,n.push([t.currentConstruct,t.containerState]),p(S)}function d(S){if(S===null){i&&A(),b(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),w(S)}function w(S){if(S===null){E(e.exit("chunkFlow"),!0),b(0),e.consume(S);return}return L(S)?(e.consume(S),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),w)}function E(S,j){const F=t.sliceStream(S);if(j&&F.push(null),S.previous=l,l&&(l.next=S),l=S,i.defineSkip(S.start),i.write(F),t.parser.lazy[S.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<o&&(!i.events[v][1].end||i.events[v][1].end.offset>o))return;const R=t.events.length;let W=R,G,k;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(G){k=t.events[W][1].end;break}G=!0}for(b(r),v=R;v<t.events.length;)t.events[v][1].end={...k},v++;const T=new Dn;T.add(W+1,0,t.events.slice(R)),T.add(R,v-R,[]),T.consume(t.events)}}function b(S){let j=n.length;for(;j-- >S;){const F=n[j];t.containerState=F[1],F[0].exit.call(t,e)}n.length=S}function A(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pu(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function pt(e){if(e===null||oe(e)||Ct(e))return 1;if(sn(e))return 2}function $n(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Pr={name:"attention",resolveAll:du,tokenize:mu};function du(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const l=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};oo(o,-l),oo(s,l);const a={type:l>1?"strongSequence":"emphasisSequence",start:o,end:{...e[i][1].end}},u={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:s},c={type:l>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},f={type:l>1?"strong":"emphasis",start:{...a.start},end:{...u.end}};e[i][1].end={...a.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Ue(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=Ue(r,[["enter",f,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=Ue(r,$n(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Ue(r,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",f,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=Ue(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),Ke(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function mu(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=pt(r);let l;return o;function o(a){return l=a,e.enter("attentionSequence"),s(a)}function s(a){if(a===l)return e.consume(a),s;const u=e.exit("attentionSequence"),c=pt(a),f=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,p=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return u._open=!!(l===42?f:f&&(i||!p)),u._close=!!(l===42?p:p&&(c||!f)),t(a)}}function oo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gu={name:"autolink",tokenize:yu};function yu(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"),l}function l(h){return Se(h)?(e.consume(h),o):h===64?n(h):u(h)}function o(h){return h===43||h===45||h===46||Ce(h)?(r=1,s(h)):u(h)}function s(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||Ce(h))&&r++<32?(e.consume(h),s):(r=0,u(h))}function a(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||On(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),c):su(h)?(e.consume(h),u):n(h)}function c(h){return Ce(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):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||Ce(h))&&r++<63){const d=h===45?p:f;return e.consume(h),d}return n(h)}}const an={partial:!0,tokenize:xu};function xu(e,t,n){return r;function r(l){return K(l)?Q(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||L(l)?t(l):n(l)}}const _l={continuation:{tokenize:wu},exit:ku,name:"blockQuote",tokenize:bu};function bu(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return K(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function wu(e,t,n){const r=this;return i;function i(o){return K(o)?Q(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(_l,t,n)(o)}}function ku(e){e.exit("blockQuote")}const Tl={name:"characterEscape",tokenize:Su};function Su(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return vl(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Al={name:"characterReference",tokenize:Cu};function Cu(e,t,n){const r=this;let i=0,l,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),a}function a(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,o=Ce,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=au,c):(e.enter("characterReferenceValue"),l=7,o=jr,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return o===Ce&&!ii(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<l?(e.consume(f),c):n(f)}}const Or={partial:!0,tokenize:vu};function vu(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const lo={concrete:!0,name:"codeFenced",tokenize:Eu};function Eu(e,t,n){const r=this,i={partial:!0,tokenize:F};let l=0,o=0,s;return a;function a(v){return u(v)}function u(v){const R=r.events[r.events.length-1];return l=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,s=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(v)}function c(v){return v===s?(o++,e.consume(v),c):o<3?n(v):(e.exit("codeFencedFenceSequence"),K(v)?Q(e,f,"whitespace")(v):f(v))}function f(v){return v===null||L(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Or,w,j)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||L(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(v)):K(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,h,"whitespace")(v)):v===96&&v===s?n(v):(e.consume(v),p)}function h(v){return v===null||L(v)?f(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||L(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(v)):v===96&&v===s?n(v):(e.consume(v),d)}function w(v){return e.attempt(i,j,E)(v)}function E(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b}function b(v){return l>0&&K(v)?Q(e,A,"linePrefix",l+1)(v):A(v)}function A(v){return v===null||L(v)?e.check(Or,w,j)(v):(e.enter("codeFlowValue"),S(v))}function S(v){return v===null||L(v)?(e.exit("codeFlowValue"),A(v)):(e.consume(v),S)}function j(v){return e.exit("codeFenced"),t(v)}function F(v,R,W){let G=0;return k;function k(B){return v.enter("lineEnding"),v.consume(B),v.exit("lineEnding"),T}function T(B){return v.enter("codeFencedFence"),K(B)?Q(v,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):P(B)}function P(B){return B===s?(v.enter("codeFencedFenceSequence"),V(B)):W(B)}function V(B){return B===s?(G++,v.consume(B),V):G>=o?(v.exit("codeFencedFenceSequence"),K(B)?Q(v,ee,"whitespace")(B):ee(B)):W(B)}function ee(B){return B===null||L(B)?(v.exit("codeFencedFence"),R(B)):W(B)}}}const cr={name:"codeIndented",tokenize:Tu},_u={partial:!0,tokenize:Au};function Tu(e,t,n){return r;function r(s){return e.enter("codeIndented"),El(e,i,n,"linePrefix",4,4)(s)}function i(s){return s===null?o(s):L(s)?e.attempt(_u,i,o)(s):(e.enter("codeFlowValue"),l(s))}function l(s){return s===null||L(s)?(e.exit("codeFlowValue"),i(s)):(e.consume(s),l)}function o(s){return e.exit("codeIndented"),t(s)}}function Au(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):El(e,t,l,"linePrefix",4,4)(o)}function l(o){return L(o)?i(o):n(o)}}const Iu={name:"codeText",previous:ju,resolve:Nu,tokenize:Pu};function Nu(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 ju(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Pu(e,t,n){let r=0,i,l;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),a(f))}function a(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),a):f===96?(l=e.enter("codeTextSequence"),i=0,c(f)):L(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||L(f)?(e.exit("codeTextData"),a(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",u(f))}}class Ou{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 l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Yt(this.left,r),l.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),Yt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yt(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);Yt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yt(this.left,n.reverse())}}}function Yt(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 Il(e){const t={};let n=-1,r,i,l,o,s,a,u;const c=new Ou(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,l=0,l<a.length&&a[l][1].type==="lineEndingBlank"&&(l+=2),l<a.length&&a[l][1].type==="content"))for(;++l<a.length&&a[l][1].type!=="content";)a[l][1].type==="chunkText"&&(a[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Du(c,n)),n=t[n],u=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=c.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Ke(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function Du(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,a=[],u={};let c,f,p=-1,h=n,d=0,w=0;const E=[w];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(w=p+1,E.push(w),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):E.pop(),p=E.length;p--;){const b=s.slice(E[p],E[p+1]),A=l.pop();a.push([A,A+b.length-1]),e.splice(A,2,b)}for(a.reverse(),p=-1;++p<a.length;)u[d+a[p][0]]=d+a[p][1],d+=a[p][1]-a[p][0]-1;return u}const zu={resolve:Mu,tokenize:Lu},Ru={partial:!0,tokenize:Fu};function Mu(e){return Il(e),e}function Lu(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?l(s):L(s)?e.check(Ru,o,l)(s):(e.consume(s),i)}function l(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Fu(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Q(e,l,"linePrefix")}function l(o){if(o===null||L(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Nl(e,t,n,r,i,l,o,s,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return f;function f(b){return b===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(b),e.exit(l),p):b===null||b===32||b===41||On(b)?n(b):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),w(b))}function p(b){return b===62?(e.enter(l),e.consume(b),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(s),p(b)):b===null||b===60||L(b)?n(b):(e.consume(b),b===92?d:h)}function d(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function w(b){return!c&&(b===null||b===41||oe(b))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(b)):c<u&&b===40?(e.consume(b),c++,w):b===41?(e.consume(b),c--,w):b===null||b===32||b===40||On(b)?n(b):(e.consume(b),b===92?E:w)}function E(b){return b===40||b===41||b===92?(e.consume(b),w):w(b)}}function jl(e,t,n,r,i,l){const o=this;let s=0,a;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(l),c}function c(h){return s>999||h===null||h===91||h===93&&!a||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):L(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||L(h)||s++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!K(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),s++,f):f(h)}}function Pl(e,t,n,r,i,l){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,a):n(p)}function a(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(l),u(p))}function u(p){return p===o?(e.exit(l),a(o)):p===null?n(p):L(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===o||p===null||L(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:c)}function f(p){return p===o||p===92?(e.consume(p),c):c(p)}}function Zt(e,t){let n;return r;function r(i){return L(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):K(i)?Q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Bu={name:"definition",tokenize:Hu},$u={partial:!0,tokenize:Uu};function Hu(e,t,n){const r=this;let i;return l;function l(h){return e.enter("definition"),o(h)}function o(h){return jl.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Xe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return oe(h)?Zt(e,u)(h):u(h)}function u(h){return Nl(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt($u,f,f)(h)}function f(h){return K(h)?Q(e,p,"whitespace")(h):p(h)}function p(h){return h===null||L(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Uu(e,t,n){return r;function r(s){return oe(s)?Zt(e,i)(s):n(s)}function i(s){return Pl(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function l(s){return K(s)?Q(e,o,"whitespace")(s):o(s)}function o(s){return s===null||L(s)?t(s):n(s)}}const Vu={name:"hardBreakEscape",tokenize:qu};function qu(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return L(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const Wu={name:"headingAtx",resolve:Yu,tokenize:Ku};function Yu(e,t){let n=e.length-2,r=3;if(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){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};Ke(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])}return e}function Ku(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||oe(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||L(c)?(e.exit("atxHeading"),t(c)):K(c)?Q(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||oe(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const Ol=["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"],Dr=["pre","script","style","textarea"],Xu={concrete:!0,name:"htmlFlow",resolveTo:Ju,tokenize:Qu},Gu={partial:!0,tokenize:Zu};function Ju(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 Qu(e,t,n){const r=this;let i,l,o,s,a;return u;function u(y){return c(y)}function c(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),f}function f(y){return y===33?(e.consume(y),p):y===47?(e.consume(y),l=!0,w):y===63?(e.consume(y),i=3,r.interrupt?t:g):Se(y)?(e.consume(y),o=String.fromCharCode(y),E):n(y)}function p(y){return y===45?(e.consume(y),i=2,h):y===91?(e.consume(y),i=5,s=0,d):Se(y)?(e.consume(y),i=4,r.interrupt?t:g):n(y)}function h(y){return y===45?(e.consume(y),r.interrupt?t:g):n(y)}function d(y){const ge="CDATA[";return y===ge.charCodeAt(s++)?(e.consume(y),s===ge.length?r.interrupt?t:P:d):n(y)}function w(y){return Se(y)?(e.consume(y),o=String.fromCharCode(y),E):n(y)}function E(y){if(y===null||y===47||y===62||oe(y)){const ge=y===47,Be=o.toLowerCase();return!ge&&!l&&Dr.includes(Be)?(i=1,r.interrupt?t(y):P(y)):Ol.includes(o.toLowerCase())?(i=6,ge?(e.consume(y),b):r.interrupt?t(y):P(y)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(y):l?A(y):S(y))}return y===45||Ce(y)?(e.consume(y),o+=String.fromCharCode(y),E):n(y)}function b(y){return y===62?(e.consume(y),r.interrupt?t:P):n(y)}function A(y){return K(y)?(e.consume(y),A):k(y)}function S(y){return y===47?(e.consume(y),k):y===58||y===95||Se(y)?(e.consume(y),j):K(y)?(e.consume(y),S):k(y)}function j(y){return y===45||y===46||y===58||y===95||Ce(y)?(e.consume(y),j):F(y)}function F(y){return y===61?(e.consume(y),v):K(y)?(e.consume(y),F):S(y)}function v(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),a=y,R):K(y)?(e.consume(y),v):W(y)}function R(y){return y===a?(e.consume(y),a=null,G):y===null||L(y)?n(y):(e.consume(y),R)}function W(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||oe(y)?F(y):(e.consume(y),W)}function G(y){return y===47||y===62||K(y)?S(y):n(y)}function k(y){return y===62?(e.consume(y),T):n(y)}function T(y){return y===null||L(y)?P(y):K(y)?(e.consume(y),T):n(y)}function P(y){return y===45&&i===2?(e.consume(y),se):y===60&&i===1?(e.consume(y),ae):y===62&&i===4?(e.consume(y),me):y===63&&i===3?(e.consume(y),g):y===93&&i===5?(e.consume(y),Ie):L(y)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gu,pe,V)(y)):y===null||L(y)?(e.exit("htmlFlowData"),V(y)):(e.consume(y),P)}function V(y){return e.check(Or,ee,pe)(y)}function ee(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),B}function B(y){return y===null||L(y)?V(y):(e.enter("htmlFlowData"),P(y))}function se(y){return y===45?(e.consume(y),g):P(y)}function ae(y){return y===47?(e.consume(y),o="",ne):P(y)}function ne(y){if(y===62){const ge=o.toLowerCase();return Dr.includes(ge)?(e.consume(y),me):P(y)}return Se(y)&&o.length<8?(e.consume(y),o+=String.fromCharCode(y),ne):P(y)}function Ie(y){return y===93?(e.consume(y),g):P(y)}function g(y){return y===62?(e.consume(y),me):y===45&&i===2?(e.consume(y),g):P(y)}function me(y){return y===null||L(y)?(e.exit("htmlFlowData"),pe(y)):(e.consume(y),me)}function pe(y){return e.exit("htmlFlow"),t(y)}}function Zu(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(an,t,n)}}const ec={name:"htmlText",tokenize:tc};function tc(e,t,n){const r=this;let i,l,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),a}function a(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),F):g===63?(e.consume(g),S):Se(g)?(e.consume(g),W):n(g)}function u(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),l=0,d):Se(g)?(e.consume(g),A):n(g)}function c(g){return g===45?(e.consume(g),h):n(g)}function f(g){return g===null?n(g):g===45?(e.consume(g),p):L(g)?(o=f,ae(g)):(e.consume(g),f)}function p(g){return g===45?(e.consume(g),h):f(g)}function h(g){return g===62?se(g):g===45?p(g):f(g)}function d(g){const me="CDATA[";return g===me.charCodeAt(l++)?(e.consume(g),l===me.length?w:d):n(g)}function w(g){return g===null?n(g):g===93?(e.consume(g),E):L(g)?(o=w,ae(g)):(e.consume(g),w)}function E(g){return g===93?(e.consume(g),b):w(g)}function b(g){return g===62?se(g):g===93?(e.consume(g),b):w(g)}function A(g){return g===null||g===62?se(g):L(g)?(o=A,ae(g)):(e.consume(g),A)}function S(g){return g===null?n(g):g===63?(e.consume(g),j):L(g)?(o=S,ae(g)):(e.consume(g),S)}function j(g){return g===62?se(g):S(g)}function F(g){return Se(g)?(e.consume(g),v):n(g)}function v(g){return g===45||Ce(g)?(e.consume(g),v):R(g)}function R(g){return L(g)?(o=R,ae(g)):K(g)?(e.consume(g),R):se(g)}function W(g){return g===45||Ce(g)?(e.consume(g),W):g===47||g===62||oe(g)?G(g):n(g)}function G(g){return g===47?(e.consume(g),se):g===58||g===95||Se(g)?(e.consume(g),k):L(g)?(o=G,ae(g)):K(g)?(e.consume(g),G):se(g)}function k(g){return g===45||g===46||g===58||g===95||Ce(g)?(e.consume(g),k):T(g)}function T(g){return g===61?(e.consume(g),P):L(g)?(o=T,ae(g)):K(g)?(e.consume(g),T):G(g)}function P(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,V):L(g)?(o=P,ae(g)):K(g)?(e.consume(g),P):(e.consume(g),ee)}function V(g){return g===i?(e.consume(g),i=void 0,B):g===null?n(g):L(g)?(o=V,ae(g)):(e.consume(g),V)}function ee(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||oe(g)?G(g):(e.consume(g),ee)}function B(g){return g===47||g===62||oe(g)?G(g):n(g)}function se(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function ae(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ne}function ne(g){return K(g)?Q(e,Ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):Ie(g)}function Ie(g){return e.enter("htmlTextData"),o(g)}}const oi={name:"labelEnd",resolveAll:oc,resolveTo:lc,tokenize:sc},nc={tokenize:ac},rc={tokenize:uc},ic={tokenize:cc};function oc(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&&Ke(e,0,e.length,n),e}function lc(e,t){let n=e.length,r=0,i,l,o;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(l=n)}const s={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[i][1].start},end:{...e[l][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",s,t],["enter",a,t]],o=Ue(o,e.slice(i+1,i+r+3)),o=Ue(o,[["enter",u,t]]),o=Ue(o,$n(t.parser.constructs.insideSpan.null,e.slice(i+r+4,l-3),t)),o=Ue(o,[["exit",u,t],e[l-2],e[l-1],["exit",a,t]]),o=Ue(o,e.slice(l+1)),o=Ue(o,[["exit",s,t]]),Ke(e,i,e.length,o),e}function sc(e,t,n){const r=this,i=r._labelStarts;let l,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();l=i[i.length-1]}return s;function s(p){return l?l._inactive?f(p):(o=r.parser.defined.includes(Xe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),a):n(p)}function a(p){return p===40?e.attempt(nc,c,o?c:f)(p):p===91?e.attempt(rc,c,o?u:f)(p):o?c(p):f(p)}function u(p){return e.attempt(ic,c,f)(p)}function c(p){return i.pop(),t(p)}function f(p){return l._balanced=!0,n(p)}}function ac(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return oe(f)?Zt(e,l)(f):l(f)}function l(f){return f===41?c(f):Nl(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return oe(f)?Zt(e,a)(f):c(f)}function s(f){return n(f)}function a(f){return f===34||f===39||f===40?Pl(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return oe(f)?Zt(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function uc(e,t,n){const r=this;return i;function i(s){return jl.call(r,e,l,o,"reference","referenceMarker","referenceString")(s)}function l(s){return r.parser.defined.includes(Xe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function cc(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const fc={name:"labelStartImage",resolveAll:oi.resolveAll,tokenize:hc};function hc(e,t,n){const r=this;let i;return l;function l(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"),i=e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}const pc={name:"labelStartLink",resolveAll:oi.resolveAll,tokenize:dc};function dc(e,t,n){const r=this;let i;return l;function l(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),i=e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(s))}}const fr={name:"lineEnding",tokenize:mc};function mc(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,t,"linePrefix")}}const In={name:"thematicBreak",tokenize:gc};function gc(e,t,n){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||L(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),K(u)?Q(e,s,"whitespace")(u):s(u))}}const ze={continuation:{tokenize:wc},exit:Sc,name:"list",tokenize:bc},yc={partial:!0,tokenize:Cc},xc={partial:!0,tokenize:kc};function bc(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){const d=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:jr(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(In,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return jr(h)&&++o<10?(e.consume(h),a):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(an,r.interrupt?n:c,e.attempt(yc,p,f))}function c(h){return r.containerState.initialBlankLine=!0,l++,p(h)}function f(h){return K(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function wc(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(an,i,l);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,"listItemIndent",r.containerState.size+1)(s)}function l(s){return r.containerState.furtherBlankLines||!K(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xc,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(ze,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function kc(e,t,n){const r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function Sc(e){e.exit(this.containerState.type)}function Cc(e,t,n){const r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!K(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const so={name:"setextUnderline",resolveTo:vc,tokenize:Ec};function vc(e,t){const n=new Dn;let r=e.length,i,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!o&&e[r][1].type==="definition"&&(o=r);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(n.add(l,0,[["enter",s,t]]),n.add(o+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[["exit",s,t]]),n.consume(e),e}function Ec(e,t,n){const r=this;let i;return l;function l(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),K(u)?Q(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||L(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const _c={tokenize:Tc};function Tc(e){const t=this,n=e.attempt(an,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(zu,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ac={resolveAll:zl()},Ic=Dl("string"),Nc=Dl("text");function Dl(e){return{resolveAll:zl(e==="text"?jc:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,s);return o;function o(c){return u(c)?l(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),l(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function zl(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function jc(e,t){const n=new Dn;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=t.sliceStream(i);let o=l.length,s=-1,a=0,u;for(;o--;){const c=l[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)u=!0,a++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const c={type:r===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const Pc={42:ze,43:ze,45:ze,48:ze,49:ze,50:ze,51:ze,52:ze,53:ze,54:ze,55:ze,56:ze,57:ze,62:_l},Oc={91:Bu},Dc={[-2]:cr,[-1]:cr,32:cr},zc={35:Wu,42:In,45:[so,In],60:Xu,61:so,95:In,96:lo,126:lo},Rc={38:Al,92:Tl},Mc={[-5]:fr,[-4]:fr,[-3]:fr,33:fc,38:Al,42:Pr,60:[gu,ec],91:pc,92:[Vu,Tl],93:oi,95:Pr,96:Iu},Lc={null:[Pr,Ac]},Fc={null:[42,95]},Bc={null:[]},$c=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Fc,contentInitial:Oc,disable:Bc,document:Pc,flow:zc,flowInitial:Dc,insideSpan:Lc,string:Rc,text:Mc},Symbol.toStringTag,{value:"Module"}));function Hc(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={},l=[];let o=[],s=[];const a={attempt:R(F),check:R(v),consume:A,enter:S,exit:j,interrupt:R(v,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:f};let c=t.tokenize.call(u,a);return t.resolveAll&&l.push(t),u;function f(T){return o=Ue(o,T),E(),o[o.length-1]!==null?[]:(W(t,0),u.events=$n(l,u.events,u),u.events)}function p(T,P){return Vc(h(T),P)}function h(T){return Uc(o,T)}function d(){const{_bufferIndex:T,_index:P,line:V,column:ee,offset:B}=r;return{_bufferIndex:T,_index:P,line:V,column:ee,offset:B}}function w(T){i[T.line]=T.column,k()}function E(){for(;r._index<o.length;){const T=o[r._index];if(typeof T=="string"){const P=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<T.length;)b(T.charCodeAt(r._bufferIndex))}else b(T)}}function b(T){c=c(T)}function A(T){L(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,k()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function S(T,P){const V=P||{};return V.type=T,V.start=d(),u.events.push(["enter",V,u]),s.push(V),V}function j(T){const P=s.pop();return P.end=d(),u.events.push(["exit",P,u]),P}function F(T,P){W(T,P.from)}function v(T,P){P.restore()}function R(T,P){return V;function V(ee,B,se){let ae,ne,Ie,g;return Array.isArray(ee)?pe(ee):"tokenize"in ee?pe([ee]):me(ee);function me(le){return Ge;function Ge(Ve){const ye=Ve!==null&&le[Ve],qe=Ve!==null&&le.null,We=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(qe)?qe:qe?[qe]:[]];return pe(We)(Ve)}}function pe(le){return ae=le,ne=0,le.length===0?se:y(le[ne])}function y(le){return Ge;function Ge(Ve){return g=G(),Ie=le,le.partial||(u.currentConstruct=le),le.name&&u.parser.constructs.disable.null.includes(le.name)?Be():le.tokenize.call(P?Object.assign(Object.create(u),P):u,a,ge,Be)(Ve)}}function ge(le){return T(Ie,g),B}function Be(le){return g.restore(),++ne<ae.length?y(ae[ne]):se}}}function W(T,P){T.resolveAll&&!l.includes(T)&&l.push(T),T.resolve&&Ke(u.events,P,u.events.length-P,T.resolve(u.events.slice(P),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function G(){const T=d(),P=u.previous,V=u.currentConstruct,ee=u.events.length,B=Array.from(s);return{from:ee,restore:se};function se(){r=T,u.previous=P,u.currentConstruct=V,u.events.length=ee,s=B,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Uc(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Vc(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
3
|
+
`;break}case-3:{o=`\r
|
|
4
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function qc(e){const r={constructs:Sl([$c,...(e||{}).extensions||[]]),content:i(uu),defined:[],document:i(fu),flow:i(_c),lazy:{},string:i(Ic),text:i(Nc)};return r;function i(l){return o;function o(s){return Hc(r,l,s)}}}function Wc(e){for(;!Il(e););return e}const ao=/[\0\t\n\r]/g;function Yc(){let e=1,t="",n=!0,r;return i;function i(l,o,s){l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l));const a=[];let u=0;for(t="",n&&(l.charCodeAt(0)===65279&&u++,n=void 0);u<l.length;){ao.lastIndex=u;const c=ao.exec(l),f=c&&c.index!==void 0?c.index:l.length,p=l.charCodeAt(f);if(!c){t=l.slice(u);break}if(p===10&&u===f&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),u<f&&(a.push(l.slice(u,f)),e+=f-u),p){case 0:{a.push(65533),e++;break}case 9:{const h=Math.ceil(e/4)*4;for(a.push(-2);e++<h;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}u=f+1}return s&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const Kc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xc(e){return e.replace(Kc,Gc)}function Gc(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Cl(n.slice(l?2:1),l?16:10)}return ii(n)||e}const Rl={}.hasOwnProperty;function Jc(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Qc(n)(Wc(qc(n).document().write(Yc()(e,t,!0))))}function Qc(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(tt),autolinkProtocol:k,autolinkEmail:k,atxHeading:o(Tt),blockQuote:o(We),characterEscape:k,characterReference:k,codeFenced:o(_t),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(_t,s),codeText:o(cn,s),codeTextData:k,data:k,codeFlowValue:k,definition:o(fn),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Lt),hardBreakEscape:o(At),hardBreakTrailing:o(At),htmlFlow:o(st,s),htmlFlowData:k,htmlText:o(st,s),htmlTextData:k,image:o(Zn),label:s,link:o(tt),listItem:o(pn),listItemValue:h,listOrdered:o(hn,p),listUnordered:o(hn),paragraph:o(Je),reference:ge,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Tt),strong:o(Ft),thematicBreak:o(Bt)},exit:{atxHeading:u(),atxHeadingSequence:v,autolink:u(),autolinkEmail:qe,autolinkProtocol:ye,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:Ge,characterReference:Ve,codeFenced:u(b),codeFencedFence:E,codeFencedFenceInfo:d,codeFencedFenceMeta:w,codeFlowValue:T,codeIndented:u(A),codeText:u(se),codeTextData:T,data:T,definition:u(),definitionDestinationString:F,definitionLabelString:S,definitionTitleString:j,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u(ee),htmlFlowData:T,htmlText:u(B),htmlTextData:T,image:u(ne),label:g,labelText:Ie,lineEnding:P,link:u(ae),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Be,resourceDestinationString:me,resourceTitleString:pe,resource:y,setextHeading:u(G),setextHeadingLineSequence:W,setextHeadingText:R,strong:u(),thematicBreak:u()}};Ml(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(C){let O={type:"root",children:[],position:void 0};const $={stack:[O],tokenStack:[],config:t,enter:a,exit:c,buffer:s,resume:f,data:n},q=[],Ee=[];let re=-1;for(;++re<C.length;)if(Ee.push(C[re]),C[re][1].type==="listOrdered"||C[re][1].type==="listUnordered")if(C[re][0]==="enter")q.push(Ee.length-1);else{const xe=q.pop();l(Ee,xe)}for(C=Ee,re=-1;++re<C.length;){const xe=t[C[re][0]];C[re][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...$,sliceSerialize:C[re][2].sliceSerialize},C[re][1]),Rl.call(xe,C[re][1].type)&&xe[C[re][1].type].call({...$,sliceSerialize:C[re][2].sliceSerialize},C[re][1]),C[re][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...$,sliceSerialize:C[re][2].sliceSerialize},C[re][1])}if($.tokenStack.length>0){const xe=$.tokenStack[$.tokenStack.length-1];(xe[1]||uo).call($,void 0,xe[0])}for(O.position={start:ht(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:ht(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re<t.transforms.length;)O=t.transforms[re](O)||O;return O}function i(C,O,$){let q=-1;for(;++q<C.length;)C[q].call(O,$)}function l(C,O){const $=C.length-1;let q=O-1,Ee=-1,re=!1,xe,ke,nt,at;const yt=[];for(;++q<=$;){const _e=C[q];switch(_e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_e[0]==="enter"?Ee++:Ee--,at=void 0;break}case"lineEndingBlank":{_e[0]==="enter"&&(xe&&!at&&!Ee&&!nt&&(nt=q),at=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:at=void 0}if(!Ee&&_e[0]==="enter"&&_e[1].type==="listItemPrefix"||Ee===-1&&_e[0]==="exit"&&(_e[1].type==="listUnordered"||_e[1].type==="listOrdered")){if(xe){let ut=q;for(ke=void 0;ut--;){const Oe=C[ut];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;ke&&(C[ke][1].type="lineEndingBlank",re=!0),Oe[1].type="lineEnding",ke=ut}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}nt&&(!ke||nt<ke)&&(xe._spread=!0),xe.end=Object.assign({},ke?C[ke][1].start:_e[1].end),yt.push({at:ke||q,event:["exit",xe,_e[2]]})}if(_e[1].type==="listItemPrefix"){const ut={type:"listItem",_spread:!1,start:Object.assign({},_e[1].start),end:void 0};xe=ut,yt.push({at:q,event:["enter",ut,_e[2]]}),nt=void 0,at=!0}}}const $t=C.splice(O);let Ht=0;for(q=-1;++q<$t.length;){for(;Ht<yt.length&&yt[Ht].at===O+q;)C.push(yt[Ht++].event);C.push($t[q])}C[O][1]._spread=re}function o(C,O){return $;function $(q){a.call(this,C(q),q),O&&O.call(this,q)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(C,O,$){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([O,$||void 0]),C.position={start:ht(O.start),end:void 0}}function u(C){return O;function O($){C&&C.call(this,$),c.call(this,$)}}function c(C,O){const $=this.stack.pop(),q=this.tokenStack.pop();if(!q)throw new Error("Cannot close `"+C.type+"` ("+Qt({start:C.start,end:C.end})+"): it’s not open");q[0].type!==C.type&&(O?O.call(this,C,q[0]):(q[1]||uo).call(this,C,q[0])),$.position.end=ht(C.end)}function f(){return Bn(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(C){if(this.data.expectingFirstListItemValue){const O=this.stack[this.stack.length-2];O.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function d(){const C=this.resume(),O=this.stack[this.stack.length-1];O.lang=C}function w(){const C=this.resume(),O=this.stack[this.stack.length-1];O.meta=C}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const C=this.resume(),O=this.stack[this.stack.length-1];O.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const C=this.resume(),O=this.stack[this.stack.length-1];O.value=C.replace(/(\r?\n|\r)$/g,"")}function S(C){const O=this.resume(),$=this.stack[this.stack.length-1];$.label=O,$.identifier=Xe(this.sliceSerialize(C)).toLowerCase()}function j(){const C=this.resume(),O=this.stack[this.stack.length-1];O.title=C}function F(){const C=this.resume(),O=this.stack[this.stack.length-1];O.url=C}function v(C){const O=this.stack[this.stack.length-1];if(!O.depth){const $=this.sliceSerialize(C).length;O.depth=$}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function W(C){const O=this.stack[this.stack.length-1];O.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function k(C){const $=this.stack[this.stack.length-1].children;let q=$[$.length-1];(!q||q.type!=="text")&&(q=er(),q.position={start:ht(C.start),end:void 0},$.push(q)),this.stack.push(q)}function T(C){const O=this.stack.pop();O.value+=this.sliceSerialize(C),O.position.end=ht(C.end)}function P(C){const O=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=O.children[O.children.length-1];$.position.end=ht(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(O.type)&&(k.call(this,C),T.call(this,C))}function V(){this.data.atHardBreak=!0}function ee(){const C=this.resume(),O=this.stack[this.stack.length-1];O.value=C}function B(){const C=this.resume(),O=this.stack[this.stack.length-1];O.value=C}function se(){const C=this.resume(),O=this.stack[this.stack.length-1];O.value=C}function ae(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=O,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function ne(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=O,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function Ie(C){const O=this.sliceSerialize(C),$=this.stack[this.stack.length-2];$.label=Xc(O),$.identifier=Xe(O).toLowerCase()}function g(){const C=this.stack[this.stack.length-1],O=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const q=C.children;$.children=q}else $.alt=O}function me(){const C=this.resume(),O=this.stack[this.stack.length-1];O.url=C}function pe(){const C=this.resume(),O=this.stack[this.stack.length-1];O.title=C}function y(){this.data.inReference=void 0}function ge(){this.data.referenceType="collapsed"}function Be(C){const O=this.resume(),$=this.stack[this.stack.length-1];$.label=O,$.identifier=Xe(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function le(C){this.data.characterReferenceType=C.type}function Ge(C){const O=this.sliceSerialize(C),$=this.data.characterReferenceType;let q;$?(q=Cl(O,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):q=ii(O);const Ee=this.stack[this.stack.length-1];Ee.value+=q}function Ve(C){const O=this.stack.pop();O.position.end=ht(C.end)}function ye(C){T.call(this,C);const O=this.stack[this.stack.length-1];O.url=this.sliceSerialize(C)}function qe(C){T.call(this,C);const O=this.stack[this.stack.length-1];O.url="mailto:"+this.sliceSerialize(C)}function We(){return{type:"blockquote",children:[],position:void 0}}function _t(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function cn(){return{type:"inlineCode",value:"",position:void 0}}function fn(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Lt(){return{type:"emphasis",children:[],position:void 0}}function Tt(){return{type:"heading",depth:0,children:[],position:void 0}}function At(){return{type:"break",position:void 0}}function st(){return{type:"html",value:"",position:void 0}}function Zn(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function tt(){return{type:"link",title:null,url:"",children:[],position:void 0}}function hn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[],position:void 0}}function pn(C){return{type:"listItem",spread:C._spread,checked:null,children:[],position:void 0}}function Je(){return{type:"paragraph",children:[],position:void 0}}function Ft(){return{type:"strong",children:[],position:void 0}}function er(){return{type:"text",value:"",position:void 0}}function Bt(){return{type:"thematicBreak",position:void 0}}}function ht(e){return{line:e.line,column:e.column,offset:e.offset}}function Ml(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ml(e,r):Zc(e,r)}}function Zc(e,t){let n;for(n in t)if(Rl.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"afterExit":case"beforeEnter":{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 uo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is still open")}function ef(e){const t=this;t.parser=n;function n(r){return Jc(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tf(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 nf(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
+
`}]}function rf(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 l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function of(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lf(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sf(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Rt(r.toLowerCase()),l=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=l+1,s+=1,e.footnoteCounts.set(r,s);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function af(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 uf(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ll(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),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function cf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ll(e,t);const i={src:Rt(r.url||"")};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function ff(e,t){const n={src:Rt(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 hf(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 pf(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ll(e,t);const i={href:Rt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function df(e,t){const n={href:Rt(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 mf(e,t,n){const r=e.all(t),i=n?gf(n):Fl(t),l={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
7
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&o.push({type:"text",value:`
|
|
8
|
+
`});const u={type:"element",tagName:"li",properties:l,children:o};return e.patch(t,u),e.applyData(t,u)}function gf(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const{children:n}=e;let r=-1;for(;!t&&++r<n.length;)t=Fl(n[r])}return t}function Fl(e){const{spread:t}=e;return t??e.children.length>1}function yf(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)}function xf(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bf(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wf(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kf(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=ei(t.children[1]),a=ml(t.children[t.children.length-1]);s&&a&&(o.position={start:s,end:a}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Sf(e,t,n){const r=n?n.children:void 0,l=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let a=-1;const u=[];for(;++a<s;){const f=t.children[a],p={},h=o?o[a]:void 0;h&&(p.align=h);let d={type:"element",tagName:l,properties:p,children:[]};f&&(d.children=e.all(f),e.patch(f,d),d=e.applyData(f,d)),u.push(d)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function Cf(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const co=9,fo=32;function vf(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const l=[];for(;r;)l.push(ho(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(ho(t.slice(i),i>0,!1)),l.join("")}function ho(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===co||l===fo;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===co||l===fo;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ef(e,t){const n={type:"text",value:vf(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function _f(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Tf={blockquote:tf,break:nf,code:rf,delete:of,emphasis:lf,footnoteReference:sf,heading:af,html:uf,imageReference:cf,image:ff,inlineCode:hf,linkReference:pf,link:df,listItem:mf,list:yf,paragraph:xf,root:bf,strong:wf,table:kf,tableCell:Cf,tableRow:Sf,text:Ef,thematicBreak:_f,toml:Sn,yaml:Sn,definition:Sn,footnoteDefinition:Sn};function Sn(){}const Bl=-1,Hn=0,en=1,zn=2,li=3,si=4,ai=5,ui=6,$l=7,Hl=8,{defineProperty:Af}=Object,Ul=typeof self=="object"?self:globalThis,po=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Ul[e](t)},If=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=t[i];switch(l){case Hn:case Bl:return n(o,i);case en:{const s=n([],i);for(const a of o)s.push(r(a));return s}case zn:{const s=n({},i);for(const[a,u]of o){const c=r(a),f=r(u);c==="__proto__"?Af(s,c,{value:f,configurable:!0,enumerable:!0,writable:!0}):s[c]=f}return s}case li:return n(new Date(o),i);case si:{const{source:s,flags:a}=o;return n(new RegExp(s,a),i)}case ai:{const s=n(new Map,i);for(const[a,u]of o)s.set(r(a),r(u));return s}case ui:{const s=n(new Set,i);for(const a of o)s.add(r(a));return s}case $l:{const{name:s,message:a}=o;return n(typeof Ul[s]=="function"?po(s,a):new Error(a),i)}case Hl:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return n(new DataView(s),o)}case"-0":return-0}return n(po(l,o),i)};return r},mo=e=>If(new Map,e)(0),wt="",{toString:Nf}={},{keys:jf,is:Pf}=Object,Kt=e=>{const t=typeof e;if(t!=="object"||!e)return[Hn,t];const n=Nf.call(e).slice(8,-1);switch(n){case"Array":return[en,wt];case"Object":return[zn,wt];case"Date":return[li,wt];case"RegExp":return[si,wt];case"Map":return[ai,wt];case"Set":return[ui,wt];case"DataView":return[en,n]}return n.includes("Array")?[en,n]:e instanceof Error?[$l,e.name||"Error"]:[zn,n]},Cn=([e,t])=>e===Hn&&(t==="function"||t==="symbol"),Of=(e,t,n,r)=>{const i=(o,s)=>{const a=r.push(o)-1;return n.set(s,a),a},l=o=>{if(n.has(o))return n.get(o);let[s,a]=Kt(o);switch(s){case Hn:{let c=o;switch(a){case"bigint":s=Hl,c=o.toString();break;case"number":if(!o&&Pf(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([Bl],o)}return i([s,c],o)}case en:{if(a){let p=o;return a==="DataView"?p=new Uint8Array(o.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(o)),i([a,[...p]],o)}const c=[],f=i([s,c],o);for(const p of o)c.push(l(p));return f}case zn:{if(a)switch(a){case"BigInt":return i([a,o.toString()],o);case"Boolean":case"Number":case"String":return i([a,o.valueOf()],o)}if(t&&"toJSON"in o)return l(o.toJSON());const c=[],f=i([s,c],o);for(const p of jf(o))(e||!Cn(Kt(o[p])))&&c.push([l(p),l(o[p])]);return f}case li:return i([s,isNaN(o.getTime())?wt:o.toISOString()],o);case si:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case ai:{const c=[],f=i([s,c],o);for(const[p,h]of o)(e||!(Cn(Kt(p))||Cn(Kt(h))))&&c.push([l(p),l(h)]);return f}case ui:{const c=[],f=i([s,c],o);for(const p of o)(e||!Cn(Kt(p)))&&c.push(l(p));return f}}const{message:u}=o;return i([s,{name:a,message:u}],o)};return l},go=(e,{json:t,lossy:n}={})=>{const r=[];return Of(!(t||n),!!t,new Map,r)(e),r},Rn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?mo(go(e,t)):structuredClone(e):(e,t)=>mo(go(e,t));function Df(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 zf(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Rf(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Df,r=e.options.footnoteBackLabel||zf,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);c&&(s[u]=e.all(c))}for(u=-1;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=s[u],p=String(c.identifier).toUpperCase(),h=Rt(p.toLowerCase());let d=0;const w=[],E=e.footnoteCounts.get(p);for(;E!==void 0&&++d<=E;){w.length>0&&w.push({type:"text",value:" "});let S=typeof n=="string"?n:n(u,d);typeof S=="string"&&(S={type:"text",value:S}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,d),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const b=f[f.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const S=b.children[b.children.length-1];S&&S.type==="text"?S.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...w)}else f.push(...w);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,A),a.push(A)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Rn(o),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 Un=function(e){if(e==null)return Bf;if(typeof e=="function")return Vn(e);if(typeof e=="object")return Array.isArray(e)?Mf(e):Lf(e);if(typeof e=="string")return Ff(e);throw new Error("Expected function, string, or object as test")};function Mf(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Un(e[n]);return Vn(r);function r(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Lf(e){const t=e;return Vn(n);function n(r){const i=r;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Ff(e){return Vn(t);function t(n){return n&&n.type===e}}function Vn(e){return t;function t(n,r,i){return!!($f(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Bf(){return!0}function $f(e){return e!==null&&typeof e=="object"&&"type"in e}const Vl=[],Hf=!0,tn=!1,zr="skip";function Rr(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,l,o,s,a;if(typeof n=="function"||n&&typeof n=="object"?(l=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o=="function")s=o;else if(o&&typeof o=="object"){if(!(o.enter===null||o.enter===void 0))if(typeof o.enter=="function")s=o.enter;else throw new Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor");if(typeof o.exit=="function")a=o.exit;else throw new Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");const u=Un(l),c=i?1:-1;f(e,void 0,[])();function f(p,h,d){const w=p&&typeof p=="object"?p:{};if(typeof w.type=="string"){const b=typeof w.tagName=="string"?w.tagName:typeof w.name=="string"?w.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return E;function E(){const b=!l||u(p,h,d[d.length-1]||void 0);let A=Vl;if(s&&b&&(A=yo(s(p,d,h)),A[0]===tn))return A;if("children"in p&&p.children){const S=p;if(S.children&&A[0]!==zr){let j=(i?-1:S.children.length)+c;const F=[...d,S];for(;j>-1&&j<S.children.length;){const v=S.children[j],R=f(v,j,F)();if(R[0]===tn)return R;j=typeof R[1]=="number"?R[1]:j+c}}}if(a&&b){const S=yo(a(p,d,h));if(S[0]===zr)throw new Error("Unexpected value `"+S[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(S[0]===tn||typeof S[1]=="number")return S}return A}}}function yo(e){return Array.isArray(e)?e:typeof e=="number"?[Hf,e]:e==null?Vl:[e]}function qn(e,t,n,r){let i,l,o;l=t,o=n,typeof l=="function"?Rr(e,i,Mr(l),o):Rr(e,i,Uf(l),o)}function Uf(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?Mr(e.enter):e.enter,exit:typeof e.exit=="function"?Mr(e.exit):e.exit}}function Mr(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const Lr={}.hasOwnProperty,Vf={};function qf(e,t){const n=t||Vf,r=new Map,i=new Map,l=new Map,o={...Tf,...n.handlers},s={all:u,applyData:Yf,definitionById:r,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:o,one:a,options:n,patch:Wf,wrap:Xf};return qn(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=String(c.identifier).toUpperCase();c.type==="definition"?r.has(f)||r.set(f,c):i.has(f)||i.set(f,c)}}),s;function a(c,f){const{type:p}=c,h=s.handlers[p];if(Lr.call(s.handlers,p)&&h)return h(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:w,...E}=c;return{...Rn(E),children:s.all(c)}}return Rn(c)}return(s.options.unknownHandler||Kf)(s,c,f)}function u(c){const f=[];if("children"in c){const p=c.children;let h=-1;for(;++h<p.length;){const d=s.one(p[h],c);if(d){if(h&&p[h-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=xo(d.value)),!Array.isArray(d)&&d.type==="element")){const w=d.children[0];w&&w.type==="text"&&(w.value=xo(w.value))}Array.isArray(d)?f.push(...d):f.push(d)}}}return f}}function Wf(e,t){e.position&&(t.position=Da(e))}function Yf(e,t){let n=t;if(e&&e.data){const{hChildren:r,hName:i,hProperties:l}=e.data;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const o="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:o}}n.type==="element"&&l&&Object.assign(n.properties,Rn(l)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function Kf(e,t){const n=t.data||{},r="value"in t&&!(Lr.call(n,"hProperties")||Lr.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 Xf(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 xo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bo(e,t){const n=qf(e,t),r=n.one(e,void 0),i=Rf(n),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
14
|
+
`},i),l}function Gf(e,t){return e&&"run"in e?async function(n,r){const i=bo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bo(n,{file:r,...e||t})}}function wo(e){if(e)throw e}function ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nn=Object.prototype.hasOwnProperty,Wl=Object.prototype.toString,ko=Object.defineProperty,So=Object.getOwnPropertyDescriptor,Co=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Wl.call(t)==="[object Array]"},vo=function(t){if(!t||Wl.call(t)!=="[object Object]")return!1;var n=Nn.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Nn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Nn.call(t,i)},Eo=function(t,n){ko&&n.name==="__proto__"?ko(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},_o=function(t,n){if(n==="__proto__")if(Nn.call(t,n)){if(So)return So(t,n).value}else return;return t[n]},Jf=function e(){var t,n,r,i,l,o,s=arguments[0],a=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},a=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=_o(s,n),i=_o(t,n),s!==i&&(c&&i&&(vo(i)||(l=Co(i)))?(l?(l=!1,o=r&&Co(r)?r:[]):o=r&&vo(r)?r:{},Eo(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Eo(s,{name:n,newValue:i}));return s};const hr=ql(Jf);function Fr(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 Qf(){const e=[],t={run:n,use:r};return t;function n(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(a,...u){const c=e[++l];let f=-1;if(a){o(a);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,c?Zf(c,s)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Zf(e,t){let n;return r;function r(...o){const s=e.length>o.length;let a;s&&o.push(i);try{a=e.apply(this,o)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(a&&a.then&&typeof a.then=="function"?a.then(l,i):a instanceof Error?i(a):l(a))}function i(o,...s){n||(n=!0,t(o,...s))}function l(o){i(null,o)}}const Qe={basename:eh,dirname:th,extname:nh,join:rh,sep:"/"};function eh(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');un(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function th(e){if(un(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 nh(e){un(e);let t=e.length,n=-1,r=0,i=-1,l=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function rh(...e){let t=-1,n;for(;++t<e.length;)un(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ih(n)}function ih(e){un(e);const t=e.codePointAt(0)===47;let n=oh(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function oh(e,t){let n="",r=0,i=-1,l=0,o=-1,s,a;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=o,l=0;continue}}else if(n.length>0){n="",r=0,i=o,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,l=0}else s===46&&l>-1?l++:l=-1}return n}function un(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lh={cwd:sh};function sh(){return"/"}function Br(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ah(e){if(typeof e=="string")e=new URL(e);else if(!Br(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 uh(e)}function uh(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 pr=["history","path","basename","stem","extname","dirname"];class Yl{constructor(t){let n;t?Br(t)?n={path:t}:typeof t=="string"||ch(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":lh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<pr.length;){const l=pr[r];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)pr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Qe.basename(this.path):void 0}set basename(t){mr(t,"basename"),dr(t,"basename"),this.path=Qe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qe.dirname(this.path):void 0}set dirname(t){To(this.basename,"dirname"),this.path=Qe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qe.extname(this.path):void 0}set extname(t){if(dr(t,"extname"),To(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=Qe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Br(t)&&(t=ah(t)),mr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qe.basename(this.path,this.extname):void 0}set stem(t){mr(t,"stem"),dr(t,"stem"),this.path=Qe.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 Fn(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 dr(e,t){if(e&&e.includes(Qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qe.sep+"`")}function mr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function To(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ch(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fh=function(e){const r=this.constructor.prototype,i=r[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,r),l},hh={}.hasOwnProperty;class ci extends fh{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=Qf()}copy(){const t=new ci;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(hr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xr("data",this.frozen),this.namespace[t]=n,this):hh.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xr("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=vn(t),r=this.parser||this.Parser;return gr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gr("process",this.parser||this.Parser),yr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,o){const s=vn(t),a=r.parse(s);r.run(a,s,function(c,f,p){if(c||!f||!p)return u(c);const h=f,d=r.stringify(h,p);mh(d)?p.value=d:p.result=d,u(c,p)});function u(c,f){c||!f?o(c):l?l(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),gr("processSync",this.parser||this.Parser),yr("processSync",this.compiler||this.Compiler),this.process(t,i),Io("processSync","process",n),r;function i(l,o){n=!0,wo(l),r=o}}run(t,n,r){Ao(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?l(void 0,r):new Promise(l);function l(o,s){const a=vn(n);i.run(t,a,u);function u(c,f,p){const h=f||t;c?s(c):o?o(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,l),Io("runSync","run",r),i;function l(o,s){wo(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=vn(n),i=this.compiler||this.Compiler;return yr("stringify",i),Ao(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(xr("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;a(c,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=hr(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];l(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[h,...d]=c;const w=r[p][1];Fr(w)&&Fr(h)&&(h=hr(!0,w,h)),r[p]=[u,h,...d]}}}}const ph=new ci().freeze();function gr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xr(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 Ao(e){if(!Fr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Io(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vn(e){return dh(e)?e:new Yl(e)}function dh(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mh(e){return typeof e=="string"||gh(e)}function gh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yh="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",No=[],jo={allowDangerousHtml:!0},xh=/^(https?|ircs?|mailto|xmpp)$/i,bh=[{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 wh(e){const t=kh(e),n=Sh(e);return Ch(t.runSync(t.parse(n),n),e)}function kh(e){const t=e.rehypePlugins||No,n=e.remarkPlugins||No,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jo}:jo;return ph().use(ef).use(n).use(Gf,r).use(t)}function Sh(e){const t=e.children||"",n=new Yl;return typeof t=="string"&&(n.value=t),n}function Ch(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,l=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,a=t.urlTransform||vh;for(const c of bh)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+yh+c.id,void 0);return qn(e,u),Ba(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function u(c,f,p){if(c.type==="raw"&&p&&typeof f=="number")return o?p.children.splice(f,1):p.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let h;for(h in ur)if(Object.hasOwn(ur,h)&&Object.hasOwn(c.properties,h)){const d=c.properties[h],w=ur[h];(w===null||w.includes(c.tagName))&&(c.properties[h]=a(String(d||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):l?l.includes(c.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(c,f,p)),h&&p&&typeof f=="number")return s&&c.children?p.children.splice(f,1,...c.children):p.children.splice(f,1),f}}}function vh(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||xh.test(e.slice(0,t))?e:""}function Po(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 Eh(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _h(e,t,n){const i=Un((n||{}).ignore||[]),l=Th(t);let o=-1;for(;++o<l.length;)Rr(e,s);function s(u,c,f){if(u.type==="text"&&typeof f=="number")return a(u,c,f);if(i(u,f,c[c.length-1]))return zr}function a(u,c,f){const p=c[c.length-1],h=l[o][0],d=l[o][1];let w=0,E=!1,b=[];h.lastIndex=0;let A=h.exec(u.value);for(;A;){const j=A.index,F={index:A.index,input:A.input,stack:[...c,u]};let v=d(...A,F);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v!==!1){if(w!==j&&S({type:"text",value:u.value.slice(w,j)}),Array.isArray(v))for(const R of v)S(R);else v&&S(v);w=j+A[0].length,E=!0}if(v===!1||A[0].length===0){const R=u.value.codePointAt(j)||0;h.lastIndex=j+(/[uv]/.test(h.flags)&&R>65535?2:1)}if(!h.global)break;A=h.exec(u.value)}return E?(w<u.value.length&&S({type:"text",value:u.value.slice(w)}),p.children.splice(f,1,...b)):b=[u],f+b.length;function S(j){const F=b[b.length-1];F&&F.type==="text"&&j.type==="text"?F.value+=j.value:b.push(j)}}}function Th(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Ah(i[0]),Ih(i[1])])}return t}function Ah(e){return typeof e=="string"?new RegExp(Eh(e),"g"):e}function Ih(e){return typeof e=="function"?e:function(){return e}}const br="phrasing",wr=["autolink","link","image","label"];function Nh(){return{transforms:[Mh],enter:{literalAutolink:Ph,literalAutolinkEmail:kr,literalAutolinkHttp:kr,literalAutolinkWww:kr},exit:{literalAutolink:Rh,literalAutolinkEmail:zh,literalAutolinkHttp:Oh,literalAutolinkWww:Dh}}}function jh(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:br,notInConstruct:wr},{character:".",before:"[Ww]{3}",inConstruct:br,notInConstruct:wr},{character:":",before:"[PSps]",after:"\\/",inConstruct:br,notInConstruct:wr}]}}function Ph(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function kr(e){this.config.enter.autolinkProtocol.call(this,e)}function Oh(e){this.config.exit.autolinkProtocol.call(this,e)}function Dh(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 zh(e){this.config.exit.autolinkEmail.call(this,e)}function Rh(e){this.exit(e)}function Mh(e){_h(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),Lh],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),$h],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),Bh],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),Fh]],{ignore:["link","linkReference"]})}function Lh(e,t,n,r,i){if(!Vh(i))return!1;let l="";if(/^w/i.test(t)&&(n=t+n,t="",l="http://"),sn(n.charCodeAt(0))||!Hh(n))return!1;const o=Uh(n+r),s={type:"link",title:null,url:l+t+o[0],children:[{type:"text",value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:"text",value:o[1],position:void 0}]:s}function Fh(e,t,n){return/[\d\-_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n,position:void 0}],position:void 0}}function Bh(e,t,n){if(/[\d\-_]$/.test(n))return!1;const r="mailto:"+t+"@"+n;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function $h(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)==="@"))return!1;const l="xmpp:"+t+"@"+n+(r||"");return{type:"link",title:null,url:l,children:[{type:"text",value:l,position:void 0}],position:void 0}}function Hh(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function Uh(e){let t=e.length;for(;t>0;){const o=e.charCodeAt(t-1);if(o===33||o===34||o===38||o===39||o===41||o===44||o===46||o===58||o===59||o===60||o===62||o===63||o===93||o===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(")");const i=Po(e,"(");let l=Po(e,")");for(;r!==-1&&i>l;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),l++;return[e,n]}function Vh(e){const t=e.input.charCodeAt(e.index-1);return e.index===0||Ct(t)||sn(t)}Kl.peek=Zh;function qh(){this.buffer()}function Wh(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Yh(){this.buffer()}function Kh(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Xh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Gh(e){this.exit(e)}function Jh(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xe(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qh(e){this.exit(e)}function Zh(){return"["}function Kl(e,t,n,r){const i=n.createTracker(r);let l=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),s(),o(),l+=i.move("]"),l}function ep(){return{enter:{gfmFootnoteCallString:qh,gfmFootnoteCall:Wh,gfmFootnoteDefinitionLabelString:Yh,gfmFootnoteDefinition:Kh},exit:{gfmFootnoteCallString:Xh,gfmFootnoteCall:Gh,gfmFootnoteDefinitionLabelString:Jh,gfmFootnoteDefinition:Qh}}}function tp(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Kl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,l,o){const s=l.createTracker(o);let a=s.move("[^");const u=l.enter("footnoteDefinition"),c=l.enter("label");return a+=s.move(l.safe(l.associationId(r),{before:a,after:"]"})),c(),a+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),a+=s.move((t?`
|
|
15
|
+
`:" ")+l.indentLines(l.containerFlow(r,s.current()),t?Xl:np))),u(),a}}function np(e,t,n){return t===0?e:Xl(e,t,n)}function Xl(e,t,n){return(n?"":" ")+e}const rp=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fi.attention=ap;fi.peek=up;function ip(){return{canContainEols:["delete"],enter:{strikethrough:lp},exit:{strikethrough:sp}}}function op(){return{handlers:{delete:fi},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rp}]}}function lp(e){this.enter({type:"delete",children:[],position:void 0},e)}function sp(e){this.exit(e)}function fi(e,t,n,r){const i=n.createTracker(r),l=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let s=i.move(l);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move(l),o(),s}function ap(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function up(){return"~"}function cp(e){return e.length}function fp(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cp,l=[],o=[],s=[],a=[];let u=0,c=-1;for(;++c<e.length;){const w=[],E=[];let b=-1;for(e[c].length>u&&(u=e[c].length);++b<e[c].length;){const A=hp(e[c][b]);if(n.alignDelimiters!==!1){const S=i(A);E[b]=S,(a[b]===void 0||S>a[b])&&(a[b]=S)}w.push(A)}o[c]=w,s[c]=E}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)l[f]=Oo(r[f]);else{const w=Oo(r);for(;++f<u;)l[f]=w}f=-1;const p=[],h=[];for(;++f<u;){const w=l[f];let E="",b="";w===99?(E=":",b=":"):w===108?E=":":w===114&&(b=":");let A=n.alignDelimiters===!1?1:Math.max(1,a[f]-E.length-b.length);const S=E+"-".repeat(A)+b;n.alignDelimiters!==!1&&(A=E.length+A+b.length,A>a[f]&&(a[f]=A),h[f]=A),p[f]=S}o.splice(1,0,p),s.splice(1,0,h),c=-1;const d=[];for(;++c<o.length;){const w=o[c],E=s[c],b=n.fillRows===!1?Math.max(1,o[c===1?0:c].length):u;f=-1;const A=[];for(;++f<b;){const S=w[f]||"";let j="",F="";if(n.alignDelimiters!==!1){const v=a[f]-(E[f]||0),R=l[f];if(R===114)j=" ".repeat(v);else if(R===99){const W=v/2;v%2?(j=" ".repeat(W+.5),F=" ".repeat(W-.5)):(j=" ".repeat(W),F=j)}else F=" ".repeat(v)}n.delimiterStart!==!1&&!f&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||f)&&A.push(" "),n.alignDelimiters!==!1&&A.push(j),A.push(S),n.alignDelimiters!==!1&&A.push(F),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||f!==b-1)&&A.push("|")}d.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return d.join(`
|
|
16
|
+
`)}function hp(e){return e==null?"":String(e)}function Oo(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}const pp=Un(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dp(e,t,n,r){const i=n.enter("blockquote"),l=n.createTracker(r);l.move("> "),l.shift(2);const o=n.indentLines(n.containerFlow(e,l.current()),mp);return i(),o}function mp(e,t,n){return">"+(n?"":" ")+e}function gp(e,t){return Do(e,t.inConstruct,!0)&&!Do(e,t.notInConstruct,!1)}function Do(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 zo(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const l=n.unsafe[i];if(l.character===`
|
|
17
|
+
`&&!l.before&&!l.after&&gp(n.stack,l))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
18
|
+
`}function yp(e,t){const n=String(e);let r=n.indexOf(t),i=r,l=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++l>o&&(o=l):l=1,i=r+t.length,r=n.indexOf(t,i);return o}function xp(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function bp(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 wp(e,t,n,r){const i=bp(n),l=e.value||"";if(xp(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(l,kp);return f(),p}const o=n.createTracker(r),s=i.repeat(Math.max(yp(l,i)+1,3)),a=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let c=o.move(s);if(e.lang){const f=n.enter(`codeFencedLang${u}`);c+=o.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${u}`);c+=o.move(" "),c+=o.move(n.safe(e.meta,{before:c,after:`
|
|
19
|
+
`,encode:["`"],...o.current()})),f()}return c+=o.move(`
|
|
20
|
+
`),l&&(c+=o.move(l+`
|
|
21
|
+
`)),c+=o.move(s),a(),c}function kp(e,t,n){return(n?"":" ")+e}function hi(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 Sp(e,t,n,r){const i=hi(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),s(),!e.url||/^<|[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
22
|
+
`,...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),o(),u}function Cp(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 Mn(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function Ot(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function Gl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ro(e,t,n){const r=pt(e),i=pt(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}}function vp(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const s=e.charCodeAt(2);return s===45?2:s===91?5:Se(s)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,l=e.charCodeAt(i);if(!Se(l))return;for(;l===45||Ce(l);)l=e.charCodeAt(++i);const o=e.slice(r,i).toLowerCase();return!n&&l!==47&&Dr.includes(o)?1:Ol.includes(o)?6:7}const Jl=new Map([["*",!1],["_",!0]]);function Ep(e,t,n){const r=new Set;for(const l of e){const o=n.get(l);if(o&&l.attention&&t.some(s=>s.attention===l.attention))for(const s of o.tokens)r.add(s.attention)}const i=[];for(const l of e)l.attention&&r.delete(l.attention)&&i.push(l.attention);return i.reverse(),i}function Ql(e,t,n){const r=[],i=new Map,l=new Map;let o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}const s=e[o].value.charAt(0),a=Jl.get(s);let u=o+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===s;)u++;const c=o?e[o-1].value:t,f=pt(c.charCodeAt(c.length-1)),p=pt((u<e.length?e[u].value:n).charCodeAt(0)),h=!p||p===2&&!!f,d=!f||f===2&&!!p,w={tokens:e.slice(o,u),markers:[],start:0,end:0,open:a?h&&(!!f||!d):h,close:a?d&&(!!p||!h):d,split:a!==void 0};for(const E of w.tokens){i.set(E,[...w.tokens]),l.set(E,w);let b=E.value.length;for(;b--;)w.markers.push(E)}w.end=w.markers.length,r.push(w),o=u}for(Tp(r,i),o=-1;++o<e.length;){const s=i.get(e[o]);if(s)return{attention:Ep(e,s,l),index:o}}}function En(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?Mn(n.value):Ot(n.value),i=Gl(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let l=n.value.slice(0,n.value.length-r.length),o=0;for(;l.charCodeAt(l.length-1-o)===92;)o++;o%2&&(l+="\\"),n.value=l+i}}function _p(e,t,n,r,i){for(const l of n.attention){const o=t.get(l)||l.sequences[0];for(const s of l.sequences){if(s===o)continue;const a=new Map(t);a.set(l,s);const u=Wn(e,a,r,i),c=Ql(u,r,i);if(!c||c.index>n.index)return{chosen:a,mistake:c,tokens:u}}}}function Tp(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let l=n.get(i);l||(l=[],n.set(i,l));let o=r.close?l.length:0;for(;o--&&r.start<r.end;){const s=l[o],a=s.end-s.start,u=r.end-r.start;if(r.split?(s.close||r.open)&&u%3&&!((a+u)%3):a!==s.markers.length||a!==u)continue;const c=r.split?a>1&&u>1?2:1:u,f=s.markers.slice(s.end-c,s.end),p=r.markers.slice(r.start,r.start+c),h=f[0],d=p[0];if(h===f[c-1]&&h.value.length===c&&d===p[c-1]&&d.value.length===c&&h.attention===d.attention)t.delete(h),t.delete(d);else{const w=[...new Set([...f,...p])];for(const E of w){const b=t.get(E);b&&b.push(...w)}}s.end-=c,r.start+=c,s.start===s.end&&l.splice(o,1),o=l.length}r.open&&r.start<r.end&&l.push(r)}}function Ap(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!vl(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const l of n)r.push(i.repeat(l))}return r}function Ip(e,t,n){const r=t.indexStack,i=e.children||[],l=[];let o=-1,s=n.before;r.push(-1);let a=t.createTracker(n);for(;++o<i.length;){const u=i[o];let c;if(r[r.length-1]=o,o+1<i.length){let h=t.handle.handlers[i[o+1].type];h&&h.peek&&(h=h.peek),c=h?Mn(h(i[o+1],e,t,{before:"",after:"",...a.current()})):""}else c=n.after;const f=l[l.length-1];typeof f=="string"&&(s==="\r"||s===`
|
|
23
|
+
`)&&u.type==="html"&&vp(u.value)!==7&&(l[l.length-1]=f.replace(/(\r?\n|\r)$/," "),s=" ",a=t.createTracker(n),a.move(Yn(l,n.before,n.after)));const p=t.handle.handlers[u.type];if(p&&p.attention){const h=pi(u,p.attention,t,a);if(!h)continue;l.push(h),s=Ot(h.sequences[0])}else{const h=t.handle(u,e,t,{...a.current(),after:c,before:s});if(!h)continue;a.move(h),l.push(h),s=Ot(h)}}return r.pop(),l}function pi(e,t,n,r){const{construct:i,markers:l,sizes:o}=t(e,n),s=Ap(e.type,l,o),a=s[0],u=n.enter(i),c=n.createTracker(r.current());c.move(a);const f=Ip(e,n,{...c.current(),before:a,after:a});if(u(),f.length!==0)return r.move(a),r.move(Yn(f,a,a)),r.move(a),{children:f,sequences:s}}function Mo(e,t,n,r){let i=Wn(e,t,n,r),l=Ql(i,n,r);for(;l;){const o=_p(e,t,l,n,r);if(!o)return;t=o.chosen,i=o.tokens,l=o.mistake}return i}function Zl(e,t,n,r){let i=n,l=-1;for(;++l<e.length;){const o=e[l];if(typeof o=="string"){i="";continue}const s=l===e.length-1?r:"",a=o.sequences.find(function(u){const c=u.charAt(0);return c!==i.charAt(0)&&c!==s.charAt(0)||e.length===1&&Jl.has(c)&&u.length>n.length})||o.sequences[0];a!==o.sequences[0]&&t.set(o,a),Zl(o.children,t,a,a),i=a}}function Wn(e,t,n,r){const i=[];let l,o=Ot(n),s=-1;for(;++s<e.length;){const a=e[s];if(typeof a=="string"){const S={value:a,attention:void 0};l&&l===Mn(a)&&En([S],!0),l=void 0,i.push(S),S.value&&(o=Ot(S.value));continue}const u=t.get(a)||a.sequences[0],c=u.charAt(0),f=e[s+1],p=o,h=Mn(f===void 0?r:typeof f=="string"?f:t.get(f)||f.sequences[0]),d=Wn(a.children,t,u,u),w=d[0].value,E=Ro(p.charCodeAt(p.length-1),w.charCodeAt(0),c);E.inside&&En(d,!0);const b=Ot(d[d.length-1].value),A=Ro(h.charCodeAt(0),b.charCodeAt(b.length-1),c);A.inside&&En(d,!1),E.outside&&p!==`
|
|
24
|
+
`&&p!=="\r"&&En(i,!1),A.outside&&(l=h),i.push({value:u,attention:a},...d,{value:u,attention:a}),o=u.charAt(u.length-1)}return i}function Yn(e,t,n){const r=new Map;Zl(e,r,t,n);const i=(r.size>0?Mo(e,r,t,n):void 0)||Mo(e,new Map,t,n)||Wn(e,new Map,t,n);let l="";for(const o of i)l+=o.value;return l}di.attention=es;di.peek=Np;function di(e,t,n,r){const i=n.enter("phrasing"),l=pi(e,es,n,n.createTracker(r)),o=l?Yn([l],r.before,r.after):"";return i(),o}function es(e,t){return{construct:"emphasis",markers:Cp(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Np(e,t,n){return n.options.emphasis||"*"}function jp(e,t){let n=!1;return qn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,tn}),!!((!e.depth||e.depth<3)&&Bn(e)&&(t.options.setext||n))}function Pp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(r);if(jp(e,n)){const f=n.enter("headingSetext"),p=n.enter("phrasing"),h=n.containerPhrasing(e,{...l.current(),before:`
|
|
25
|
+
`,after:`
|
|
26
|
+
`});return p(),f(),h+`
|
|
27
|
+
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
28
|
+
`))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),a=n.enter("phrasing");l.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
29
|
+
`,...l.current()});const c=u.charCodeAt(0);return(c===9||c===32)&&(u=Gl(c)+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),a(),s(),u}ts.peek=Op;function ts(e){return e.value||""}function Op(){return"<"}ns.peek=Dp;function ns(e,t,n,r){const i=hi(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),s(),!e.url&&e.title||/^<|[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),s(),e.title&&(s=n.enter(`title${l}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function Dp(){return"!"}rs.peek=zp;function rs(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("![");const u=n.safe(e.alt,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),o=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=c,l(),i==="full"||!u||u!==f?a+=s.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function zp(){return"!"}is.peek=Rp;function is(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],s=n.compilePattern(o);if(!o.atBreak)continue;let a;for(;a=s.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function Rp(){return"`"}function os(e,t){const n=Bn(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))}ls.peek=Mp;function ls(e,t,n,r){const i=hi(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);if(os(e,n)){const d=n.stack;n.stack=d.filter(function(b){return b!=="phrasing"});const w=n.enter("autolink");let E=o.move("<");return E+=o.move(n.containerPhrasing(e,{before:E,after:">",...o.current()})),E+=o.move(">"),w(),n.stack=d,E}const s=n.enter("link");let a=n.enter("label"),u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"](",...o.current()});u+=o.move(c),a(),u+=o.move("](");const f=/^<|[\0- \u007F]/.test(e.url),p=r.before.charAt(r.before.length-1);let h=e.title||void 0;if(!h&&!f&&(p===`
|
|
30
|
+
`||p==="\r")){let d=0;for(;d<c.length&&c.charCodeAt(d)!==93;)d+=c.charCodeAt(d)===92?2:1;c.charCodeAt(d+1)===58&&(h="")}return!e.url&&typeof h=="string"||f?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:typeof h=="string"?" ":")",...o.current()}))),a(),typeof h=="string"&&(a=n.enter(`title${l}`),u+=o.move(" "+i),u+=o.move(n.safe(h,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),s(),u}function Mp(e,t,n){return os(e,n)?"<":"["}ss.peek=Lp;function ss(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let a=s.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...s.current()});a+=s.move(u+"]["),o();const c=n.stack;n.stack=c.filter(function(p){return p!=="phrasing"}),o=n.enter("reference");const f=n.safe(n.associationId(e),{before:a,after:"]",...s.current()});return o(),n.stack=c,l(),i==="full"||!u||u!==f?a+=s.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=s.move("]"),a}function Lp(){return"["}function mi(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 Fp(e){const t=mi(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 Bp(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 as(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 $p(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?Bp(n):mi(n);const s=e.ordered?o==="."?")":".":Fp(n);let a=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.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&&(a=!0),as(n)===o&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),u}function Hp(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 Up(e,t,n,r){const i=Hp(n);let l=n.bulletCurrent||mi(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(l+" ".repeat(o-l.length)),s.shift(o);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return a(),u;function c(f,p,h){return p?(h?"":" ".repeat(o))+f:(h?l:l+" ".repeat(o-l.length))+f}}function Vp(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}function qp(e,t,n,r){if(!e.children.some(function(s){return pp(s)}))return n.containerFlow(e,r);const l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),o}function Wp(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gi.attention=us;gi.peek=Yp;function gi(e,t,n,r){const i=n.enter("phrasing"),l=pi(e,us,n,n.createTracker(r)),o=l?Yn([l],r.before,r.after):"";return i(),o}function us(e,t){return{construct:"strong",markers:Wp(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function Yp(e,t,n){return n.options.strong||"*"}function Kp(e,t,n,r){const i=t?t.children:[],l=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[l+1],beforeNode:i[l-1]})}function Xp(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 Gp(e,t,n){const r=(as(n)+(n.options.ruleSpaces?" ":"")).repeat(Xp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $r={blockquote:dp,break:zo,code:wp,definition:Sp,emphasis:di,hardBreak:zo,heading:Pp,html:ts,image:ns,imageReference:rs,inlineCode:is,link:ls,linkReference:ss,list:$p,listItem:Up,paragraph:Vp,root:qp,strong:gi,text:Kp,thematicBreak:Gp};function Jp(){return{enter:{table:Qp,tableData:Lo,tableHeader:Lo,tableRow:ed},exit:{codeText:td,table:Zp,tableData:Sr,tableHeader:Sr,tableRow:Sr}}}function Qp(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[],position:void 0},e),this.data.inTable=!0}function Zp(e){this.exit(e),this.data.inTable=void 0}function ed(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function Sr(e){this.exit(e)}function Lo(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function td(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,nd));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function nd(e,t){return t==="|"?t:e}function rd(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,l=n?" ":"|";return{handlers:{inlineCode:p,table:o,tableCell:a,tableRow:s},join:[id],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
31
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function o(h,d,w,E){const b=c(h,w,E),A=b[0];if(A){let S=h.align?h.align.length:0,j=-1;if(!S)for(;++j<b.length;)b[j].length>S&&(S=b[j].length);for(;A.length<S;)A.push("")}return u(b,h.align)}function s(h,d,w,E){const b=f(h,w,E),A=u([b]);return A.slice(0,A.indexOf(`
|
|
32
|
+
`))}function a(h,d,w,E){const b=w.enter("tableCell"),A=w.enter("phrasing"),S=w.containerPhrasing(h,{...E,before:l,after:l});return A(),b(),S}function u(h,d){return fp(h,{align:d,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function c(h,d,w){const{children:E}=h;let b=-1;const A=[],S=d.enter("table");for(;++b<E.length;)A[b]=f(E[b],d,w);return S(),A}function f(h,d,w){const{children:E}=h;let b=-1;const A=[],S=d.enter("tableRow");for(;++b<E.length;)A[b]=a(E[b],h,d,w);return S(),A}function p(h,d,w){const E=$r.inlineCode(h,d,w);if(!w.stack.includes("tableCell"))return E;const b=[];let A=0,S=E.indexOf("|");for(;S!==-1;){let j=S;for(;j>A&&E.charCodeAt(j-1)===92;)j--;b.push(E.slice(A,S)),(S-j)%2===0&&b.push("\\"),A=S,S=E.indexOf("|",S+1)}return b.push(E.slice(A)),b.join("")}}function id(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&od(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function od(e,t){let n=!1;return qn(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,tn}),!!((!e.depth||e.depth<3)&&Bn(e)&&(t.options.setext||n))}function ld(){return{exit:{taskListCheckValueChecked:Fo,taskListCheckValueUnchecked:Fo,paragraph:ad}}}function sd(){return{handlers:{paragraph:ud},join:[cd]}}function Fo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ad(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 l=-1,o;for(;++l<i.length;){const s=i[l];if(s.type==="paragraph"){o=s;break}}o===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={...r.position.start}))}}this.exit(e)}function ud(e,t,n,r){if(!t||t.type!=="listItem"||cs(t)!==e)return $r.paragraph(e,t,n,r);const i="["+(t.checked?"x":" ")+"] ",l=n.createTracker(r);l.move(i);const o=$r.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},t,n,{...r,...l.current()});return i+o}function cd(e,t,n){if(!(e.type==="definition"&&n.type==="listItem"))return;const r=cs(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function cs(e){if(typeof e.checked=="boolean")for(const t of e.children){if(t.type==="paragraph")return t;if(t.type!=="definition")return}}function fd(){return[Nh(),ep(),ip(),Jp(),ld()]}function hd(e){return{extensions:[jh(),tp(e),op(),rd(e),sd()]}}const pd={tokenize:bd,partial:!0},fs={tokenize:wd,partial:!0},hs={tokenize:kd,partial:!0},ps={tokenize:Sd,partial:!0},dd={tokenize:Cd,partial:!0},ds={name:"wwwAutolink",tokenize:yd,previous:gs},ms={name:"protocolAutolink",tokenize:xd,previous:ys},lt={name:"emailAutolink",tokenize:gd,previous:xs},et={};function md(){return{text:et}}let bt=48;for(;bt<123;)et[bt]=lt,bt++,bt===58?bt=65:bt===91&&(bt=97);et[43]=lt;et[45]=lt;et[46]=lt;et[95]=lt;et[72]=[lt,ms];et[104]=[lt,ms];et[87]=[lt,ds];et[119]=[lt,ds];function gd(e,t,n){const r=this;let i,l;return o;function o(f){return!Hr(f)||!xs.call(r,r.previous)||yi(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Hr(f)?(e.consume(f),s):f===64?(e.consume(f),a):n(f)}function a(f){return f===46?e.check(dd,c,u)(f):f===45||f===95||Ce(f)?(l=!0,e.consume(f),a):c(f)}function u(f){return e.consume(f),i=!0,a}function c(f){return l&&i&&Se(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function yd(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!gs.call(r,r.previous)||yi(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(pd,e.attempt(fs,e.attempt(hs,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function xd(e,t,n){const r=this;let i="",l=!1;return o;function o(f){return(f===72||f===104)&&ys.call(r,r.previous)&&!yi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(Se(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),a}return n(f)}function a(f){return f===47?(e.consume(f),l?u:(l=!0,a)):n(f)}function u(f){return f===null||On(f)||oe(f)||Ct(f)||sn(f)?n(f):e.attempt(fs,e.attempt(hs,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function bd(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function wd(e,t,n){let r,i,l;return o;function o(u){return u===46||u===95?e.check(ps,a,s)(u):u===null||oe(u)||Ct(u)||u!==45&&sn(u)?a(u):(l=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function a(u){return i||r||!l?n(u):t(u)}}function kd(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ps,t,l)(o):o===null||oe(o)||Ct(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function Sd(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),l):s===93?(e.consume(s),i):s===60||s===null||oe(s)||Ct(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||oe(s)||Ct(s)?t(s):r(s)}function l(s){return Se(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):Se(s)?(e.consume(s),o):n(s)}}function Cd(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Ce(l)?n(l):t(l)}}function gs(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function ys(e){return!Se(e)}function xs(e){return!(e===47||Hr(e))}function Hr(e){return e===43||e===45||e===46||e===95||Ce(e)}function yi(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 vd={tokenize:Pd,partial:!0};function Ed(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Id,continuation:{tokenize:Nd},exit:jd}},text:{91:{name:"gfmFootnoteCall",tokenize:Ad},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_d,resolveTo:Td}}}}function _d(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){o=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return s;function s(a){if(!o||!o._balanced)return n(a);const u=Xe(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!l.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function Td(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 l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Ad(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(l>999||f===93&&!o||f===null||f===91||oe(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Xe(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return oe(f)||(o=!0),l++,e.consume(f),f===92?c:u}function c(f){return f===91||f===92||f===93?(e.consume(f),l++,u):u(f)}}function Id(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,s;return a;function a(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(d)}function c(d){if(o>999||d===93&&!s||d===null||d===91||oe(d))return n(d);if(d===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=Xe(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return oe(d)||(s=!0),o++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(l)||i.push(l),Q(e,h,"gfmFootnoteDefinitionWhitespace")):n(d)}function h(d){return t(d)}}function Nd(e,t,n){return e.check(an,t,e.attempt(vd,t,n))}function jd(e){e.exit("gfmFootnoteDefinition")}function Pd(e,t,n){const r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function Od(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let a=-1;for(;++a<o.length;)if(o[a][0]==="enter"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._close){let u=a;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[a][1].end.offset-o[a][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[a][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[a][1].end)},f={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[a][1].start)},p=[["enter",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",f,s]],h=s.parser.constructs.insideSpan.null;h&&Ke(p,p.length,0,$n(h,o.slice(u+1,a),s)),Ke(p,p.length,0,[["exit",f,s],["enter",o[a][1],s],["exit",o[a][1],s],["exit",c,s]]),Ke(o,u-1,a-u+3,p),a=u+p.length-2;break}}for(a=-1;++a<o.length;)o[a][1].type==="strikethroughSequenceTemporary"&&(o[a][1].type="data");return o}function l(o,s,a){const u=this.previous,c=this.events;let f=0;return p;function p(d){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(d):(o.enter("strikethroughSequenceTemporary"),h(d))}function h(d){const w=pt(u);if(d===126)return f>1?a(d):(o.consume(d),f++,h);if(f<2&&!n)return a(d);const E=o.exit("strikethroughSequenceTemporary"),b=pt(d);return E._open=!b||b===2&&!!w,E._close=!w||w===2&&!!b,s(d)}}}class Dd{constructor(){this.map=[],this.index=new Map}add(t,n,r){zd(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[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 l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}}function zd(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const l=[t,n,r];e.map.push(l),e.index.set(t,l)}function Rd(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 l=r.length-1;r[l]=r[l]==="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 Md(){return{flow:{null:{name:"table",tokenize:Ld,resolveAll:Fd}}}}function Ld(e,t,n){const r=this;let i=0,l=0,o;return s;function s(k){let T=r.events.length-1;for(;T>-1;){const{type:ee}=r.events[T][1];if(ee==="lineEnding"||ee==="linePrefix")T--;else break}const P=T>-1?r.events[T][1].type:null,V=P==="tableHead"||P==="tableRow"?v:a;return V===v&&r.parser.lazy[r.now().line]?n(k):V(k)}function a(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(o=!0,l+=1),c(k)}function c(k){return k===null?n(k):L(k)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):K(k)?Q(e,c,"whitespace")(k):(l+=1,o&&(o=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(k)))}function f(k){return k===null||k===124||oe(k)?(e.exit("data"),c(k)):(e.consume(k),k===92?p:f)}function p(k){return k===92||k===124?(e.consume(k),f):f(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),o=!1,K(k)?Q(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):d(k))}function d(k){return k===45||k===58?E(k):k===124?(o=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),w):F(k)}function w(k){return K(k)?Q(e,E,"whitespace")(k):E(k)}function E(k){return k===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),b):k===45?(l+=1,b(k)):k===null||L(k)?j(k):F(k)}function b(k){return k===45?(e.enter("tableDelimiterFiller"),A(k)):F(k)}function A(k){return k===45?(e.consume(k),A):k===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(k))}function S(k){return K(k)?Q(e,j,"whitespace")(k):j(k)}function j(k){return k===124?d(k):k===null||L(k)?!o||i!==l?F(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):F(k)}function F(k){return n(k)}function v(k){return e.enter("tableRow"),R(k)}function R(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),R):k===null||L(k)?(e.exit("tableRow"),t(k)):K(k)?Q(e,R,"whitespace")(k):(e.enter("data"),W(k))}function W(k){return k===null||k===124||oe(k)?(e.exit("data"),R(k)):(e.consume(k),k===92?G:W)}function G(k){return k===92||k===124?(e.consume(k),W):W(k)}}function Fd(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],s=!1,a=0,u,c,f;const p=new Dd;for(;++n<e.length;){const h=e[n],d=h[1];h[0]==="enter"?d.type==="tableHead"?(s=!1,a!==0&&(Bo(p,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,f=void 0,l=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",c,t]])),i=d.type==="tableDelimiterRow"?2:c?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],f=_n(p,t,l,i,void 0,f),l=[0,0,0,0]),o[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],f=_n(p,t,l,i,void 0,f)),l=o,o=[l[1],n,0,0])):d.type==="tableHead"?(s=!0,a=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(a=n,l[1]!==0?(o[0]=o[1],f=_n(p,t,l,i,n,f)):o[1]!==0&&(f=_n(p,t,o,i,n,f)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(o[3]=n)}for(a!==0&&Bo(p,t,a,u,c),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=Rd(t.events,n))}return e}function _n(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(l.end=Object.assign({},jt(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const a=jt(t.events,n[1]);if(l={type:o,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const u=jt(t.events,n[2]),c=jt(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,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",f,t]])}return i!==void 0&&(l.end=Object.assign({},jt(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function Bo(e,t,n,r,i){const l=[],o=jt(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function jt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Bd={name:"tasklistCheck",tokenize:Hd};function $d(){return{text:{91:Bd}}}function Hd(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),l)}function l(a){return oe(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),o):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),o):n(a)}function o(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(a)}function s(a){return L(a)?t(a):K(a)?e.check({tokenize:Ud},t,n)(a):n(a)}}function Ud(e,t,n){return Q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Vd(e){return Sl([md(),Ed(),Od(e),Md(),$d()])}const qd={};function Wd(e){const t=this,n=e||qd,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Vd(n)),l.push(fd()),o.push(hd(n))}var bs=I.createContext({});function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue.apply(null,arguments)}function Yd(e){if(Array.isArray(e))return e}function Kd(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,o,s=[],a=!0,u=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(a=(r=l.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function $o(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xd(e,t){if(e){if(typeof e=="string")return $o(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$o(e,t):void 0}}function Gd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
33
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ws(e,t){return Yd(e)||Kd(e,t)||Xd(e,t)||Gd()}function vt(e){"@babel/helpers - typeof";return vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(e)}function Jd(e,t){if(vt(e)!="object"||!e)return e;var n;if(typeof Symbol<"u"&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t);if(vt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qd(e){var t=Jd(e,"string");return vt(t)=="symbol"?t:t+""}function je(e,t,n){return(t=Qd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zd(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ks(e,t){if(e==null)return{};var n,r,i=Zd(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Ss={exports:{}};/*!
|
|
34
|
+
Copyright (c) 2018 Jed Watson.
|
|
35
|
+
Licensed under the MIT License (MIT), see
|
|
36
|
+
http://jedwatson.github.io/classnames
|
|
37
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var l="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(l=i(l,r(s)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return n.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var o="";for(var s in l)t.call(l,s)&&l[s]&&(o=i(o,s));return o}function i(l,o){return o?l?l+" "+o:l+o:l}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ss);var em=Ss.exports;const tm=ql(em),we=Math.round;function Cr(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=t(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Ho=(e,t,n)=>n===0?e:e/100;function Xt(e,t){const n=t||255;return e>n?n:e<0?0:e}class Pt{constructor(t){je(this,"isValid",!0),je(this,"r",0),je(this,"g",0),je(this,"b",0),je(this,"a",1),je(this,"_h",void 0),je(this,"_s",void 0),je(this,"_l",void 0),je(this,"_v",void 0),je(this,"_max",void 0),je(this,"_min",void 0),je(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let i=function(l){return r.startsWith(l)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):i("rgb")?this.fromRgbString(r):i("hsl")?this.fromHslString(r):(i("hsv")||i("hsb"))&&this.fromHsvString(r)}else if(t instanceof Pt)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Xt(t.r),this.g=Xt(t.g),this.b=Xt(t.b),this.a=typeof t.a=="number"?Xt(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(l){const o=l/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),i=t(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=we(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(t,n=50){const r=this._c(t),i=n/100,l=s=>(r[s]-this[s])*i+this[s],o={r:we(l("r")),g:we(l("g")),b:we(l("b")),a:we(l("a")*100)/100};return this._c(o)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),i=l=>we((this[l]*this.a+n[l]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const l=we(this.a*255).toString(16);t+=l.length===2?l:"0"+l}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=we(this.getSaturation()*100),r=we(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const i=this.clone();return i[t]=Xt(n,r),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(i,l){return parseInt(n[i]+n[l||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:i}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const p=we(r*255);this.r=p,this.g=p,this.b=p}let l=0,o=0,s=0;const a=t/60,u=(1-Math.abs(2*r-1))*n,c=u*(1-Math.abs(a%2-1));a>=0&&a<1?(l=u,o=c):a>=1&&a<2?(l=c,o=u):a>=2&&a<3?(o=u,s=c):a>=3&&a<4?(o=c,s=u):a>=4&&a<5?(l=c,s=u):a>=5&&a<6&&(l=u,s=c);const f=r-u/2;this.r=we((l+f)*255),this.g=we((o+f)*255),this.b=we((s+f)*255)}fromHsv({h:t,s:n,v:r,a:i}){this._h=t%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const l=we(r*255);if(this.r=l,this.g=l,this.b=l,n<=0)return;const o=t/60,s=Math.floor(o),a=o-s,u=we(r*(1-n)*255),c=we(r*(1-n*a)*255),f=we(r*(1-n*(1-a))*255);switch(s){case 0:this.g=f,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=c;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(t){const n=Cr(t,Ho);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Cr(t,Ho);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Cr(t,(r,i)=>i.includes("%")?we(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var Tn=2,Uo=.16,nm=.05,rm=.05,im=.15,Cs=5,vs=4,om=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function Vo(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Tn*t:Math.round(e.h)+Tn*t:r=n?Math.round(e.h)+Tn*t:Math.round(e.h)-Tn*t,r<0?r+=360:r>=360&&(r-=360),r}function qo(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Uo*t:t===vs?r=e.s+Uo:r=e.s+nm*t,r>1&&(r=1),n&&t===Cs&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Wo(e,t,n){var r;return n?r=e.v+rm*t:r=e.v-im*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function lm(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Pt(e),i=r.toHsv(),l=Cs;l>0;l-=1){var o=new Pt({h:Vo(i,l,!0),s:qo(i,l,!0),v:Wo(i,l,!0)});n.push(o)}n.push(r);for(var s=1;s<=vs;s+=1){var a=new Pt({h:Vo(i,s),s:qo(i,s),v:Wo(i,s)});n.push(a)}return t.theme==="dark"?om.map(function(u){var c=u.index,f=u.amount;return new Pt(t.backgroundColor||"#141414").mix(n[c],f).toHexString()}):n.map(function(u){return u.toHexString()})}var Ur=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ur.primary=Ur[5];function Yo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yo(Object(n),!0).forEach(function(r){je(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yo(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sm(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function am(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Ko="data-rc-order",Xo="data-rc-priority",um="rc-util-key",Vr=new Map;function Es(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):um}function xi(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function cm(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function bi(e){return Array.from((Vr.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function _s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!sm())return null;var n=t.csp,r=t.prepend,i=t.priority,l=i===void 0?0:i,o=cm(r),s=o==="prependQueue",a=document.createElement("style");a.setAttribute(Ko,o),s&&l&&a.setAttribute(Xo,"".concat(l)),n!=null&&n.nonce&&(a.nonce=n==null?void 0:n.nonce),a.innerHTML=e;var u=xi(t),c=u.firstChild;if(r){if(s){var f=(t.styles||bi(u)).filter(function(p){if(!["prepend","prependQueue"].includes(p.getAttribute(Ko)))return!1;var h=Number(p.getAttribute(Xo)||0);return l>=h});if(f.length)return u.insertBefore(a,f[f.length-1].nextSibling),a}u.insertBefore(a,c)}else u.appendChild(a);return a}function fm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=xi(t);return(t.styles||bi(n)).find(function(r){return r.getAttribute(Es(t))===e})}function hm(e,t){var n=Vr.get(e);if(!n||!am(document,n)){var r=_s("",t),i=r.parentNode;Vr.set(e,i),e.removeChild(r)}}function pm(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=xi(n),i=bi(r),l=Ze(Ze({},n),{},{styles:i});hm(r,l);var o=fm(t,l);if(o){var s,a;if((s=l.csp)!==null&&s!==void 0&&s.nonce&&o.nonce!==((a=l.csp)===null||a===void 0?void 0:a.nonce)){var u;o.nonce=(u=l.csp)===null||u===void 0?void 0:u.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var c=_s(e,l);return c.setAttribute(Es(l),t),c}function Ts(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function dm(e){return Ts(e)instanceof ShadowRoot}function mm(e){return dm(e)?Ts(e):null}var qr={},wi=[],gm=function(t){wi.push(t)};function ym(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=wi.reduce(function(r,i){return i(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function xm(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=wi.reduce(function(r,i){return i(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function bm(){qr={}}function As(e,t,n){!t&&!qr[n]&&(e(!1,n),qr[n]=!0)}function Kn(e,t){As(ym,e,t)}function wm(e,t){As(xm,e,t)}Kn.preMessage=gm;Kn.resetWarned=bm;Kn.noteOnce=wm;function km(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function Sm(e,t){Kn(e,"[@ant-design/icons] ".concat(t))}function Go(e){return vt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(vt(e.icon)==="object"||typeof e.icon=="function")}function Jo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[km(n)]=r}return t},{})}function Wr(e,t,n){return n?I.createElement(e.tag,Ze(Ze({key:t},Jo(e.attrs)),n),(e.children||[]).map(function(r,i){return Wr(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):I.createElement(e.tag,Ze({key:t},Jo(e.attrs)),(e.children||[]).map(function(r,i){return Wr(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function Is(e){return lm(e)[0]}function Ns(e){return e?Array.isArray(e)?e:[e]:[]}var Cm=`
|
|
38
|
+
.anticon {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
color: inherit;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
line-height: 0;
|
|
44
|
+
text-align: center;
|
|
45
|
+
text-transform: none;
|
|
46
|
+
vertical-align: -0.125em;
|
|
47
|
+
text-rendering: optimizeLegibility;
|
|
48
|
+
-webkit-font-smoothing: antialiased;
|
|
49
|
+
-moz-osx-font-smoothing: grayscale;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.anticon > * {
|
|
53
|
+
line-height: 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.anticon svg {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.anticon::before {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.anticon .anticon-icon {
|
|
65
|
+
display: block;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.anticon[tabindex] {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.anticon-spin::before,
|
|
73
|
+
.anticon-spin {
|
|
74
|
+
display: inline-block;
|
|
75
|
+
-webkit-animation: loadingCircle 1s infinite linear;
|
|
76
|
+
animation: loadingCircle 1s infinite linear;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@-webkit-keyframes loadingCircle {
|
|
80
|
+
100% {
|
|
81
|
+
-webkit-transform: rotate(360deg);
|
|
82
|
+
transform: rotate(360deg);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes loadingCircle {
|
|
87
|
+
100% {
|
|
88
|
+
-webkit-transform: rotate(360deg);
|
|
89
|
+
transform: rotate(360deg);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`,vm=function(t){var n=I.useContext(bs),r=n.csp,i=n.prefixCls,l=n.layer,o=Cm;i&&(o=o.replace(/anticon/g,i)),l&&(o="@layer ".concat(l,` {
|
|
93
|
+
`).concat(o,`
|
|
94
|
+
}`)),I.useEffect(function(){var s=t.current,a=mm(s);pm(o,"@ant-design-icons",{prepend:!l,csp:r,attachTo:a})},[])},Em=["icon","className","onClick","style","primaryColor","secondaryColor"],nn={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function _m(e){var t=e.primaryColor,n=e.secondaryColor;nn.primaryColor=t,nn.secondaryColor=n||Is(t),nn.calculated=!!n}function Tm(){return Ze({},nn)}var Mt=function(t){var n=t.icon,r=t.className,i=t.onClick,l=t.style,o=t.primaryColor,s=t.secondaryColor,a=ks(t,Em),u=U.useRef(),c=nn;if(o&&(c={primaryColor:o,secondaryColor:s||Is(o)}),vm(u),Sm(Go(n),"icon should be icon definiton, but got ".concat(n)),!Go(n))return null;var f=n;return f&&typeof f.icon=="function"&&(f=Ze(Ze({},f),{},{icon:f.icon(c.primaryColor,c.secondaryColor)})),Wr(f.icon,"svg-".concat(f.name),Ze(Ze({className:r,onClick:i,style:l,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},a),{},{ref:u}))};Mt.displayName="IconReact";Mt.getTwoToneColors=Tm;Mt.setTwoToneColors=_m;function js(e){var t=Ns(e),n=ws(t,2),r=n[0],i=n[1];return Mt.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Am(){var e=Mt.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Im=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];js(Ur.primary);var ce=U.forwardRef(function(e,t){var n=e.className,r=e.icon,i=e.spin,l=e.rotate,o=e.tabIndex,s=e.onClick,a=e.twoToneColor,u=ks(e,Im),c=U.useContext(bs),f=c.prefixCls,p=f===void 0?"anticon":f,h=c.rootClassName,d=tm(h,p,je(je({},"".concat(p,"-").concat(r.name),!!r.name),"".concat(p,"-spin"),!!i||r.name==="loading"),n),w=o;w===void 0&&s&&(w=-1);var E=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,b=Ns(a),A=ws(b,2),S=A[0],j=A[1];return U.createElement("span",ue({role:"img","aria-label":r.name},u,{ref:t,tabIndex:w,onClick:s,className:d}),U.createElement(Mt,{icon:r,primaryColor:S,secondaryColor:j,style:E}))});ce.displayName="AntdIcon";ce.getTwoToneColor=Am;ce.setTwoToneColor=js;var Nm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},jm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Nm}))},Ps=U.forwardRef(jm);process.env.NODE_ENV!=="production"&&(Ps.displayName="ArrowLeftOutlined");var Pm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},Om=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Pm}))},Os=U.forwardRef(Om);process.env.NODE_ENV!=="production"&&(Os.displayName="ArrowUpOutlined");var Dm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"},zm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Dm}))},Jt=U.forwardRef(zm);process.env.NODE_ENV!=="production"&&(Jt.displayName="AudioOutlined");var Rm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},Mm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Rm}))},Ds=U.forwardRef(Mm);process.env.NODE_ENV!=="production"&&(Ds.displayName="CheckCircleOutlined");var Lm={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},Fm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Lm}))},Xn=U.forwardRef(Fm);process.env.NODE_ENV!=="production"&&(Xn.displayName="CloseCircleOutlined");var Bm={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},$m=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Bm}))},Yr=U.forwardRef($m);process.env.NODE_ENV!=="production"&&(Yr.displayName="CloseOutlined");var Hm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Um=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Hm}))},Gn=U.forwardRef(Um);process.env.NODE_ENV!=="production"&&(Gn.displayName="DownOutlined");var Vm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},qm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Vm}))},zs=U.forwardRef(qm);process.env.NODE_ENV!=="production"&&(zs.displayName="DownloadOutlined");var Wm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"},Ym=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Wm}))},ki=U.forwardRef(Ym);process.env.NODE_ENV!=="production"&&(ki.displayName="FileExcelOutlined");var Km={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},Xm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Km}))},Si=U.forwardRef(Xm);process.env.NODE_ENV!=="production"&&(Si.displayName="FileOutlined");var Gm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-pdf",theme:"outlined"},Jm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Gm}))},Ci=U.forwardRef(Jm);process.env.NODE_ENV!=="production"&&(Ci.displayName="FilePdfOutlined");var Qm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 00-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 00-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"}}]},name:"file-word",theme:"outlined"},Zm=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:Qm}))},vi=U.forwardRef(Zm);process.env.NODE_ENV!=="production"&&(vi.displayName="FileWordOutlined");var eg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"},tg=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:eg}))},Kr=U.forwardRef(tg);process.env.NODE_ENV!=="production"&&(Kr.displayName="HistoryOutlined");var ng={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},rg=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:ng}))},ot=U.forwardRef(rg);process.env.NODE_ENV!=="production"&&(ot.displayName="LoadingOutlined");var ig={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},og=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:ig}))},Rs=U.forwardRef(og);process.env.NODE_ENV!=="production"&&(Rs.displayName="PaperClipOutlined");var lg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"},sg=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:lg}))},Ms=U.forwardRef(sg);process.env.NODE_ENV!=="production"&&(Ms.displayName="PictureOutlined");var ag={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},ug=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:ag}))},Xr=U.forwardRef(ug);process.env.NODE_ENV!=="production"&&(Xr.displayName="PlusOutlined");var cg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zM300 328c0-33.1 26.9-60 60-60s60 26.9 60 60-26.9 60-60 60-60-26.9-60-60zm372 248c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-60c0-4.4 3.6-8 8-8h304c4.4 0 8 3.6 8 8v60zm-8-188c-33.1 0-60-26.9-60-60s26.9-60 60-60 60 26.9 60 60-26.9 60-60 60zm135 476H225c-13.8 0-25 14.3-25 32v56c0 4.4 2.8 8 6.2 8h611.5c3.4 0 6.2-3.6 6.2-8v-56c.1-17.7-11.1-32-24.9-32z"}}]},name:"robot",theme:"filled"},fg=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:cg}))},jn=U.forwardRef(fg);process.env.NODE_ENV!=="production"&&(jn.displayName="RobotFilled");var hg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},pg=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:hg}))},Ls=U.forwardRef(pg);process.env.NODE_ENV!=="production"&&(Ls.displayName="SettingOutlined");var dg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"},mg=function(t,n){return U.createElement(ce,ue({},t,{ref:n,icon:dg}))},Ei=U.forwardRef(mg);process.env.NODE_ENV!=="production"&&(Ei.displayName="ThunderboltOutlined");let Pe={};function Fs(e){Pe={...Pe,...e}}const on=()=>{const e=typeof process<"u"&&process.env&&process.env.REACT_APP_BASE_URL?process.env.REACT_APP_BASE_URL:"",t=Pe.baseUrl??e;return t&&t!=="/"?t.replace(/\/+$/,""):""},Jn=()=>Pe.token!==void 0?typeof Pe.token=="function"?Pe.token():Pe.token:sessionStorage.getItem("saas-token")||sessionStorage.getItem("saasToken")||localStorage.getItem("saas-token")||"",Qn=()=>Pe.saasAgent??"qj-pc",Qo=()=>{var e;sessionStorage.removeItem("saas-token"),sessionStorage.removeItem("saasToken"),localStorage.removeItem("saas-token"),(e=Pe.onUnauthorized)==null||e.call(Pe)},Bs=()=>{try{const e=localStorage.getItem("proappEnvLayout");if(!e)return null;const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}},gg=()=>{if(Pe.channelCode)return Pe.channelCode;const e=Bs();return e&&"channelCode"in e?String(e.channelCode??""):""},yg=()=>{if(Pe.proappEnvCode)return Pe.proappEnvCode;const e=Bs();return e?"proappEnvCode"in e?String(e.proappEnvCode??""):"proappCode"in e?String(e.proappCode??""):"":""};function Fe(e){return typeof e=="object"&&e!==null}function dt(e){return e?Array.isArray(e)?e:Fe(e)?e.data?dt(e.data):e.dataObj?dt(e.dataObj):Array.isArray(e.list)?e.list:Array.isArray(e.records)?e.records:[]:[]:[]}function xg(e){return Object.entries(e).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n==null?"":String(n))}`).join("&")}async function gt(e,t={}){const{method:n="POST",body:r}=t,i=e.startsWith("http")?e:`${on()}${e}`,l=Jn(),o=await fetch(i,{method:n,headers:{"Content-Type":"application/x-www-form-urlencoded","saas-agent":Qn(),...l?{"saas-token":l}:{}},body:r?xg(r):void 0});let s=null;try{s=await o.json()}catch{s=null}if(o.status===401)throw Qo(),new Error("未登录,请重新登录");const a=Fe(s)?s:{};if(!o.ok){const u=a.msg||a.message||a.errorMsg||a.errorMessage?String(a.msg||a.message||a.errorMsg||a.errorMessage):`请求失败: ${o.status}`;throw new Error(u)}if(a.errorCode==="nologin")throw Qo(),new Error("未登录,请重新登录");if(a.success===!1)throw new Error(String(a.msg||a.message||a.errorMsg||a.errorMessage||"操作失败"));if(a.sysRecode==="error")throw new Error(String(a.msg||a.message||a.errorMsg||a.errorMessage||"操作失败"));return s}async function bg(){const e=gg(),t=yg(),n={page:1,rows:50};e&&(n.channelCode=e),t&&(n.proappEnvCode=t);const r=await gt("/web/ag/agent/queryAgentPageForWork.json",{body:n});return dt(r)}async function Zo(e={}){const t=await gt("/web/ag/model/queryModelPageForBus.json",{body:{...e,dataState:0,modelIsActive:1}});return dt(t)}async function wg(e){const t=await gt("/web/ag/userprompt/queryUserpromptPageForBus.json",{body:{agentCode:e,page:1,rows:100,dataState:0,userpromptType:1}});return dt(t).sort((r,i)=>(Number(i.userpromptPriority)||0)-(Number(r.userpromptPriority)||0))}async function el(e={}){const t=await gt("/web/dd/falgSetting/queryFalgSettingPage.json",{body:e});return dt(t)}async function kg(e={}){return gt("/web/dd/falgSetting/saveFalgSettingByChannel.json",{method:"POST",body:e})}async function Sg(e={}){return gt("/web/dd/falgSetting/updateFalgSetting.json",{method:"POST",body:e})}async function Cg(e={}){const{agentCode:t,page:n,rows:r,sessionCode:i,orderStr:l="GMT_MODIFIED desc",url:o,...s}=e,a=o?encodeURI(o):"/web/ag/session/querySessionPageForBus.json",u={agentCode:t,orderStr:l,...s};i!=null&&i!==""&&(u.sessionCode=i),n!=null&&(u.page=n),r!=null&&(u.rows=r);const c=await gt(a,{method:"POST",body:u});return dt(c)}async function vg(e={}){const{sessionCode:t,agentCode:n,page:r=1,rows:i=100,orderStr:l="GMT_MODIFIED asc",url:o}=e,s=o?encodeURI(o):"/web/ag/chatmessage/queryChatmessagePageForBus.json",a=await gt(s,{method:"POST",body:{sessionCode:t,agentCode:n,page:r,rows:i,orderStr:l}});return dt(a)}function Gr(e,t=0){if(e==null||t>5)return"";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.map(r=>Gr(r,t+1)).filter(Boolean).join(`
|
|
95
|
+
`);if(!Fe(e))return"";const n=["content","answer","text","markdown","output","result","message","delta","choices","data","detail"];for(const r of n){const i=Gr(e[r],t+1);if(i.trim())return i}return""}function Eg(e){return Fe(e.data)?{...e,...e.data,type:e.type??e.data.type,event:e.event??e.data.event,sender:e.sender??e.data.sender,sessionCode:e.sessionCode??e.data.sessionCode}:e}function _g(e,t){const n=String(e.type??e.event??t??"").toLowerCase(),r=String(e.sender??"").toLowerCase();return!["","text","message","delta","answer","content","assistant","done"].includes(n)||n==="text"&&["user","system","tool"].includes(r)?"":Gr([e.content,e.answer,e.markdown,e.text,e.output,e.result,e.data,e.detail,e.message]).replace(/^\n+|\n+$/g,"")}function Tg(e,t){var o;const n=new AbortController,r=Jn(),i={message:e.message,agentCode:e.agentCode||"",sessionCode:e.sessionCode||null};(o=e.attachments)!=null&&o.length&&(i.attachments=e.attachments),e.modelCode&&(i.modelCode=e.modelCode);const l=e.agentTypeUrl?encodeURI(e.agentTypeUrl.startsWith("http")?e.agentTypeUrl:`${on()}${e.agentTypeUrl}`):`${on()}/web/agg/graph/stream/chat.json`;return fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream","saas-agent":Qn(),...r?{"saas-token":r}:{}},body:JSON.stringify(i),signal:n.signal}).then(async s=>{var F,v,R,W,G;if(!s.ok){let k=`请求失败: ${s.status}`;try{const T=await s.json();Fe(T)&&(T.msg||T.message)&&(k=String(T.msg||T.message))}catch{}(F=t.onError)==null||F.call(t,new Error(k)),(v=t.onFinished)==null||v.call(t,{success:!1});return}if(!s.body){(R=t.onError)==null||R.call(t,new Error("浏览器不支持流式响应")),(W=t.onFinished)==null||W.call(t,{success:!1});return}const a=s.body.getReader(),u=new TextDecoder;let c="",f=null,p=null,h=!1,d=!1,w=!1,E="";const b=(k,T=!0)=>{var P,V;d||(d=!0,k&&T&&((P=t.onDone)==null||P.call(t,{sessionCode:p})),(V=t.onFinished)==null||V.call(t,{sessionCode:p,success:k}))},A=(k,T=!1)=>{var se,ae,ne,Ie,g,me,pe;const P=Eg(k);if(w=!0,P.sessionCode&&(p=String(P.sessionCode)),P.success===!1){h=!0,(se=t.onMessage)==null||se.call(t,{text:"",errorMsg:String(P.msg||P.message||"请求失败"),sessionCode:p});return}const V=String(P.type||"").toLowerCase(),ee=String(P.sender||"").toLowerCase(),B=_g(P,T?f:void 0);if(V==="error"||f==="error"){h=!0,(ae=t.onMessage)==null||ae.call(t,{text:"",errorMsg:B||String(P.msg||P.message||"请求异常"),sessionCode:p});return}if(V==="thinking"&&B){(ne=t.onMessage)==null||ne.call(t,{text:"",thinking:B,sessionCode:p});return}if(V==="tool_call"){(Ie=t.onMessage)==null||Ie.call(t,{text:"",isToolCall:!0,toolCall:String(P.toolName||P.name||P.tool||P.toolCallName||"工具调用"),toolCallContent:P.content??P.input??P.arguments??"",sessionCode:p});return}if(V==="tool_result"){(g=t.onMessage)==null||g.call(t,{text:"",toolResult:P.toolResult??P.result??P.content,sessionCode:p});return}if(V==="file_download"){(me=t.onMessage)==null||me.call(t,{text:"",sessionCode:p,fileDownload:{toolName:P.toolName,fileCode:P.fileCode,fileName:P.fileName,fileSize:P.fileSize,mimeType:P.mimeType,downloadUrl:P.downloadUrl,ossUrl:P.ossUrl,content:P.content}});return}B&&!(V==="text"&&["user","system","tool"].includes(ee))&&((pe=t.onMessage)==null||pe.call(t,{text:B,sessionCode:p})),V==="done"&&b(!h)},S=k=>{if(!k||k==="[DONE]"){k==="[DONE]"&&b(!h);return}let T;try{T=JSON.parse(k)}catch{return}Fe(T)&&A(T,!0)},j=async()=>{let k=!0;for(;k;){const{done:V,value:ee}=await a.read();if(V){k=!1;break}const B=u.decode(ee,{stream:!0});E+=B,c+=B;const se=c.split(`
|
|
96
|
+
`);c=se.pop()||"";for(const ae of se){const ne=ae.trim();if(ne&&!ne.startsWith(":")){if(ne.startsWith("event:")){f=ne.slice(6).trim();continue}ne.startsWith("data:")&&S(ne.slice(5).trim())}}}const T=u.decode();T&&(c+=T);const P=c.trim();P.startsWith("data:")&&S(P.slice(5).trim())};try{if(await j(),!w&&!h&&E.trim())try{const k=JSON.parse(E);Fe(k)&&A(k)}catch{}b(!h)}catch(k){k.name!=="AbortError"&&((G=t.onError)==null||G.call(t,k),b(!1,!1))}}).catch(s=>{var a,u;s.name!=="AbortError"&&((a=t.onError)==null||a.call(t,s),(u=t.onFinished)==null||u.call(t,{success:!1}))}),n}async function Ag(e){const t=Jn(),n=new FormData;e.forEach(s=>n.append("files",s)),n.append("bizType","FILE_02");const r=await fetch(`${on()}/web/agg/graph/upload.json`,{method:"POST",headers:{"saas-agent":Qn(),...t?{"saas-token":t}:{}},body:n});if(!r.ok){let s=`上传失败: ${r.status}`;try{const a=await r.json();s=String((a==null?void 0:a.msg)||(a==null?void 0:a.message)||s)}catch{}throw new Error(s)}const i=await r.json(),l=Fe(i)?i.files:[];return Array.isArray(l)?l:[l]}async function Ig(e){const{agentCode:t,base64Data:n,audioUrl:r,mimeType:i}=e,l=Jn();return new Promise((o,s)=>{fetch(`${on()}/web/agg/graph/asr/transcribe.json`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream","saas-agent":Qn(),...l?{"saas-token":l}:{}},body:JSON.stringify({agentCode:t,mimeType:i,...n?{base64Data:n}:{},...r?{audioUrl:r}:{}})}).then(async a=>{var A;if(!a.ok){let S=`语音识别失败: ${a.status}`;try{const j=await a.json();S=String((j==null?void 0:j.msg)||(j==null?void 0:j.message)||S)}catch{}throw new Error(S)}if(!(a.headers.get("content-type")||"").includes("text/event-stream")){const S=await a.json().catch(()=>null);if(Fe(S)&&S.success===!1)throw new Error(String(S.msg||S.message||"语音识别失败"));o(String((Fe(S)?S.content??S.data:null)??""));return}const c=(A=a.body)==null?void 0:A.getReader();if(!c){o("");return}const f=new TextDecoder;let p="",h=null,d="",w="",E=!1;await(async()=>{let S=!1;for(;!S;){const{done:j,value:F}=await c.read();if(S=j,j)break;const v=f.decode(F,{stream:!0});w+=v,p+=v;const R=p.split(/\r?\n/);p=R.pop()||"";for(const W of R){const G=W.trim();if(!G||G.startsWith(":"))continue;if(G.startsWith("event:")){h=G.slice(6).trim();continue}if(!G.startsWith("data:"))continue;const k=G.slice(5).trim();if(!k||k==="[DONE]")continue;let T;try{T=JSON.parse(k)}catch{continue}if(Fe(T)){if(E=!0,T.success===!1)throw new Error(String(T.msg||T.message||"语音识别失败"));if(T.type==="error"||h==="error")throw new Error(String(T.content||T.msg||T.message||"语音识别失败"));if(T.content&&(d=String(T.content)),T.type==="done"){o(d);return}}}}if(!E&&w.trim())try{const j=JSON.parse(w);if(Fe(j)&&j.success===!1)throw new Error(String(j.msg||j.message||"语音识别失败"));o(String((Fe(j)?j.content??j.data:null)??""))}catch{}o(d)})()}).catch(a=>{a.name!=="AbortError"&&s(a)})})}const Dt=60,ve=24,Ng=380,jg=600,Pg=()=>({x:window.innerWidth-Dt-ve,y:window.innerHeight-Dt-ve}),Jr=e=>({x:Math.min(Math.max(ve,e.x),window.innerWidth-Dt-ve),y:Math.min(Math.max(ve,e.y),window.innerHeight-Dt-ve)}),Og=e=>{const t=Jr(e),r=t.x+Dt/2<window.innerWidth/2?"left":"right";return{position:{x:r==="left"?ve:window.innerWidth-Dt-ve,y:t.y},side:r}},$s=()=>({width:Math.min(Ng,window.innerWidth-2*ve),height:Math.min(jg,window.innerHeight-2*ve)}),tl=e=>{const{width:t,height:n}=$s();return{x:e==="right"?window.innerWidth-t-ve:ve,y:window.innerHeight-n-ve}},vr=e=>{const{width:t,height:n}=$s();return{x:Math.min(Math.max(ve,e.x),window.innerWidth-t-ve),y:Math.min(Math.max(ve,e.y),window.innerHeight-n-ve)}},nl=e=>{const[t,n]=I.useState(!1),r=I.useRef(null),i=I.useRef(e);return i.current=e,I.useEffect(()=>{if(!t)return;const o=a=>{const u=r.current;if(!u)return;const c=a.clientX-u.startX,f=a.clientY-u.startY;!u.moved&&(Math.abs(c)>5||Math.abs(f)>5)&&(u.moved=!0),u.lastX=u.originX+c,u.lastY=u.originY+f,i.current.onMove({x:u.lastX,y:u.lastY})},s=()=>{const a=r.current;a&&i.current.onEnd({x:a.lastX,y:a.lastY},a.moved),r.current=null,n(!1)};return window.addEventListener("pointermove",o),window.addEventListener("pointerup",s),window.addEventListener("pointercancel",s),()=>{window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s)}},[t]),{dragging:t,onPointerDown:o=>{const s=i.current.getOrigin();r.current={startX:o.clientX,startY:o.clientY,originX:s.x,originY:s.y,lastX:s.x,lastY:s.y,moved:!1},n(!0),o.preventDefault()}}},Nt=e=>e.filter(t=>t.type==="text").map(t=>t.content||"").join(""),Pn=e=>{if(e==null)return"";if(typeof e=="string"){const t=e.trim();if(!t)return"";if(t.startsWith("{")||t.startsWith("["))try{return Pn(JSON.parse(t))}catch{return t}return t}if(Array.isArray(e))return e.map(Pn).filter(Boolean).join(`
|
|
97
|
+
`);if(typeof e=="object"){const t=e,n=["text","content","answer","markdown","html","output","result","data","detail","goodsDetail","productDetail","message"];for(const r of n){const i=Pn(t[r]);if(i)return i}return St(e)}return String(e)},Er=(e,t)=>{e&&window.dispatchEvent(new CustomEvent("nebula-ai:result",{detail:{source:e.source,target:e.target,text:t.text||"",files:t.files||[],success:!!t.success,error:t.error||""}}))},Gt=e=>e.map(t=>t.type==="thinking"?{...t,loading:!1,streaming:!1}:t);function St(e){if(e==null)return"";if(typeof e!="string")try{return JSON.stringify(e,null,2)}catch{return String(e)}const t=e.trim();if(!t)return"";try{return JSON.stringify(JSON.parse(t),null,2)}catch{return e}}function Dg(e){if(e==null||e==="")return"";const t=Number(e);return!Number.isFinite(t)||t<0?"":t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)} MB`:`${(t/1024/1024/1024).toFixed(1)} GB`}const _i=(...e)=>{for(const t of e)if(typeof t=="string"&&t.trim())return t.trim();return""},Hs=e=>typeof e=="string"?e:_i(e.userpromptName,e.userpromptContent,e.promptContent,e.content,e.title,e.name),zg=e=>typeof e=="string"?e:_i(e.userpromptSystemPrompt)||Hs(e),Ln=e=>e.replace(/^\w/,t=>t.toUpperCase()),rl=e=>{const t=String(e||"").trim();return t?`${t.slice(0,6)}••••••••`:"未配置"},Rg=e=>{if(e==null||e==="")return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=new Date,r=n.getTime()-t.getTime(),i=60*1e3,o=24*(60*i);if(r<i)return"刚刚";const s=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),a=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u=Math.round((s-a)/o);if(u<=0)return"今天";if(u===1)return"昨天";if(u<7)return`${u} 天前`;const c=t.getFullYear(),f=String(t.getMonth()+1).padStart(2,"0"),p=String(t.getDate()).padStart(2,"0"),h=String(t.getHours()).padStart(2,"0"),d=String(t.getMinutes()).padStart(2,"0");return`${c}-${f}-${p} ${h}:${d}`},Mg=e=>e.gmtModified??e.updateTime??e.gmtCreate??e.createTime??e.createDate,Lg=e=>e.chatmessageCreateTime??e.chatmessageGmtCreate??e.createTime??e.createDate??e.gmtCreate??e.gmtModified??e.updateTime,Fg=e=>{if(e==null||e==="")return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),i=new Date,l=new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime(),o=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),s=Math.round((l-o)/(24*3600*1e3));return s<=0?`${n}:${r}`:s===1?`昨天 ${n}:${r}`:t.getFullYear()===i.getFullYear()?`${t.getMonth()+1}月${t.getDate()}日 ${n}:${r}`:`${t.getFullYear()}年${t.getMonth()+1}月${t.getDate()}日 ${n}:${r}`},An=(e,t,n)=>{for(let r=0;r<n.length;r+=1)e.setUint8(t+r,n.charCodeAt(r))},il=(e,t)=>{const n=e.reduce((o,s)=>o+s.length,0),r=new ArrayBuffer(44+n*2),i=new DataView(r);An(i,0,"RIFF"),i.setUint32(4,36+n*2,!0),An(i,8,"WAVE"),An(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,t,!0),i.setUint32(28,t*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),An(i,36,"data"),i.setUint32(40,n*2,!0);let l=0;return e.forEach(o=>{for(let s=0;s<o.length;s+=1){const a=Math.max(-1,Math.min(1,o[s])),u=a<0?a*32768:a*32767;i.setInt16(44+l,u,!0),l+=2}}),new Blob([i],{type:"audio/wav"})},Bg=e=>{const t=e.reduce((i,l)=>i+l.length,0),n=new Float32Array(t);let r=0;return e.forEach(i=>{n.set(i,r),r+=i.length}),n},ol=(e,t)=>{let n=0,r=0,i=0;if(e.forEach(s=>{n+=s.length;for(let a=0;a<s.length;a+=1){const u=s[a],c=Math.abs(u);c>i&&(i=c),r+=u*u}}),n===0)return!1;const l=n/t,o=Math.sqrt(r/n);return l>=.4&&i>.03&&o>.008},$g=e=>new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{const i=r.result||"";t(String(i).split(",")[1]||"")},r.onerror=()=>n(r.error||new Error("音频编码失败")),r.readAsDataURL(e)}),Hg=e=>{const t=[];let n=null;const r=i=>{try{const l=i.chatmessageMetadata,o=typeof l=="string"?JSON.parse(l):l;return o&&typeof o=="object"?o:null}catch{return null}};return e.forEach((i,l)=>{const o=String(i.chatmessageContent??""),s=String(i.chatmessageType??i.type??"TEXT").toUpperCase(),c=String(i.chatmessageRole??"").toUpperCase()==="ASSISTANT"||(s==="TOOL_CALL"||s==="TOOL_RESULT"||s==="THINKING"||s==="ERROR")?"assistant":"user",f=String(i.msgId??i.id??`history-${l}`),p=Lg(i);if(c==="user"){n=null,t.push({id:f,role:"user",content:o,blocks:[],time:p});return}n||(n={id:f,role:"assistant",content:"",blocks:[],time:p},t.push(n));const h=n.blocks||(n.blocks=[]);if(s==="THINKING"){const d=h[h.length-1];(d==null?void 0:d.type)==="thinking"?h[h.length-1]={...d,content:`${d.content||""}${o}`}:h.push({type:"thinking",content:o});return}if(s==="TOOL_CALL"){const d=r(i),w=String(i.chatmessageToolName??i.toolName??(d==null?void 0:d.toolName)??(d==null?void 0:d.name)??"工具调用"),E=(d==null?void 0:d.input)??(d==null?void 0:d.arguments)??(d==null?void 0:d.toolCallContent)??o;h.push({type:"toolCall",toolName:w,input:String(E??""),result:null});return}if(s==="TOOL_RESULT"){const d=r(i),w=(d==null?void 0:d.toolResult)??(d==null?void 0:d.result)??(d==null?void 0:d.content)??o;let E=-1;for(let b=h.length-1;b>=0;b-=1)if(h[b].type==="toolCall"&&h[b].result==null){E=b;break}E>=0?h[E]={...h[E],result:String(w??"")}:h.push({type:"toolCall",toolName:"工具调用",input:"",result:String(w??"")});return}if(s==="ERROR"){h.push({type:"error",content:o});return}h.push({type:"text",content:o})}),t.map(i=>{if(i.role==="assistant"&&Array.isArray(i.blocks)){const l=i.blocks.filter(o=>o.type==="text").map(o=>o.content||"").join(`
|
|
98
|
+
`);return{...i,content:l}}return i})},Ug=e=>{if(!e)return[];if(Array.isArray(e))return e.map(t=>String(t??"").trim()).filter(Boolean);if(typeof e=="string"){const t=e.trim();if(!t)return[];if(t.startsWith("["))try{const n=JSON.parse(t);if(Array.isArray(n))return n.map(r=>String(r??"").trim()).filter(Boolean)}catch{}return t.split(",").map(n=>n.trim()).filter(Boolean)}return[String(e)]},_r=(e,t)=>e.find(n=>String(n.agentCode||"")===String(t||""))||null,ll=e=>{const t=new Map;e.filter(l=>l.modelIsActive!==!1).forEach(l=>{var s;const o=String(l.modelBradnCode||"");t.has(o)||t.set(o,[]),(s=t.get(o))==null||s.push({model:l})});const n=Array.from(t.entries()),r=n.filter(([l])=>!l);return[...n.filter(([l])=>l),...r].map(([l,o])=>({label:o.map(s=>s.model.modelBradnName).find(Boolean)||l||"其他",options:o.map(({model:s})=>({value:s.modelCode||"",label:m.jsxs("span",{className:"chatbot-model-option",children:[m.jsx("span",{className:"chatbot-model-option__icon",children:m.jsx(Ei,{})}),m.jsxs("span",{className:"chatbot-model-option__text",children:[m.jsx("span",{className:"chatbot-model-option__name",children:Ln(s.modelProvider||s.modelCode||"")}),m.jsx("span",{className:"chatbot-model-option__code",children:Ln(s.modelName||"")})]}),s.default?m.jsx("span",{className:"chatbot-model-option__tag",children:"默认"}):null]})}))}))},Vg=({block:e})=>{const[t,n]=I.useState(!0);return e.loading?m.jsxs("div",{className:"chatbot-block chatbot-thinking chatbot-thinking--loading",children:[m.jsx(ot,{spin:!0}),m.jsx("span",{children:"思考中"})]}):e.content?m.jsxs("div",{className:`chatbot-block chatbot-thinking${t?" is-open":""}`,children:[m.jsxs("button",{type:"button",className:"chatbot-thinking__head",onClick:()=>n(r=>!r),children:[m.jsx(Gn,{className:`chatbot-thinking__arrow${t?"":" is-closed"}`}),m.jsx("span",{children:e.streaming?"思考中":"思考完成"})]}),t&&m.jsx("div",{className:"chatbot-thinking__body",children:e.content})]}):null},qg=({block:e})=>{const[t,n]=I.useState(!1),r=e.result==null,i=!r&&!!e.result&&(e.result.startsWith("Error:")||e.result.startsWith("错误")),l=St(e.input).replace(/\s+/g," ").slice(0,60);return m.jsxs("div",{className:`chatbot-block chatbot-tool${r?" is-running":""}${i?" is-error":""}`,children:[m.jsxs("button",{type:"button",className:"chatbot-tool__head",onClick:()=>n(o=>!o),children:[r?m.jsx(ot,{spin:!0,className:"chatbot-tool__icon"}):i?m.jsx(Xn,{className:"chatbot-tool__icon chatbot-tool__icon--error"}):m.jsx(Ds,{className:"chatbot-tool__icon chatbot-tool__icon--ok"}),m.jsx("span",{className:"chatbot-tool__name",children:e.toolName||"工具调用"}),m.jsx("span",{className:"chatbot-tool__status",children:r?"执行中":l||"完成"}),m.jsx(Gn,{className:`chatbot-tool__arrow${t?" is-open":""}`})]}),t&&m.jsxs("div",{className:"chatbot-tool__body",children:[m.jsx("div",{className:"chatbot-tool__label",children:"参数"}),m.jsx("pre",{className:"chatbot-tool__pre",children:St(e.input)||"(无参数)"}),!r&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"chatbot-tool__label",children:"结果"}),m.jsx("pre",{className:`chatbot-tool__pre${i?" is-error-text":""}`,children:St(e.result)})]})]})]})},Wg=({block:e})=>{const{fileName:t,downloadUrl:n,fileSize:r,mimeType:i,desc:l}=e,o=n?n.startsWith("http")?n:`${window.location.origin}${n}`:"",s=i||"",a=s==="application/pdf"||(t==null?void 0:t.endsWith(".pdf")),u=s.includes("spreadsheet")||s.includes("excel")||!!(t!=null&&t.match(/\.xlsx?$/i)),c=s.includes("word")||!!(t!=null&&t.match(/\.docx?$/i)),f=a?Ci:u?ki:c?vi:Si,p=a?"#ff4d4f":u?"#52c41a":c?"#1677ff":"#8c95a8";return m.jsxs("div",{className:"chatbot-block chatbot-file",children:[m.jsx("span",{className:"chatbot-file__icon",style:{color:p},children:m.jsx(f,{})}),m.jsxs("div",{className:"chatbot-file__info",children:[m.jsx("span",{className:"chatbot-file__name",children:t||"未命名文件"}),r!=null&&r!==""&&m.jsx("span",{className:"chatbot-file__size",children:Dg(r)}),l&&m.jsx("span",{className:"chatbot-file__desc",children:l})]}),o&&m.jsx("a",{className:"chatbot-file__btn",href:o,download:t||"",rel:"noopener","aria-label":"下载",children:m.jsx(zs,{})})]})},Yg=({block:e})=>m.jsxs("div",{className:"chatbot-block chatbot-error",children:[m.jsx(Xn,{}),m.jsx("span",{children:e.content})]}),Kg=({code:e,lang:t})=>{const[n,r]=I.useState(!1),i=()=>{var l;(l=navigator.clipboard)==null||l.writeText(e).then(()=>{r(!0),window.setTimeout(()=>r(!1),2500)}).catch(()=>{})};return m.jsxs("div",{className:"chatbot-code-block",children:[m.jsxs("div",{className:"chatbot-code-block__header",children:[m.jsx("span",{children:t||"text"}),m.jsx("button",{type:"button",className:"chatbot-code-block__copy",onClick:i,children:n?"已复制":"复制"})]}),m.jsx("pre",{className:"chatbot-code-block__body",children:m.jsx("code",{children:e})})]})},Xg={pre:({children:e})=>{var l,o;const n=Array.isArray(e)?e[0]:e,r=/language-(\w+)/.exec(((l=n==null?void 0:n.props)==null?void 0:l.className)||""),i=String(((o=n==null?void 0:n.props)==null?void 0:o.children)??"").replace(/\n$/,"");return m.jsx(Kg,{code:i,lang:r?r[1]:"text"})},a:({href:e,children:t})=>e?m.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer nofollow",children:t}):m.jsx(m.Fragment,{children:t})},Us=({text:e})=>e?m.jsx("div",{className:"chatbot-markdown",children:m.jsx(wh,{remarkPlugins:[Wd],components:Xg,children:e})}):null,Gg=({blocks:e})=>!e||e.length===0?null:m.jsx("div",{className:"chatbot-blocks",children:e.map((t,n)=>t.type==="thinking"?m.jsx(Vg,{block:t},`t-${n}`):t.type==="text"?m.jsx(Us,{text:t.content||""},`x-${n}`):t.type==="toolCall"?m.jsx(qg,{block:t},`c-${n}`):t.type==="file"?m.jsx(Wg,{block:t},`f-${n}`):t.type==="error"?m.jsx(Yg,{block:t},`e-${n}`):null)}),sl=(e,t,n)=>{const r=n||t||"",i=r.startsWith("image/"),l=r==="application/pdf"||!!(e!=null&&e.endsWith(".pdf")),o=r.includes("spreadsheet")||r.includes("excel")||!!(e!=null&&e.match(/\.xlsx?$/i)),s=r.includes("word")||!!(e!=null&&e.match(/\.docx?$/i));return{isImage:i,icon:i?m.jsx(Ms,{}):l?m.jsx(Ci,{}):o?m.jsx(ki,{}):s?m.jsx(vi,{}):m.jsx(Si,{}),color:i?"#1677ff":l?"#ff4d4f":o?"#52c41a":s?"#1677ff":"#8c95a8"}},Vs=({apiConfig:e})=>{const[t,n]=I.useState(!1),[r,i]=I.useState(!1),[l,o]=I.useState("right"),[s,a]=I.useState(Pg),[u,c]=I.useState(()=>tl("right")),[f,p]=I.useState([]),[h,d]=I.useState(!0),[w,E]=I.useState([]),[b,A]=I.useState([]),[S,j]=I.useState([]),[F,v]=I.useState(!1),[R,W]=I.useState(""),[G,k]=I.useState(""),[T,P]=I.useState(""),[V,ee]=I.useState(""),[B,se]=I.useState(""),[ae,ne]=I.useState(null),[Ie,g]=I.useState([]),[me,pe]=I.useState(""),[y,ge]=I.useState(!1),[Be,le]=I.useState([]),[Ge,Ve]=I.useState(!1),[ye,qe]=I.useState(!1),[We,_t]=I.useState(!1),[cn,fn]=I.useState(0),[Lt,Tt]=I.useState(""),[At,st]=I.useState(""),[Zn,tt]=I.useState(!1),[hn,pn]=I.useState("未配置"),[Je,Ft]=I.useState(""),[er,Bt]=I.useState(!1),[C,O]=I.useState(""),[$,q]=I.useState(!1),[Ee,re]=I.useState(!1),[xe,ke]=I.useState(!1),[nt,at]=I.useState([]),[yt,$t]=I.useState(!1),[Ht,_e]=I.useState(null),[ut,Oe]=I.useState(!1),[xt,Ti]=I.useState(!1),[dn,qs]=I.useState(!1),[Ws,Ai]=I.useState(0),Ii=I.useRef(null),tr=I.useRef(null),nr=I.useRef(null),Ni=I.useRef(null),ct=I.useRef(null),rr=I.useRef(null),ir=I.useRef(""),mn=I.useRef(null),rt=I.useRef(null),gn=I.useRef(null),yn=I.useRef(null),It=I.useRef([]),Ut=I.useRef(!1),xn=I.useRef(0),bn=I.useRef(Je);bn.current=Je;const ji=I.useRef(R);ji.current=R;const Pi=I.useRef(()=>{}),it=I.useRef(null),$e=I.useRef(null),Vt=I.useRef(0),or=I.useRef(""),lr=I.useRef(""),Oi=I.useRef(""),Di=I.useRef(""),wn=I.useRef([]),He=_r(f,R),Ys=(He==null?void 0:He.agentName)||"星云 AI 助手",Ks=_i(He==null?void 0:He.agentTags)||"你好,今天有哪些运营任务需要处理?",zi=(He==null?void 0:He.agentDescription)||"我可以帮你生成商品标题、详情,识别供应商和合同信息,并回填到对应表单。";I.useEffect(()=>{const x=Ii.current;x&&(x.scrollTop=x.scrollHeight)},[Ie,y,t]),I.useEffect(()=>{if(xt)return;const x=nr.current;x&&qs(x.scrollHeight-x.clientHeight>1)},[zi,xt,t]),I.useEffect(()=>{Ti(!1),Ai(0)},[R]);const Ri=()=>{if(dn){if(!xt){const x=nr.current;Ai(x?x.scrollHeight:600)}Ti(x=>!x)}};I.useEffect(()=>{const x=()=>{a(_=>Jr(_)),c(_=>vr(_))};return window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),I.useEffect(()=>{const x=_=>{var M;const D=_.detail||{};n(!0),i(!1),ct.current&&(window.clearTimeout(ct.current),ct.current=null),D.newChat&&(Vt.current+=1,(M=$e.current)==null||M.abort(),$e.current=null,g([]),ne(null),Oe(!1),ke(!1),tt(!1),pe(""),le([]),ge(!1)),D.source&&(it.current={source:D.source,target:D.target}),D.prompt&&(pe(D.prompt),D.autoSend&&window.setTimeout(()=>{if(!ji.current){const Y=it.current;Y&&(Er(Y,{text:"",files:[],success:!1,error:"智能体加载中,请稍后再试"}),it.current=null),te.message.warning("智能体加载中,请稍后再试");return}Pi.current(D.prompt,!0)},300))};return window.addEventListener("nebula-ai:open",x),()=>window.removeEventListener("nebula-ai:open",x)},[]),I.useEffect(()=>()=>{var x;ct.current&&window.clearTimeout(ct.current),(x=$e.current)==null||x.abort()},[]);const Mi=()=>{d(!0),bg().then(x=>{p(x);const _=x.find(D=>D.agentCode)||x[0];_!=null&&_.agentCode&&(W(_.agentCode),k(typeof _.agenttypeUrl=="string"?_.agenttypeUrl:""),P(typeof _.agenttypeUrl1=="string"?_.agenttypeUrl1:""),ee(typeof _.agenttypeUrl2=="string"?_.agenttypeUrl2:""))}).catch(()=>{}).finally(()=>d(!1))};I.useEffect(()=>{e&&Fs(e),Mi()},[e]),I.useEffect(()=>{Zo().then(x=>{if(A(x),!bn.current){const _=x.find(D=>D.modelCode)||x[0];_!=null&&_.modelCode&&Ft(_.modelCode)}}).catch(()=>{})},[]),I.useEffect(()=>{el({flagSettingType:"agent",flagSettingCode:"agent_global_setting"}).then(x=>{const _=x[0];if(!_)return;rr.current=_;const D=_.flagSettingInfo;let M={};if(typeof D=="string")try{M=JSON.parse(D)}catch{M={}}else D&&typeof D=="object"&&(M=D);const Y=String(M.agentApikey??"");ir.current=Y,pn(Y?rl(Y):"未配置");const X=String(M.modelCode??"");X&&Ft(X)}).catch(()=>{})},[]),I.useEffect(()=>{if(!xe)return;let x=!1;return $t(!0),Cg({agentCode:R||void 0,page:1,rows:50,url:T||void 0}).then(_=>{x||at(_||[])}).catch(()=>{x||at([])}).finally(()=>{x||$t(!1)}),()=>{x=!0}},[xe,R,T]),I.useEffect(()=>{const x=_r(f,R),_=Ug(x==null?void 0:x.agentModelTypes);let D=!1;return Zo(_.length>0?{modelType:_.join(",")}:{}).then(M=>{if(D)return;E(M);let Y=x!=null&&x.modelCode?M.find(X=>X.modelCode===x.modelCode):void 0;!Y&&bn.current&&(Y=M.find(X=>X.modelCode===bn.current)),Y||(Y=M.find(X=>X.default)||M[0]),Y!=null&&Y.modelCode&&se(Y.modelCode)}).catch(()=>{D||E([])}),()=>{D=!0}},[R,f]),I.useEffect(()=>{if(!R){j([]),v(!1);return}let x=!1;return v(!0),wg(R).then(_=>{x||j(_||[])}).catch(()=>{x||j([])}).finally(()=>{x||v(!1)}),()=>{x=!0}},[R]),I.useEffect(()=>{if(!ye){fn(0);return}const x=window.setInterval(()=>fn(_=>_+1),1e3);return()=>window.clearInterval(x)},[ye]),I.useEffect(()=>()=>{var x,_,D;(x=mn.current)==null||x.getTracks().forEach(M=>M.stop()),(_=gn.current)==null||_.disconnect(),(D=yn.current)==null||D.disconnect(),rt.current&&rt.current.state!=="closed"&&rt.current.close().catch(()=>{})},[]);const Li=nl({getOrigin:()=>s,onMove:x=>a(Jr(x)),onEnd:(x,_)=>{if(!_)it.current=null,c(tl(l)),n(!0);else{const D=Og(x);a(D.position),o(D.side)}}}),Xs=nl({getOrigin:()=>u,onMove:x=>c(vr(x)),onEnd:x=>c(vr(x))}),Gs=()=>{it.current=null,i(!0),ct.current&&window.clearTimeout(ct.current),ct.current=window.setTimeout(()=>{n(!1),i(!1)},220)},Fi=()=>{var x;Vt.current+=1,(x=$e.current)==null||x.abort(),$e.current=null,g([]),ne(null),Oe(!1),ke(!1),tt(!1),pe(""),le([]),ge(!1),it.current=null},Js=x=>{le(_=>_.filter((D,M)=>M!==x))},Qs=()=>{var x;return(x=Ni.current)==null?void 0:x.click()},Zs=async x=>{const _=Array.from(x),D=_.map(M=>({name:M.name,size:M.size,type:M.type,uploading:!0}));le(M=>[...M,...D]);try{const M=await Ag(_);le(Y=>Y.map(X=>{if(X.uploading){const fe=M.find(be=>be.fileName===X.name);if(fe){const be=String(fe.ossUrl||""),Ne=be.startsWith("http")?be:`${window.location.origin}${be}`;return{...X,uploading:!1,ossUrl:be,url:Ne,type:fe.mimeType||X.type,mimeType:fe.mimeType||X.type}}}return X}))}catch(M){te.message.error(M.message||"文件上传失败"),le(Y=>Y.filter(X=>!X.uploading))}},ea=x=>{const{files:_}=x.target;_!=null&&_.length&&Zs(Array.from(_)),x.target.value=""},kn=()=>{var x,_,D;(x=mn.current)==null||x.getTracks().forEach(M=>M.stop()),(_=gn.current)==null||_.disconnect(),(D=yn.current)==null||D.disconnect(),rt.current&&rt.current.state!=="closed"&&rt.current.close().catch(()=>{}),mn.current=null,gn.current=null,yn.current=null,rt.current=null},Bi=()=>{if(Ge){xn.current+=1,Ut.current=!1,qe(!1),_t(!1),kn(),Ve(!1);return}Tt(""),st(""),Ve(!0)},ta=async()=>{var _;if(ye||We)return;st(""),Tt(""),xn.current+=1;const x=window.AudioContext||window.webkitAudioContext;if(!((_=navigator.mediaDevices)!=null&&_.getUserMedia)||!x){te.message.error("当前浏览器不支持语音输入");return}try{const D=await navigator.mediaDevices.getUserMedia({audio:!0});if(!Ut.current){D.getTracks().forEach(fe=>fe.stop());return}mn.current=D;const M=new x,Y=M.createMediaStreamSource(D),X=M.createScriptProcessor(4096,1,1);It.current=[],X.onaudioprocess=fe=>{const be=fe.inputBuffer.getChannelData(0);It.current.push(new Float32Array(be))},Y.connect(X),X.connect(M.destination),rt.current=M,gn.current=Y,yn.current=X,qe(!0)}catch{te.message.error("无法访问麦克风,请检查浏览器权限"),qe(!1),kn()}},na=async(x,_={})=>{const{durationSeconds:D=0,audioChunks:M=[],sampleRate:Y=48e3}=_,X=x.type||"audio/wav",fe=10,be=async Ne=>{const De=await $g(Ne);return Ig({agentCode:R,base64Data:De,mimeType:X})};if(D>fe&&M.length>0){const Ne=Bg(M),De=Math.floor(Y*fe),Ye=[];for(let Me=0;Me<Ne.length;Me+=De){const qt=Ne.subarray(Me,Math.min(Me+De,Ne.length));if(!ol([qt],Y))continue;const z=il([qt],Y);if(z.size<=44)continue;const he=new File([z],`voice-chunk-${Me}.wav`,{type:"audio/wav"}),Z=await be(he);Z&&Ye.push(Z)}return Ye.join(`
|
|
99
|
+
`)}return be(x)},$i=async()=>{var _;if(!ye)return;const x=xn.current;qe(!1),_t(!0);try{const D=((_=rt.current)==null?void 0:_.sampleRate)||48e3,M=It.current.reduce((De,Ye)=>De+Ye.length,0),Y=D?M/D:cn,X=il(It.current,D),fe=ol(It.current,D);if(kn(),!fe||X.size<=44){st("没有检测到语音内容");return}const be=new File([X],`voice-${Date.now()}.wav`,{type:"audio/wav"}),Ne=await na(be,{durationSeconds:Y,audioChunks:It.current,sampleRate:D});if(x!==xn.current)return;Ne?(Tt(Ne),pe(De=>De?`${De} ${Ne}`:Ne)):st("未识别到语音内容")}catch(D){st(D.message||"语音识别失败")}finally{_t(!1),kn()}},sr=(x,_=!1)=>{var qt;const D=(x??me).trim(),M=Be.filter(z=>z.ossUrl&&!z.uploading),Y=Be.some(z=>z.uploading);if(!D&&M.length===0||y&&!_)return;if(Y){te.message.info("文件上传中,请稍候");return}if(!R){te.message.warning("请先选择智能体");return}const X=D||(M.length>0?"[文件]":"");g(z=>[...z,{id:`u-${Date.now()}`,role:"user",content:X,files:M.length>0?M:void 0}]);const fe=`a-${Date.now()}`;g(z=>[...z,{id:fe,role:"assistant",content:"",blocks:[]}]),pe(""),le([]),ge(!0),or.current="",lr.current="",Oi.current="",Di.current="",wn.current=[];const be=M.map(z=>{const he=z.mimeType||z.type||"";return{type:he.startsWith("image/")?"image":he.startsWith("audio/")?"audio":he.startsWith("video/")?"video":"file",mimeType:he,url:z.url||z.ossUrl||"",name:z.name||"",fileSize:z.size??""}});(qt=$e.current)==null||qt.abort();const Ne=Vt.current+1;Vt.current=Ne;const De=()=>Vt.current===Ne;let Ye=!1,Me=null;$e.current=Tg({message:D,agentCode:R,sessionCode:ae,modelCode:B,agentTypeUrl:G,attachments:be.length>0?be:void 0},{onMessage:z=>{if(De()){if(z.sessionCode&&ne(z.sessionCode),z.errorMsg&&(Ye=!0),z.text&&(lr.current+=z.text,or.current=lr.current),z.toolResult!==void 0&&z.toolResult!==null&&(Oi.current=Pn(z.toolResult)),z.fileDownload){typeof z.fileDownload.content=="string"&&z.fileDownload.content.trim()&&(Di.current=z.fileDownload.content.trim());const he=typeof z.fileDownload.ossUrl=="string"&&z.fileDownload.ossUrl?z.fileDownload.ossUrl:typeof z.fileDownload.downloadUrl=="string"?z.fileDownload.downloadUrl:"",Z=he?he.startsWith("http")?he:`${window.location.origin}${he}`:"";Z&&wn.current.push({url:Z,name:typeof z.fileDownload.fileName=="string"?z.fileDownload.fileName:void 0,mimeType:typeof z.fileDownload.mimeType=="string"?z.fileDownload.mimeType:void 0})}g(he=>he.map(Z=>{if(Z.id!==fe)return Z;const Te=Z.blocks?[...Z.blocks]:[];if(z.errorMsg)return Te.push({type:"error",content:z.errorMsg||"请求异常"}),{...Z,blocks:Te,content:Nt(Te)};if(z.thinking){const J=Te[Te.length-1];return(J==null?void 0:J.type)==="thinking"?Te[Te.length-1]={...J,content:(J.content||"")+z.thinking,loading:!1,streaming:!0}:Te.push({type:"thinking",content:z.thinking,loading:!1,streaming:!0}),{...Z,blocks:Te}}if(z.isToolCall||z.toolCall){const J=Gt(Te);return J.push({type:"toolCall",toolName:z.toolCall||"工具调用",input:St(z.toolCallContent),result:null}),{...Z,blocks:J,content:Nt(J)}}if(z.toolResult!==void 0&&z.toolResult!==null){const J=Gt(Te);let Ae=-1;for(let ft=J.length-1;ft>=0;ft-=1)if(J[ft].type==="toolCall"&&J[ft].result==null){Ae=ft;break}return Ae>=0?J[Ae]={...J[Ae],result:St(z.toolResult)}:J.push({type:"toolCall",toolName:"工具调用",input:"",result:St(z.toolResult)}),{...Z,blocks:J,content:Nt(J)}}if(z.fileDownload){const J=Gt(Te);return J.push({type:"file",fileName:typeof z.fileDownload.fileName=="string"?z.fileDownload.fileName:void 0,fileSize:typeof z.fileDownload.fileSize=="number"||typeof z.fileDownload.fileSize=="string"?z.fileDownload.fileSize:void 0,mimeType:typeof z.fileDownload.mimeType=="string"?z.fileDownload.mimeType:void 0,downloadUrl:typeof z.fileDownload.downloadUrl=="string"?z.fileDownload.downloadUrl:void 0,desc:typeof z.fileDownload.content=="string"?z.fileDownload.content:void 0}),{...Z,blocks:J,content:Nt(J)}}if(z.text){const J=Gt(Te),Ae=J[J.length-1];return(Ae==null?void 0:Ae.type)==="text"?J[J.length-1]={...Ae,content:(Ae.content||"")+z.text}:J.push({type:"text",content:z.text}),{...Z,blocks:J,content:Nt(J)}}return Z}))}},onError:z=>{De()&&(Me&&(window.clearTimeout(Me),Me=null),$e.current=null,Ye=!0,g(he=>he.map(Z=>Z.id===fe?{...Z,blocks:[...Z.blocks||[],{type:"error",content:`抱歉,服务暂时不可用(${z.message})。`}]}:Z)),ge(!1))},onFinished:({sessionCode:z,success:he})=>{if(!De())return;Me&&(window.clearTimeout(Me),Me=null),$e.current=null,z&&ne(z),g(J=>J.map(Ae=>{if(Ae.id!==fe)return Ae;const ft=Ae.blocks?[...Ae.blocks]:[];!he&&!Ye&&ft.push({type:"error",content:"抱歉,服务暂时不可用。"});const Vi=Gt(ft);return{...Ae,blocks:Vi,content:Nt(Vi)}})),ge(!1);const Z=or.current.trim(),Te=it.current;Te&&Er(Te,{text:Z,files:[...wn.current],success:he&&!Ye&&!!(Z||wn.current.length>0),error:!he||Ye?"生成失败,请稍后重试":""})}}),Me=window.setTimeout(()=>{if(!De()||!$e.current)return;$e.current.abort(),$e.current=null,Ye=!0,g(he=>he.map(Z=>Z.id===fe?{...Z,blocks:[...Z.blocks||[],{type:"error",content:"请求超时,请稍后重试"}]}:Z)),ge(!1);const z=it.current;z&&Er(z,{text:"",files:[],success:!1,error:"请求超时,请稍后重试"})},12e4)};Pi.current=sr;const Hi=async(x,_)=>{const D=b.find(be=>be.modelCode===_),Y={flagSettingType:"agent",flagSettingCode:"agent_global_setting",flagSettingInfo:JSON.stringify({agentApikey:x,modelCode:_||"",modelName:(D==null?void 0:D.modelName)||""})},X=rr.current;X&&X.flagSettingId!==null&&X.flagSettingId!==void 0?await Sg({flagSettingId:X.flagSettingId,...Y}):await kg(Y);const fe=await el({flagSettingType:"agent",flagSettingCode:"agent_global_setting"});fe.length&&(rr.current=fe[0])},Ui=async()=>{const x=C.trim();if(!x){te.message.warning("请输入新的 key");return}q(!0);try{await Hi(x,Je),ir.current=x,pn(rl(x)),Bt(!1),te.message.success("key 已替换")}catch(_){te.message.error(_.message||"替换失败")}finally{q(!1)}},ra=async()=>{if(!Je){te.message.warning("请选择默认模型");return}re(!0);try{await Hi(ir.current,Je),tt(!1),te.message.success("设置已保存")}catch(x){te.message.error(x.message||"保存失败")}finally{re(!1)}},ia=async x=>{it.current=null;const _=String(x.sessionCode||x.sessionId||"");if(_){_e(_);try{const D=await vg({sessionCode:_,agentCode:R||void 0,page:1,rows:200,orderStr:"GMT_MODIFIED asc",url:V||void 0}),M=Hg(D);g(M),ne(_),Oe(!0),ke(!1)}catch(D){te.message.error(D.message||"历史对话加载失败")}finally{_e(null)}}};return t?m.jsx(m.Fragment,{children:m.jsxs("div",{ref:tr,className:`chatbot-panel chatbot-panel--${l}${r?" chatbot-panel--closing":""}`,style:{left:u.x,top:u.y},role:"dialog","aria-label":"星云 AI 助手",children:[m.jsxs("header",{className:"chatbot-panel__header",onPointerDown:x=>{x.target.closest(".chatbot-panel__header-actions")||Xs.onPointerDown(x)},children:[m.jsxs("div",{className:"chatbot-panel__brand",children:[m.jsx("span",{className:"chatbot-panel__brand-mark",children:m.jsx(jn,{})}),m.jsxs("div",{className:"chatbot-panel__brand-copy",children:[m.jsx("strong",{children:Ys}),m.jsxs("span",{className:"chatbot-panel__online",children:[m.jsx("i",{}),"在线"]})]})]}),m.jsxs("div",{className:"chatbot-panel__header-actions",children:[m.jsx(te.Button,{type:"text",size:"small",icon:m.jsx(Xr,{}),onClick:Fi}),m.jsx(te.Button,{type:"text",size:"small",icon:m.jsx(Ls,{}),onClick:()=>{ke(!1),tt(!0)}}),m.jsx(te.Button,{type:"text",size:"small",icon:m.jsx(Kr,{}),onClick:()=>{tt(!1),ke(!0)}}),m.jsx(te.Button,{type:"text",size:"small",icon:m.jsx(Yr,{}),onClick:Gs})]})]}),m.jsxs("div",{className:"chatbot-panel__agent",children:[m.jsx("span",{className:"chatbot-panel__agent-label",children:"智能体"}),m.jsx(te.Select,{value:R||void 0,style:{flex:1},placeholder:"请选择智能体",loading:h,notFoundContent:h?m.jsx("span",{children:"正在加载智能体…"}):m.jsx("span",{className:"chatbot-agent-empty-tip",children:"暂无可用智能体,请联系管理员配置"}),options:f.map(x=>({value:x.agentCode||"",label:m.jsxs("span",{className:"chatbot-agent-option",children:[m.jsx("i",{className:"chatbot-agent-option__dot"}),m.jsx("span",{children:x.agentName||x.agentCode||""})]})})),onChange:x=>{W(x);const _=_r(f,x);k(typeof(_==null?void 0:_.agenttypeUrl)=="string"?_.agenttypeUrl:""),P(typeof(_==null?void 0:_.agenttypeUrl1)=="string"?_.agenttypeUrl1:""),ee(typeof(_==null?void 0:_.agenttypeUrl2)=="string"?_.agenttypeUrl2:""),ne(null),g([]),Oe(!1)},getPopupContainer:()=>tr.current||document.body,popupClassName:"chatbot-agent-popup"})]}),Zn?m.jsxs("section",{className:"chatbot-settings-panel",children:[m.jsx("div",{className:"chatbot-settings-panel__title",children:"全局设置"}),m.jsx("p",{className:"chatbot-settings-panel__sub",children:"配置 AI 对话使用的全局星枢 key 和默认模型。"}),m.jsxs("div",{className:"chatbot-settings-panel__field",children:[m.jsx("label",{children:"全局 key"}),er?m.jsxs("div",{className:"chatbot-settings-panel__key-editor",children:[m.jsx(te.Input.Password,{value:C,onChange:x=>O(x.target.value),onPressEnter:Ui,placeholder:"请输入新的 key",autoFocus:!0}),m.jsxs("div",{className:"chatbot-settings-panel__key-actions",children:[m.jsx(te.Button,{type:"primary",size:"small",loading:$,onClick:Ui,children:"确定"}),m.jsx(te.Button,{size:"small",onClick:()=>Bt(!1),children:"取消"})]})]}):m.jsxs("div",{className:"chatbot-settings-panel__key-row",children:[m.jsx("span",{className:"chatbot-settings-panel__key-value",children:hn}),m.jsx("button",{type:"button",className:"chatbot-settings-panel__replace",onClick:()=>{O(""),Bt(!0)},children:"替换"})]}),m.jsx("p",{className:"chatbot-settings-panel__help",children:"key 仅加密存储,前端不展示完整内容。"})]}),m.jsxs("div",{className:"chatbot-settings-panel__field",children:[m.jsx("label",{children:"默认模型"}),m.jsx(te.Select,{value:Je||void 0,style:{width:"100%"},placeholder:"请选择默认模型",loading:b.length===0,popupClassName:"chatbot-model-popup",options:ll(b),onChange:Ft,labelRender:()=>{const x=b.find(D=>D.modelCode===Je),_=x?Ln(x.modelName||x.modelCode||""):Je;return m.jsx("span",{className:"chatbot-settings-panel__model-selected",children:_})}}),m.jsx("p",{className:"chatbot-settings-panel__help",children:"对话未手动选择模型时,使用该默认模型。"})]}),m.jsxs("div",{className:"chatbot-settings-panel__actions",children:[m.jsx(te.Button,{type:"primary",size:"small",loading:Ee,onClick:ra,children:"保存设置"}),m.jsx(te.Button,{size:"small",onClick:()=>tt(!1),children:"取消"})]})]}):xe?m.jsxs("section",{className:"chatbot-history-panel",children:[m.jsxs("div",{className:"chatbot-history-panel__head",children:[m.jsxs("div",{className:"chatbot-history-panel__heading",children:[m.jsxs("button",{type:"button",className:"chatbot-history-panel__back",onClick:()=>ke(!1),children:[m.jsx(Ps,{}),"返回"]}),m.jsxs("div",{className:"chatbot-history-panel__title",children:[m.jsx("strong",{children:"历史会话"}),m.jsx("span",{children:"最近 7 天"})]})]}),m.jsxs("button",{type:"button",className:"chatbot-history-panel__new",onClick:Fi,children:[m.jsx(Xr,{}),"新对话"]})]}),m.jsx("div",{className:"chatbot-history-panel__list",children:yt&&nt.length===0?m.jsxs("div",{className:"chatbot-history-panel__empty",children:[m.jsx(ot,{spin:!0}),m.jsx("span",{children:"正在加载历史会话…"})]}):nt.length===0?m.jsxs("div",{className:"chatbot-history-panel__empty",children:[m.jsx(Kr,{}),m.jsx("span",{children:"暂无历史会话"})]}):nt.map((x,_)=>{const D=String(x.sessionCode||x.sessionId||`session-${_}`),M=String(x.sessionTitle||x.sessionCode||"未命名对话"),Y=Rg(Mg(x)),X=String(x.agentName||(He==null?void 0:He.agentName)||"");return m.jsxs("button",{type:"button",className:"chatbot-history-item",disabled:Ht===D,onClick:()=>ia(x),children:[m.jsx("strong",{children:M}),m.jsxs("span",{className:"chatbot-history-item__meta",children:[X?m.jsx("span",{className:"chatbot-history-item__tag",children:X}):null,m.jsx("span",{className:"chatbot-history-item__time",children:Y})]})]},D)})})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"chatbot-panel__body",ref:Ii,children:[!ut&&m.jsx(m.Fragment,{children:f.length===0?m.jsxs("div",{className:"chatbot-agent-empty",children:[m.jsx("span",{className:"chatbot-agent-empty__icon",children:h?m.jsx(ot,{spin:!0}):m.jsx(jn,{})}),m.jsx("strong",{children:h?"正在加载智能体…":"暂无可用智能体"}),!h&&m.jsx("p",{children:"当前渠道暂未配置智能体,请联系管理员开启后再使用 AI 对话。"}),m.jsx(te.Button,{type:"primary",size:"small",loading:h,onClick:Mi,children:"重新加载"})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"chatbot-welcome",children:[m.jsx("h2",{children:Ks}),m.jsx("p",{ref:nr,className:`chatbot-welcome__intro${dn&&!xt?" is-clamped":""}${dn?" is-clickable":""}`,style:{maxHeight:xt?Ws:63},onClick:Ri,children:zi}),dn&&m.jsxs("button",{type:"button",className:"chatbot-welcome__more",onClick:Ri,children:[xt?"收起":"展开阅读更多",m.jsx(Gn,{className:`chatbot-welcome__more-icon${xt?" is-open":""}`})]})]}),F&&S.length===0?m.jsxs("div",{className:"chatbot-section-label chatbot-section-label--loading",children:[m.jsx(ot,{spin:!0}),m.jsx("span",{children:"正在加载推荐…"})]}):S.length>0?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"chatbot-section-label",children:"你可以这样开始"}),m.jsx("div",{className:"chatbot-suggestions",children:S.map((x,_)=>m.jsxs("button",{type:"button",className:"chatbot-suggestion",onClick:()=>pe(zg(x)),children:[m.jsx("span",{className:"chatbot-suggestion__dot"}),m.jsx("span",{children:Hs(x)})]},_))})]}):null]})}),Ie.map(x=>m.jsx("div",{className:`chatbot-msg chatbot-msg--${x.role}`,children:m.jsxs("div",{className:"chatbot-msg__wrap",children:[m.jsxs("div",{className:"chatbot-msg__bubble",children:[x.role==="assistant"&&x.blocks&&x.blocks.length>0?m.jsx(Gg,{blocks:x.blocks}):x.role==="assistant"&&!x.content?m.jsxs("span",{className:"chatbot-typing",children:[m.jsx("span",{}),m.jsx("span",{}),m.jsx("span",{})]}):m.jsx(Us,{text:x.content}),x.files&&x.files.length>0&&m.jsx("div",{className:"chatbot-msg-files",children:x.files.map((_,D)=>{const M=sl(_.name,_.type,_.mimeType),Y=_.url||_.ossUrl;return m.jsxs("div",{className:"chatbot-msg-file",onClick:()=>Y&&window.open(Y,"_blank"),title:_.name,children:[M.isImage&&Y?m.jsx("img",{className:"chatbot-msg-file__thumb",src:Y,alt:_.name}):m.jsx("span",{className:"chatbot-msg-file__icon",style:{color:M.color},children:M.icon}),m.jsx("span",{className:"chatbot-msg-file__name",children:_.name})]},D)})})]}),x.time?m.jsx("span",{className:"chatbot-msg__time",children:Fg(x.time)}):null]})},x.id))]}),m.jsxs("div",{className:"chatbot-panel__composer",children:[Ge&&m.jsxs("div",{className:`chatbot-voice${ye?" is-recording":""}`,children:[m.jsxs("div",{className:"chatbot-voice__top",children:[m.jsxs("span",{className:"chatbot-voice__label",children:[m.jsx(Jt,{})," 语音输入"]}),m.jsx("button",{type:"button",className:"chatbot-voice__close",onClick:Bi,title:"关闭语音输入",children:m.jsx(Yr,{})})]}),m.jsxs("div",{className:"chatbot-voice__main",children:[m.jsx("button",{type:"button",className:`chatbot-voice__mic${ye?" is-active":""}`,onPointerDown:x=>{var _,D;We||x.button!==0||(Ut.current=!0,(D=(_=x.currentTarget).setPointerCapture)==null||D.call(_,x.pointerId),ta())},onPointerUp:()=>{Ut.current=!1,$i()},onPointerCancel:()=>{Ut.current=!1,$i()},disabled:We,onContextMenu:x=>x.preventDefault(),title:ye?"松开结束":"按住说话",children:We?m.jsx(ot,{spin:!0}):m.jsx(Jt,{})}),m.jsxs("div",{className:"chatbot-voice__content",children:[!ye&&!We&&!Lt&&!At&&m.jsxs("div",{className:"chatbot-voice__hint",children:[m.jsx(Jt,{})," 按住麦克风说话,松开结束"]}),!ye&&!We&&At&&m.jsxs("div",{className:"chatbot-voice__error",children:[m.jsx("span",{className:"chatbot-voice__error-dot"}),At]}),We&&m.jsxs("div",{className:"chatbot-voice__status",children:[m.jsx(ot,{spin:!0})," 正在识别,请稍候..."]}),ye&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"chatbot-voice__status",children:[m.jsx("span",{className:"chatbot-voice__dot"})," 正在聆听 ",cn,"s · 松开结束"]}),m.jsx("div",{className:"chatbot-voice__wave","aria-hidden":"true",children:[0,1,2,3,4].map(x=>m.jsx("span",{style:{animationDelay:`${x*.12}s`}},x))})]}),!ye&&Lt&&m.jsx("div",{className:"chatbot-voice__result",children:Lt})]})]})]}),m.jsxs("div",{className:"chatbot-composer",children:[Be.length>0&&m.jsx("div",{className:"chatbot-attachments",children:Be.map((x,_)=>{const D=sl(x.name,x.type,x.mimeType);return m.jsxs("div",{className:`chatbot-attachment${x.uploading?" is-uploading":""}`,children:[D.isImage&&x.ossUrl?m.jsx("img",{className:"chatbot-attachment__thumb",src:x.ossUrl,alt:x.name}):m.jsx("span",{className:"chatbot-attachment__icon",style:{color:D.color},children:D.icon}),m.jsx("span",{className:"chatbot-attachment__name",children:x.uploading?"上传中...":x.name}),x.uploading&&m.jsx(ot,{spin:!0,className:"chatbot-attachment__spin"}),m.jsx(Xn,{className:"chatbot-attachment__remove",onClick:()=>Js(_)})]},_)})}),m.jsx(te.Input.TextArea,{className:"chatbot-composer__input",value:me,onChange:x=>pe(x.target.value),placeholder:"输入需求,或描述你要处理的业务内容...",autoSize:{minRows:2,maxRows:5},bordered:!1,onPressEnter:x=>{x.shiftKey||(x.preventDefault(),sr())}}),m.jsxs("div",{className:"chatbot-composer__footer",children:[m.jsxs("div",{className:"chatbot-composer__tools",children:[m.jsx(te.Button,{type:"text",className:`chatbot-composer__tool-btn${Ge?" is-active":""}`,icon:m.jsx(Jt,{}),title:Ge?"关闭语音输入":"语音输入",onClick:Bi}),m.jsx(te.Button,{type:"text",className:"chatbot-composer__tool-btn",icon:m.jsx(Rs,{}),title:"添加附件",onClick:Qs}),m.jsx("input",{ref:Ni,type:"file",multiple:!0,accept:"image/*,.pdf,audio/*,.wav,.flac,.ape,.alac,.mp3,.aac,.m4a,.ogg,.wma",style:{display:"none"},onChange:ea})]}),m.jsxs("div",{className:"chatbot-composer__actions",children:[m.jsx("div",{className:"chatbot-composer__model",children:m.jsx(te.Select,{value:B||void 0,size:"small",style:{width:132},placeholder:"模型",loading:w.length===0,popupMatchSelectWidth:!1,popupClassName:"chatbot-model-popup",options:ll(w),onChange:se,labelRender:()=>{const x=w.find(D=>D.modelCode===B),_=Ln((x==null?void 0:x.modelProvider)||(x==null?void 0:x.modelCode)||B||"");return m.jsxs("span",{className:"chatbot-composer__model-selected",children:[m.jsx("span",{className:"chatbot-composer__model-selected-icon",children:m.jsx(Ei,{})}),m.jsx("span",{className:"chatbot-composer__model-selected-name",children:_})]})},getPopupContainer:()=>tr.current||document.body})}),m.jsx(te.Button,{className:"chatbot-composer__send",type:"primary",shape:"circle",icon:m.jsx(Os,{}),onClick:()=>sr(),loading:y,disabled:!me.trim()&&!Be.some(x=>x.ossUrl&&!x.uploading)})]})]})]})]})]})]})}):m.jsxs("button",{type:"button",className:`chatbot-fab${Li.dragging?" chatbot-fab--dragging":""}`,style:{left:s.x,top:s.y},"aria-label":"打开 AI 助手",onPointerDown:Li.onPointerDown,children:[m.jsx(jn,{}),m.jsx("span",{className:"chatbot-fab__status"})]})};exports.ChatBot=Vs;exports.configureApi=Fs;exports.default=Vs;
|