nnews-react 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,42 +1,42 @@
1
- "use strict";var qm=Object.defineProperty;var Um=(e,t,n)=>t in e?qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Um(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),H=require("react");require("react-dom");function $m(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 fe=$m(H);var Fe=(e=>(e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Scheduled=3]="Scheduled",e[e.Review=4]="Review",e))(Fe||{});function zm({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No articles found"}){return t?x.jsx("div",{className:"flex items-center justify-center p-8",children:x.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?x.jsx("div",{className:"rounded-md bg-red-50 p-4",children:x.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?x.jsx("div",{className:"flex items-center justify-center p-8",children:x.jsx("div",{className:"text-gray-500",children:a})}):x.jsxs("div",{className:"space-y-6",children:[x.jsx("div",{className:"grid grid-cols-3 gap-6",children:e.items.map(l=>x.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",children:[l.imageName&&x.jsx("div",{className:"w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden",children:x.jsx("img",{src:l.imageName,alt:l.title,className:"w-full h-[250px] object-cover",style:{height:"250px"}})}),x.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[x.jsxs("div",{className:"flex-1",children:[x.jsx("h3",{className:`text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}`,onClick:()=>r==null?void 0:r(l),children:l.title}),x.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[l.dateAt&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(l.dateAt).toLocaleDateString()]}),l.category&&x.jsx("span",{className:"rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200",children:l.category.title})]}),x.jsx("div",{className:"mt-3",children:x.jsx("span",{className:`inline-block rounded-full px-3 py-1 text-xs font-medium ${l.status===Fe.Published?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":l.status===Fe.Draft?"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200":l.status===Fe.Review?"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200":l.status===Fe.Scheduled?"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200":"bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,children:Fe[l.status]})}),l.tags&&l.tags.length>0&&x.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[l.tags.slice(0,3).map(c=>x.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["#",c.title]},c.tagId)),l.tags.length>3&&x.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["+",l.tags.length-3]})]}),l.roles&&l.roles.length>0&&x.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[l.roles.slice(0,2).map(c=>x.jsx("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:c.name},c.slug)),l.roles.length>2&&x.jsxs("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:["+",l.roles.length-2]})]})]}),o&&(i||s)&&x.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end",children:[i&&x.jsx("button",{onClick:()=>i(l),className:"rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",title:"Edit",children:x.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),s&&x.jsx("button",{onClick:()=>s(l),className:"rounded p-2 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20",title:"Delete",children:x.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})]},l.articleId))}),e.totalPages>1&&x.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4",children:x.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function jm(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Km={};function Mc(e,t){return(Km.jsx?Gm:Hm).test(e)}const Wm=/[ \t\n\f\r]/g;function Vm(e){return typeof e=="object"?e.type==="text"?Dc(e.value):!1:Dc(e)}function Dc(e){return e.replace(Wm,"")===""}class Li{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Li.prototype.normal={};Li.prototype.property={};Li.prototype.space=void 0;function Nf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Li(n,r,t)}function ja(e){return e.toLowerCase()}class mt{constructor(t,n){this.attribute=n,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let Ym=0;const de=er(),Me=er(),Ha=er(),$=er(),Te=er(),Sr=er(),Et=er();function er(){return 2**++Ym}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Me,commaOrSpaceSeparated:Et,commaSeparated:Sr,number:$,overloadedBoolean:Ha,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),oa=Object.keys(Ga);class Ml extends mt{constructor(t,n,r,i){let s=-1;if(super(t,n),Pc(this,"space",i),typeof r=="number")for(;++s<oa.length;){const o=oa[s];Pc(this,oa[s],(r&Ga[o])===Ga[o])}}}Ml.prototype.defined=!0;function Pc(e,t,n){n&&(e[t]=n)}function Ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ml(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ja(r)]=r,n[ja(s.attribute)]=r}return new Li(t,n,e.space)}const Af=Ur({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:Te,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:$,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:Te,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Me,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Tf(e,t){return Sf(e,t.toLowerCase())}const Zm=Ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sr,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Te,autoFocus:de,autoPlay:de,blocking:Te,capture:null,charSet:null,checked:de,cite:null,className:Te,cols:$,colSpan:null,content:null,contentEditable:Me,controls:de,controlsList:Te,coords:$|Sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Ha,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Te,height:$,hidden:Ha,high:$,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Te,itemRef:Te,itemScope:de,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:$,pattern:null,ping:Te,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Te,required:de,reversed:de,rows:$,rowSpan:$,sandbox:Te,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Me,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Tf}),Xm=Ur({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Et,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Te,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:Sr,g2:Sr,glyphName:Sr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Et,rev:Et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Et,requiredFeatures:Et,requiredFonts:Et,requiredFormats:Et,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Et,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),Cf=Ur({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()}}),Of=Ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),If=Ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qm={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"},Jm=/[A-Z]/g,Bc=/-[a-z]/g,eb=/^data[-\w.:]+$/i;function tb(e,t){const n=ja(t);let r=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bc,rb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bc.test(s)){let o=s.replace(Jm,nb);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ml}return new i(r,t)}function nb(e){return"-"+e.toLowerCase()}function rb(e){return e.charAt(1).toUpperCase()}const ib=Nf([Af,Zm,Cf,Of,If],"html"),Dl=Nf([Af,Xm,Cf,Of,If],"svg");function sb(e){return e.join(" ").trim()}var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pl={},Fc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ob=/\n/g,ab=/^\s*/,lb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,cb=/^:\s*/,ub=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,db=/^[;\s]*/,fb=/^\s+|\s+$/g,hb=`
2
- `,qc="/",Uc="*",Gn="",pb="comment",gb="declaration";function mb(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(p){var m=p.match(ob);m&&(n+=m.length);var b=p.lastIndexOf(hb);r=~b?p.length-b:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new o(p),c(),m}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var b=m[0];return i(b),e=e.slice(b.length),m}}function c(){l(ab)}function u(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=s();if(!(qc!=e.charAt(0)||Uc!=e.charAt(1))){for(var m=2;Gn!=e.charAt(m)&&(Uc!=e.charAt(m)||qc!=e.charAt(m+1));)++m;if(m+=2,Gn===e.charAt(m-1))return a("End of comment missing");var b=e.slice(2,m-2);return r+=2,i(b),e=e.slice(m),r+=2,p({type:pb,comment:b})}}function h(){var p=s(),m=l(lb);if(m){if(d(),!l(cb))return a("property missing ':'");var b=l(ub),y=p({type:gb,property:$c(m[0].replace(Fc,Gn)),value:b?$c(b[0].replace(Fc,Gn)):Gn});return l(db),y}}function f(){var p=[];u(p);for(var m;m=h();)m!==!1&&(p.push(m),u(p));return p}return c(),f()}function $c(e){return e?e.replace(fb,Gn):Gn}var bb=mb,yb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=xb;const Eb=yb(bb);function xb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Eb.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.camelCase=void 0;var wb=/^--[a-zA-Z0-9_-]+$/,_b=/-([a-z])/g,vb=/^[^-]+$/,kb=/^-(webkit|moz|ms|o|khtml)-/,Nb=/^-(ms)-/,Ab=function(e){return!e||vb.test(e)||wb.test(e)},Sb=function(e,t){return t.toUpperCase()},zc=function(e,t){return"".concat(t,"-")},Tb=function(e,t){return t===void 0&&(t={}),Ab(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Nb,zc):e=e.replace(kb,zc),e.replace(_b,Sb))};Ks.camelCase=Tb;var Cb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ob=Cb(Pl),Ib=Ks;function Ka(e,t){var n={};return!e||typeof e!="string"||(0,Ob.default)(e,function(r,i){r&&i&&(n[(0,Ib.camelCase)(r,t)]=i)}),n}Ka.default=Ka;var Rb=Ka;const Lb=Mi(Rb),Rf=Lf("end"),Bl=Lf("start");function Lf(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 Mb(e){const t=Bl(e),n=Rf(e);if(t&&n)return{start:t,end:n}}function pi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jc(e.position):"start"in e||"end"in e?jc(e):"line"in e||"column"in e?Wa(e):""}function Wa(e){return Hc(e&&e.line)+":"+Hc(e&&e.column)}function jc(e){return Wa(e&&e.start)+"-"+Wa(e&&e.end)}function Hc(e){return e&&typeof e=="number"?e:1}class Qe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=pi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qe.prototype.file="";Qe.prototype.name="";Qe.prototype.reason="";Qe.prototype.message="";Qe.prototype.stack="";Qe.prototype.column=void 0;Qe.prototype.line=void 0;Qe.prototype.ancestors=void 0;Qe.prototype.cause=void 0;Qe.prototype.fatal=void 0;Qe.prototype.place=void 0;Qe.prototype.ruleId=void 0;Qe.prototype.source=void 0;const Fl={}.hasOwnProperty,Db=new Map,Pb=/[A-Z]/g,Bb=new Set(["table","tbody","thead","tfoot","tr"]),Fb=new Set(["td","th"]),Mf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qb(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=Wb(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=Kb(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"?Dl:ib,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Df(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Df(e,t,n){if(t.type==="element")return Ub(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $b(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jb(e,t,n);if(t.type==="mdxjsEsm")return zb(e,t);if(t.type==="root")return Hb(e,t,n);if(t.type==="text")return Gb(e,t)}function Ub(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=Bf(e,t.tagName,!1),o=Vb(e,t);let a=Ul(e,t);return Bb.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Vm(l):!0})),Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function $b(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)}wi(e,t.position)}function zb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wi(e,t.position)}function jb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Bf(e,t.name,!0),o=Yb(e,t),a=Ul(e,t);return Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Hb(e,t,n){const r={};return ql(r,Ul(e,t)),e.create(t,e.Fragment,r,n)}function Gb(e,t){return t.value}function Pf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ql(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kb(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function Wb(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Bl(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Vb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Fl.call(t.properties,i)){const s=Zb(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Fb.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Yb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wi(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else wi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ul(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Db;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Df(e,s,o);a!==void 0&&n.push(a)}return n}function Zb(e,t,n){const r=tb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jm(n):sb(n)),r.property==="style"){let i=typeof n=="object"?n:Xb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Qb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Qm[r.property]||r.property:r.attribute,n]}}function Xb(e,t){try{return Lb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Qe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Mf+"#cannot-parse-style-attribute",i}}function Bf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=Mc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=Mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Fl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);wi(e)}function wi(e,t){const n=new Qe("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=Mf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qb(e){const t={};let n;for(n in e)Fl.call(e,n)&&(t[Jb(n)]=e[n]);return t}function Jb(e){let t=e.replace(Pb,ey);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ey(e){return"-"+e.toLowerCase()}const aa={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"]},ty={};function ny(e,t){const n=ty,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ff(e,r,i)}function Ff(e,t,n){if(ry(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 Gc(e.children,t,n)}return Array.isArray(e)?Gc(e,t,n):""}function Gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ff(e[i],t,n);return r.join("")}function ry(e){return!!(e&&typeof e=="object")}const Kc=document.createElement("i");function $l(e){const t="&"+e+";";Kc.innerHTML=t;const n=Kc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wt(e,t,n,r){const i=e.length;let s=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);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function St(e,t){return e.length>0?(wt(e,e.length,0,t),e):t}const Wc={}.hasOwnProperty;function qf(e){const t={};let n=-1;for(;++n<e.length;)iy(t,e[n]);return t}function iy(e,t){let n;for(n in t){const i=(Wc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Wc.call(i,o)||(i[o]=[]);const a=s[o];sy(i[o],Array.isArray(a)?a:a?[a]:[])}}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wt(e,0,0,r)}function Uf(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 Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=Pn(/[A-Za-z]/),Ze=Pn(/[\dA-Za-z]/),oy=Pn(/[#-'*+\--9=?A-Z^-~]/);function Is(e){return e!==null&&(e<32||e===127)}const Va=Pn(/\d/),ay=Pn(/[\dA-Fa-f]/),ly=Pn(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function ke(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const Ws=Pn(new RegExp("\\p{P}|\\p{S}","u")),Yn=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $r(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Ze(e.charCodeAt(n+1))&&Ze(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);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 be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return ge(l)?(e.enter(n),a(l)):t(l)}function a(l){return ge(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const cy={tokenize:uy};function uy(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return oe(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const dy={tokenize:fy},Vc={tokenize:hy};function fy(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let C=T,N;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){N=t.events[C][1].end;break}y(r);let P=T;for(;P<t.events.length;)t.events[P][1].end={...N},P++;return wt(t.events,C+1,0,t.events.slice(T)),t.events.length=P,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vc,u,d)(v)}function u(v){return i&&_(),y(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(v)}function h(v){return t.containerState={},e.attempt(Vc,f,p)(v)}function f(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&_(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(v)}function m(v){if(v===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return oe(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),m)}function b(v,T){const C=t.sliceStream(v);if(T&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<o&&(!i.events[N][1].end||i.events[N][1].end.offset>o))return;const P=t.events.length;let U=P,G,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(G){O=t.events[U][1].end;break}G=!0}for(y(r),N=P;N<t.events.length;)t.events[N][1].end={...O},N++;wt(t.events,U+1,0,t.events.slice(P)),t.events.length=N}}function y(v){let T=n.length;for(;T-- >v;){const C=n[T];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function _(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hy(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(e){if(e===null||ke(e)||Yn(e))return 1;if(Ws(e))return 2}function Vs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ya={name:"attention",resolveAll:py,tokenize:gy};function py(e,t){let n=-1,r,i,s,o,a,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Yc(d,-l),Yc(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=St(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=St(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=St(c,Vs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=St(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=St(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function gy(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rr(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=Rr(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function Yc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const my={name:"autolink",tokenize:by};function by(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return st(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||Ze(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Ze(f))&&r++<32?(e.consume(f),a):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Is(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):oy(f)?(e.consume(f),c):n(f)}function u(f){return Ze(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||Ze(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Di={partial:!0,tokenize:yy};function yy(e,t,n){return r;function r(s){return ge(s)?be(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||oe(s)?t(s):n(s)}}const $f={continuation:{tokenize:xy},exit:wy,name:"blockQuote",tokenize:Ey};function Ey(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return ge(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function xy(e,t,n){const r=this;return i;function i(o){return ge(o)?be(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt($f,t,n)(o)}}function wy(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:_y};function _y(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return ly(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jf={name:"characterReference",tokenize:vy};function vy(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=Ze,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=ay,u):(e.enter("characterReferenceValue"),s=7,o=Va,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Ze&&!$l(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const Zc={partial:!0,tokenize:Ny},Xc={concrete:!0,name:"codeFenced",tokenize:ky};function ky(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,o=0,a;return l;function l(N){return c(N)}function c(N){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(N)}function u(N){return N===a?(o++,e.consume(N),u):o<3?n(N):(e.exit("codeFencedFenceSequence"),ge(N)?be(e,d,"whitespace")(N):d(N))}function d(N){return N===null||oe(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Zc,m,T)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||oe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):ge(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,f,"whitespace")(N)):N===96&&N===a?n(N):(e.consume(N),h)}function f(N){return N===null||oe(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||oe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===a?n(N):(e.consume(N),p)}function m(N){return e.attempt(i,T,b)(N)}function b(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return s>0&&ge(N)?be(e,_,"linePrefix",s+1)(N):_(N)}function _(N){return N===null||oe(N)?e.check(Zc,m,T)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||oe(N)?(e.exit("codeFlowValue"),_(N)):(e.consume(N),v)}function T(N){return e.exit("codeFenced"),t(N)}function C(N,P,U){let G=0;return O;function O(Y){return N.enter("lineEnding"),N.consume(Y),N.exit("lineEnding"),j}function j(Y){return N.enter("codeFencedFence"),ge(Y)?be(N,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):B(Y)}function B(Y){return Y===a?(N.enter("codeFencedFenceSequence"),re(Y)):U(Y)}function re(Y){return Y===a?(G++,N.consume(Y),re):G>=o?(N.exit("codeFencedFenceSequence"),ge(Y)?be(N,X,"whitespace")(Y):X(Y)):U(Y)}function X(Y){return Y===null||oe(Y)?(N.exit("codeFencedFence"),P(Y)):U(Y)}}}function Ny(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"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const la={name:"codeIndented",tokenize:Sy},Ay={partial:!0,tokenize:Ty};function Sy(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),be(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):oe(c)?e.attempt(Ay,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||oe(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function Ty(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):be(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):oe(o)?i(o):n(o)}}const Cy={name:"codeText",previous:Iy,resolve:Oy,tokenize:Ry};function Oy(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 Iy(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ry(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):oe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||oe(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class Ly{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&si(this.left,r),s.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),si(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),si(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);si(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);si(this.left,n.reverse())}}}function si(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 Hf(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new Ly(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,My(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return wt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function My(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const y=a.slice(b[h],b[h+1]),_=s.pop();l.push([_,_+y.length-1]),e.splice(_,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const Dy={resolve:By,tokenize:Fy},Py={partial:!0,tokenize:qy};function By(e){return Hf(e),e}function Fy(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):oe(a)?e.check(Py,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function qy(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),be(e,s,"linePrefix")}function s(o){if(o===null||oe(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Gf(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),h):y===null||y===32||y===41||Is(y)?n(y):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(y))}function h(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||oe(y)?n(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function m(y){return!u&&(y===null||y===41||ke(y))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||Is(y)?n(y):(e.consume(y),y===92?b:m)}function b(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Kf(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):oe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||oe(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!ge(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Wf(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):oe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||oe(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function gi(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ge(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Uy={name:"definition",tokenize:zy},$y={partial:!0,tokenize:jy};function zy(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return Kf.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return ke(f)?gi(e,c)(f):c(f)}function c(f){return Gf(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt($y,d,d)(f)}function d(f){return ge(f)?be(e,h,"whitespace")(f):h(f)}function h(f){return f===null||oe(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function jy(e,t,n){return r;function r(a){return ke(a)?gi(e,i)(a):n(a)}function i(a){return Wf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return ge(a)?be(e,o,"whitespace")(a):o(a)}function o(a){return a===null||oe(a)?t(a):n(a)}}const Hy={name:"hardBreakEscape",tokenize:Gy};function Gy(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return oe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Ky={name:"headingAtx",resolve:Wy,tokenize:Vy};function Wy(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Vy(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||ke(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||oe(u)?(e.exit("atxHeading"),t(u)):ge(u)?be(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||ke(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Yy=["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"],Qc=["pre","script","style","textarea"],Zy={concrete:!0,name:"htmlFlow",resolveTo:Jy,tokenize:e0},Xy={partial:!0,tokenize:n0},Qy={partial:!0,tokenize:t0};function Jy(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 e0(e,t,n){const r=this;let i,s,o,a,l;return c;function c(k){return u(k)}function u(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),s=!0,m):k===63?(e.consume(k),i=3,r.interrupt?t:w):st(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function h(k){return k===45?(e.consume(k),i=2,f):k===91?(e.consume(k),i=5,a=0,p):st(k)?(e.consume(k),i=4,r.interrupt?t:w):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:w):n(k)}function p(k){const he="CDATA[";return k===he.charCodeAt(a++)?(e.consume(k),a===he.length?r.interrupt?t:B:p):n(k)}function m(k){return st(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function b(k){if(k===null||k===47||k===62||ke(k)){const he=k===47,se=o.toLowerCase();return!he&&!s&&Qc.includes(se)?(i=1,r.interrupt?t(k):B(k)):Yy.includes(o.toLowerCase())?(i=6,he?(e.consume(k),y):r.interrupt?t(k):B(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?_(k):v(k))}return k===45||Ze(k)?(e.consume(k),o+=String.fromCharCode(k),b):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:B):n(k)}function _(k){return ge(k)?(e.consume(k),_):O(k)}function v(k){return k===47?(e.consume(k),O):k===58||k===95||st(k)?(e.consume(k),T):ge(k)?(e.consume(k),v):O(k)}function T(k){return k===45||k===46||k===58||k===95||Ze(k)?(e.consume(k),T):C(k)}function C(k){return k===61?(e.consume(k),N):ge(k)?(e.consume(k),C):v(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,P):ge(k)?(e.consume(k),N):U(k)}function P(k){return k===l?(e.consume(k),l=null,G):k===null||oe(k)?n(k):(e.consume(k),P)}function U(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ke(k)?C(k):(e.consume(k),U)}function G(k){return k===47||k===62||ge(k)?v(k):n(k)}function O(k){return k===62?(e.consume(k),j):n(k)}function j(k){return k===null||oe(k)?B(k):ge(k)?(e.consume(k),j):n(k)}function B(k){return k===45&&i===2?(e.consume(k),I):k===60&&i===1?(e.consume(k),q):k===62&&i===4?(e.consume(k),Q):k===63&&i===3?(e.consume(k),w):k===93&&i===5?(e.consume(k),K):oe(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Xy,ae,re)(k)):k===null||oe(k)?(e.exit("htmlFlowData"),re(k)):(e.consume(k),B)}function re(k){return e.check(Qy,X,ae)(k)}function X(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Y}function Y(k){return k===null||oe(k)?re(k):(e.enter("htmlFlowData"),B(k))}function I(k){return k===45?(e.consume(k),w):B(k)}function q(k){return k===47?(e.consume(k),o="",F):B(k)}function F(k){if(k===62){const he=o.toLowerCase();return Qc.includes(he)?(e.consume(k),Q):B(k)}return st(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),F):B(k)}function K(k){return k===93?(e.consume(k),w):B(k)}function w(k){return k===62?(e.consume(k),Q):k===45&&i===2?(e.consume(k),w):B(k)}function Q(k){return k===null||oe(k)?(e.exit("htmlFlowData"),ae(k)):(e.consume(k),Q)}function ae(k){return e.exit("htmlFlow"),t(k)}}function t0(e,t,n){const r=this;return i;function i(o){return oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function n0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Di,t,n)}}const r0={name:"htmlText",tokenize:i0};function i0(e,t,n){const r=this;let i,s,o;return a;function a(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),C):w===63?(e.consume(w),v):st(w)?(e.consume(w),U):n(w)}function c(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),s=0,p):st(w)?(e.consume(w),_):n(w)}function u(w){return w===45?(e.consume(w),f):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):oe(w)?(o=d,q(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),f):d(w)}function f(w){return w===62?I(w):w===45?h(w):d(w)}function p(w){const Q="CDATA[";return w===Q.charCodeAt(s++)?(e.consume(w),s===Q.length?m:p):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),b):oe(w)?(o=m,q(w)):(e.consume(w),m)}function b(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?I(w):w===93?(e.consume(w),y):m(w)}function _(w){return w===null||w===62?I(w):oe(w)?(o=_,q(w)):(e.consume(w),_)}function v(w){return w===null?n(w):w===63?(e.consume(w),T):oe(w)?(o=v,q(w)):(e.consume(w),v)}function T(w){return w===62?I(w):v(w)}function C(w){return st(w)?(e.consume(w),N):n(w)}function N(w){return w===45||Ze(w)?(e.consume(w),N):P(w)}function P(w){return oe(w)?(o=P,q(w)):ge(w)?(e.consume(w),P):I(w)}function U(w){return w===45||Ze(w)?(e.consume(w),U):w===47||w===62||ke(w)?G(w):n(w)}function G(w){return w===47?(e.consume(w),I):w===58||w===95||st(w)?(e.consume(w),O):oe(w)?(o=G,q(w)):ge(w)?(e.consume(w),G):I(w)}function O(w){return w===45||w===46||w===58||w===95||Ze(w)?(e.consume(w),O):j(w)}function j(w){return w===61?(e.consume(w),B):oe(w)?(o=j,q(w)):ge(w)?(e.consume(w),j):G(w)}function B(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,re):oe(w)?(o=B,q(w)):ge(w)?(e.consume(w),B):(e.consume(w),X)}function re(w){return w===i?(e.consume(w),i=void 0,Y):w===null?n(w):oe(w)?(o=re,q(w)):(e.consume(w),re)}function X(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ke(w)?G(w):(e.consume(w),X)}function Y(w){return w===47||w===62||ke(w)?G(w):n(w)}function I(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function q(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),F}function F(w){return ge(w)?be(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):K(w)}function K(w){return e.enter("htmlTextData"),o(w)}}const zl={name:"labelEnd",resolveAll:l0,resolveTo:c0,tokenize:u0},s0={tokenize:d0},o0={tokenize:f0},a0={tokenize:h0};function l0(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&&wt(e,0,e.length,n),e}function c0(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=St(a,e.slice(s+1,s+r+3)),a=St(a,[["enter",u,t]]),a=St(a,Vs(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=St(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=St(a,e.slice(o+1)),a=St(a,[["exit",l,t]]),wt(e,s,e.length,a),e}function u0(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(Ht(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(s0,u,o?u:d)(h):h===91?e.attempt(o0,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(a0,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function d0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ke(d)?gi(e,s)(d):s(d)}function s(d){return d===41?u(d):Gf(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return ke(d)?gi(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Wf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ke(d)?gi(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function f0(e,t,n){const r=this;return i;function i(a){return Kf.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function h0(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const p0={name:"labelStartImage",resolveAll:zl.resolveAll,tokenize:g0};function g0(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const m0={name:"labelStartLink",resolveAll:zl.resolveAll,tokenize:b0};function b0(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ca={name:"lineEnding",tokenize:y0};function y0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const vs={name:"thematicBreak",tokenize:E0};function E0(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||oe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?be(e,a,"whitespace")(c):a(c))}}const ht={continuation:{tokenize:v0},exit:N0,name:"list",tokenize:_0},x0={partial:!0,tokenize:A0},w0={partial:!0,tokenize:k0};function _0(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Va(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(vs,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Va(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Di,r.interrupt?n:u,e.attempt(x0,h,d))}function u(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return ge(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function v0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Di,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!ge(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(w0,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(ht,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function k0(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function N0(e){e.exit(this.containerState.type)}function A0(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!ge(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Jc={name:"setextUnderline",resolveTo:S0,tokenize:T0};function S0(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function T0(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),ge(c)?be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||oe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C0={tokenize:O0};function O0(e){const t=this,n=e.attempt(Di,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dy,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const I0={resolveAll:Yf()},R0=Vf("string"),L0=Vf("text");function Vf(e){return{resolveAll:Yf(e==="text"?M0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Yf(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function M0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const D0={42:ht,43:ht,45:ht,48:ht,49:ht,50:ht,51:ht,52:ht,53:ht,54:ht,55:ht,56:ht,57:ht,62:$f},P0={91:Uy},B0={[-2]:la,[-1]:la,32:la},F0={35:Ky,42:vs,45:[Jc,vs],60:Zy,61:Jc,95:vs,96:Xc,126:Xc},q0={38:jf,92:zf},U0={[-5]:ca,[-4]:ca,[-3]:ca,33:p0,38:jf,42:Ya,60:[my,r0],91:m0,92:[Hy,zf],93:zl,95:Ya,96:Cy},$0={null:[Ya,I0]},z0={null:[42,95]},j0={null:[]},H0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z0,contentInitial:P0,disable:j0,document:D0,flow:F0,flowInitial:B0,insideSpan:$0,string:q0,text:U0},Symbol.toStringTag,{value:"Module"}));function G0(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={},s=[];let o=[],a=[];const l={attempt:P(C),check:P(N),consume:_,enter:v,exit:T,interrupt:P(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(j){return o=St(o,j),b(),o[o.length-1]!==null?[]:(U(t,0),c.events=Vs(s,c.events,c),c.events)}function h(j,B){return W0(f(j),B)}function f(j){return K0(o,j)}function p(){const{_bufferIndex:j,_index:B,line:re,column:X,offset:Y}=r;return{_bufferIndex:j,_index:B,line:re,column:X,offset:Y}}function m(j){i[j.line]=j.column,O()}function b(){let j;for(;r._index<o.length;){const B=o[r._index];if(typeof B=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<B.length;)y(B.charCodeAt(r._bufferIndex));else y(B)}}function y(j){u=u(j)}function _(j){oe(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,O()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=j}function v(j,B){const re=B||{};return re.type=j,re.start=p(),c.events.push(["enter",re,c]),a.push(re),re}function T(j){const B=a.pop();return B.end=p(),c.events.push(["exit",B,c]),B}function C(j,B){U(j,B.from)}function N(j,B){B.restore()}function P(j,B){return re;function re(X,Y,I){let q,F,K,w;return Array.isArray(X)?ae(X):"tokenize"in X?ae([X]):Q(X);function Q(we){return at;function at(Ne){const Je=Ne!==null&&we[Ne],et=Ne!==null&&we.null,lt=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(et)?et:et?[et]:[]];return ae(lt)(Ne)}}function ae(we){return q=we,F=0,we.length===0?I:k(we[F])}function k(we){return at;function at(Ne){return w=G(),K=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?se():we.tokenize.call(B?Object.assign(Object.create(c),B):c,l,he,se)(Ne)}}function he(we){return j(K,w),Y}function se(we){return w.restore(),++F<q.length?k(q[F]):I}}}function U(j,B){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&wt(c.events,B,c.events.length-B,j.resolve(c.events.slice(B),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function G(){const j=p(),B=c.previous,re=c.currentConstruct,X=c.events.length,Y=Array.from(a);return{from:X,restore:I};function I(){r=j,c.previous=B,c.currentConstruct=re,c.events.length=X,a=Y,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function K0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function W0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
1
+ "use strict";var qm=Object.defineProperty;var Um=(e,t,n)=>t in e?qm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>Um(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),H=require("react");require("react-dom");function $m(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 fe=$m(H);var Fe=(e=>(e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Scheduled=3]="Scheduled",e[e.Review=4]="Review",e))(Fe||{});function zm({articles:e,loading:t=!1,error:n=null,onArticleClick:r,onEditClick:i,onDeleteClick:s,onAIClick:o,showActions:a=!1,emptyMessage:l="No articles found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading articles..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading articles: ",n.message]})}):!e||e.items.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l})}):E.jsxs("div",{className:"space-y-6",children:[E.jsx("div",{className:"grid grid-cols-3 gap-6",children:e.items.map(c=>E.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",children:[c.imageName&&E.jsx("div",{className:`w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden ${r?"cursor-pointer":""}`,onClick:()=>r==null?void 0:r(c),children:E.jsx("img",{src:c.imageName,alt:c.title,className:"w-full h-[250px] object-cover hover:scale-105 transition-transform duration-300",style:{height:"250px"}})}),E.jsxs("div",{className:"p-6 flex-1 flex flex-col",children:[E.jsxs("div",{className:"flex-1",children:[E.jsx("h3",{className:`text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":""}`,onClick:()=>r==null?void 0:r(c),children:c.title}),E.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[c.dateAt&&E.jsxs("span",{className:"flex items-center gap-1",children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(c.dateAt).toLocaleDateString()]}),c.category&&E.jsx("span",{className:"rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200",children:c.category.title})]}),E.jsx("div",{className:"mt-3",children:E.jsx("span",{className:`inline-block rounded-full px-3 py-1 text-xs font-medium ${c.status===Fe.Published?"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200":c.status===Fe.Draft?"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200":c.status===Fe.Review?"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200":c.status===Fe.Scheduled?"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200":"bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,children:Fe[c.status]})}),c.tags&&c.tags.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[c.tags.slice(0,3).map(u=>E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["#",u.title]},u.tagId)),c.tags.length>3&&E.jsxs("span",{className:"rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",children:["+",c.tags.length-3]})]}),c.roles&&c.roles.length>0&&E.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[c.roles.slice(0,2).map(u=>E.jsx("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:u.name},u.slug)),c.roles.length>2&&E.jsxs("span",{className:"rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",children:["+",c.roles.length-2]})]})]}),a&&(i||s||o)&&E.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end",children:[o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-2 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20",title:"AI Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",title:"Edit",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),s&&E.jsx("button",{onClick:()=>s(c),className:"rounded p-2 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20",title:"Delete",children:E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})]},c.articleId))}),e.totalPages>1&&E.jsx("div",{className:"mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4",children:E.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:["Showing ",e.items.length," of ",e.totalCount," articles (Page ",e.page," of ",e.totalPages,")"]})})]})}function jm(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gm=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Km={};function Mc(e,t){return(Km.jsx?Gm:Hm).test(e)}const Wm=/[ \t\n\f\r]/g;function Vm(e){return typeof e=="object"?e.type==="text"?Dc(e.value):!1:Dc(e)}function Dc(e){return e.replace(Wm,"")===""}class Li{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Li.prototype.normal={};Li.prototype.property={};Li.prototype.space=void 0;function Nf(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Li(n,r,t)}function ja(e){return e.toLowerCase()}class mt{constructor(t,n){this.attribute=n,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let Ym=0;const de=er(),Me=er(),Ha=er(),$=er(),Te=er(),Sr=er(),xt=er();function er(){return 2**++Ym}const Ga=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:Me,commaOrSpaceSeparated:xt,commaSeparated:Sr,number:$,overloadedBoolean:Ha,spaceSeparated:Te},Symbol.toStringTag,{value:"Module"})),oa=Object.keys(Ga);class Ml extends mt{constructor(t,n,r,i){let s=-1;if(super(t,n),Pc(this,"space",i),typeof r=="number")for(;++s<oa.length;){const o=oa[s];Pc(this,oa[s],(r&Ga[o])===Ga[o])}}}Ml.prototype.defined=!0;function Pc(e,t,n){n&&(e[t]=n)}function Ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ml(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ja(r)]=r,n[ja(s.attribute)]=r}return new Li(t,n,e.space)}const Af=Ur({properties:{ariaActiveDescendant:null,ariaAtomic:Me,ariaAutoComplete:null,ariaBusy:Me,ariaChecked:Me,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Te,ariaCurrent:null,ariaDescribedBy:Te,ariaDetails:null,ariaDisabled:Me,ariaDropEffect:Te,ariaErrorMessage:null,ariaExpanded:Me,ariaFlowTo:Te,ariaGrabbed:Me,ariaHasPopup:null,ariaHidden:Me,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Te,ariaLevel:$,ariaLive:null,ariaModal:Me,ariaMultiLine:Me,ariaMultiSelectable:Me,ariaOrientation:null,ariaOwns:Te,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Me,ariaReadOnly:Me,ariaRelevant:null,ariaRequired:Me,ariaRoleDescription:Te,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Me,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sf(e,t){return t in e?e[t]:t}function Tf(e,t){return Sf(e,t.toLowerCase())}const Zm=Ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Sr,acceptCharset:Te,accessKey:Te,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Te,autoFocus:de,autoPlay:de,blocking:Te,capture:null,charSet:null,checked:de,cite:null,className:Te,cols:$,colSpan:null,content:null,contentEditable:Me,controls:de,controlsList:Te,coords:$|Sr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Ha,draggable:Me,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Te,height:$,hidden:Ha,high:$,href:null,hrefLang:null,htmlFor:Te,httpEquiv:Te,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Te,itemRef:Te,itemScope:de,itemType:Te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:$,pattern:null,ping:Te,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Te,required:de,reversed:de,rows:$,rowSpan:$,sandbox:Te,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Me,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:Me,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Te,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Me,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:Tf}),Xm=Ur({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Te,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:Sr,g2:Sr,glyphName:Sr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sf}),Cf=Ur({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()}}),Of=Ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tf}),If=Ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qm={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"},Jm=/[A-Z]/g,Bc=/-[a-z]/g,eb=/^data[-\w.:]+$/i;function tb(e,t){const n=ja(t);let r=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Bc,rb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Bc.test(s)){let o=s.replace(Jm,nb);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ml}return new i(r,t)}function nb(e){return"-"+e.toLowerCase()}function rb(e){return e.charAt(1).toUpperCase()}const ib=Nf([Af,Zm,Cf,Of,If],"html"),Dl=Nf([Af,Xm,Cf,Of,If],"svg");function sb(e){return e.join(" ").trim()}var It=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pl={},Fc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ob=/\n/g,ab=/^\s*/,lb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,cb=/^:\s*/,ub=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,db=/^[;\s]*/,fb=/^\s+|\s+$/g,hb=`
2
+ `,qc="/",Uc="*",Gn="",pb="comment",gb="declaration";function mb(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(p){var m=p.match(ob);m&&(n+=m.length);var b=p.lastIndexOf(hb);r=~b?p.length-b:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new o(p),c(),m}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var b=m[0];return i(b),e=e.slice(b.length),m}}function c(){l(ab)}function u(p){var m;for(p=p||[];m=d();)m!==!1&&p.push(m);return p}function d(){var p=s();if(!(qc!=e.charAt(0)||Uc!=e.charAt(1))){for(var m=2;Gn!=e.charAt(m)&&(Uc!=e.charAt(m)||qc!=e.charAt(m+1));)++m;if(m+=2,Gn===e.charAt(m-1))return a("End of comment missing");var b=e.slice(2,m-2);return r+=2,i(b),e=e.slice(m),r+=2,p({type:pb,comment:b})}}function h(){var p=s(),m=l(lb);if(m){if(d(),!l(cb))return a("property missing ':'");var b=l(ub),y=p({type:gb,property:$c(m[0].replace(Fc,Gn)),value:b?$c(b[0].replace(Fc,Gn)):Gn});return l(db),y}}function f(){var p=[];u(p);for(var m;m=h();)m!==!1&&(p.push(m),u(p));return p}return c(),f()}function $c(e){return e?e.replace(fb,Gn):Gn}var bb=mb,yb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.default=Eb;const xb=yb(bb);function Eb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,xb.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.camelCase=void 0;var wb=/^--[a-zA-Z0-9_-]+$/,_b=/-([a-z])/g,vb=/^[^-]+$/,kb=/^-(webkit|moz|ms|o|khtml)-/,Nb=/^-(ms)-/,Ab=function(e){return!e||vb.test(e)||wb.test(e)},Sb=function(e,t){return t.toUpperCase()},zc=function(e,t){return"".concat(t,"-")},Tb=function(e,t){return t===void 0&&(t={}),Ab(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Nb,zc):e=e.replace(kb,zc),e.replace(_b,Sb))};Ks.camelCase=Tb;var Cb=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ob=Cb(Pl),Ib=Ks;function Ka(e,t){var n={};return!e||typeof e!="string"||(0,Ob.default)(e,function(r,i){r&&i&&(n[(0,Ib.camelCase)(r,t)]=i)}),n}Ka.default=Ka;var Rb=Ka;const Lb=Mi(Rb),Rf=Lf("end"),Bl=Lf("start");function Lf(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 Mb(e){const t=Bl(e),n=Rf(e);if(t&&n)return{start:t,end:n}}function pi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jc(e.position):"start"in e||"end"in e?jc(e):"line"in e||"column"in e?Wa(e):""}function Wa(e){return Hc(e&&e.line)+":"+Hc(e&&e.column)}function jc(e){return Wa(e&&e.start)+"-"+Wa(e&&e.end)}function Hc(e){return e&&typeof e=="number"?e:1}class Qe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=pi(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qe.prototype.file="";Qe.prototype.name="";Qe.prototype.reason="";Qe.prototype.message="";Qe.prototype.stack="";Qe.prototype.column=void 0;Qe.prototype.line=void 0;Qe.prototype.ancestors=void 0;Qe.prototype.cause=void 0;Qe.prototype.fatal=void 0;Qe.prototype.place=void 0;Qe.prototype.ruleId=void 0;Qe.prototype.source=void 0;const Fl={}.hasOwnProperty,Db=new Map,Pb=/[A-Z]/g,Bb=new Set(["table","tbody","thead","tfoot","tr"]),Fb=new Set(["td","th"]),Mf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qb(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=Wb(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=Kb(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"?Dl:ib,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Df(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Df(e,t,n){if(t.type==="element")return Ub(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $b(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jb(e,t,n);if(t.type==="mdxjsEsm")return zb(e,t);if(t.type==="root")return Hb(e,t,n);if(t.type==="text")return Gb(e,t)}function Ub(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=Bf(e,t.tagName,!1),o=Vb(e,t);let a=Ul(e,t);return Bb.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Vm(l):!0})),Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function $b(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)}wi(e,t.position)}function zb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wi(e,t.position)}function jb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Dl,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Bf(e,t.name,!0),o=Yb(e,t),a=Ul(e,t);return Pf(e,o,s,t),ql(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Hb(e,t,n){const r={};return ql(r,Ul(e,t)),e.create(t,e.Fragment,r,n)}function Gb(e,t){return t.value}function Pf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ql(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kb(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function Wb(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Bl(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Vb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Fl.call(t.properties,i)){const s=Zb(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Fb.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Yb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wi(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else wi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ul(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Db;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Df(e,s,o);a!==void 0&&n.push(a)}return n}function Zb(e,t,n){const r=tb(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?jm(n):sb(n)),r.property==="style"){let i=typeof n=="object"?n:Xb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Qb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Qm[r.property]||r.property:r.attribute,n]}}function Xb(e,t){try{return Lb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Qe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Mf+"#cannot-parse-style-attribute",i}}function Bf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=Mc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=Mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Fl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);wi(e)}function wi(e,t){const n=new Qe("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=Mf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qb(e){const t={};let n;for(n in e)Fl.call(e,n)&&(t[Jb(n)]=e[n]);return t}function Jb(e){let t=e.replace(Pb,ey);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ey(e){return"-"+e.toLowerCase()}const aa={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"]},ty={};function ny(e,t){const n=ty,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ff(e,r,i)}function Ff(e,t,n){if(ry(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 Gc(e.children,t,n)}return Array.isArray(e)?Gc(e,t,n):""}function Gc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ff(e[i],t,n);return r.join("")}function ry(e){return!!(e&&typeof e=="object")}const Kc=document.createElement("i");function $l(e){const t="&"+e+";";Kc.innerHTML=t;const n=Kc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wt(e,t,n,r){const i=e.length;let s=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);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function St(e,t){return e.length>0?(wt(e,e.length,0,t),e):t}const Wc={}.hasOwnProperty;function qf(e){const t={};let n=-1;for(;++n<e.length;)iy(t,e[n]);return t}function iy(e,t){let n;for(n in t){const i=(Wc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Wc.call(i,o)||(i[o]=[]);const a=s[o];sy(i[o],Array.isArray(a)?a:a?[a]:[])}}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wt(e,0,0,r)}function Uf(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 Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const st=Pn(/[A-Za-z]/),Ze=Pn(/[\dA-Za-z]/),oy=Pn(/[#-'*+\--9=?A-Z^-~]/);function Is(e){return e!==null&&(e<32||e===127)}const Va=Pn(/\d/),ay=Pn(/[\dA-Fa-f]/),ly=Pn(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function ke(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const Ws=Pn(new RegExp("\\p{P}|\\p{S}","u")),Yn=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $r(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&Ze(e.charCodeAt(n+1))&&Ze(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);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 be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return ge(l)?(e.enter(n),a(l)):t(l)}function a(l){return ge(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const cy={tokenize:uy};function uy(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return oe(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const dy={tokenize:fy},Vc={tokenize:hy};function fy(e){const t=this,n=[];let r=0,i,s,o;return a;function a(v){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let C=T,N;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){N=t.events[C][1].end;break}y(r);let P=T;for(;P<t.events.length;)t.events[P][1].end={...N},P++;return wt(t.events,C+1,0,t.events.slice(T)),t.events.length=P,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return h(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vc,u,d)(v)}function u(v){return i&&_(),y(r),h(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(v)}function h(v){return t.containerState={},e.attempt(Vc,f,p)(v)}function f(v){return r++,n.push([t.currentConstruct,t.containerState]),h(v)}function p(v){if(v===null){i&&_(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(v)}function m(v){if(v===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return oe(v)?(e.consume(v),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),m)}function b(v,T){const C=t.sliceStream(v);if(T&&C.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<o&&(!i.events[N][1].end||i.events[N][1].end.offset>o))return;const P=t.events.length;let U=P,G,O;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(G){O=t.events[U][1].end;break}G=!0}for(y(r),N=P;N<t.events.length;)t.events[N][1].end={...O},N++;wt(t.events,U+1,0,t.events.slice(P)),t.events.length=N}}function y(v){let T=n.length;for(;T-- >v;){const C=n[T];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function _(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hy(e,t,n){return be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(e){if(e===null||ke(e)||Yn(e))return 1;if(Ws(e))return 2}function Vs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ya={name:"attention",resolveAll:py,tokenize:gy};function py(e,t){let n=-1,r,i,s,o,a,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Yc(d,-l),Yc(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=St(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=St(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=St(c,Vs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=St(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=St(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function gy(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rr(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=Rr(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function Yc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const my={name:"autolink",tokenize:by};function by(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return st(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||Ze(f)?(r=1,a(f)):c(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Ze(f))&&r++<32?(e.consume(f),a):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Is(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):oy(f)?(e.consume(f),c):n(f)}function u(f){return Ze(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||Ze(f))&&r++<63){const p=f===45?h:d;return e.consume(f),p}return n(f)}}const Di={partial:!0,tokenize:yy};function yy(e,t,n){return r;function r(s){return ge(s)?be(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||oe(s)?t(s):n(s)}}const $f={continuation:{tokenize:Ey},exit:wy,name:"blockQuote",tokenize:xy};function xy(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return ge(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function Ey(e,t,n){const r=this;return i;function i(o){return ge(o)?be(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt($f,t,n)(o)}}function wy(e){e.exit("blockQuote")}const zf={name:"characterEscape",tokenize:_y};function _y(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return ly(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const jf={name:"characterReference",tokenize:vy};function vy(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=Ze,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=ay,u):(e.enter("characterReferenceValue"),s=7,o=Va,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===Ze&&!$l(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const Zc={partial:!0,tokenize:Ny},Xc={concrete:!0,name:"codeFenced",tokenize:ky};function ky(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,o=0,a;return l;function l(N){return c(N)}function c(N){const P=r.events[r.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(N)}function u(N){return N===a?(o++,e.consume(N),u):o<3?n(N):(e.exit("codeFencedFenceSequence"),ge(N)?be(e,d,"whitespace")(N):d(N))}function d(N){return N===null||oe(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Zc,m,T)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||oe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):ge(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,f,"whitespace")(N)):N===96&&N===a?n(N):(e.consume(N),h)}function f(N){return N===null||oe(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||oe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===a?n(N):(e.consume(N),p)}function m(N){return e.attempt(i,T,b)(N)}function b(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y}function y(N){return s>0&&ge(N)?be(e,_,"linePrefix",s+1)(N):_(N)}function _(N){return N===null||oe(N)?e.check(Zc,m,T)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||oe(N)?(e.exit("codeFlowValue"),_(N)):(e.consume(N),v)}function T(N){return e.exit("codeFenced"),t(N)}function C(N,P,U){let G=0;return O;function O(Y){return N.enter("lineEnding"),N.consume(Y),N.exit("lineEnding"),j}function j(Y){return N.enter("codeFencedFence"),ge(Y)?be(N,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):B(Y)}function B(Y){return Y===a?(N.enter("codeFencedFenceSequence"),re(Y)):U(Y)}function re(Y){return Y===a?(G++,N.consume(Y),re):G>=o?(N.exit("codeFencedFenceSequence"),ge(Y)?be(N,X,"whitespace")(Y):X(Y)):U(Y)}function X(Y){return Y===null||oe(Y)?(N.exit("codeFencedFence"),P(Y)):U(Y)}}}function Ny(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"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const la={name:"codeIndented",tokenize:Sy},Ay={partial:!0,tokenize:Ty};function Sy(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),be(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):oe(c)?e.attempt(Ay,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||oe(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function Ty(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):be(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):oe(o)?i(o):n(o)}}const Cy={name:"codeText",previous:Iy,resolve:Oy,tokenize:Ry};function Oy(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 Iy(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ry(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):oe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||oe(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class Ly{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&si(this.left,r),s.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),si(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),si(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);si(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);si(this.left,n.reverse())}}}function si(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 Hf(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new Ly(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,My(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return wt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function My(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,b.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),h=b.length;h--;){const y=a.slice(b[h],b[h+1]),_=s.pop();l.push([_,_+y.length-1]),e.splice(_,2,y)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const Dy={resolve:By,tokenize:Fy},Py={partial:!0,tokenize:qy};function By(e){return Hf(e),e}function Fy(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):oe(a)?e.check(Py,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function qy(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),be(e,s,"linePrefix")}function s(o){if(o===null||oe(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Gf(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),h):y===null||y===32||y===41||Is(y)?n(y):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(y))}function h(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||oe(y)?n(y):(e.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function m(y){return!u&&(y===null||y===41||ke(y))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||Is(y)?n(y):(e.consume(y),y===92?b:m)}function b(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Kf(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):oe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||oe(f)||a++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!ge(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Wf(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):oe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||oe(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function gi(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ge(i)?be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Uy={name:"definition",tokenize:zy},$y={partial:!0,tokenize:jy};function zy(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),o(f)}function o(f){return Kf.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return ke(f)?gi(e,c)(f):c(f)}function c(f){return Gf(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt($y,d,d)(f)}function d(f){return ge(f)?be(e,h,"whitespace")(f):h(f)}function h(f){return f===null||oe(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function jy(e,t,n){return r;function r(a){return ke(a)?gi(e,i)(a):n(a)}function i(a){return Wf(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return ge(a)?be(e,o,"whitespace")(a):o(a)}function o(a){return a===null||oe(a)?t(a):n(a)}}const Hy={name:"hardBreakEscape",tokenize:Gy};function Gy(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return oe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Ky={name:"headingAtx",resolve:Wy,tokenize:Vy};function Wy(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Vy(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||ke(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||oe(u)?(e.exit("atxHeading"),t(u)):ge(u)?be(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||ke(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Yy=["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"],Qc=["pre","script","style","textarea"],Zy={concrete:!0,name:"htmlFlow",resolveTo:Jy,tokenize:e0},Xy={partial:!0,tokenize:n0},Qy={partial:!0,tokenize:t0};function Jy(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 e0(e,t,n){const r=this;let i,s,o,a,l;return c;function c(k){return u(k)}function u(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),s=!0,m):k===63?(e.consume(k),i=3,r.interrupt?t:w):st(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function h(k){return k===45?(e.consume(k),i=2,f):k===91?(e.consume(k),i=5,a=0,p):st(k)?(e.consume(k),i=4,r.interrupt?t:w):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:w):n(k)}function p(k){const he="CDATA[";return k===he.charCodeAt(a++)?(e.consume(k),a===he.length?r.interrupt?t:B:p):n(k)}function m(k){return st(k)?(e.consume(k),o=String.fromCharCode(k),b):n(k)}function b(k){if(k===null||k===47||k===62||ke(k)){const he=k===47,se=o.toLowerCase();return!he&&!s&&Qc.includes(se)?(i=1,r.interrupt?t(k):B(k)):Yy.includes(o.toLowerCase())?(i=6,he?(e.consume(k),y):r.interrupt?t(k):B(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):s?_(k):v(k))}return k===45||Ze(k)?(e.consume(k),o+=String.fromCharCode(k),b):n(k)}function y(k){return k===62?(e.consume(k),r.interrupt?t:B):n(k)}function _(k){return ge(k)?(e.consume(k),_):O(k)}function v(k){return k===47?(e.consume(k),O):k===58||k===95||st(k)?(e.consume(k),T):ge(k)?(e.consume(k),v):O(k)}function T(k){return k===45||k===46||k===58||k===95||Ze(k)?(e.consume(k),T):C(k)}function C(k){return k===61?(e.consume(k),N):ge(k)?(e.consume(k),C):v(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,P):ge(k)?(e.consume(k),N):U(k)}function P(k){return k===l?(e.consume(k),l=null,G):k===null||oe(k)?n(k):(e.consume(k),P)}function U(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ke(k)?C(k):(e.consume(k),U)}function G(k){return k===47||k===62||ge(k)?v(k):n(k)}function O(k){return k===62?(e.consume(k),j):n(k)}function j(k){return k===null||oe(k)?B(k):ge(k)?(e.consume(k),j):n(k)}function B(k){return k===45&&i===2?(e.consume(k),I):k===60&&i===1?(e.consume(k),q):k===62&&i===4?(e.consume(k),Q):k===63&&i===3?(e.consume(k),w):k===93&&i===5?(e.consume(k),K):oe(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Xy,ae,re)(k)):k===null||oe(k)?(e.exit("htmlFlowData"),re(k)):(e.consume(k),B)}function re(k){return e.check(Qy,X,ae)(k)}function X(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Y}function Y(k){return k===null||oe(k)?re(k):(e.enter("htmlFlowData"),B(k))}function I(k){return k===45?(e.consume(k),w):B(k)}function q(k){return k===47?(e.consume(k),o="",F):B(k)}function F(k){if(k===62){const he=o.toLowerCase();return Qc.includes(he)?(e.consume(k),Q):B(k)}return st(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),F):B(k)}function K(k){return k===93?(e.consume(k),w):B(k)}function w(k){return k===62?(e.consume(k),Q):k===45&&i===2?(e.consume(k),w):B(k)}function Q(k){return k===null||oe(k)?(e.exit("htmlFlowData"),ae(k)):(e.consume(k),Q)}function ae(k){return e.exit("htmlFlow"),t(k)}}function t0(e,t,n){const r=this;return i;function i(o){return oe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function n0(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Di,t,n)}}const r0={name:"htmlText",tokenize:i0};function i0(e,t,n){const r=this;let i,s,o;return a;function a(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),C):w===63?(e.consume(w),v):st(w)?(e.consume(w),U):n(w)}function c(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),s=0,p):st(w)?(e.consume(w),_):n(w)}function u(w){return w===45?(e.consume(w),f):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):oe(w)?(o=d,q(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),f):d(w)}function f(w){return w===62?I(w):w===45?h(w):d(w)}function p(w){const Q="CDATA[";return w===Q.charCodeAt(s++)?(e.consume(w),s===Q.length?m:p):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),b):oe(w)?(o=m,q(w)):(e.consume(w),m)}function b(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?I(w):w===93?(e.consume(w),y):m(w)}function _(w){return w===null||w===62?I(w):oe(w)?(o=_,q(w)):(e.consume(w),_)}function v(w){return w===null?n(w):w===63?(e.consume(w),T):oe(w)?(o=v,q(w)):(e.consume(w),v)}function T(w){return w===62?I(w):v(w)}function C(w){return st(w)?(e.consume(w),N):n(w)}function N(w){return w===45||Ze(w)?(e.consume(w),N):P(w)}function P(w){return oe(w)?(o=P,q(w)):ge(w)?(e.consume(w),P):I(w)}function U(w){return w===45||Ze(w)?(e.consume(w),U):w===47||w===62||ke(w)?G(w):n(w)}function G(w){return w===47?(e.consume(w),I):w===58||w===95||st(w)?(e.consume(w),O):oe(w)?(o=G,q(w)):ge(w)?(e.consume(w),G):I(w)}function O(w){return w===45||w===46||w===58||w===95||Ze(w)?(e.consume(w),O):j(w)}function j(w){return w===61?(e.consume(w),B):oe(w)?(o=j,q(w)):ge(w)?(e.consume(w),j):G(w)}function B(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,re):oe(w)?(o=B,q(w)):ge(w)?(e.consume(w),B):(e.consume(w),X)}function re(w){return w===i?(e.consume(w),i=void 0,Y):w===null?n(w):oe(w)?(o=re,q(w)):(e.consume(w),re)}function X(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ke(w)?G(w):(e.consume(w),X)}function Y(w){return w===47||w===62||ke(w)?G(w):n(w)}function I(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function q(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),F}function F(w){return ge(w)?be(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):K(w)}function K(w){return e.enter("htmlTextData"),o(w)}}const zl={name:"labelEnd",resolveAll:l0,resolveTo:c0,tokenize:u0},s0={tokenize:d0},o0={tokenize:f0},a0={tokenize:h0};function l0(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&&wt(e,0,e.length,n),e}function c0(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=St(a,e.slice(s+1,s+r+3)),a=St(a,[["enter",u,t]]),a=St(a,Vs(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=St(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=St(a,e.slice(o+1)),a=St(a,[["exit",l,t]]),wt(e,s,e.length,a),e}function u0(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(Ht(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(s0,u,o?u:d)(h):h===91?e.attempt(o0,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(a0,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function d0(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ke(d)?gi(e,s)(d):s(d)}function s(d){return d===41?u(d):Gf(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return ke(d)?gi(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Wf(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ke(d)?gi(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function f0(e,t,n){const r=this;return i;function i(a){return Kf.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function h0(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const p0={name:"labelStartImage",resolveAll:zl.resolveAll,tokenize:g0};function g0(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const m0={name:"labelStartLink",resolveAll:zl.resolveAll,tokenize:b0};function b0(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const ca={name:"lineEnding",tokenize:y0};function y0(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const vs={name:"thematicBreak",tokenize:x0};function x0(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||oe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?be(e,a,"whitespace")(c):a(c))}}const ht={continuation:{tokenize:v0},exit:N0,name:"list",tokenize:_0},E0={partial:!0,tokenize:A0},w0={partial:!0,tokenize:k0};function _0(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(f){const p=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Va(f)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(vs,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Va(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Di,r.interrupt?n:u,e.attempt(E0,h,d))}function u(f){return r.containerState.initialBlankLine=!0,s++,h(f)}function d(f){return ge(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function v0(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Di,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!ge(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(w0,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(ht,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function k0(e,t,n){const r=this;return be(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function N0(e){e.exit(this.containerState.type)}function A0(e,t,n){const r=this;return be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!ge(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Jc={name:"setextUnderline",resolveTo:S0,tokenize:T0};function S0(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function T0(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),ge(c)?be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||oe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C0={tokenize:O0};function O0(e){const t=this,n=e.attempt(Di,r,e.attempt(this.parser.constructs.flowInitial,i,be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Dy,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const I0={resolveAll:Yf()},R0=Vf("string"),L0=Vf("text");function Vf(e){return{resolveAll:Yf(e==="text"?M0:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Yf(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function M0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const D0={42:ht,43:ht,45:ht,48:ht,49:ht,50:ht,51:ht,52:ht,53:ht,54:ht,55:ht,56:ht,57:ht,62:$f},P0={91:Uy},B0={[-2]:la,[-1]:la,32:la},F0={35:Ky,42:vs,45:[Jc,vs],60:Zy,61:Jc,95:vs,96:Xc,126:Xc},q0={38:jf,92:zf},U0={[-5]:ca,[-4]:ca,[-3]:ca,33:p0,38:jf,42:Ya,60:[my,r0],91:m0,92:[Hy,zf],93:zl,95:Ya,96:Cy},$0={null:[Ya,I0]},z0={null:[42,95]},j0={null:[]},H0=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z0,contentInitial:P0,disable:j0,document:D0,flow:F0,flowInitial:B0,insideSpan:$0,string:q0,text:U0},Symbol.toStringTag,{value:"Module"}));function G0(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={},s=[];let o=[],a=[];const l={attempt:P(C),check:P(N),consume:_,enter:v,exit:T,interrupt:P(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(j){return o=St(o,j),b(),o[o.length-1]!==null?[]:(U(t,0),c.events=Vs(s,c.events,c),c.events)}function h(j,B){return W0(f(j),B)}function f(j){return K0(o,j)}function p(){const{_bufferIndex:j,_index:B,line:re,column:X,offset:Y}=r;return{_bufferIndex:j,_index:B,line:re,column:X,offset:Y}}function m(j){i[j.line]=j.column,O()}function b(){let j;for(;r._index<o.length;){const B=o[r._index];if(typeof B=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<B.length;)y(B.charCodeAt(r._bufferIndex));else y(B)}}function y(j){u=u(j)}function _(j){oe(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,O()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=j}function v(j,B){const re=B||{};return re.type=j,re.start=p(),c.events.push(["enter",re,c]),a.push(re),re}function T(j){const B=a.pop();return B.end=p(),c.events.push(["exit",B,c]),B}function C(j,B){U(j,B.from)}function N(j,B){B.restore()}function P(j,B){return re;function re(X,Y,I){let q,F,K,w;return Array.isArray(X)?ae(X):"tokenize"in X?ae([X]):Q(X);function Q(we){return at;function at(Ne){const Je=Ne!==null&&we[Ne],et=Ne!==null&&we.null,lt=[...Array.isArray(Je)?Je:Je?[Je]:[],...Array.isArray(et)?et:et?[et]:[]];return ae(lt)(Ne)}}function ae(we){return q=we,F=0,we.length===0?I:k(we[F])}function k(we){return at;function at(Ne){return w=G(),K=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?se():we.tokenize.call(B?Object.assign(Object.create(c),B):c,l,he,se)(Ne)}}function he(we){return j(K,w),Y}function se(we){return w.restore(),++F<q.length?k(q[F]):I}}}function U(j,B){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&wt(c.events,B,c.events.length-B,j.resolve(c.events.slice(B),c)),j.resolveTo&&(c.events=j.resolveTo(c.events,c))}function G(){const j=p(),B=c.previous,re=c.currentConstruct,X=c.events.length,Y=Array.from(a);return{from:X,restore:I};function I(){r=j,c.previous=B,c.currentConstruct=re,c.events.length=X,a=Y,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function K0(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function W0(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
3
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(s)}i=s===-2,r.push(o)}return r.join("")}function V0(e){const r={constructs:qf([H0,...(e||{}).extensions||[]]),content:i(cy),defined:[],document:i(dy),flow:i(C0),lazy:{},string:i(R0),text:i(L0)};return r;function i(s){return o;function o(a){return G0(r,s,a)}}}function Y0(e){for(;!Hf(e););return e}const eu=/[\0\t\n\r]/g;function Z0(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(eu.lastIndex=d,c=eu.exec(s),h=c&&c.index!==void 0?c.index:s.length,f=s.charCodeAt(h),!c){t=s.slice(d);break}if(f===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const X0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Q0(e){return e.replace(X0,J0)}function J0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Uf(n.slice(s?2:1),s?16:10)}return $l(n)||e}const Zf={}.hasOwnProperty;function eE(e,t,n){return typeof t!="string"&&(n=t,t=void 0),tE(n)(Y0(V0(n).document().write(Z0()(e,t,!0))))}function tE(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Mt),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Re),blockQuote:s(et),characterEscape:G,characterReference:G,codeFenced:s(lt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(lt,o),codeText:s(Lt,o),codeTextData:G,data:G,codeFlowValue:G,definition:s(bt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(vt),hardBreakEscape:s(pe),hardBreakTrailing:s(pe),htmlFlow:s(je,o),htmlFlowData:G,htmlText:s(je,o),htmlTextData:G,image:s(ie),label:o,link:s(Mt),listItem:s(me),listItemValue:h,listOrdered:s(ve,d),listUnordered:s(ve),paragraph:s(Dt),reference:k,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Re),strong:s(ct),thematicBreak:s(kt)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:Je,autolinkProtocol:Ne,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:we,characterReference:at,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:O,codeIndented:l(y),codeText:l(Y),codeTextData:O,data:O,definition:l(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(re),htmlFlowData:O,htmlText:l(X),htmlTextData:O,image:l(q),label:K,labelText:F,lineEnding:j,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:w,resourceTitleString:Q,resource:ae,setextHeading:l(U),setextHeadingLineSequence:P,setextHeadingText:N,strong:l(),thematicBreak:l()}};Xf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let R={type:"root",children:[]};const z={stack:[R],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},W=[];let te=-1;for(;++te<S.length;)if(S[te][1].type==="listOrdered"||S[te][1].type==="listUnordered")if(S[te][0]==="enter")W.push(te);else{const Ae=W.pop();te=i(S,Ae,te)}for(te=-1;++te<S.length;){const Ae=t[S[te][0]];Zf.call(Ae,S[te][1].type)&&Ae[S[te][1].type].call(Object.assign({sliceSerialize:S[te][2].sliceSerialize},z),S[te][1])}if(z.tokenStack.length>0){const Ae=z.tokenStack[z.tokenStack.length-1];(Ae[1]||tu).call(z,void 0,Ae[0])}for(R.position={start:An(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:An(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)R=t.transforms[te](R)||R;return R}function i(S,R,z){let W=R-1,te=-1,Ae=!1,ut,tt,Pt,Nt;for(;++W<=z;){const Be=S[W];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?te++:te--,Nt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(ut&&!Nt&&!te&&!Pt&&(Pt=W),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!te&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||te===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(ut){let yt=W;for(tt=void 0;yt--;){const qe=S[yt];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;tt&&(S[tt][1].type="lineEndingBlank",Ae=!0),qe[1].type="lineEnding",tt=yt}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}Pt&&(!tt||Pt<tt)&&(ut._spread=!0),ut.end=Object.assign({},tt?S[tt][1].start:Be[1].end),S.splice(tt||W,0,["exit",ut,Be[2]]),W++,z++}if(Be[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};ut=yt,S.splice(W,0,["enter",yt,Be[2]]),W++,z++,Pt=void 0,Nt=!0}}}return S[R][1]._spread=Ae,z}function s(S,R){return z;function z(W){a.call(this,S(W),W),R&&R.call(this,W)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(S,R,z){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([R,z||void 0]),S.position={start:An(R.start),end:void 0}}function l(S){return R;function R(z){S&&S.call(this,z),c.call(this,z)}}function c(S,R){const z=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==S.type&&(R?R.call(this,S,W[0]):(W[1]||tu).call(this,S,W[0]));else throw new Error("Cannot close `"+S.type+"` ("+pi({start:S.start,end:S.end})+"): it’s not open");z.position.end=An(S.end)}function u(){return ny(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(S){if(this.data.expectingFirstListItemValue){const R=this.stack[this.stack.length-2];R.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function f(){const S=this.resume(),R=this.stack[this.stack.length-1];R.lang=S}function p(){const S=this.resume(),R=this.stack[this.stack.length-1];R.meta=S}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/(\r?\n|\r)$/g,"")}function _(S){const R=this.resume(),z=this.stack[this.stack.length-1];z.label=R,z.identifier=Ht(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function T(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function C(S){const R=this.stack[this.stack.length-1];if(!R.depth){const z=this.sliceSerialize(S).length;R.depth=z}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function P(S){const R=this.stack[this.stack.length-1];R.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function G(S){const z=this.stack[this.stack.length-1].children;let W=z[z.length-1];(!W||W.type!=="text")&&(W=He(),W.position={start:An(S.start),end:void 0},z.push(W)),this.stack.push(W)}function O(S){const R=this.stack.pop();R.value+=this.sliceSerialize(S),R.position.end=An(S.end)}function j(S){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=R.children[R.children.length-1];z.position.end=An(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(R.type)&&(G.call(this,S),O.call(this,S))}function B(){this.data.atHardBreak=!0}function re(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function X(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function Y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function I(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function F(S){const R=this.sliceSerialize(S),z=this.stack[this.stack.length-2];z.label=Q0(R),z.identifier=Ht(R).toLowerCase()}function K(){const S=this.stack[this.stack.length-1],R=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const W=S.children;z.children=W}else z.alt=R}function w(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function Q(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function ae(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function he(S){const R=this.resume(),z=this.stack[this.stack.length-1];z.label=R,z.identifier=Ht(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function se(S){this.data.characterReferenceType=S.type}function we(S){const R=this.sliceSerialize(S),z=this.data.characterReferenceType;let W;z?(W=Uf(R,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=$l(R);const te=this.stack[this.stack.length-1];te.value+=W}function at(S){const R=this.stack.pop();R.position.end=An(S.end)}function Ne(S){O.call(this,S);const R=this.stack[this.stack.length-1];R.url=this.sliceSerialize(S)}function Je(S){O.call(this,S);const R=this.stack[this.stack.length-1];R.url="mailto:"+this.sliceSerialize(S)}function et(){return{type:"blockquote",children:[]}}function lt(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vt(){return{type:"emphasis",children:[]}}function Re(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function je(){return{type:"html",value:""}}function ie(){return{type:"image",title:null,url:"",alt:null}}function Mt(){return{type:"link",title:null,url:"",children:[]}}function ve(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function me(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function An(e){return{line:e.line,column:e.column,offset:e.offset}}function Xf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xf(e,r):nE(e,r)}}function nE(e,t){let n;for(n in t)if(Zf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function tu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is still open")}function rE(e){const t=this;t.parser=n;function n(r){return eE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function iE(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 sE(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function oE(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 s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function aE(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lE(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cE(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$r(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function uE(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 dE(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qf(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),s=i[0];s&&s.type==="text"?s.value="["+s.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 fE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={src:$r(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function hE(e,t){const n={src:$r(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 pE(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 gE(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={href:$r(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function mE(e,t){const n={href:$r(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 bE(e,t,n){const r=e.all(t),i=n?yE(n):Jf(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
4
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function V0(e){const r={constructs:qf([H0,...(e||{}).extensions||[]]),content:i(cy),defined:[],document:i(dy),flow:i(C0),lazy:{},string:i(R0),text:i(L0)};return r;function i(s){return o;function o(a){return G0(r,s,a)}}}function Y0(e){for(;!Hf(e););return e}const eu=/[\0\t\n\r]/g;function Z0(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(eu.lastIndex=d,c=eu.exec(s),h=c&&c.index!==void 0?c.index:s.length,f=s.charCodeAt(h),!c){t=s.slice(d);break}if(f===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const X0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Q0(e){return e.replace(X0,J0)}function J0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Uf(n.slice(s?2:1),s?16:10)}return $l(n)||e}const Zf={}.hasOwnProperty;function ex(e,t,n){return typeof t!="string"&&(n=t,t=void 0),tx(n)(Y0(V0(n).document().write(Z0()(e,t,!0))))}function tx(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Mt),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Re),blockQuote:s(et),characterEscape:G,characterReference:G,codeFenced:s(lt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(lt,o),codeText:s(Lt,o),codeTextData:G,data:G,codeFlowValue:G,definition:s(bt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(vt),hardBreakEscape:s(pe),hardBreakTrailing:s(pe),htmlFlow:s(je,o),htmlFlowData:G,htmlText:s(je,o),htmlTextData:G,image:s(ie),label:o,link:s(Mt),listItem:s(me),listItemValue:h,listOrdered:s(ve,d),listUnordered:s(ve),paragraph:s(Dt),reference:k,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Re),strong:s(ct),thematicBreak:s(kt)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:Je,autolinkProtocol:Ne,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:we,characterReference:at,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:O,codeIndented:l(y),codeText:l(Y),codeTextData:O,data:O,definition:l(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(re),htmlFlowData:O,htmlText:l(X),htmlTextData:O,image:l(q),label:K,labelText:F,lineEnding:j,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:he,resourceDestinationString:w,resourceTitleString:Q,resource:ae,setextHeading:l(U),setextHeadingLineSequence:P,setextHeadingText:N,strong:l(),thematicBreak:l()}};Xf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let R={type:"root",children:[]};const z={stack:[R],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},W=[];let te=-1;for(;++te<S.length;)if(S[te][1].type==="listOrdered"||S[te][1].type==="listUnordered")if(S[te][0]==="enter")W.push(te);else{const Ae=W.pop();te=i(S,Ae,te)}for(te=-1;++te<S.length;){const Ae=t[S[te][0]];Zf.call(Ae,S[te][1].type)&&Ae[S[te][1].type].call(Object.assign({sliceSerialize:S[te][2].sliceSerialize},z),S[te][1])}if(z.tokenStack.length>0){const Ae=z.tokenStack[z.tokenStack.length-1];(Ae[1]||tu).call(z,void 0,Ae[0])}for(R.position={start:An(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:An(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)R=t.transforms[te](R)||R;return R}function i(S,R,z){let W=R-1,te=-1,Ae=!1,ut,tt,Pt,Nt;for(;++W<=z;){const Be=S[W];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?te++:te--,Nt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(ut&&!Nt&&!te&&!Pt&&(Pt=W),Nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nt=void 0}if(!te&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||te===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(ut){let yt=W;for(tt=void 0;yt--;){const qe=S[yt];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;tt&&(S[tt][1].type="lineEndingBlank",Ae=!0),qe[1].type="lineEnding",tt=yt}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}Pt&&(!tt||Pt<tt)&&(ut._spread=!0),ut.end=Object.assign({},tt?S[tt][1].start:Be[1].end),S.splice(tt||W,0,["exit",ut,Be[2]]),W++,z++}if(Be[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};ut=yt,S.splice(W,0,["enter",yt,Be[2]]),W++,z++,Pt=void 0,Nt=!0}}}return S[R][1]._spread=Ae,z}function s(S,R){return z;function z(W){a.call(this,S(W),W),R&&R.call(this,W)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(S,R,z){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([R,z||void 0]),S.position={start:An(R.start),end:void 0}}function l(S){return R;function R(z){S&&S.call(this,z),c.call(this,z)}}function c(S,R){const z=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==S.type&&(R?R.call(this,S,W[0]):(W[1]||tu).call(this,S,W[0]));else throw new Error("Cannot close `"+S.type+"` ("+pi({start:S.start,end:S.end})+"): it’s not open");z.position.end=An(S.end)}function u(){return ny(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(S){if(this.data.expectingFirstListItemValue){const R=this.stack[this.stack.length-2];R.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function f(){const S=this.resume(),R=this.stack[this.stack.length-1];R.lang=S}function p(){const S=this.resume(),R=this.stack[this.stack.length-1];R.meta=S}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S.replace(/(\r?\n|\r)$/g,"")}function _(S){const R=this.resume(),z=this.stack[this.stack.length-1];z.label=R,z.identifier=Ht(this.sliceSerialize(S)).toLowerCase()}function v(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function T(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function C(S){const R=this.stack[this.stack.length-1];if(!R.depth){const z=this.sliceSerialize(S).length;R.depth=z}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function P(S){const R=this.stack[this.stack.length-1];R.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function G(S){const z=this.stack[this.stack.length-1].children;let W=z[z.length-1];(!W||W.type!=="text")&&(W=He(),W.position={start:An(S.start),end:void 0},z.push(W)),this.stack.push(W)}function O(S){const R=this.stack.pop();R.value+=this.sliceSerialize(S),R.position.end=An(S.end)}function j(S){const R=this.stack[this.stack.length-1];if(this.data.atHardBreak){const z=R.children[R.children.length-1];z.position.end=An(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(R.type)&&(G.call(this,S),O.call(this,S))}function B(){this.data.atHardBreak=!0}function re(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function X(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function Y(){const S=this.resume(),R=this.stack[this.stack.length-1];R.value=S}function I(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function q(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const R=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=R,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function F(S){const R=this.sliceSerialize(S),z=this.stack[this.stack.length-2];z.label=Q0(R),z.identifier=Ht(R).toLowerCase()}function K(){const S=this.stack[this.stack.length-1],R=this.resume(),z=this.stack[this.stack.length-1];if(this.data.inReference=!0,z.type==="link"){const W=S.children;z.children=W}else z.alt=R}function w(){const S=this.resume(),R=this.stack[this.stack.length-1];R.url=S}function Q(){const S=this.resume(),R=this.stack[this.stack.length-1];R.title=S}function ae(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function he(S){const R=this.resume(),z=this.stack[this.stack.length-1];z.label=R,z.identifier=Ht(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function se(S){this.data.characterReferenceType=S.type}function we(S){const R=this.sliceSerialize(S),z=this.data.characterReferenceType;let W;z?(W=Uf(R,z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=$l(R);const te=this.stack[this.stack.length-1];te.value+=W}function at(S){const R=this.stack.pop();R.position.end=An(S.end)}function Ne(S){O.call(this,S);const R=this.stack[this.stack.length-1];R.url=this.sliceSerialize(S)}function Je(S){O.call(this,S);const R=this.stack[this.stack.length-1];R.url="mailto:"+this.sliceSerialize(S)}function et(){return{type:"blockquote",children:[]}}function lt(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vt(){return{type:"emphasis",children:[]}}function Re(){return{type:"heading",depth:0,children:[]}}function pe(){return{type:"break"}}function je(){return{type:"html",value:""}}function ie(){return{type:"image",title:null,url:"",alt:null}}function Mt(){return{type:"link",title:null,url:"",children:[]}}function ve(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function me(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Dt(){return{type:"paragraph",children:[]}}function ct(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function An(e){return{line:e.line,column:e.column,offset:e.offset}}function Xf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xf(e,r):nx(e,r)}}function nx(e,t){let n;for(n in t)if(Zf.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function tu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pi({start:t.start,end:t.end})+") is still open")}function rx(e){const t=this;t.parser=n;function n(r){return ex(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ix(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 sx(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function ox(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 s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function ax(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lx(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cx(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$r(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function ux(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 dx(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qf(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),s=i[0];s&&s.type==="text"?s.value="["+s.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 fx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={src:$r(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function hx(e,t){const n={src:$r(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 px(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 gx(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qf(e,t);const i={href:$r(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function mx(e,t){const n={href:$r(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 bx(e,t,n){const r=e.all(t),i=n?yx(n):Jf(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
7
7
  `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
8
- `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function yE(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jf(n[r])}return t}function Jf(e){const t=e.spread;return t??e.children.length>1}function EE(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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function xE(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wE(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _E(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vE(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)},a=Bl(t.children[1]),l=Rf(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function kE(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},f=o?o[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:s,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function NE(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nu=9,ru=32;function AE(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(iu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(iu(t.slice(i),i>0,!1)),s.join("")}function iu(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===nu||s===ru;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===nu||s===ru;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function SE(e,t){const n={type:"text",value:AE(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function TE(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const CE={blockquote:iE,break:sE,code:oE,delete:aE,emphasis:lE,footnoteReference:cE,heading:uE,html:dE,imageReference:fE,image:hE,inlineCode:pE,linkReference:gE,link:mE,listItem:bE,list:EE,paragraph:xE,root:wE,strong:_E,table:vE,tableCell:NE,tableRow:kE,text:SE,thematicBreak:TE,toml:ss,yaml:ss,definition:ss,footnoteDefinition:ss};function ss(){}const eh=-1,Ys=0,mi=1,Rs=2,jl=3,Hl=4,Gl=5,Kl=6,th=7,nh=8,su=typeof self=="object"?self:globalThis,OE=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Ys:case eh:return n(o,i);case mi:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Rs:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case jl:return n(new Date(o),i);case Hl:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Gl:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case Kl:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case th:{const{name:a,message:l}=o;return n(new su[a](l),i)}case nh: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:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new su[s](o),i)};return r},ou=e=>OE(new Map,e)(0),mr="",{toString:IE}={},{keys:RE}=Object,oi=e=>{const t=typeof e;if(t!=="object"||!e)return[Ys,t];const n=IE.call(e).slice(8,-1);switch(n){case"Array":return[mi,mr];case"Object":return[Rs,mr];case"Date":return[jl,mr];case"RegExp":return[Hl,mr];case"Map":return[Gl,mr];case"Set":return[Kl,mr];case"DataView":return[mi,n]}return n.includes("Array")?[mi,n]:n.includes("Error")?[th,n]:[Rs,n]},os=([e,t])=>e===Ys&&(t==="function"||t==="symbol"),LE=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=oi(o);switch(a){case Ys:{let u=o;switch(l){case"bigint":a=nh,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([eh],o)}return i([a,u],o)}case mi:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Rs:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of RE(o))(e||!os(oi(o[h])))&&u.push([s(h),s(o[h])]);return d}case jl:return i([a,o.toISOString()],o);case Hl:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Gl:{const u=[],d=i([a,u],o);for(const[h,f]of o)(e||!(os(oi(h))||os(oi(f))))&&u.push([s(h),s(f)]);return d}case Kl:{const u=[],d=i([a,u],o);for(const h of o)(e||!os(oi(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},au=(e,{json:t,lossy:n}={})=>{const r=[];return LE(!(t||n),!!t,new Map,r)(e),r},Ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ou(au(e,t)):structuredClone(e):(e,t)=>ou(au(e,t));function ME(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 DE(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function PE(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ME,r=e.options.footnoteBackLabel||DE,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=$r(d.toLowerCase());let f=0;const p=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++f<=m;){p.length>0&&p.push({type:"text",value:" "});let _=typeof n=="string"?n:n(l,f);typeof _=="string"&&(_={type:"text",value:_}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const _=b.children[b.children.length-1];_&&_.type==="text"?_.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ls(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
8
+ `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function yx(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Jf(n[r])}return t}function Jf(e){const t=e.spread;return t??e.children.length>1}function xx(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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Ex(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wx(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _x(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vx(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)},a=Bl(t.children[1]),l=Rf(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function kx(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},f=o?o[l]:void 0;f&&(h.align=f);let p={type:"element",tagName:s,properties:h,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function Nx(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nu=9,ru=32;function Ax(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(iu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(iu(t.slice(i),i>0,!1)),s.join("")}function iu(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===nu||s===ru;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===nu||s===ru;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Sx(e,t){const n={type:"text",value:Ax(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tx(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Cx={blockquote:ix,break:sx,code:ox,delete:ax,emphasis:lx,footnoteReference:cx,heading:ux,html:dx,imageReference:fx,image:hx,inlineCode:px,linkReference:gx,link:mx,listItem:bx,list:xx,paragraph:Ex,root:wx,strong:_x,table:vx,tableCell:Nx,tableRow:kx,text:Sx,thematicBreak:Tx,toml:ss,yaml:ss,definition:ss,footnoteDefinition:ss};function ss(){}const eh=-1,Ys=0,mi=1,Rs=2,jl=3,Hl=4,Gl=5,Kl=6,th=7,nh=8,su=typeof self=="object"?self:globalThis,Ox=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Ys:case eh:return n(o,i);case mi:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Rs:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case jl:return n(new Date(o),i);case Hl:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Gl:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case Kl:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case th:{const{name:a,message:l}=o;return n(new su[a](l),i)}case nh: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:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new su[s](o),i)};return r},ou=e=>Ox(new Map,e)(0),mr="",{toString:Ix}={},{keys:Rx}=Object,oi=e=>{const t=typeof e;if(t!=="object"||!e)return[Ys,t];const n=Ix.call(e).slice(8,-1);switch(n){case"Array":return[mi,mr];case"Object":return[Rs,mr];case"Date":return[jl,mr];case"RegExp":return[Hl,mr];case"Map":return[Gl,mr];case"Set":return[Kl,mr];case"DataView":return[mi,n]}return n.includes("Array")?[mi,n]:n.includes("Error")?[th,n]:[Rs,n]},os=([e,t])=>e===Ys&&(t==="function"||t==="symbol"),Lx=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=oi(o);switch(a){case Ys:{let u=o;switch(l){case"bigint":a=nh,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([eh],o)}return i([a,u],o)}case mi:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Rs:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of Rx(o))(e||!os(oi(o[h])))&&u.push([s(h),s(o[h])]);return d}case jl:return i([a,o.toISOString()],o);case Hl:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Gl:{const u=[],d=i([a,u],o);for(const[h,f]of o)(e||!(os(oi(h))||os(oi(f))))&&u.push([s(h),s(f)]);return d}case Kl:{const u=[],d=i([a,u],o);for(const h of o)(e||!os(oi(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},au=(e,{json:t,lossy:n}={})=>{const r=[];return Lx(!(t||n),!!t,new Map,r)(e),r},Ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ou(au(e,t)):structuredClone(e):(e,t)=>ou(au(e,t));function Mx(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 Dx(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Px(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mx,r=e.options.footnoteBackLabel||Dx,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=$r(d.toLowerCase());let f=0;const p=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++f<=m;){p.length>0&&p.push({type:"text",value:" "});let _=typeof n=="string"?n:n(l,f);typeof _=="string"&&(_={type:"text",value:_}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,f),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const _=b.children[b.children.length-1];_&&_.type==="text"?_.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ls(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
9
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
- `}]}}const rh=function(e){if(e==null)return UE;if(typeof e=="function")return Zs(e);if(typeof e=="object")return Array.isArray(e)?BE(e):FE(e);if(typeof e=="string")return qE(e);throw new Error("Expected function, string, or object as test")};function BE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rh(e[n]);return Zs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function FE(e){const t=e;return Zs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function qE(e){return Zs(t);function t(n){return n&&n.type===e}}function Zs(e){return t;function t(n,r,i){return!!($E(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function UE(){return!0}function $E(e){return e!==null&&typeof e=="object"&&"type"in e}const ih=[],zE=!0,lu=!1,jE="skip";function HE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=rh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ih,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=GE(n(l,u)),f[0]===lu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==jE)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===lu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function GE(e){return Array.isArray(e)?e:typeof e=="number"?[zE,e]:e==null?ih:[e]}function KE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),HE(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const Za={}.hasOwnProperty,WE={};function VE(e,t){const n=t||WE,r=new Map,i=new Map,s=new Map,o={...CE,...n.handlers},a={all:c,applyData:ZE,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:YE,wrap:QE};return KE(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,f=a.handlers[h];if(Za.call(a.handlers,h)&&f)return f(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:m,...b}=u,y=Ls(b);return y.children=a.all(u),y}return Ls(u)}return(a.options.unknownHandler||XE)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const p=a.one(h[f],u);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=cu(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=cu(m.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function YE(e,t){e.position&&(t.position=Mb(e))}function ZE(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Ls(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function XE(e,t){const n=t.data||{},r="value"in t&&!(Za.call(n,"hProperties")||Za.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 QE(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
10
+ `}]}}const rh=function(e){if(e==null)return Ux;if(typeof e=="function")return Zs(e);if(typeof e=="object")return Array.isArray(e)?Bx(e):Fx(e);if(typeof e=="string")return qx(e);throw new Error("Expected function, string, or object as test")};function Bx(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rh(e[n]);return Zs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Fx(e){const t=e;return Zs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function qx(e){return Zs(t);function t(n){return n&&n.type===e}}function Zs(e){return t;function t(n,r,i){return!!($x(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ux(){return!0}function $x(e){return e!==null&&typeof e=="object"&&"type"in e}const ih=[],zx=!0,lu=!1,jx="skip";function Hx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=rh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=ih,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Gx(n(l,u)),f[0]===lu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==jx)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===lu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function Gx(e){return Array.isArray(e)?e:typeof e=="number"?[zx,e]:e==null?ih:[e]}function Kx(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),Hx(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const Za={}.hasOwnProperty,Wx={};function Vx(e,t){const n=t||Wx,r=new Map,i=new Map,s=new Map,o={...Cx,...n.handlers},a={all:c,applyData:Zx,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:Yx,wrap:Qx};return Kx(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,f=a.handlers[h];if(Za.call(a.handlers,h)&&f)return f(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:m,...b}=u,y=Ls(b);return y.children=a.all(u),y}return Ls(u)}return(a.options.unknownHandler||Xx)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let f=-1;for(;++f<h.length;){const p=a.one(h[f],u);if(p){if(f&&h[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=cu(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=cu(m.value))}Array.isArray(p)?d.push(...p):d.push(p)}}}return d}}function Yx(e,t){e.position&&(t.position=Mb(e))}function Zx(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,Ls(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Xx(e,t){const n=t.data||{},r="value"in t&&!(Za.call(n,"hProperties")||Za.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 Qx(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
11
  `});++r<e.length;)r&&n.push({type:"text",value:`
12
12
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
- `}),n}function cu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uu(e,t){const n=VE(e,t),r=n.one(e,void 0),i=PE(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
14
- `},i),s}function JE(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function du(e){if(e)throw e}var ks=Object.prototype.hasOwnProperty,sh=Object.prototype.toString,fu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sh.call(t)==="[object Array]"},gu=function(t){if(!t||sh.call(t)!=="[object Object]")return!1;var n=ks.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ks.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ks.call(t,i)},mu=function(t,n){fu&&n.name==="__proto__"?fu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bu=function(t,n){if(n==="__proto__")if(ks.call(t,n)){if(hu)return hu(t,n).value}else return;return t[n]},e1=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=bu(a,n),i=bu(t,n),a!==i&&(u&&i&&(gu(i)||(s=pu(i)))?(s?(s=!1,o=r&&pu(r)?r:[]):o=r&&gu(r)?r:{},mu(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&mu(a,{name:n,newValue:i}));return a};const ua=Mi(e1);function Xa(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 t1(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?n1(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function n1(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const rn={basename:r1,dirname:i1,extname:s1,join:o1,sep:"/"};function r1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function i1(e){if(Pi(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 s1(e){Pi(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function o1(...e){let t=-1,n;for(;++t<e.length;)Pi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":a1(n)}function a1(e){Pi(e);const t=e.codePointAt(0)===47;let n=l1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function l1(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=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,s=0}else a===46&&s>-1?s++:s=-1}return n}function Pi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const c1={cwd:u1};function u1(){return"/"}function Qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d1(e){if(typeof e=="string")e=new URL(e);else if(!Qa(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 f1(e)}function f1(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 da=["history","path","basename","stem","extname","dirname"];class oh{constructor(t){let n;t?Qa(t)?n={path:t}:typeof t=="string"||h1(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":c1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<da.length;){const s=da[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){ha(t,"basename"),fa(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){yu(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(fa(t,"extname"),yu(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=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qa(t)&&(t=d1(t)),ha(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){ha(t,"stem"),fa(t,"stem"),this.path=rn.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 Qe(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 fa(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function ha(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function h1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p1=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},g1={}.hasOwnProperty;class Wl extends p1{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=t1()}copy(){const t=new Wl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ma("data",this.frozen),this.namespace[t]=n,this):g1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ma("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=as(t),r=this.parser||this.Parser;return pa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pa("process",this.parser||this.Parser),ga("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=as(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);y1(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),pa("processSync",this.parser||this.Parser),ga("processSync",this.compiler||this.Compiler),this.process(t,i),xu("processSync","process",n),r;function i(s,o){n=!0,du(s),r=o}}run(t,n,r){Eu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=as(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),xu("runSync","run",r),i;function s(o,a){du(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=as(n),i=this.compiler||this.Compiler;return ga("stringify",i),Eu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ma("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ua(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=r[h][1];Xa(m)&&Xa(f)&&(f=ua(!0,m,f)),r[h]=[c,f,...p]}}}}const m1=new Wl().freeze();function pa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ma(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 Eu(e){if(!Xa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function as(e){return b1(e)?e:new oh(e)}function b1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y1(e){return typeof e=="string"||E1(e)}function E1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah=function(e){if(e==null)return v1;if(typeof e=="function")return Xs(e);if(typeof e=="object")return Array.isArray(e)?x1(e):w1(e);if(typeof e=="string")return _1(e);throw new Error("Expected function, string, or object as test")};function x1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ah(e[n]);return Xs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function w1(e){const t=e;return Xs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function _1(e){return Xs(t);function t(n){return n&&n.type===e}}function Xs(e){return t;function t(n,r,i){return!!(k1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function v1(){return!0}function k1(e){return e!==null&&typeof e=="object"&&"type"in e}const lh=[],N1=!0,wu=!1,A1="skip";function S1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ah(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=lh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=T1(n(l,u)),f[0]===wu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==A1)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===wu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function T1(e){return Array.isArray(e)?e:typeof e=="number"?[N1,e]:e==null?lh:[e]}function C1(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),S1(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const O1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_u=[],vu={allowDangerousHtml:!0},I1=/^(https?|ircs?|mailto|xmpp)$/i,R1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const t=L1(e),n=M1(e);return D1(t.runSync(t.parse(n),n),e)}function L1(e){const t=e.rehypePlugins||_u,n=e.remarkPlugins||_u,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vu}:vu;return m1().use(rE).use(n).use(JE,r).use(t)}function M1(e){const t=e.children||"",n=new oh;return typeof t=="string"&&(n.value=t),n}function D1(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||P1;for(const u of R1)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+O1+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),C1(e,c),qb(e,{Fragment:x.Fragment,components:i,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in aa)if(Object.hasOwn(aa,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],m=aa[f];(m===null||m.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function P1(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||I1.test(e.slice(0,t))?e:""}function ku(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 B1(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Vl=function(e){if(e==null)return $1;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?F1(e):q1(e);if(typeof e=="string")return U1(e);throw new Error("Expected function, string, or object as test")};function F1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vl(e[n]);return Qs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function q1(e){const t=e;return Qs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function U1(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,i){return!!(z1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $1(){return!0}function z1(e){return e!==null&&typeof e=="object"&&"type"in e}const uh=[],j1=!0,Nu=!1,H1="skip";function G1(e,t,n,r){let i;i=t;const s=Vl(i),o=1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=uh,p,m,b;if(s(l,c,u[u.length-1]||void 0)&&(f=K1(n(l,u)),f[0]===Nu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==H1)for(m=-1+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Nu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function K1(e){return Array.isArray(e)?e:typeof e=="number"?[j1,e]:e==null?uh:[e]}function W1(e,t,n){const i=Vl((n||{}).ignore||[]),s=V1(t);let o=-1;for(;++o<s.length;)G1(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],f=s[o][1];let p=0;const b=d.children.indexOf(c);let y=!1,_=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const T=v.index,C={index:v.index,input:v.input,stack:[...u,c]};let N=f(...v,C);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=T+1:(p!==T&&_.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(N)?_.push(...N):N&&_.push(N),p=T+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(p<c.value.length&&_.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,..._)):_=[c],b+_.length}}function V1(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Y1(i[0]),Z1(i[1])])}return t}function Y1(e){return typeof e=="string"?new RegExp(B1(e),"g"):e}function Z1(e){return typeof e=="function"?e:function(){return e}}const ba="phrasing",ya=["autolink","link","image","label"];function X1(){return{transforms:[ix],enter:{literalAutolink:J1,literalAutolinkEmail:Ea,literalAutolinkHttp:Ea,literalAutolinkWww:Ea},exit:{literalAutolink:rx,literalAutolinkEmail:nx,literalAutolinkHttp:ex,literalAutolinkWww:tx}}}function Q1(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:":",before:"[ps]",after:"\\/",inConstruct:ba,notInConstruct:ya}]}}function J1(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ea(e){this.config.enter.autolinkProtocol.call(this,e)}function ex(e){this.config.exit.autolinkProtocol.call(this,e)}function tx(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 nx(e){this.config.exit.autolinkEmail.call(this,e)}function rx(e){this.exit(e)}function ix(e){W1(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sx],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ox]],{ignore:["link","linkReference"]})}function sx(e,t,n,r,i){let s="";if(!dh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!ax(n)))return!1;const o=lx(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function ox(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ax(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lx(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ku(e,"(");let s=ku(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||Ws(n))&&(!t||n!==47)}fh.peek=bx;function cx(){this.buffer()}function ux(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dx(){this.buffer()}function fx(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function px(e){this.exit(e)}function gx(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mx(e){this.exit(e)}function bx(){return"["}function fh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function yx(){return{enter:{gfmFootnoteCallString:cx,gfmFootnoteCall:ux,gfmFootnoteDefinitionLabelString:dx,gfmFootnoteDefinition:fx},exit:{gfmFootnoteCallString:hx,gfmFootnoteCall:px,gfmFootnoteDefinitionLabelString:gx,gfmFootnoteDefinition:mx}}}function Ex(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
15
- `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?hh:xx))),c(),l}}function xx(e,t,n){return t===0?e:hh(e,t,n)}function hh(e,t,n){return(n?"":" ")+e}const wx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ph.peek=Ax;function _x(){return{canContainEols:["delete"],enter:{strikethrough:kx},exit:{strikethrough:Nx}}}function vx(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wx}],handlers:{delete:ph}}}function kx(e){this.enter({type:"delete",children:[]},e)}function Nx(e){this.exit(e)}function ph(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function Ax(){return"~"}function Sx(e){return e.length}function Tx(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Sx,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const _=Cx(e[u][y]);if(n.alignDelimiters!==!1){const v=i(_);b[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(_)}o[u]=m,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Au(r[d]);else{const m=Au(r);for(;++d<c;)s[d]=m}d=-1;const h=[],f=[];for(;++d<c;){const m=s[d];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let _=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const v=b+"-".repeat(_)+y;n.alignDelimiters!==!1&&(_=b.length+_+y.length,_>l[d]&&(l[d]=_),f[d]=_),h[d]=v}o.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u<o.length;){const m=o[u],b=a[u];d=-1;const y=[];for(;++d<c;){const _=m[d]||"";let v="",T="";if(n.alignDelimiters!==!1){const C=l[d]-(b[d]||0),N=s[d];N===114?v=" ".repeat(C):N===99?C%2?(v=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),T=v):T=" ".repeat(C)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(_),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
16
- `)}function Cx(e){return e==null?"":String(e)}function Au(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Ox(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),Ix);return i(),o}function Ix(e,t,n){return">"+(n?"":" ")+e}function Rx(e,t){return Su(e,t.inConstruct,!0)&&!Su(e,t.notInConstruct,!1)}function Su(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 Tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
- `&&Rx(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
- `}function Lx(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function Mx(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Dx(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 Px(e,t,n,r){const i=Dx(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Mx(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,Bx);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(Lx(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
13
+ `}),n}function cu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function uu(e,t){const n=Vx(e,t),r=n.one(e,void 0),i=Px(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
14
+ `},i),s}function Jx(e,t){return e&&"run"in e?async function(n,r){const i=uu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return uu(n,{file:r,...e||t})}}function du(e){if(e)throw e}var ks=Object.prototype.hasOwnProperty,sh=Object.prototype.toString,fu=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,pu=function(t){return typeof Array.isArray=="function"?Array.isArray(t):sh.call(t)==="[object Array]"},gu=function(t){if(!t||sh.call(t)!=="[object Object]")return!1;var n=ks.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ks.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ks.call(t,i)},mu=function(t,n){fu&&n.name==="__proto__"?fu(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},bu=function(t,n){if(n==="__proto__")if(ks.call(t,n)){if(hu)return hu(t,n).value}else return;return t[n]},e1=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=bu(a,n),i=bu(t,n),a!==i&&(u&&i&&(gu(i)||(s=pu(i)))?(s?(s=!1,o=r&&pu(r)?r:[]):o=r&&gu(r)?r:{},mu(a,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&mu(a,{name:n,newValue:i}));return a};const ua=Mi(e1);function Xa(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 t1(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?n1(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function n1(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const rn={basename:r1,dirname:i1,extname:s1,join:o1,sep:"/"};function r1(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function i1(e){if(Pi(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 s1(e){Pi(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function o1(...e){let t=-1,n;for(;++t<e.length;)Pi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":a1(n)}function a1(e){Pi(e);const t=e.codePointAt(0)===47;let n=l1(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function l1(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=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,s=0}else a===46&&s>-1?s++:s=-1}return n}function Pi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const c1={cwd:u1};function u1(){return"/"}function Qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d1(e){if(typeof e=="string")e=new URL(e);else if(!Qa(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 f1(e)}function f1(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 da=["history","path","basename","stem","extname","dirname"];class oh{constructor(t){let n;t?Qa(t)?n={path:t}:typeof t=="string"||h1(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":c1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<da.length;){const s=da[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)da.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?rn.basename(this.path):void 0}set basename(t){ha(t,"basename"),fa(t,"basename"),this.path=rn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?rn.dirname(this.path):void 0}set dirname(t){yu(this.basename,"dirname"),this.path=rn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?rn.extname(this.path):void 0}set extname(t){if(fa(t,"extname"),yu(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=rn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qa(t)&&(t=d1(t)),ha(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?rn.basename(this.path,this.extname):void 0}set stem(t){ha(t,"stem"),fa(t,"stem"),this.path=rn.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 Qe(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 fa(e,t){if(e&&e.includes(rn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+rn.sep+"`")}function ha(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function h1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p1=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},g1={}.hasOwnProperty;class Wl extends p1{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=t1()}copy(){const t=new Wl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ua(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ma("data",this.frozen),this.namespace[t]=n,this):g1.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ma("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=as(t),r=this.parser||this.Parser;return pa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),pa("process",this.parser||this.Parser),ga("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=as(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=r.stringify(f,h);y1(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),pa("processSync",this.parser||this.Parser),ga("processSync",this.compiler||this.Compiler),this.process(t,i),Eu("processSync","process",n),r;function i(s,o){n=!0,du(s),r=o}}run(t,n,r){xu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=as(n);i.run(t,l,c);function c(u,d,h){const f=d||t;u?a(u):o?o(f):r(void 0,f,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Eu("runSync","run",r),i;function s(o,a){du(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=as(n),i=this.compiler||this.Compiler;return ga("stringify",i),xu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ma("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=ua(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=r[h][1];Xa(m)&&Xa(f)&&(f=ua(!0,m,f)),r[h]=[c,f,...p]}}}}const m1=new Wl().freeze();function pa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ga(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ma(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 xu(e){if(!Xa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Eu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function as(e){return b1(e)?e:new oh(e)}function b1(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y1(e){return typeof e=="string"||x1(e)}function x1(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ah=function(e){if(e==null)return v1;if(typeof e=="function")return Xs(e);if(typeof e=="object")return Array.isArray(e)?E1(e):w1(e);if(typeof e=="string")return _1(e);throw new Error("Expected function, string, or object as test")};function E1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ah(e[n]);return Xs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function w1(e){const t=e;return Xs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function _1(e){return Xs(t);function t(n){return n&&n.type===e}}function Xs(e){return t;function t(n,r,i){return!!(k1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function v1(){return!0}function k1(e){return e!==null&&typeof e=="object"&&"type"in e}const lh=[],N1=!0,wu=!1,A1="skip";function S1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ah(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=lh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=T1(n(l,u)),f[0]===wu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==A1)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===wu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function T1(e){return Array.isArray(e)?e:typeof e=="number"?[N1,e]:e==null?lh:[e]}function C1(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),S1(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const O1="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_u=[],vu={allowDangerousHtml:!0},I1=/^(https?|ircs?|mailto|xmpp)$/i,R1=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ch(e){const t=L1(e),n=M1(e);return D1(t.runSync(t.parse(n),n),e)}function L1(e){const t=e.rehypePlugins||_u,n=e.remarkPlugins||_u,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vu}:vu;return m1().use(rx).use(n).use(Jx,r).use(t)}function M1(e){const t=e.children||"",n=new oh;return typeof t=="string"&&(n.value=t),n}function D1(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||P1;for(const u of R1)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+O1+u.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),C1(e,c),qb(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let f;for(f in aa)if(Object.hasOwn(aa,f)&&Object.hasOwn(u.properties,f)){const p=u.properties[f],m=aa[f];(m===null||m.includes(u.tagName))&&(u.properties[f]=l(String(p||""),f,u))}}if(u.type==="element"){let f=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(u,d,h)),f&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function P1(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||I1.test(e.slice(0,t))?e:""}function ku(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 B1(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Vl=function(e){if(e==null)return $1;if(typeof e=="function")return Qs(e);if(typeof e=="object")return Array.isArray(e)?F1(e):q1(e);if(typeof e=="string")return U1(e);throw new Error("Expected function, string, or object as test")};function F1(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vl(e[n]);return Qs(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function q1(e){const t=e;return Qs(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function U1(e){return Qs(t);function t(n){return n&&n.type===e}}function Qs(e){return t;function t(n,r,i){return!!(z1(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $1(){return!0}function z1(e){return e!==null&&typeof e=="object"&&"type"in e}const uh=[],j1=!0,Nu=!1,H1="skip";function G1(e,t,n,r){let i;i=t;const s=Vl(i),o=1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=uh,p,m,b;if(s(l,c,u[u.length-1]||void 0)&&(f=K1(n(l,u)),f[0]===Nu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==H1)for(m=-1+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Nu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function K1(e){return Array.isArray(e)?e:typeof e=="number"?[j1,e]:e==null?uh:[e]}function W1(e,t,n){const i=Vl((n||{}).ignore||[]),s=V1(t);let o=-1;for(;++o<s.length;)G1(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(i(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],f=s[o][1];let p=0;const b=d.children.indexOf(c);let y=!1,_=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const T=v.index,C={index:v.index,input:v.input,stack:[...u,c]};let N=f(...v,C);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=T+1:(p!==T&&_.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(N)?_.push(...N):N&&_.push(N),p=T+v[0].length,y=!0),!h.global)break;v=h.exec(c.value)}return y?(p<c.value.length&&_.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,..._)):_=[c],b+_.length}}function V1(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Y1(i[0]),Z1(i[1])])}return t}function Y1(e){return typeof e=="string"?new RegExp(B1(e),"g"):e}function Z1(e){return typeof e=="function"?e:function(){return e}}const ba="phrasing",ya=["autolink","link","image","label"];function X1(){return{transforms:[iE],enter:{literalAutolink:J1,literalAutolinkEmail:xa,literalAutolinkHttp:xa,literalAutolinkWww:xa},exit:{literalAutolink:rE,literalAutolinkEmail:nE,literalAutolinkHttp:eE,literalAutolinkWww:tE}}}function Q1(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ba,notInConstruct:ya},{character:":",before:"[ps]",after:"\\/",inConstruct:ba,notInConstruct:ya}]}}function J1(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xa(e){this.config.enter.autolinkProtocol.call(this,e)}function eE(e){this.config.exit.autolinkProtocol.call(this,e)}function tE(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 nE(e){this.config.exit.autolinkEmail.call(this,e)}function rE(e){this.exit(e)}function iE(e){W1(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oE]],{ignore:["link","linkReference"]})}function sE(e,t,n,r,i){let s="";if(!dh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!aE(n)))return!1;const o=lE(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function oE(e,t,n,r){return!dh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function aE(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lE(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=ku(e,"(");let s=ku(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function dh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yn(n)||Ws(n))&&(!t||n!==47)}fh.peek=bE;function cE(){this.buffer()}function uE(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dE(){this.buffer()}function fE(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pE(e){this.exit(e)}function gE(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ht(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mE(e){this.exit(e)}function bE(){return"["}function fh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function yE(){return{enter:{gfmFootnoteCallString:cE,gfmFootnoteCall:uE,gfmFootnoteDefinitionLabelString:dE,gfmFootnoteDefinition:fE},exit:{gfmFootnoteCallString:hE,gfmFootnoteCall:pE,gfmFootnoteDefinitionLabelString:gE,gfmFootnoteDefinition:mE}}}function xE(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
15
+ `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?hh:EE))),c(),l}}function EE(e,t,n){return t===0?e:hh(e,t,n)}function hh(e,t,n){return(n?"":" ")+e}const wE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ph.peek=AE;function _E(){return{canContainEols:["delete"],enter:{strikethrough:kE},exit:{strikethrough:NE}}}function vE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wE}],handlers:{delete:ph}}}function kE(e){this.enter({type:"delete",children:[]},e)}function NE(e){this.exit(e)}function ph(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function AE(){return"~"}function SE(e){return e.length}function TE(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||SE,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],b=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const _=CE(e[u][y]);if(n.alignDelimiters!==!1){const v=i(_);b[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(_)}o[u]=m,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Au(r[d]);else{const m=Au(r);for(;++d<c;)s[d]=m}d=-1;const h=[],f=[];for(;++d<c;){const m=s[d];let b="",y="";m===99?(b=":",y=":"):m===108?b=":":m===114&&(y=":");let _=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-y.length);const v=b+"-".repeat(_)+y;n.alignDelimiters!==!1&&(_=b.length+_+y.length,_>l[d]&&(l[d]=_),f[d]=_),h[d]=v}o.splice(1,0,h),a.splice(1,0,f),u=-1;const p=[];for(;++u<o.length;){const m=o[u],b=a[u];d=-1;const y=[];for(;++d<c;){const _=m[d]||"";let v="",T="";if(n.alignDelimiters!==!1){const C=l[d]-(b[d]||0),N=s[d];N===114?v=" ".repeat(C):N===99?C%2?(v=" ".repeat(C/2+.5),T=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),T=v):T=" ".repeat(C)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(_),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}p.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(`
16
+ `)}function CE(e){return e==null?"":String(e)}function Au(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function OE(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),IE);return i(),o}function IE(e,t,n){return">"+(n?"":" ")+e}function RE(e,t){return Su(e,t.inConstruct,!0)&&!Su(e,t.notInConstruct,!1)}function Su(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 Tu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&RE(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function LE(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function ME(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function DE(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 PE(e,t,n,r){const i=DE(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(ME(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,BE);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(LE(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
19
19
  `,encode:["`"],...a.current()})),d()}return u+=a.move(`
20
20
  `),s&&(u+=a.move(s+`
21
- `)),u+=a.move(l),c(),u}function Bx(e,t,n){return(n?"":" ")+e}function Yl(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 Fx(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
- `,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function qx(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 _i(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ms(e,t,n){const r=Rr(e),i=Rr(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}}gh.peek=Ux;function gh(e,t,n,r){const i=qx(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function Ux(e,t,n){return n.options.emphasis||"*"}const mh=function(e){if(e==null)return Hx;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?$x(e):zx(e);if(typeof e=="string")return jx(e);throw new Error("Expected function, string, or object as test")};function $x(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mh(e[n]);return Js(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function zx(e){const t=e;return Js(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function jx(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(Gx(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Hx(){return!0}function Gx(e){return e!==null&&typeof e=="object"&&"type"in e}const bh=[],Kx=!0,Ja=!1,Wx="skip";function Vx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=Yx(n(l,u)),f[0]===Ja))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==Wx)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Ja)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function Yx(e){return Array.isArray(e)?e:typeof e=="number"?[Kx,e]:e==null?bh:[e]}function Zx(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),Vx(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const Xx={};function yh(e,t){const n=Xx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Eh(e,r,i)}function Eh(e,t,n){if(Qx(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 Cu(e.children,t,n)}return Array.isArray(e)?Cu(e,t,n):""}function Cu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Eh(e[i],t,n);return r.join("")}function Qx(e){return!!(e&&typeof e=="object")}function Jx(e,t){let n=!1;return Zx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ja}),!!((!e.depth||e.depth<3)&&yh(e)&&(t.options.setext||n))}function ew(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Jx(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
21
+ `)),u+=a.move(l),c(),u}function BE(e,t,n){return(n?"":" ")+e}function Yl(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 FE(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
22
+ `,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function qE(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 _i(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ms(e,t,n){const r=Rr(e),i=Rr(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}}gh.peek=UE;function gh(e,t,n,r){const i=qE(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function UE(e,t,n){return n.options.emphasis||"*"}const mh=function(e){if(e==null)return HE;if(typeof e=="function")return Js(e);if(typeof e=="object")return Array.isArray(e)?$E(e):zE(e);if(typeof e=="string")return jE(e);throw new Error("Expected function, string, or object as test")};function $E(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mh(e[n]);return Js(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function zE(e){const t=e;return Js(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function jE(e){return Js(t);function t(n){return n&&n.type===e}}function Js(e){return t;function t(n,r,i){return!!(GE(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function HE(){return!0}function GE(e){return e!==null&&typeof e=="object"&&"type"in e}const bh=[],KE=!0,Ja=!1,WE="skip";function VE(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=mh(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=bh,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=YE(n(l,u)),f[0]===Ja))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==WE)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Ja)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function YE(e){return Array.isArray(e)?e:typeof e=="number"?[KE,e]:e==null?bh:[e]}function ZE(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),VE(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const XE={};function yh(e,t){const n=XE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xh(e,r,i)}function xh(e,t,n){if(QE(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 Cu(e.children,t,n)}return Array.isArray(e)?Cu(e,t,n):""}function Cu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=xh(e[i],t,n);return r.join("")}function QE(e){return!!(e&&typeof e=="object")}function JE(e,t){let n=!1;return ZE(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ja}),!!((!e.depth||e.depth<3)&&yh(e)&&(t.options.setext||n))}function ew(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(JE(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
23
23
  `,after:`
24
24
  `});return d(),u(),h+`
25
25
  `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
26
26
  `))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...s.current()});return/^[\t ]/.test(c)&&(c=_i(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}xh.peek=tw;function xh(e){return e.value||""}function tw(){return"<"}wh.peek=nw;function wh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function nw(){return"!"}_h.peek=rw;function _h(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function rw(){return"!"}vh.peek=iw;function vh(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function iw(){return"`"}function kh(e,t){const n=yh(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))}Nh.peek=sw;function Nh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(kh(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function sw(e,t,n){return kh(e,n)?"<":"["}Ah.peek=ow;function Ah(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function ow(){return"["}function Zl(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 aw(e){const t=Zl(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 lw(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 Sh(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 cw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?lw(n):Zl(n);const a=e.ordered?o==="."?")":".":aw(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.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&&(l=!0),Sh(n)===o&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function uw(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 dw(e,t,n,r){const i=uw(n);let s=n.bulletCurrent||Zl(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(o))+d:(f?s:s+" ".repeat(o-s.length))+d}}function fw(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const Th=function(e){if(e==null)return mw;if(typeof e=="function")return eo(e);if(typeof e=="object")return Array.isArray(e)?hw(e):pw(e);if(typeof e=="string")return gw(e);throw new Error("Expected function, string, or object as test")};function hw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Th(e[n]);return eo(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function pw(e){const t=e;return eo(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function gw(e){return eo(t);function t(n){return n&&n.type===e}}function eo(e){return t;function t(n,r,i){return!!(bw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function mw(){return!0}function bw(e){return e!==null&&typeof e=="object"&&"type"in e}const yw=Th(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ew(e,t,n,r){return(e.children.some(function(o){return yw(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function xw(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ch.peek=ww;function Ch(e,t,n,r){const i=xw(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function ww(e,t,n){return n.options.strong||"*"}function _w(e,t,n,r){return n.safe(e.value,r)}function vw(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 kw(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(vw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oh={blockquote:Ox,break:Tu,code:Px,definition:Fx,emphasis:gh,hardBreak:Tu,heading:ew,html:xh,image:wh,imageReference:_h,inlineCode:vh,link:Nh,linkReference:Ah,list:cw,listItem:dw,paragraph:fw,root:Ew,strong:Ch,text:_w,thematicBreak:kw};function Nw(){return{enter:{table:Aw,tableData:Ou,tableHeader:Ou,tableRow:Tw},exit:{codeText:Cw,table:Sw,tableData:xa,tableHeader:xa,tableRow:xa}}}function Aw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Sw(e){this.exit(e),this.data.inTable=void 0}function Tw(e){this.enter({type:"tableRow",children:[]},e)}function xa(e){this.exit(e)}function Ou(e){this.enter({type:"tableCell",children:[]},e)}function Cw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ow));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ow(e,t){return t==="|"?t:e}function Iw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
27
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=_i(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}Eh.peek=tw;function Eh(e){return e.value||""}function tw(){return"<"}wh.peek=nw;function wh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function nw(){return"!"}_h.peek=rw;function _h(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function rw(){return"!"}vh.peek=iw;function vh(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function iw(){return"`"}function kh(e,t){const n=yh(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))}Nh.peek=sw;function Nh(e,t,n,r){const i=Yl(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(kh(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function sw(e,t,n){return kh(e,n)?"<":"["}Ah.peek=ow;function Ah(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function ow(){return"["}function Zl(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 aw(e){const t=Zl(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 lw(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 Sh(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 cw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?lw(n):Zl(n);const a=e.ordered?o==="."?")":".":aw(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.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&&(l=!0),Sh(n)===o&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function uw(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 dw(e,t,n,r){const i=uw(n);let s=n.bulletCurrent||Zl(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(o))+d:(f?s:s+" ".repeat(o-s.length))+d}}function fw(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const Th=function(e){if(e==null)return mw;if(typeof e=="function")return eo(e);if(typeof e=="object")return Array.isArray(e)?hw(e):pw(e);if(typeof e=="string")return gw(e);throw new Error("Expected function, string, or object as test")};function hw(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Th(e[n]);return eo(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function pw(e){const t=e;return eo(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function gw(e){return eo(t);function t(n){return n&&n.type===e}}function eo(e){return t;function t(n,r,i){return!!(bw(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function mw(){return!0}function bw(e){return e!==null&&typeof e=="object"&&"type"in e}const yw=Th(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xw(e,t,n,r){return(e.children.some(function(o){return yw(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ew(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ch.peek=ww;function Ch(e,t,n,r){const i=Ew(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ms(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=_i(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+_i(d));const f=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+f}function ww(e,t,n){return n.options.strong||"*"}function _w(e,t,n,r){return n.safe(e.value,r)}function vw(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 kw(e,t,n){const r=(Sh(n)+(n.options.ruleSpaces?" ":"")).repeat(vw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Oh={blockquote:OE,break:Tu,code:PE,definition:FE,emphasis:gh,hardBreak:Tu,heading:ew,html:Eh,image:wh,imageReference:_h,inlineCode:vh,link:Nh,linkReference:Ah,list:cw,listItem:dw,paragraph:fw,root:xw,strong:Ch,text:_w,thematicBreak:kw};function Nw(){return{enter:{table:Aw,tableData:Ou,tableHeader:Ou,tableRow:Tw},exit:{codeText:Cw,table:Sw,tableData:Ea,tableHeader:Ea,tableRow:Ea}}}function Aw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Sw(e){this.exit(e),this.data.inTable=void 0}function Tw(e){this.enter({type:"tableRow",children:[]},e)}function Ea(e){this.exit(e)}function Ou(e){this.enter({type:"tableCell",children:[]},e)}function Cw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ow));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ow(e,t){return t==="|"?t:e}function Iw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
28
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(f,p,m,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const y=d(f,m,b),_=c([y]);return _.slice(0,_.indexOf(`
29
- `))}function l(f,p,m,b){const y=m.enter("tableCell"),_=m.enter("phrasing"),v=m.containerPhrasing(f,{...b,before:s,after:s});return _(),y(),v}function c(f,p){return Tx(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("table");for(;++y<b.length;)_[y]=d(b[y],p,m);return v(),_}function d(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("tableRow");for(;++y<b.length;)_[y]=l(b[y],f,p,m);return v(),_}function h(f,p,m){let b=Oh.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Rw(){return{exit:{taskListCheckValueChecked:Iu,taskListCheckValueUnchecked:Iu,paragraph:Mw}}}function Lw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dw}}}function Iu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mw(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 s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;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=Object.assign({},r.position.start)))}}this.exit(e)}function Dw(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=Oh.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Pw(){return[X1(),yx(),_x(),Nw(),Rw()]}function Bw(e){return{extensions:[Q1(),Ex(e),vx(),Iw(e),Lw()]}}const Fw={tokenize:Hw,partial:!0},Ih={tokenize:Gw,partial:!0},Rh={tokenize:Kw,partial:!0},Lh={tokenize:Ww,partial:!0},qw={tokenize:Vw,partial:!0},Mh={name:"wwwAutolink",tokenize:zw,previous:Ph},Dh={name:"protocolAutolink",tokenize:jw,previous:Bh},wn={name:"emailAutolink",tokenize:$w,previous:Fh},un={};function Uw(){return{text:un}}let Hn=48;for(;Hn<123;)un[Hn]=wn,Hn++,Hn===58?Hn=65:Hn===91&&(Hn=97);un[43]=wn;un[45]=wn;un[46]=wn;un[95]=wn;un[72]=[wn,Dh];un[104]=[wn,Dh];un[87]=[wn,Mh];un[119]=[wn,Mh];function $w(e,t,n){const r=this;let i,s;return o;function o(d){return!el(d)||!Fh.call(r,r.previous)||Xl(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return el(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(qw,u,c)(d):d===45||d===95||Ze(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&st(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function zw(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Ph.call(r,r.previous)||Xl(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Fw,e.attempt(Ih,e.attempt(Rh,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function jw(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&Bh.call(r,r.previous)&&!Xl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(st(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Is(d)||ke(d)||Yn(d)||Ws(d)?n(d):e.attempt(Ih,e.attempt(Rh,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Hw(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),s):n(o)}function s(o){return o===null?n(o):t(o)}}function Gw(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(Lh,l,a)(c):c===null||ke(c)||Yn(c)||c!==45&&Ws(c)?l(c):(s=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!s?n(c):t(c)}}function Kw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(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(Lh,t,s)(o):o===null||ke(o)||Yn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function Ww(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||ke(a)||Yn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ke(a)||Yn(a)?t(a):r(a)}function s(a){return st(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):st(a)?(e.consume(a),o):n(a)}}function Vw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ze(s)?n(s):t(s)}}function Ph(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ke(e)}function Bh(e){return!st(e)}function Fh(e){return!(e===47||el(e))}function el(e){return e===43||e===45||e===46||e===95||Ze(e)}function Xl(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 Yw={tokenize:r_,partial:!0};function Zw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:e_,continuation:{tokenize:t_},exit:n_}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xw,resolveTo:Qw}}}}function Xw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=Ht(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Qw(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Jw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!o||d===null||d===91||ke(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Ht(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ke(d)||(o=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function e_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(o>999||p===93&&!a||p===null||p===91||ke(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return ke(p)||(a=!0),o++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,u):u(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),be(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function t_(e,t,n){return e.check(Di,t,e.attempt(Yw,t,n))}function n_(e){e.exit("gfmFootnoteDefinition")}function r_(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function i_(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&wt(h,h.length,0,Vs(f,o.slice(c+1,l),a)),wt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),wt(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(o.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Rr(c);if(p===126)return d>1?l(p):(o.consume(p),d++,f);if(d<2&&!n)return l(p);const b=o.exit("strikethroughSequenceTemporary"),y=Rr(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class s_{constructor(){this.map=[]}add(t,n,r){o_(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[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 s of i)t.push(s);i=r.pop()}this.map.length=0}}function o_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function a_(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 s=r.length-1;r[s]=r[s]==="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 l_(){return{flow:{null:{name:"table",tokenize:c_,resolveAll:u_}}}}function c_(e,t,n){const r=this;let i=0,s=0,o;return a;function a(O){let j=r.events.length-1;for(;j>-1;){const X=r.events[j][1].type;if(X==="lineEnding"||X==="linePrefix")j--;else break}const B=j>-1?r.events[j][1].type:null,re=B==="tableHead"||B==="tableRow"?N:l;return re===N&&r.parser.lazy[r.now().line]?n(O):re(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,s+=1),u(O)}function u(O){return O===null?n(O):oe(O)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):n(O):ge(O)?be(e,u,"whitespace")(O):(s+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(O)))}function d(O){return O===null||O===124||ke(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?h:d)}function h(O){return O===92||O===124?(e.consume(O),d):d(O)}function f(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,ge(O)?be(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):p(O))}function p(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):C(O)}function m(O){return ge(O)?be(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(s+=1,y(O)):O===null||oe(O)?T(O):C(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):C(O)}function _(O){return O===45?(e.consume(O),_):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(O))}function v(O){return ge(O)?be(e,T,"whitespace")(O):T(O)}function T(O){return O===124?p(O):O===null||oe(O)?!o||i!==s?C(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):C(O)}function C(O){return n(O)}function N(O){return e.enter("tableRow"),P(O)}function P(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),P):O===null||oe(O)?(e.exit("tableRow"),t(O)):ge(O)?be(e,P,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||ke(O)?(e.exit("data"),P(O)):(e.consume(O),O===92?G:U)}function G(O){return O===92||O===124?(e.consume(O),U):U(O)}}function u_(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,d;const h=new s_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(Ru(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d),s=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d)),s=o,o=[s[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],d=ls(h,t,s,i,n,d)):o[1]!==0&&(d=ls(h,t,o,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ru(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=a_(t.events,n))}return e}function ls(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=yr(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=yr(t.events,n[2]),u=yr(t.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ru(e,t,n,r,i){const s=[],o=yr(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const d_={name:"tasklistCheck",tokenize:h_};function f_(){return{text:{91:d_}}}function h_(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return ke(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return oe(l)?t(l):ge(l)?e.check({tokenize:p_},t,n)(l):n(l)}}function p_(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function g_(e){return qf([Uw(),Zw(),i_(e),l_(),f_()])}const m_={};function qh(e){const t=this,n=e||m_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(g_(n)),s.push(Pw()),o.push(Bw(n))}const Uh=function(e){if(e==null)return x_;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?b_(e):y_(e);if(typeof e=="string")return E_(e);throw new Error("Expected function, string, or object as test")};function b_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(e[n]);return to(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function y_(e){const t=e;return to(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function E_(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(w_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function x_(){return!0}function w_(e){return e!==null&&typeof e=="object"&&"type"in e}const Lu=function(e,t,n){const r=Uh(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},tr=function(e){if(e==null)return k_;if(typeof e=="string")return v_(e);if(typeof e=="object")return __(e);if(typeof e=="function")return Ql(e);throw new Error("Expected function, string, or array as `test`")};function __(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return Ql(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function v_(e){return Ql(t);function t(n){return n.tagName===e}}function Ql(e){return t;function t(n,r,i){return!!(N_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k_(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function N_(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Mu=/\n/g,Du=/[\t ]+/g,tl=tr("br"),Pu=tr(L_),A_=tr("p"),Bu=tr("tr"),S_=tr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",R_,M_]),$h=tr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T_(e,t){const n=t||{},r="children"in e?e.children:[],i=$h(e),s=Hh(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...jh(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)o.push(...zh(r[a],e,{whitespace:s,breakBefore:a?void 0:i,breakAfter:a<r.length-1?tl(r[a+1]):i}));const l=[];let c;for(a=-1;++a<o.length;){const u=o[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
29
+ `))}function l(f,p,m,b){const y=m.enter("tableCell"),_=m.enter("phrasing"),v=m.containerPhrasing(f,{...b,before:s,after:s});return _(),y(),v}function c(f,p){return TE(f,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("table");for(;++y<b.length;)_[y]=d(b[y],p,m);return v(),_}function d(f,p,m){const b=f.children;let y=-1;const _=[],v=p.enter("tableRow");for(;++y<b.length;)_[y]=l(b[y],f,p,m);return v(),_}function h(f,p,m){let b=Oh.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function Rw(){return{exit:{taskListCheckValueChecked:Iu,taskListCheckValueUnchecked:Iu,paragraph:Mw}}}function Lw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dw}}}function Iu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Mw(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 s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;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=Object.assign({},r.position.start)))}}this.exit(e)}function Dw(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=Oh.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function Pw(){return[X1(),yE(),_E(),Nw(),Rw()]}function Bw(e){return{extensions:[Q1(),xE(e),vE(),Iw(e),Lw()]}}const Fw={tokenize:Hw,partial:!0},Ih={tokenize:Gw,partial:!0},Rh={tokenize:Kw,partial:!0},Lh={tokenize:Ww,partial:!0},qw={tokenize:Vw,partial:!0},Mh={name:"wwwAutolink",tokenize:zw,previous:Ph},Dh={name:"protocolAutolink",tokenize:jw,previous:Bh},wn={name:"emailAutolink",tokenize:$w,previous:Fh},un={};function Uw(){return{text:un}}let Hn=48;for(;Hn<123;)un[Hn]=wn,Hn++,Hn===58?Hn=65:Hn===91&&(Hn=97);un[43]=wn;un[45]=wn;un[46]=wn;un[95]=wn;un[72]=[wn,Dh];un[104]=[wn,Dh];un[87]=[wn,Mh];un[119]=[wn,Mh];function $w(e,t,n){const r=this;let i,s;return o;function o(d){return!el(d)||!Fh.call(r,r.previous)||Xl(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return el(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(qw,u,c)(d):d===45||d===95||Ze(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&st(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function zw(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Ph.call(r,r.previous)||Xl(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Fw,e.attempt(Ih,e.attempt(Rh,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function jw(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&Bh.call(r,r.previous)&&!Xl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(st(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Is(d)||ke(d)||Yn(d)||Ws(d)?n(d):e.attempt(Ih,e.attempt(Rh,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Hw(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),s):n(o)}function s(o){return o===null?n(o):t(o)}}function Gw(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(Lh,l,a)(c):c===null||ke(c)||Yn(c)||c!==45&&Ws(c)?l(c):(s=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!s?n(c):t(c)}}function Kw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(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(Lh,t,s)(o):o===null||ke(o)||Yn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function Ww(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||ke(a)||Yn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ke(a)||Yn(a)?t(a):r(a)}function s(a){return st(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):st(a)?(e.consume(a),o):n(a)}}function Vw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Ze(s)?n(s):t(s)}}function Ph(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ke(e)}function Bh(e){return!st(e)}function Fh(e){return!(e===47||el(e))}function el(e){return e===43||e===45||e===46||e===95||Ze(e)}function Xl(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 Yw={tokenize:r_,partial:!0};function Zw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:e_,continuation:{tokenize:t_},exit:n_}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xw,resolveTo:Qw}}}}function Xw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=Ht(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Qw(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Jw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!o||d===null||d===91||ke(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Ht(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ke(d)||(o=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function e_(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(o>999||p===93&&!a||p===null||p===91||ke(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return ke(p)||(a=!0),o++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),o++,u):u(p)}function h(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),be(e,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return t(p)}}function t_(e,t,n){return e.check(Di,t,e.attempt(Yw,t,n))}function n_(e){e.exit("gfmFootnoteDefinition")}function r_(e,t,n){const r=this;return be(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function i_(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&wt(h,h.length,0,Vs(f,o.slice(c+1,l),a)),wt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),wt(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(o.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=Rr(c);if(p===126)return d>1?l(p):(o.consume(p),d++,f);if(d<2&&!n)return l(p);const b=o.exit("strikethroughSequenceTemporary"),y=Rr(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class s_{constructor(){this.map=[]}add(t,n,r){o_(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[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 s of i)t.push(s);i=r.pop()}this.map.length=0}}function o_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function a_(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 s=r.length-1;r[s]=r[s]==="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 l_(){return{flow:{null:{name:"table",tokenize:c_,resolveAll:u_}}}}function c_(e,t,n){const r=this;let i=0,s=0,o;return a;function a(O){let j=r.events.length-1;for(;j>-1;){const X=r.events[j][1].type;if(X==="lineEnding"||X==="linePrefix")j--;else break}const B=j>-1?r.events[j][1].type:null,re=B==="tableHead"||B==="tableRow"?N:l;return re===N&&r.parser.lazy[r.now().line]?n(O):re(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,s+=1),u(O)}function u(O){return O===null?n(O):oe(O)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),f):n(O):ge(O)?be(e,u,"whitespace")(O):(s+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(O)))}function d(O){return O===null||O===124||ke(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?h:d)}function h(O){return O===92||O===124?(e.consume(O),d):d(O)}function f(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,ge(O)?be(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):p(O))}function p(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):C(O)}function m(O){return ge(O)?be(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):O===45?(s+=1,y(O)):O===null||oe(O)?T(O):C(O)}function y(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):C(O)}function _(O){return O===45?(e.consume(O),_):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(O))}function v(O){return ge(O)?be(e,T,"whitespace")(O):T(O)}function T(O){return O===124?p(O):O===null||oe(O)?!o||i!==s?C(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):C(O)}function C(O){return n(O)}function N(O){return e.enter("tableRow"),P(O)}function P(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),P):O===null||oe(O)?(e.exit("tableRow"),t(O)):ge(O)?be(e,P,"whitespace")(O):(e.enter("data"),U(O))}function U(O){return O===null||O===124||ke(O)?(e.exit("data"),P(O)):(e.consume(O),O===92?G:U)}function G(O){return O===92||O===124?(e.consume(O),U):U(O)}}function u_(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,d;const h=new s_;for(;++n<e.length;){const f=e[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(Ru(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d),s=[0,0,0,0]),o[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],d=ls(h,t,s,i,void 0,d)),s=o,o=[s[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],d=ls(h,t,s,i,n,d)):o[1]!==0&&(d=ls(h,t,o,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ru(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=a_(t.events,n))}return e}function ls(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},yr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=yr(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=yr(t.events,n[2]),u=yr(t.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],f=t.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},yr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Ru(e,t,n,r,i){const s=[],o=yr(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function yr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const d_={name:"tasklistCheck",tokenize:h_};function f_(){return{text:{91:d_}}}function h_(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return ke(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return oe(l)?t(l):ge(l)?e.check({tokenize:p_},t,n)(l):n(l)}}function p_(e,t,n){return be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function g_(e){return qf([Uw(),Zw(),i_(e),l_(),f_()])}const m_={};function qh(e){const t=this,n=e||m_,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(g_(n)),s.push(Pw()),o.push(Bw(n))}const Uh=function(e){if(e==null)return E_;if(typeof e=="function")return to(e);if(typeof e=="object")return Array.isArray(e)?b_(e):y_(e);if(typeof e=="string")return x_(e);throw new Error("Expected function, string, or object as test")};function b_(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(e[n]);return to(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function y_(e){const t=e;return to(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function x_(e){return to(t);function t(n){return n&&n.type===e}}function to(e){return t;function t(n,r,i){return!!(w_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function E_(){return!0}function w_(e){return e!==null&&typeof e=="object"&&"type"in e}const Lu=function(e,t,n){const r=Uh(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},tr=function(e){if(e==null)return k_;if(typeof e=="string")return v_(e);if(typeof e=="object")return __(e);if(typeof e=="function")return Ql(e);throw new Error("Expected function, string, or array as `test`")};function __(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=tr(e[n]);return Ql(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function v_(e){return Ql(t);function t(n){return n.tagName===e}}function Ql(e){return t;function t(n,r,i){return!!(N_(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k_(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function N_(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Mu=/\n/g,Du=/[\t ]+/g,tl=tr("br"),Pu=tr(L_),A_=tr("p"),Bu=tr("tr"),S_=tr(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",R_,M_]),$h=tr(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function T_(e,t){const n=t||{},r="children"in e?e.children:[],i=$h(e),s=Hh(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...jh(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)o.push(...zh(r[a],e,{whitespace:s,breakBefore:a?void 0:i,breakAfter:a<r.length-1?tl(r[a+1]):i}));const l=[];let c;for(a=-1;++a<o.length;){const u=o[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
30
30
  `.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function zh(e,t,n){return e.type==="element"?C_(e,t,n):e.type==="text"?n.whitespace==="normal"?jh(e,n):O_(e):[]}function C_(e,t,n){const r=Hh(e,n),i=e.children||[];let s=-1,o=[];if(S_(e))return o;let a,l;for(tl(e)||Bu(e)&&Lu(t,e,Bu)?l=`
31
- `:A_(e)?(a=2,l=2):$h(e)&&(a=1,l=1);++s<i.length;)o=o.concat(zh(i[s],e,{whitespace:r,breakBefore:s?void 0:a,breakAfter:s<i.length-1?tl(i[s+1]):l}));return Pu(e)&&Lu(t,e,Pu)&&o.push(" "),a&&o.unshift(a),l&&o.push(l),o}function jh(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){Mu.lastIndex=s;const l=Mu.exec(n),c=l&&"index"in l?l.index:n.length;r.push(I_(n.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),s=c+1}let o=-1,a;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),a=void 0):r[o]?(typeof a=="number"&&i.push(a),i.push(r[o]),a=0):(o===0||o===r.length-1)&&i.push(0);return i}function O_(e){return[String(e.value)]}function I_(e,t,n){const r=[];let i=0,s;for(;i<e.length;){Du.lastIndex=i;const o=Du.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function Hh(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function R_(e){return!!(e.properties||{}).hidden}function L_(e){return e.tagName==="td"||e.tagName==="th"}function M_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function D_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function P_(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=D_(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function B_(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],y={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],T=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],C=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[..._,...v,"set","shopt",...T,...C]},contains:[f,e.SHEBANG(),p,d,s,o,y,a,l,c,u,n]}}function F_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:y.concat([{begin:/\(/,end:/\)/,keywords:b,contains:y.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"</",contains:[].concat(_,v,y,[d,{begin:e.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:b}}}function q_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function U_(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},u={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(u,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(h,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});h.contains=[m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[b,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",T={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[y,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},T]}}const $_=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),z_=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],j_=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],H_=[...z_,...j_],G_=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),K_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),W_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),V_=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Y_(e){const t=e.regex,n=$_(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+K_.join("|")+")"},{begin:":(:)?("+W_.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+V_.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:G_.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+H_.join("|")+")\\b"}]}}function Z_(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function X_(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function Q_(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function J_(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,s,i,o,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),h=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[r,a,s,i,o,n]}}]}}var Er="[0-9](_*[0-9])*",cs=`\\.(${Er})`,us="[0-9a-fA-F](_*[0-9a-fA-F])*",Fu={className:"number",variants:[{begin:`(\\b(${Er})((${cs})|\\.)?|(${cs}))[eE][+-]?(${Er})[fFdD]?\\b`},{begin:`\\b(${Er})((${cs})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${cs})[fFdD]?\\b`},{begin:`\\b(${Er})[fFdD]\\b`},{begin:`\\b0[xX]((${us})\\.?|(${us})?\\.(${us}))[pP][+-]?(${Er})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${us})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Gh(e,t,n){return n===-1?"":e.replace(t,r=>Gh(e,t,n-1))}function ev(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Gh("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Fu,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Fu,c]}}const qu="[A-Za-z$_][0-9A-Za-z$_]*",tv=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],nv=["true","false","null","undefined","NaN","Infinity"],Kh=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Wh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],iv=[].concat(Vh,Kh,Wh);function sv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=qu,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let ae;const k=F.input.substring(w);if(ae=k.match(/^\s*=/)){K.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){K.ignoreMatch();return}}},a={$pattern:qu,keyword:tv,literal:nv,built_in:iv,"variable.language":rv},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Kh,...Wh]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(F){return t.concat("(?!",F.join("|"),")")}const re={match:t.concat(/\b/,B([...Vh,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",q={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},re,j,P,Y,{match:/\$[(.]/}]}}function ov(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var xr="[0-9](_*[0-9])*",ds=`\\.(${xr})`,fs="[0-9a-fA-F](_*[0-9a-fA-F])*",av={className:"number",variants:[{begin:`(\\b(${xr})((${ds})|\\.)?|(${ds}))[eE][+-]?(${xr})[fFdD]?\\b`},{begin:`\\b(${xr})((${ds})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ds})[fFdD]?\\b`},{begin:`\\b(${xr})[fFdD]\\b`},{begin:`\\b0[xX]((${fs})\\.?|(${fs})?\\.(${fs}))[pP][+-]?(${xr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fs})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function lv(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=av,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,a,l,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
32
- `},c]}}const cv=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],fv=[...uv,...dv],hv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Yh=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Zh=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),gv=Yh.concat(Zh).sort().reverse();function mv(e){const t=cv(e),n=gv,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},c=function(v,T,C){return{className:v,begin:T,relevance:C}},u={$pattern:/[a-z-]+/,keyword:r,attribute:hv.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:u,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=a.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},p={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pv.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:a,relevance:0}},b={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+fv.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Yh.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Zh.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},_={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,_,p,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function bv(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function yv(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,s,o]}}function Ev(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),h=e.inherit(u,{contains:[]});c.contains.push(h),u.contains.push(d);let f=[n,l];return[c,u,d,h].forEach(y=>{y.contains=y.contains.concat(f)}),f=f.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,u,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function xv(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function wv(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,s,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(m,b,y="\\1")=>{const _=y==="\\1"?y:t.concat(y,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,y,r)},f=(m,b,y)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,r),p=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...d,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function _v(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(X,Y)=>{Y.data._beginMatch=X[1]||X[2]},"on:end":(X,Y)=>{Y.data._beginMatch!==X[1]&&Y.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
33
- ]`,p={scope:"string",variants:[u,c,d,h]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],T={keyword:y,literal:(X=>{const Y=[];return X.forEach(I=>{Y.push(I),I.toLowerCase()===I?Y.push(I.toUpperCase()):Y.push(I.toLowerCase())}),Y})(b),built_in:_},C=X=>X.map(Y=>Y.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",C(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},P=t.concat(r,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},G={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},O={relevance:0,begin:/\(/,end:/\)/,keywords:T,contains:[G,o,U,e.C_BLOCK_COMMENT_MODE,p,m,N]},j={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",C(y).join("\\b|"),"|",C(_).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O]};O.contains.push(j);const B=[G,U,e.C_BLOCK_COMMENT_MODE,p,m,N],re={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...B]},...B,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:T,contains:[re,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,j,U,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:T,contains:["self",re,o,U,e.C_BLOCK_COMMENT_MODE,p,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},p,m]}}function vv(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function kv(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Nv(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",f=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,p=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${f}))[eE][+-]?(${h})[jJ]?(?=${p})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${h})[jJ](?=${p})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,y,d]}]}}function Av(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Sv(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Tv(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},h="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},N=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=N,m.contains=N;const O=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:N}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(O).concat(c).concat(N)}}function Cv(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:a,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:u}},{className:"punctuation",begin:"->"},s]}}const Ov=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Iv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Rv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Lv=[...Iv,...Rv],Mv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Dv=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Pv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Bv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Fv(e){const t=Ov(e),n=Pv,r=Dv,i="@[a-z-]+",s="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Lv.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Bv.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Mv.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function qv(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Uv(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=u,p=[...c,...l].filter(C=>!u.includes(C)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function _(C){return t.concat(/\b/,t.either(...C.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const v={scope:"keyword",match:_(h),relevance:0};function T(C,{exceptions:N,when:P}={}){const U=P;return N=N||[],C.map(G=>G.match(/\|\d+$/)||N.includes(G)?G:U(G)?`${G}|0`:G)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(p,{when:C=>C.length<3}),literal:s,type:a,built_in:d},contains:[{scope:"type",match:_(o)},v,y,m,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function Xh(e){return e?typeof e=="string"?e:e.source:null}function ai(e){return _e("(?=",e,")")}function _e(...e){return e.map(n=>Xh(n)).join("")}function $v(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function it(...e){return"("+($v(e).capture?"":"?:")+e.map(r=>Xh(r)).join("|")+")"}const Jl=e=>_e(/\b/,e,/\w$/.test(e)?/\b/:/\B/),zv=["Protocol","Type"].map(Jl),Uu=["init","self"].map(Jl),jv=["Any","Self"],wa=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],$u=["false","nil","true"],Hv=["assignment","associativity","higherThan","left","lowerThan","none","right"],Gv=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],zu=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Qh=it(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Jh=it(Qh,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_a=_e(Qh,Jh,"*"),ep=it(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ds=it(ep,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),nn=_e(ep,Ds,"*"),hs=_e(/[A-Z]/,Ds,"*"),Kv=["attached","autoclosure",_e(/convention\(/,it("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",_e(/objc\(/,nn,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Wv=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Vv(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,it(...zv,...Uu)],className:{2:"keyword"}},s={match:_e(/\./,it(...wa)),relevance:0},o=wa.filter(pe=>typeof pe=="string").concat(["_|0"]),a=wa.filter(pe=>typeof pe!="string").concat(jv).map(Jl),l={variants:[{className:"keyword",match:it(...a,...Uu)}]},c={$pattern:it(/\b\w+/,/#\w+/),keyword:o.concat(Gv),literal:$u},u=[i,s,l],d={match:_e(/\./,it(...zu)),relevance:0},h={className:"built_in",match:_e(/\b/,it(...zu),/(?=\()/)},f=[d,h],p={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:_a},{match:`\\.(\\.|${Jh})+`}]},b=[p,m],y="([0-9]_*)+",_="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${_})(\\.(${_}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},T=(pe="")=>({className:"subst",variants:[{match:_e(/\\/,pe,/[0\\tnr"']/)},{match:_e(/\\/,pe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),C=(pe="")=>({className:"subst",match:_e(/\\/,pe,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(pe="")=>({className:"subst",label:"interpol",begin:_e(/\\/,pe,/\(/),end:/\)/}),P=(pe="")=>({begin:_e(pe,/"""/),end:_e(/"""/,pe),contains:[T(pe),C(pe),N(pe)]}),U=(pe="")=>({begin:_e(pe,/"/),end:_e(/"/,pe),contains:[T(pe),N(pe)]}),G={className:"string",variants:[P(),P("#"),P("##"),P("###"),U(),U("#"),U("##"),U("###")]},O=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],j={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:O},B=pe=>{const je=_e(pe,/\//),ie=_e(/\//,pe);return{begin:je,end:ie,contains:[...O,{scope:"comment",begin:`#(?!.*${ie})`,end:/$/}]}},re={scope:"regexp",variants:[B("###"),B("##"),B("#"),j]},X={match:_e(/`/,nn,/`/)},Y={className:"variable",match:/\$\d+/},I={className:"variable",match:`\\$${Ds}+`},q=[X,Y,I],F={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Wv,contains:[...b,v,G]}]}},K={scope:"keyword",match:_e(/@/,it(...Kv),ai(it(/\(/,/\s+/)))},w={scope:"meta",match:_e(/@/,nn)},Q=[F,K,w],ae={match:ai(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:_e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ds,"+")},{className:"type",match:hs,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:_e(/\s+&\s+/,ai(hs)),relevance:0}]},k={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...Q,p,ae]};ae.contains.push(k);const he={match:_e(nn,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",he,...r,re,...u,...f,...b,v,G,...q,...Q,ae]},we={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ae]},at={begin:it(ai(_e(nn,/\s*:/)),ai(_e(nn,/\s+/,nn,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:nn}]},Ne={begin:/\(/,end:/\)/,keywords:c,contains:[at,...r,...u,...b,v,G,...Q,ae,se],endsParent:!0,illegal:/["']/},Je={match:[/(func|macro)/,/\s+/,it(X.match,nn,_a)],className:{1:"keyword",3:"title.function"},contains:[we,Ne,t],illegal:[/\[/,/%/]},et={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[we,Ne,t],illegal:/\[|%/},lt={match:[/operator/,/\s+/,_a],className:{1:"keyword",3:"title"}},Lt={begin:[/precedencegroup/,/\s+/,hs],className:{1:"keyword",3:"title"},contains:[ae],keywords:[...Hv,...$u],end:/}/},bt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},vt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Re={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,nn,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[we,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:hs},...u],relevance:0}]};for(const pe of G.variants){const je=pe.contains.find(Mt=>Mt.label==="interpol");je.keywords=c;const ie=[...u,...f,...b,v,G,...q];je.contains=[...ie,{begin:/\(/,end:/\)/,contains:["self",...ie]}]}return{name:"Swift",keywords:c,contains:[...r,Je,et,bt,vt,Re,lt,Lt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},re,...u,...f,...b,v,G,...q,...Q,ae,se]}}const Ps="[A-Za-z$_][0-9A-Za-z$_]*",tp=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],np=["true","false","null","undefined","NaN","Infinity"],rp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ip=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],sp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],op=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ap=[].concat(sp,rp,ip);function Yv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=Ps,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let ae;const k=F.input.substring(w);if(ae=k.match(/^\s*=/)){K.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){K.ignoreMatch();return}}},a={$pattern:Ps,keyword:tp,literal:np,built_in:ap,"variable.language":op},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rp,...ip]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(F){return t.concat("(?!",F.join("|"),")")}const re={match:t.concat(/\b/,B([...sp,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",q={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},re,j,P,Y,{match:/\$[(.]/}]}}function Zv(e){const t=e.regex,n=Yv(e),r=Ps,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Ps,keyword:tp.concat(l),literal:np,built_in:ap.concat(i),"variable.language":op},u={className:"meta",begin:"@"+r},d=(m,b,y)=>{const _=m.contains.findIndex(v=>v.label===b);if(_===-1)throw new Error("can not find mode to replace");m.contains.splice(_,1,y)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const h=n.contains.find(m=>m.scope==="attr"),f=Object.assign({},h,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,h,f]),n.contains=n.contains.concat([u,s,o,f]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);const p=n.contains.find(m=>m.label==="func.def");return p.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Xv(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(o,a),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}function Qv(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,e.QUOTE_STRING_MODE,l,c,a]}}function Jv(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(s,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,o,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ek(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},h,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,m,s,o],y=[...b];return y.pop(),y.push(a),f.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}const tk={arduino:P_,bash:B_,c:F_,cpp:q_,csharp:U_,css:Y_,diff:Z_,go:X_,graphql:Q_,ini:J_,java:ev,javascript:sv,json:ov,kotlin:lv,less:mv,lua:bv,makefile:yv,markdown:Ev,objectivec:xv,perl:wv,php:_v,"php-template":vv,plaintext:kv,python:Nv,"python-repl":Av,r:Sv,ruby:Tv,rust:Cv,scss:Fv,shell:qv,sql:Uv,swift:Vv,typescript:Zv,vbnet:Xv,wasm:Qv,xml:Jv,yaml:ek};function lp(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&lp(n)}),e}class ju{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function cp(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function In(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const nk="</span>",Hu=e=>!!e.scope,rk=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class ik{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=cp(t)}openNode(t){if(!Hu(t))return;const n=rk(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Hu(t)&&(this.buffer+=nk)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Gu=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class ec{constructor(){this.rootNode=Gu(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Gu({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{ec._collapse(n)}))}}class sk extends ec{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new ik(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function vi(e){return e?typeof e=="string"?e:e.source:null}function up(e){return nr("(?=",e,")")}function ok(e){return nr("(?:",e,")*")}function ak(e){return nr("(?:",e,")?")}function nr(...e){return e.map(n=>vi(n)).join("")}function lk(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function tc(...e){return"("+(lk(e).capture?"":"?:")+e.map(r=>vi(r)).join("|")+")"}function dp(e){return new RegExp(e.toString()+"|").exec("").length-1}function ck(e,t){const n=e&&e.exec(t);return n&&n.index===0}const uk=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nc(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=vi(r),o="";for(;s.length>0;){const a=uk.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const dk=/\b\B/,fp="[a-zA-Z]\\w*",rc="[a-zA-Z_]\\w*",hp="\\b\\d+(\\.\\d+)?",pp="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",gp="\\b(0b[01]+)",fk="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",hk=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=nr(t,/.*\b/,e.binary,/\b.*/)),In({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ki={begin:"\\\\[\\s\\S]",relevance:0},pk={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ki]},gk={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ki]},mk={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},no=function(e,t,n={}){const r=In({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=tc("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:nr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},bk=no("//","$"),yk=no("/\\*","\\*/"),Ek=no("#","$"),xk={scope:"number",begin:hp,relevance:0},wk={scope:"number",begin:pp,relevance:0},_k={scope:"number",begin:gp,relevance:0},vk={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ki,{begin:/\[/,end:/\]/,relevance:0,contains:[ki]}]},kk={scope:"title",begin:fp,relevance:0},Nk={scope:"title",begin:rc,relevance:0},Ak={begin:"\\.\\s*"+rc,relevance:0},Sk=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var ps=Object.freeze({__proto__:null,APOS_STRING_MODE:pk,BACKSLASH_ESCAPE:ki,BINARY_NUMBER_MODE:_k,BINARY_NUMBER_RE:gp,COMMENT:no,C_BLOCK_COMMENT_MODE:yk,C_LINE_COMMENT_MODE:bk,C_NUMBER_MODE:wk,C_NUMBER_RE:pp,END_SAME_AS_BEGIN:Sk,HASH_COMMENT_MODE:Ek,IDENT_RE:fp,MATCH_NOTHING_RE:dk,METHOD_GUARD:Ak,NUMBER_MODE:xk,NUMBER_RE:hp,PHRASAL_WORDS_MODE:mk,QUOTE_STRING_MODE:gk,REGEXP_MODE:vk,RE_STARTERS_RE:fk,SHEBANG:hk,TITLE_MODE:kk,UNDERSCORE_IDENT_RE:rc,UNDERSCORE_TITLE_MODE:Nk});function Tk(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Ck(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Ok(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Tk,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Ik(e,t){Array.isArray(e.illegal)&&(e.illegal=tc(...e.illegal))}function Rk(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Lk(e,t){e.relevance===void 0&&(e.relevance=1)}const Mk=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=nr(n.beforeMatch,up(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Dk=["of","and","for","in","not","or","if","then","parent","list","value"],Pk="keyword";function mp(e,t,n=Pk){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,mp(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,Bk(l[0],l[1])]})}}function Bk(e,t){return t?Number(t):Fk(e)?0:1}function Fk(e){return Dk.includes(e.toLowerCase())}const Ku={},Wn=e=>{console.error(e)},Wu=(e,...t)=>{console.log(`WARN: ${e}`,...t)},br=(e,t)=>{Ku[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ku[`${e}/${t}`]=!0)},Bs=new Error;function bp(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=dp(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function qk(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Wn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Bs;if(typeof e.beginScope!="object"||e.beginScope===null)throw Wn("beginScope must be object"),Bs;bp(e,e.begin,{key:"beginScope"}),e.begin=nc(e.begin,{joinWith:""})}}function Uk(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Wn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Bs;if(typeof e.endScope!="object"||e.endScope===null)throw Wn("endScope must be object"),Bs;bp(e,e.end,{key:"endScope"}),e.end=nc(e.end,{joinWith:""})}}function $k(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function zk(e){$k(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),qk(e),Uk(e)}function jk(e){function t(o,a){return new RegExp(vi(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=dp(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(nc(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[Ck,Rk,zk,Mk].forEach(u=>u(o,a)),e.compilerExtensions.forEach(u=>u(o,a)),o.__beforeBegin=null,[Ok,Ik,Lk].forEach(u=>u(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=mp(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=vi(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(u){return Hk(u==="self"?o:u)})),o.contains.forEach(function(u){s(u,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=In(e.classNameAliases||{}),s(e)}function yp(e){return e?e.endsWithParent||yp(e.starts):!1}function Hk(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return In(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yp(e)?In(e,{starts:e.starts?In(e.starts):null}):Object.isFrozen(e)?In(e):e}var Gk="11.11.1";class Kk extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const va=cp,Vu=In,Yu=Symbol("nomatch"),Wk=7,Ep=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:sk};function l(I){return a.noHighlightRe.test(I)}function c(I){let q=I.className+" ";q+=I.parentNode?I.parentNode.className:"";const F=a.languageDetectRe.exec(q);if(F){const K=U(F[1]);return K||(Wu(s.replace("{}",F[1])),Wu("Falling back to no-highlight mode for this block.",I)),K?F[1]:"no-highlight"}return q.split(/\s+/).find(K=>l(K)||U(K))}function u(I,q,F){let K="",w="";typeof q=="object"?(K=I,F=q.ignoreIllegals,w=q.language):(br("10.7.0","highlight(lang, code, ...args) has been deprecated."),br("10.7.0",`Please use highlight(code, options) instead.
31
+ `:A_(e)?(a=2,l=2):$h(e)&&(a=1,l=1);++s<i.length;)o=o.concat(zh(i[s],e,{whitespace:r,breakBefore:s?void 0:a,breakAfter:s<i.length-1?tl(i[s+1]):l}));return Pu(e)&&Lu(t,e,Pu)&&o.push(" "),a&&o.unshift(a),l&&o.push(l),o}function jh(e,t){const n=String(e.value),r=[],i=[];let s=0;for(;s<=n.length;){Mu.lastIndex=s;const l=Mu.exec(n),c=l&&"index"in l?l.index:n.length;r.push(I_(n.slice(s,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),s===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),s=c+1}let o=-1,a;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),a=void 0):r[o]?(typeof a=="number"&&i.push(a),i.push(r[o]),a=0):(o===0||o===r.length-1)&&i.push(0);return i}function O_(e){return[String(e.value)]}function I_(e,t,n){const r=[];let i=0,s;for(;i<e.length;){Du.lastIndex=i;const o=Du.exec(e);s=o?o.index:e.length,!i&&!s&&o&&!t&&r.push(""),i!==s&&r.push(e.slice(i,s)),i=o?s+o[0].length:s}return i!==s&&!n&&r.push(""),r.join(" ")}function Hh(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function R_(e){return!!(e.properties||{}).hidden}function L_(e){return e.tagName==="td"||e.tagName==="th"}function M_(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function D_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function P_(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=D_(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function B_(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],b=["true","false"],y={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],T=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],C=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:b,built_in:[..._,...v,"set","shopt",...T,...C]},contains:[f,e.SHEBANG(),p,d,s,o,y,a,l,c,u,n]}}function F_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",b={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:b,contains:y.concat([{begin:/\(/,end:/\)/,keywords:b,contains:y.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:b,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:b,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:b,disableAutodetect:!0,illegal:"</",contains:[].concat(_,v,y,[d,{begin:e.IDENT_RE+"::",keywords:b},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:b}}}function q_(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},f=t.optional(i)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],b=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],T={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:b},C={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[C,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:N.concat([{begin:/\(/,end:/\)/,keywords:T,contains:N.concat(["self"]),relevance:0}]),relevance:0},U={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:f,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:T,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,U,C,N,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:T,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:T},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function U_(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},u={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(u,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(h,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},b=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});h.contains=[m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],f.contains=[b,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,m,p,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},_={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",T={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,_,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,_],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[y,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},T]}}const $_=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),z_=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],j_=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],H_=[...z_,...j_],G_=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),K_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),W_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),V_=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Y_(e){const t=e.regex,n=$_(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+K_.join("|")+")"},{begin:":(:)?("+W_.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+V_.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:G_.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+H_.join("|")+")\\b"}]}}function Z_(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function X_(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function Q_(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function J_(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,s,i,o,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),h=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:h,className:"attr",starts:{end:/$/,contains:[r,a,s,i,o,n]}}]}}var xr="[0-9](_*[0-9])*",cs=`\\.(${xr})`,us="[0-9a-fA-F](_*[0-9a-fA-F])*",Fu={className:"number",variants:[{begin:`(\\b(${xr})((${cs})|\\.)?|(${cs}))[eE][+-]?(${xr})[fFdD]?\\b`},{begin:`\\b(${xr})((${cs})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${cs})[fFdD]?\\b`},{begin:`\\b(${xr})[fFdD]\\b`},{begin:`\\b0[xX]((${us})\\.?|(${us})?\\.(${us}))[pP][+-]?(${xr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${us})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Gh(e,t,n){return n===-1?"":e.replace(t,r=>Gh(e,t,n-1))}function ev(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Gh("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Fu,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Fu,c]}}const qu="[A-Za-z$_][0-9A-Za-z$_]*",tv=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],nv=["true","false","null","undefined","NaN","Infinity"],Kh=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Wh=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Vh=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],iv=[].concat(Vh,Kh,Wh);function sv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=qu,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let ae;const k=F.input.substring(w);if(ae=k.match(/^\s*=/)){K.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){K.ignoreMatch();return}}},a={$pattern:qu,keyword:tv,literal:nv,built_in:iv,"variable.language":rv},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Kh,...Wh]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(F){return t.concat("(?!",F.join("|"),")")}const re={match:t.concat(/\b/,B([...Vh,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",q={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},re,j,P,Y,{match:/\$[(.]/}]}}function ov(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Er="[0-9](_*[0-9])*",ds=`\\.(${Er})`,fs="[0-9a-fA-F](_*[0-9a-fA-F])*",av={className:"number",variants:[{begin:`(\\b(${Er})((${ds})|\\.)?|(${ds}))[eE][+-]?(${Er})[fFdD]?\\b`},{begin:`\\b(${Er})((${ds})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ds})[fFdD]?\\b`},{begin:`\\b(${Er})[fFdD]\\b`},{begin:`\\b0[xX]((${fs})\\.?|(${fs})?\\.(${fs}))[pP][+-]?(${Er})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fs})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function lv(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=av,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=d;return h.variants[1].contains=[d],d.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,a,l,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
32
+ `},c]}}const cv=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),uv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],fv=[...uv,...dv],hv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Yh=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Zh=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),gv=Yh.concat(Zh).sort().reverse();function mv(e){const t=cv(e),n=gv,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},c=function(v,T,C){return{className:v,begin:T,relevance:C}},u={$pattern:/[a-z-]+/,keyword:r,attribute:hv.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:u,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=a.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},p={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pv.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:a,relevance:0}},b={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+fv.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",s,0),c("selector-id","#"+s),c("selector-class","\\."+s,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Yh.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Zh.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},_={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,b,_,p,y,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function bv(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function yv(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,s,o]}}function xv(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),h=e.inherit(u,{contains:[]});c.contains.push(h),u.contains.push(d);let f=[n,l];return[c,u,d,h].forEach(y=>{y.contains=y.contains.concat(f)}),f=f.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},n,s,c,u,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Ev(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function wv(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,s,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(m,b,y="\\1")=>{const _=y==="\\1"?y:t.concat(y,b);return t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,_,/(?:\\.|[^\\\/])*?/,y,r)},f=(m,b,y)=>t.concat(t.concat("(?:",m,")"),b,/(?:\\.|[^\\\/])*?/,y,r),p=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...d,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function _v(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(X,Y)=>{Y.data._beginMatch=X[1]||X[2]},"on:end":(X,Y)=>{Y.data._beginMatch!==X[1]&&Y.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[
33
+ ]`,p={scope:"string",variants:[u,c,d,h]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},b=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],_=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],T={keyword:y,literal:(X=>{const Y=[];return X.forEach(I=>{Y.push(I),I.toLowerCase()===I?Y.push(I.toUpperCase()):Y.push(I.toLowerCase())}),Y})(b),built_in:_},C=X=>X.map(Y=>Y.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",C(_).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},P=t.concat(r,"\\b(?!\\()"),U={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},G={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},O={relevance:0,begin:/\(/,end:/\)/,keywords:T,contains:[G,o,U,e.C_BLOCK_COMMENT_MODE,p,m,N]},j={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",C(y).join("\\b|"),"|",C(_).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O]};O.contains.push(j);const B=[G,U,e.C_BLOCK_COMMENT_MODE,p,m,N],re={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:b,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:b,keyword:["new","array"]},contains:["self",...B]},...B,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:T,contains:[re,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,j,U,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:T,contains:["self",re,o,U,e.C_BLOCK_COMMENT_MODE,p,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},p,m]}}function vv(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function kv(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Nv(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",f=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,p=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${f}))[eE][+-]?(${h})[jJ]?(?=${p})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${h})[jJ](?=${p})`}]},b={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,y,d]}]}}function Av(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Sv(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Tv(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},h="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},N=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=N,m.contains=N;const O=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:N}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(O).concat(c).concat(N)}}function Cv(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:a,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:u}},{className:"punctuation",begin:"->"},s]}}const Ov=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Iv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Rv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Lv=[...Iv,...Rv],Mv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Dv=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Pv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Bv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Fv(e){const t=Ov(e),n=Pv,r=Dv,i="@[a-z-]+",s="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Lv.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Bv.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Mv.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function qv(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Uv(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=u,p=[...c,...l].filter(C=>!u.includes(C)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},b={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function _(C){return t.concat(/\b/,t.either(...C.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const v={scope:"keyword",match:_(h),relevance:0};function T(C,{exceptions:N,when:P}={}){const U=P;return N=N||[],C.map(G=>G.match(/\|\d+$/)||N.includes(G)?G:U(G)?`${G}|0`:G)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:T(p,{when:C=>C.length<3}),literal:s,type:a,built_in:d},contains:[{scope:"type",match:_(o)},v,y,m,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}function Xh(e){return e?typeof e=="string"?e:e.source:null}function ai(e){return _e("(?=",e,")")}function _e(...e){return e.map(n=>Xh(n)).join("")}function $v(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function it(...e){return"("+($v(e).capture?"":"?:")+e.map(r=>Xh(r)).join("|")+")"}const Jl=e=>_e(/\b/,e,/\w$/.test(e)?/\b/:/\B/),zv=["Protocol","Type"].map(Jl),Uu=["init","self"].map(Jl),jv=["Any","Self"],wa=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],$u=["false","nil","true"],Hv=["assignment","associativity","higherThan","left","lowerThan","none","right"],Gv=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],zu=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Qh=it(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Jh=it(Qh,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_a=_e(Qh,Jh,"*"),ep=it(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ds=it(ep,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),nn=_e(ep,Ds,"*"),hs=_e(/[A-Z]/,Ds,"*"),Kv=["attached","autoclosure",_e(/convention\(/,it("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",_e(/objc\(/,nn,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Wv=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Vv(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,it(...zv,...Uu)],className:{2:"keyword"}},s={match:_e(/\./,it(...wa)),relevance:0},o=wa.filter(pe=>typeof pe=="string").concat(["_|0"]),a=wa.filter(pe=>typeof pe!="string").concat(jv).map(Jl),l={variants:[{className:"keyword",match:it(...a,...Uu)}]},c={$pattern:it(/\b\w+/,/#\w+/),keyword:o.concat(Gv),literal:$u},u=[i,s,l],d={match:_e(/\./,it(...zu)),relevance:0},h={className:"built_in",match:_e(/\b/,it(...zu),/(?=\()/)},f=[d,h],p={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:_a},{match:`\\.(\\.|${Jh})+`}]},b=[p,m],y="([0-9]_*)+",_="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${_})(\\.(${_}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},T=(pe="")=>({className:"subst",variants:[{match:_e(/\\/,pe,/[0\\tnr"']/)},{match:_e(/\\/,pe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),C=(pe="")=>({className:"subst",match:_e(/\\/,pe,/[\t ]*(?:[\r\n]|\r\n)/)}),N=(pe="")=>({className:"subst",label:"interpol",begin:_e(/\\/,pe,/\(/),end:/\)/}),P=(pe="")=>({begin:_e(pe,/"""/),end:_e(/"""/,pe),contains:[T(pe),C(pe),N(pe)]}),U=(pe="")=>({begin:_e(pe,/"/),end:_e(/"/,pe),contains:[T(pe),N(pe)]}),G={className:"string",variants:[P(),P("#"),P("##"),P("###"),U(),U("#"),U("##"),U("###")]},O=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],j={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:O},B=pe=>{const je=_e(pe,/\//),ie=_e(/\//,pe);return{begin:je,end:ie,contains:[...O,{scope:"comment",begin:`#(?!.*${ie})`,end:/$/}]}},re={scope:"regexp",variants:[B("###"),B("##"),B("#"),j]},X={match:_e(/`/,nn,/`/)},Y={className:"variable",match:/\$\d+/},I={className:"variable",match:`\\$${Ds}+`},q=[X,Y,I],F={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Wv,contains:[...b,v,G]}]}},K={scope:"keyword",match:_e(/@/,it(...Kv),ai(it(/\(/,/\s+/)))},w={scope:"meta",match:_e(/@/,nn)},Q=[F,K,w],ae={match:ai(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:_e(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ds,"+")},{className:"type",match:hs,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:_e(/\s+&\s+/,ai(hs)),relevance:0}]},k={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...Q,p,ae]};ae.contains.push(k);const he={match:_e(nn,/\s*:/),keywords:"_|0",relevance:0},se={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",he,...r,re,...u,...f,...b,v,G,...q,...Q,ae]},we={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ae]},at={begin:it(ai(_e(nn,/\s*:/)),ai(_e(nn,/\s+/,nn,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:nn}]},Ne={begin:/\(/,end:/\)/,keywords:c,contains:[at,...r,...u,...b,v,G,...Q,ae,se],endsParent:!0,illegal:/["']/},Je={match:[/(func|macro)/,/\s+/,it(X.match,nn,_a)],className:{1:"keyword",3:"title.function"},contains:[we,Ne,t],illegal:[/\[/,/%/]},et={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[we,Ne,t],illegal:/\[|%/},lt={match:[/operator/,/\s+/,_a],className:{1:"keyword",3:"title"}},Lt={begin:[/precedencegroup/,/\s+/,hs],className:{1:"keyword",3:"title"},contains:[ae],keywords:[...Hv,...$u],end:/}/},bt={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},vt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Re={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,nn,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[we,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:hs},...u],relevance:0}]};for(const pe of G.variants){const je=pe.contains.find(Mt=>Mt.label==="interpol");je.keywords=c;const ie=[...u,...f,...b,v,G,...q];je.contains=[...ie,{begin:/\(/,end:/\)/,contains:["self",...ie]}]}return{name:"Swift",keywords:c,contains:[...r,Je,et,bt,vt,Re,lt,Lt,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},re,...u,...f,...b,v,G,...q,...Q,ae,se]}}const Ps="[A-Za-z$_][0-9A-Za-z$_]*",tp=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],np=["true","false","null","undefined","NaN","Infinity"],rp=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ip=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],sp=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],op=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ap=[].concat(sp,rp,ip);function Yv(e){const t=e.regex,n=(F,{after:K})=>{const w="</"+F[0].slice(1);return F.input.indexOf(w,K)!==-1},r=Ps,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const w=F[0].length+F.index,Q=F.input[w];if(Q==="<"||Q===","){K.ignoreMatch();return}Q===">"&&(n(F,{after:w})||K.ignoreMatch());let ae;const k=F.input.substring(w);if(ae=k.match(/^\s*=/)){K.ignoreMatch();return}if((ae=k.match(/^\s+extends\s+/))&&ae.index===0){K.ignoreMatch();return}}},a={$pattern:Ps,keyword:tp,literal:np,built_in:ap,"variable.language":op},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,{match:/\$\d+/},d];h.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const T=[].concat(_,h.contains),C=T.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(T)}]),N={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},U={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...rp,...ip]}},G={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[N],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(F){return t.concat("(?!",F.join("|"),")")}const re={match:t.concat(/\b/,B([...sp,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},X={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},N]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",q={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[N]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:U},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),G,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,m,b,_,{match:/\$\d+/},d,U,{scope:"attr",match:r+t.lookahead(":"),relevance:0},q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[N,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},X,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[N]},re,j,P,Y,{match:/\$[(.]/}]}}function Zv(e){const t=e.regex,n=Yv(e),r=Ps,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:Ps,keyword:tp.concat(l),literal:np,built_in:ap.concat(i),"variable.language":op},u={className:"meta",begin:"@"+r},d=(m,b,y)=>{const _=m.contains.findIndex(v=>v.label===b);if(_===-1)throw new Error("can not find mode to replace");m.contains.splice(_,1,y)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const h=n.contains.find(m=>m.scope==="attr"),f=Object.assign({},h,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,h,f]),n.contains=n.contains.concat([u,s,o,f]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);const p=n.contains.find(m=>m.label==="func.def");return p.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Xv(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(o,a),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}function Qv(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,e.QUOTE_STRING_MODE,l,c,a]}}function Jv(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(s,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,o,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ek(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},a=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},b=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},h,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,m,s,o],y=[...b];return y.pop(),y.push(a),f.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:b}}const tk={arduino:P_,bash:B_,c:F_,cpp:q_,csharp:U_,css:Y_,diff:Z_,go:X_,graphql:Q_,ini:J_,java:ev,javascript:sv,json:ov,kotlin:lv,less:mv,lua:bv,makefile:yv,markdown:xv,objectivec:Ev,perl:wv,php:_v,"php-template":vv,plaintext:kv,python:Nv,"python-repl":Av,r:Sv,ruby:Tv,rust:Cv,scss:Fv,shell:qv,sql:Uv,swift:Vv,typescript:Zv,vbnet:Xv,wasm:Qv,xml:Jv,yaml:ek};function lp(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&lp(n)}),e}class ju{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function cp(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function In(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const nk="</span>",Hu=e=>!!e.scope,rk=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};class ik{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=cp(t)}openNode(t){if(!Hu(t))return;const n=rk(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){Hu(t)&&(this.buffer+=nk)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const Gu=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class ec{constructor(){this.rootNode=Gu(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Gu({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{ec._collapse(n)}))}}class sk extends ec{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new ik(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function vi(e){return e?typeof e=="string"?e:e.source:null}function up(e){return nr("(?=",e,")")}function ok(e){return nr("(?:",e,")*")}function ak(e){return nr("(?:",e,")?")}function nr(...e){return e.map(n=>vi(n)).join("")}function lk(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function tc(...e){return"("+(lk(e).capture?"":"?:")+e.map(r=>vi(r)).join("|")+")"}function dp(e){return new RegExp(e.toString()+"|").exec("").length-1}function ck(e,t){const n=e&&e.exec(t);return n&&n.index===0}const uk=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function nc(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let s=vi(r),o="";for(;s.length>0;){const a=uk.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&n++)}return o}).map(r=>`(${r})`).join(t)}const dk=/\b\B/,fp="[a-zA-Z]\\w*",rc="[a-zA-Z_]\\w*",hp="\\b\\d+(\\.\\d+)?",pp="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",gp="\\b(0b[01]+)",fk="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",hk=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=nr(t,/.*\b/,e.binary,/\b.*/)),In({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ki={begin:"\\\\[\\s\\S]",relevance:0},pk={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ki]},gk={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ki]},mk={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},no=function(e,t,n={}){const r=In({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=tc("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:nr(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},bk=no("//","$"),yk=no("/\\*","\\*/"),xk=no("#","$"),Ek={scope:"number",begin:hp,relevance:0},wk={scope:"number",begin:pp,relevance:0},_k={scope:"number",begin:gp,relevance:0},vk={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ki,{begin:/\[/,end:/\]/,relevance:0,contains:[ki]}]},kk={scope:"title",begin:fp,relevance:0},Nk={scope:"title",begin:rc,relevance:0},Ak={begin:"\\.\\s*"+rc,relevance:0},Sk=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var ps=Object.freeze({__proto__:null,APOS_STRING_MODE:pk,BACKSLASH_ESCAPE:ki,BINARY_NUMBER_MODE:_k,BINARY_NUMBER_RE:gp,COMMENT:no,C_BLOCK_COMMENT_MODE:yk,C_LINE_COMMENT_MODE:bk,C_NUMBER_MODE:wk,C_NUMBER_RE:pp,END_SAME_AS_BEGIN:Sk,HASH_COMMENT_MODE:xk,IDENT_RE:fp,MATCH_NOTHING_RE:dk,METHOD_GUARD:Ak,NUMBER_MODE:Ek,NUMBER_RE:hp,PHRASAL_WORDS_MODE:mk,QUOTE_STRING_MODE:gk,REGEXP_MODE:vk,RE_STARTERS_RE:fk,SHEBANG:hk,TITLE_MODE:kk,UNDERSCORE_IDENT_RE:rc,UNDERSCORE_TITLE_MODE:Nk});function Tk(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Ck(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Ok(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Tk,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Ik(e,t){Array.isArray(e.illegal)&&(e.illegal=tc(...e.illegal))}function Rk(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Lk(e,t){e.relevance===void 0&&(e.relevance=1)}const Mk=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=nr(n.beforeMatch,up(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Dk=["of","and","for","in","not","or","if","then","parent","list","value"],Pk="keyword";function mp(e,t,n=Pk){const r=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(s){Object.assign(r,mp(e[s],t,s))}),r;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const l=a.split("|");r[l[0]]=[s,Bk(l[0],l[1])]})}}function Bk(e,t){return t?Number(t):Fk(e)?0:1}function Fk(e){return Dk.includes(e.toLowerCase())}const Ku={},Wn=e=>{console.error(e)},Wu=(e,...t)=>{console.log(`WARN: ${e}`,...t)},br=(e,t)=>{Ku[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ku[`${e}/${t}`]=!0)},Bs=new Error;function bp(e,t,{key:n}){let r=0;const i=e[n],s={},o={};for(let a=1;a<=t.length;a++)o[a+r]=i[a],s[a+r]=!0,r+=dp(t[a-1]);e[n]=o,e[n]._emit=s,e[n]._multi=!0}function qk(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Wn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Bs;if(typeof e.beginScope!="object"||e.beginScope===null)throw Wn("beginScope must be object"),Bs;bp(e,e.begin,{key:"beginScope"}),e.begin=nc(e.begin,{joinWith:""})}}function Uk(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Wn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Bs;if(typeof e.endScope!="object"||e.endScope===null)throw Wn("endScope must be object"),Bs;bp(e,e.end,{key:"endScope"}),e.end=nc(e.end,{joinWith:""})}}function $k(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function zk(e){$k(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),qk(e),Uk(e)}function jk(e){function t(o,a){return new RegExp(vi(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=dp(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(l=>l[1]);this.matcherRe=t(nc(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const l=this.matcherRe.exec(a);if(!l)return null;const c=l.findIndex((d,h)=>h>0&&d!==void 0),u=this.matchIndexes[c];return l.splice(0,c),Object.assign(l,u)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const l=new n;return this.rules.slice(a).forEach(([c,u])=>l.addRule(c,u)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){const l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let c=l.exec(a);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const u=this.getMatcher(0);u.lastIndex=this.lastIndex+1,c=u.exec(a)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function i(o){const a=new r;return o.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){const l=o;if(o.isCompiled)return l;[Ck,Rk,zk,Mk].forEach(u=>u(o,a)),e.compilerExtensions.forEach(u=>u(o,a)),o.__beforeBegin=null,[Ok,Ik,Lk].forEach(u=>u(o,a)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=mp(o.keywords,e.case_insensitive)),l.keywordPatternRe=t(c,!0),a&&(o.begin||(o.begin=/\B|\b/),l.beginRe=t(l.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(l.endRe=t(l.end)),l.terminatorEnd=vi(l.end)||"",o.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(l.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(u){return Hk(u==="self"?o:u)})),o.contains.forEach(function(u){s(u,l)}),o.starts&&s(o.starts,a),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=In(e.classNameAliases||{}),s(e)}function yp(e){return e?e.endsWithParent||yp(e.starts):!1}function Hk(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return In(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yp(e)?In(e,{starts:e.starts?In(e.starts):null}):Object.isFrozen(e)?In(e):e}var Gk="11.11.1";class Kk extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const va=cp,Vu=In,Yu=Symbol("nomatch"),Wk=7,xp=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:sk};function l(I){return a.noHighlightRe.test(I)}function c(I){let q=I.className+" ";q+=I.parentNode?I.parentNode.className:"";const F=a.languageDetectRe.exec(q);if(F){const K=U(F[1]);return K||(Wu(s.replace("{}",F[1])),Wu("Falling back to no-highlight mode for this block.",I)),K?F[1]:"no-highlight"}return q.split(/\s+/).find(K=>l(K)||U(K))}function u(I,q,F){let K="",w="";typeof q=="object"?(K=I,F=q.ignoreIllegals,w=q.language):(br("10.7.0","highlight(lang, code, ...args) has been deprecated."),br("10.7.0",`Please use highlight(code, options) instead.
34
34
  https://github.com/highlightjs/highlight.js/issues/2277`),w=I,K=q),F===void 0&&(F=!0);const Q={code:K,language:w};X("before:highlight",Q);const ae=Q.result?Q.result:d(Q.language,Q.code,F);return ae.code=Q.code,X("after:highlight",ae),ae}function d(I,q,F,K){const w=Object.create(null);function Q(S,R){return S.keywords[R]}function ae(){if(!ie.keywords){ve.addText(me);return}let S=0;ie.keywordPatternRe.lastIndex=0;let R=ie.keywordPatternRe.exec(me),z="";for(;R;){z+=me.substring(S,R.index);const W=Re.case_insensitive?R[0].toLowerCase():R[0],te=Q(ie,W);if(te){const[Ae,ut]=te;if(ve.addText(z),z="",w[W]=(w[W]||0)+1,w[W]<=Wk&&(Dt+=ut),Ae.startsWith("_"))z+=R[0];else{const tt=Re.classNameAliases[Ae]||Ae;se(R[0],tt)}}else z+=R[0];S=ie.keywordPatternRe.lastIndex,R=ie.keywordPatternRe.exec(me)}z+=me.substring(S),ve.addText(z)}function k(){if(me==="")return;let S=null;if(typeof ie.subLanguage=="string"){if(!t[ie.subLanguage]){ve.addText(me);return}S=d(ie.subLanguage,me,!0,Mt[ie.subLanguage]),Mt[ie.subLanguage]=S._top}else S=f(me,ie.subLanguage.length?ie.subLanguage:null);ie.relevance>0&&(Dt+=S.relevance),ve.__addSublanguage(S._emitter,S.language)}function he(){ie.subLanguage!=null?k():ae(),me=""}function se(S,R){S!==""&&(ve.startScope(R),ve.addText(S),ve.endScope())}function we(S,R){let z=1;const W=R.length-1;for(;z<=W;){if(!S._emit[z]){z++;continue}const te=Re.classNameAliases[S[z]]||S[z],Ae=R[z];te?se(Ae,te):(me=Ae,ae(),me=""),z++}}function at(S,R){return S.scope&&typeof S.scope=="string"&&ve.openNode(Re.classNameAliases[S.scope]||S.scope),S.beginScope&&(S.beginScope._wrap?(se(me,Re.classNameAliases[S.beginScope._wrap]||S.beginScope._wrap),me=""):S.beginScope._multi&&(we(S.beginScope,R),me="")),ie=Object.create(S,{parent:{value:ie}}),ie}function Ne(S,R,z){let W=ck(S.endRe,z);if(W){if(S["on:end"]){const te=new ju(S);S["on:end"](R,te),te.isMatchIgnored&&(W=!1)}if(W){for(;S.endsParent&&S.parent;)S=S.parent;return S}}if(S.endsWithParent)return Ne(S.parent,R,z)}function Je(S){return ie.matcher.regexIndex===0?(me+=S[0],1):(kt=!0,0)}function et(S){const R=S[0],z=S.rule,W=new ju(z),te=[z.__beforeBegin,z["on:begin"]];for(const Ae of te)if(Ae&&(Ae(S,W),W.isMatchIgnored))return Je(R);return z.skip?me+=R:(z.excludeBegin&&(me+=R),he(),!z.returnBegin&&!z.excludeBegin&&(me=R)),at(z,S),z.returnBegin?0:R.length}function lt(S){const R=S[0],z=q.substring(S.index),W=Ne(ie,S,z);if(!W)return Yu;const te=ie;ie.endScope&&ie.endScope._wrap?(he(),se(R,ie.endScope._wrap)):ie.endScope&&ie.endScope._multi?(he(),we(ie.endScope,S)):te.skip?me+=R:(te.returnEnd||te.excludeEnd||(me+=R),he(),te.excludeEnd&&(me=R));do ie.scope&&ve.closeNode(),!ie.skip&&!ie.subLanguage&&(Dt+=ie.relevance),ie=ie.parent;while(ie!==W.parent);return W.starts&&at(W.starts,S),te.returnEnd?0:R.length}function Lt(){const S=[];for(let R=ie;R!==Re;R=R.parent)R.scope&&S.unshift(R.scope);S.forEach(R=>ve.openNode(R))}let bt={};function vt(S,R){const z=R&&R[0];if(me+=S,z==null)return he(),0;if(bt.type==="begin"&&R.type==="end"&&bt.index===R.index&&z===""){if(me+=q.slice(R.index,R.index+1),!i){const W=new Error(`0 width match regex (${I})`);throw W.languageName=I,W.badRule=bt.rule,W}return 1}if(bt=R,R.type==="begin")return et(R);if(R.type==="illegal"&&!F){const W=new Error('Illegal lexeme "'+z+'" for mode "'+(ie.scope||"<unnamed>")+'"');throw W.mode=ie,W}else if(R.type==="end"){const W=lt(R);if(W!==Yu)return W}if(R.type==="illegal"&&z==="")return me+=`
35
- `,1;if(He>1e5&&He>R.index*3)throw new Error("potential infinite loop, way more iterations than matches");return me+=z,z.length}const Re=U(I);if(!Re)throw Wn(s.replace("{}",I)),new Error('Unknown language: "'+I+'"');const pe=jk(Re);let je="",ie=K||pe;const Mt={},ve=new a.__emitter(a);Lt();let me="",Dt=0,ct=0,He=0,kt=!1;try{if(Re.__emitTokens)Re.__emitTokens(q,ve);else{for(ie.matcher.considerAll();;){He++,kt?kt=!1:ie.matcher.considerAll(),ie.matcher.lastIndex=ct;const S=ie.matcher.exec(q);if(!S)break;const R=q.substring(ct,S.index),z=vt(R,S);ct=S.index+z}vt(q.substring(ct))}return ve.finalize(),je=ve.toHTML(),{language:I,value:je,relevance:Dt,illegal:!1,_emitter:ve,_top:ie}}catch(S){if(S.message&&S.message.includes("Illegal"))return{language:I,value:va(q),illegal:!0,relevance:0,_illegalBy:{message:S.message,index:ct,context:q.slice(ct-100,ct+100),mode:S.mode,resultSoFar:je},_emitter:ve};if(i)return{language:I,value:va(q),illegal:!1,relevance:0,errorRaised:S,_emitter:ve,_top:ie};throw S}}function h(I){const q={value:va(I),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return q._emitter.addText(I),q}function f(I,q){q=q||a.languages||Object.keys(t);const F=h(I),K=q.filter(U).filter(O).map(he=>d(he,I,!1));K.unshift(F);const w=K.sort((he,se)=>{if(he.relevance!==se.relevance)return se.relevance-he.relevance;if(he.language&&se.language){if(U(he.language).supersetOf===se.language)return 1;if(U(se.language).supersetOf===he.language)return-1}return 0}),[Q,ae]=w,k=Q;return k.secondBest=ae,k}function p(I,q,F){const K=q&&n[q]||F;I.classList.add("hljs"),I.classList.add(`language-${K}`)}function m(I){let q=null;const F=c(I);if(l(F))return;if(X("before:highlightElement",{el:I,language:F}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),a.throwUnescapedHTML))throw new Kk("One of your code blocks includes unescaped HTML.",I.innerHTML);q=I;const K=q.textContent,w=F?u(K,{language:F,ignoreIllegals:!0}):f(K);I.innerHTML=w.value,I.dataset.highlighted="yes",p(I,F,w.language),I.result={language:w.language,re:w.relevance,relevance:w.relevance},w.secondBest&&(I.secondBest={language:w.secondBest.language,relevance:w.secondBest.relevance}),X("after:highlightElement",{el:I,result:w,text:K})}function b(I){a=Vu(a,I)}const y=()=>{T(),br("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){T(),br("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let v=!1;function T(){function I(){T()}if(document.readyState==="loading"){v||window.addEventListener("DOMContentLoaded",I,!1),v=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function C(I,q){let F=null;try{F=q(e)}catch(K){if(Wn("Language definition for '{}' could not be registered.".replace("{}",I)),i)Wn(K);else throw K;F=o}F.name||(F.name=I),t[I]=F,F.rawDefinition=q.bind(null,e),F.aliases&&G(F.aliases,{languageName:I})}function N(I){delete t[I];for(const q of Object.keys(n))n[q]===I&&delete n[q]}function P(){return Object.keys(t)}function U(I){return I=(I||"").toLowerCase(),t[I]||t[n[I]]}function G(I,{languageName:q}){typeof I=="string"&&(I=[I]),I.forEach(F=>{n[F.toLowerCase()]=q})}function O(I){const q=U(I);return q&&!q.disableAutodetect}function j(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=q=>{I["before:highlightBlock"](Object.assign({block:q.el},q))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=q=>{I["after:highlightBlock"](Object.assign({block:q.el},q))})}function B(I){j(I),r.push(I)}function re(I){const q=r.indexOf(I);q!==-1&&r.splice(q,1)}function X(I,q){const F=I;r.forEach(function(K){K[F]&&K[F](q)})}function Y(I){return br("10.7.0","highlightBlock will be removed entirely in v12.0"),br("10.7.0","Please use highlightElement now."),m(I)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:T,highlightElement:m,highlightBlock:Y,configure:b,initHighlighting:y,initHighlightingOnLoad:_,registerLanguage:C,unregisterLanguage:N,listLanguages:P,getLanguage:U,registerAliases:G,autoDetection:O,inherit:Vu,addPlugin:B,removePlugin:re}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Gk,e.regex={concat:nr,lookahead:up,either:tc,optional:ak,anyNumberOfTimes:ok};for(const I in ps)typeof ps[I]=="object"&&lp(ps[I]);return Object.assign(e,ps),e},Lr=Ep({});Lr.newInstance=()=>Ep({});var Vk=Lr;Lr.HighlightJS=Lr;Lr.default=Lr;const Yk=Mi(Vk),Zu={},Zk="hljs-";function Xk(e){const t=Yk.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function n(l,c,u){const d=u||Zu,h=typeof d.prefix=="string"?d.prefix:Zk;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Qk,classPrefix:h});const f=t.highlight(c,{ignoreIllegals:!0,language:l});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const p=f._emitter.root,m=p.data;return m.language=f.language,m.relevance=f.relevance,p}function r(l,c){const d=(c||Zu).subset||i();let h=-1,f=0,p;for(;++h<d.length;){const m=d[h];if(!t.getLanguage(m))continue;const b=n(m,l,c);b.data&&b.data.relevance!==void 0&&b.data.relevance>f&&(f=b.data.relevance,p=b)}return p||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function s(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function a(l){return!!t.getLanguage(l)}}class Qk{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,a){return a?o+"_".repeat(a):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const xp=function(e){if(e==null)return nN;if(typeof e=="function")return ro(e);if(typeof e=="object")return Array.isArray(e)?Jk(e):eN(e);if(typeof e=="string")return tN(e);throw new Error("Expected function, string, or object as test")};function Jk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xp(e[n]);return ro(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function eN(e){const t=e;return ro(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function tN(e){return ro(t);function t(n){return n&&n.type===e}}function ro(e){return t;function t(n,r,i){return!!(rN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nN(){return!0}function rN(e){return e!==null&&typeof e=="object"&&"type"in e}const wp=[],iN=!0,Xu=!1,sN="skip";function oN(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=xp(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=wp,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=aN(n(l,u)),f[0]===Xu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==sN)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Xu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function aN(e){return Array.isArray(e)?e:typeof e=="number"?[iN,e]:e==null?wp:[e]}function lN(e,t,n,r){let i,s,o;s=t,o=n,i=r,oN(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const cN={};function _p(e){const t=e||cN,n=t.aliases,r=t.detect||!1,i=t.languages||tk,s=t.plainText,o=t.prefix,a=t.subset;let l="hljs";const c=Xk(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){lN(u,"element",function(h,f,p){if(h.tagName!=="code"||!p||p.type!=="element"||p.tagName!=="pre")return;const m=uN(h);if(m===!1||!m&&!r||m&&s&&s.includes(m))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(l)||h.properties.className.unshift(l);const b=T_(h,{whitespace:"pre"});let y;try{y=m?c.highlight(m,b,{prefix:o}):c.highlightAuto(b,{prefix:o,subset:a})}catch(_){const v=_;if(m&&/Unknown language/.test(v.message)){d.message("Cannot highlight as `"+m+"`, it’s not registered",{ancestors:[p,h],cause:v,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw v}!m&&y.data&&y.data.language&&h.properties.className.push("language-"+y.data.language),y.children.length>0&&(h.children=y.children)})}}function uN(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function dN({article:e,onBack:t,onEdit:n,showActions:r=!1}){return x.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&x.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&x.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[x.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&x.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[x.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Edit"]})]}),x.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[x.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[x.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),x.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&x.jsxs("span",{className:"flex items-center gap-2",children:[x.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&x.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),x.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===Fe.Published?"bg-green-100 text-green-800":e.status===Fe.Draft?"bg-gray-100 text-gray-800":e.status===Fe.Review?"bg-yellow-100 text-yellow-800":e.status===Fe.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:Fe[e.status]})]}),e.tags&&e.tags.length>0&&x.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>x.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",i.title]},i.tagId))}),e.roles&&e.roles.length>0&&x.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>x.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),x.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:x.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e.content})})]})]})}var vp=typeof global=="object"&&global&&global.Object===Object&&global,fN=typeof self=="object"&&self&&self.Object===Object&&self,dn=vp||fN||Function("return this")(),Dn=dn.Symbol,kp=Object.prototype,hN=kp.hasOwnProperty,pN=kp.toString,li=Dn?Dn.toStringTag:void 0;function gN(e){var t=hN.call(e,li),n=e[li];try{e[li]=void 0;var r=!0}catch{}var i=pN.call(e);return r&&(t?e[li]=n:delete e[li]),i}var mN=Object.prototype,bN=mN.toString;function yN(e){return bN.call(e)}var EN="[object Null]",xN="[object Undefined]",Qu=Dn?Dn.toStringTag:void 0;function zr(e){return e==null?e===void 0?xN:EN:Qu&&Qu in Object(e)?gN(e):yN(e)}function yn(e){return e!=null&&typeof e=="object"}var Zn=Array.isArray;function Bn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Np(e){return e}var wN="[object AsyncFunction]",_N="[object Function]",vN="[object GeneratorFunction]",kN="[object Proxy]";function ic(e){if(!Bn(e))return!1;var t=zr(e);return t==_N||t==vN||t==wN||t==kN}var ka=dn["__core-js_shared__"],Ju=function(){var e=/[^.]+$/.exec(ka&&ka.keys&&ka.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function NN(e){return!!Ju&&Ju in e}var AN=Function.prototype,SN=AN.toString;function rr(e){if(e!=null){try{return SN.call(e)}catch{}try{return e+""}catch{}}return""}var TN=/[\\^$.*+?()[\]{}|]/g,CN=/^\[object .+?Constructor\]$/,ON=Function.prototype,IN=Object.prototype,RN=ON.toString,LN=IN.hasOwnProperty,MN=RegExp("^"+RN.call(LN).replace(TN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DN(e){if(!Bn(e)||NN(e))return!1;var t=ic(e)?MN:CN;return t.test(rr(e))}function PN(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=PN(e,t);return DN(n)?n:void 0}var nl=ir(dn,"WeakMap"),ed=Object.create,BN=function(){function e(){}return function(t){if(!Bn(t))return{};if(ed)return ed(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function FN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function qN(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var UN=800,$N=16,zN=Date.now;function jN(e){var t=0,n=0;return function(){var r=zN(),i=$N-(r-n);if(n=r,i>0){if(++t>=UN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function HN(e){return function(){return e}}var Fs=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),GN=Fs?function(e,t){return Fs(e,"toString",{configurable:!0,enumerable:!1,value:HN(t),writable:!0})}:Np,KN=jN(GN);function WN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var VN=9007199254740991,YN=/^(?:0|[1-9]\d*)$/;function Ap(e,t){var n=typeof e;return t=t??VN,!!t&&(n=="number"||n!="symbol"&&YN.test(e))&&e>-1&&e%1==0&&e<t}function sc(e,t,n){t=="__proto__"&&Fs?Fs(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Bi(e,t){return e===t||e!==e&&t!==t}var ZN=Object.prototype,XN=ZN.hasOwnProperty;function Sp(e,t,n){var r=e[t];(!(XN.call(e,t)&&Bi(r,n))||n===void 0&&!(t in e))&&sc(e,t,n)}function QN(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?sc(n,a,l):Sp(n,a,l)}return n}var td=Math.max;function JN(e,t,n){return t=td(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=td(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),FN(e,this,a)}}function eA(e,t){return KN(JN(e,t,Np),e+"")}var tA=9007199254740991;function Tp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tA}function io(e){return e!=null&&Tp(e.length)&&!ic(e)}function nA(e,t,n){if(!Bn(n))return!1;var r=typeof t;return(r=="number"?io(n)&&Ap(t,n.length):r=="string"&&t in n)?Bi(n[t],e):!1}function rA(e){return eA(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&nA(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var iA=Object.prototype;function oc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||iA;return e===n}function sA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var oA="[object Arguments]";function nd(e){return yn(e)&&zr(e)==oA}var Cp=Object.prototype,aA=Cp.hasOwnProperty,lA=Cp.propertyIsEnumerable,rl=nd(function(){return arguments}())?nd:function(e){return yn(e)&&aA.call(e,"callee")&&!lA.call(e,"callee")};function cA(){return!1}var Op=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rd=Op&&typeof module=="object"&&module&&!module.nodeType&&module,uA=rd&&rd.exports===Op,id=uA?dn.Buffer:void 0,dA=id?id.isBuffer:void 0,Ni=dA||cA,fA="[object Arguments]",hA="[object Array]",pA="[object Boolean]",gA="[object Date]",mA="[object Error]",bA="[object Function]",yA="[object Map]",EA="[object Number]",xA="[object Object]",wA="[object RegExp]",_A="[object Set]",vA="[object String]",kA="[object WeakMap]",NA="[object ArrayBuffer]",AA="[object DataView]",SA="[object Float32Array]",TA="[object Float64Array]",CA="[object Int8Array]",OA="[object Int16Array]",IA="[object Int32Array]",RA="[object Uint8Array]",LA="[object Uint8ClampedArray]",MA="[object Uint16Array]",DA="[object Uint32Array]",Oe={};Oe[SA]=Oe[TA]=Oe[CA]=Oe[OA]=Oe[IA]=Oe[RA]=Oe[LA]=Oe[MA]=Oe[DA]=!0;Oe[fA]=Oe[hA]=Oe[NA]=Oe[pA]=Oe[AA]=Oe[gA]=Oe[mA]=Oe[bA]=Oe[yA]=Oe[EA]=Oe[xA]=Oe[wA]=Oe[_A]=Oe[vA]=Oe[kA]=!1;function PA(e){return yn(e)&&Tp(e.length)&&!!Oe[zr(e)]}function ac(e){return function(t){return e(t)}}var Ip=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bi=Ip&&typeof module=="object"&&module&&!module.nodeType&&module,BA=bi&&bi.exports===Ip,Na=BA&&vp.process,Mr=function(){try{var e=bi&&bi.require&&bi.require("util").types;return e||Na&&Na.binding&&Na.binding("util")}catch{}}(),sd=Mr&&Mr.isTypedArray,lc=sd?ac(sd):PA,FA=Object.prototype,qA=FA.hasOwnProperty;function Rp(e,t){var n=Zn(e),r=!n&&rl(e),i=!n&&!r&&Ni(e),s=!n&&!r&&!i&&lc(e),o=n||r||i||s,a=o?sA(e.length,String):[],l=a.length;for(var c in e)(t||qA.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ap(c,l)))&&a.push(c);return a}function Lp(e,t){return function(n){return e(t(n))}}var UA=Lp(Object.keys,Object),$A=Object.prototype,zA=$A.hasOwnProperty;function jA(e){if(!oc(e))return UA(e);var t=[];for(var n in Object(e))zA.call(e,n)&&n!="constructor"&&t.push(n);return t}function HA(e){return io(e)?Rp(e):jA(e)}function GA(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var KA=Object.prototype,WA=KA.hasOwnProperty;function VA(e){if(!Bn(e))return GA(e);var t=oc(e),n=[];for(var r in e)r=="constructor"&&(t||!WA.call(e,r))||n.push(r);return n}function Mp(e){return io(e)?Rp(e,!0):VA(e)}var Ai=ir(Object,"create");function YA(){this.__data__=Ai?Ai(null):{},this.size=0}function ZA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var XA="__lodash_hash_undefined__",QA=Object.prototype,JA=QA.hasOwnProperty;function eS(e){var t=this.__data__;if(Ai){var n=t[e];return n===XA?void 0:n}return JA.call(t,e)?t[e]:void 0}var tS=Object.prototype,nS=tS.hasOwnProperty;function rS(e){var t=this.__data__;return Ai?t[e]!==void 0:nS.call(t,e)}var iS="__lodash_hash_undefined__";function sS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ai&&t===void 0?iS:t,this}function Xn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xn.prototype.clear=YA;Xn.prototype.delete=ZA;Xn.prototype.get=eS;Xn.prototype.has=rS;Xn.prototype.set=sS;function oS(){this.__data__=[],this.size=0}function so(e,t){for(var n=e.length;n--;)if(Bi(e[n][0],t))return n;return-1}var aS=Array.prototype,lS=aS.splice;function cS(e){var t=this.__data__,n=so(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lS.call(t,n,1),--this.size,!0}function uS(e){var t=this.__data__,n=so(t,e);return n<0?void 0:t[n][1]}function dS(e){return so(this.__data__,e)>-1}function fS(e,t){var n=this.__data__,r=so(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _n(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_n.prototype.clear=oS;_n.prototype.delete=cS;_n.prototype.get=uS;_n.prototype.has=dS;_n.prototype.set=fS;var Si=ir(dn,"Map");function hS(){this.size=0,this.__data__={hash:new Xn,map:new(Si||_n),string:new Xn}}function pS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function oo(e,t){var n=e.__data__;return pS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function gS(e){var t=oo(this,e).delete(e);return this.size-=t?1:0,t}function mS(e){return oo(this,e).get(e)}function bS(e){return oo(this,e).has(e)}function yS(e,t){var n=oo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sr.prototype.clear=hS;sr.prototype.delete=gS;sr.prototype.get=mS;sr.prototype.has=bS;sr.prototype.set=yS;function ES(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Dp=Lp(Object.getPrototypeOf,Object),xS="[object Object]",wS=Function.prototype,_S=Object.prototype,Pp=wS.toString,vS=_S.hasOwnProperty,kS=Pp.call(Object);function NS(e){if(!yn(e)||zr(e)!=xS)return!1;var t=Dp(e);if(t===null)return!0;var n=vS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pp.call(n)==kS}function AS(){this.__data__=new _n,this.size=0}function SS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function TS(e){return this.__data__.get(e)}function CS(e){return this.__data__.has(e)}var OS=200;function IS(e,t){var n=this.__data__;if(n instanceof _n){var r=n.__data__;if(!Si||r.length<OS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new sr(r)}return n.set(e,t),this.size=n.size,this}function on(e){var t=this.__data__=new _n(e);this.size=t.size}on.prototype.clear=AS;on.prototype.delete=SS;on.prototype.get=TS;on.prototype.has=CS;on.prototype.set=IS;var Bp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,od=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,RS=od&&od.exports===Bp,ad=RS?dn.Buffer:void 0,ld=ad?ad.allocUnsafe:void 0;function Fp(e,t){if(t)return e.slice();var n=e.length,r=ld?ld(n):new e.constructor(n);return e.copy(r),r}function LS(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function MS(){return[]}var DS=Object.prototype,PS=DS.propertyIsEnumerable,cd=Object.getOwnPropertySymbols,BS=cd?function(e){return e==null?[]:(e=Object(e),LS(cd(e),function(t){return PS.call(e,t)}))}:MS;function FS(e,t,n){var r=t(e);return Zn(e)?r:ES(r,n(e))}function il(e){return FS(e,HA,BS)}var sl=ir(dn,"DataView"),ol=ir(dn,"Promise"),al=ir(dn,"Set"),ud="[object Map]",qS="[object Object]",dd="[object Promise]",fd="[object Set]",hd="[object WeakMap]",pd="[object DataView]",US=rr(sl),$S=rr(Si),zS=rr(ol),jS=rr(al),HS=rr(nl),zt=zr;(sl&&zt(new sl(new ArrayBuffer(1)))!=pd||Si&&zt(new Si)!=ud||ol&&zt(ol.resolve())!=dd||al&&zt(new al)!=fd||nl&&zt(new nl)!=hd)&&(zt=function(e){var t=zr(e),n=t==qS?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case US:return pd;case $S:return ud;case zS:return dd;case jS:return fd;case HS:return hd}return t});var GS=Object.prototype,KS=GS.hasOwnProperty;function WS(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&KS.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var qs=dn.Uint8Array;function cc(e){var t=new e.constructor(e.byteLength);return new qs(t).set(new qs(e)),t}function VS(e,t){var n=cc(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var YS=/\w*$/;function ZS(e){var t=new e.constructor(e.source,YS.exec(e));return t.lastIndex=e.lastIndex,t}var gd=Dn?Dn.prototype:void 0,md=gd?gd.valueOf:void 0;function XS(e){return md?Object(md.call(e)):{}}function qp(e,t){var n=t?cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var QS="[object Boolean]",JS="[object Date]",eT="[object Map]",tT="[object Number]",nT="[object RegExp]",rT="[object Set]",iT="[object String]",sT="[object Symbol]",oT="[object ArrayBuffer]",aT="[object DataView]",lT="[object Float32Array]",cT="[object Float64Array]",uT="[object Int8Array]",dT="[object Int16Array]",fT="[object Int32Array]",hT="[object Uint8Array]",pT="[object Uint8ClampedArray]",gT="[object Uint16Array]",mT="[object Uint32Array]";function bT(e,t,n){var r=e.constructor;switch(t){case oT:return cc(e);case QS:case JS:return new r(+e);case aT:return VS(e);case lT:case cT:case uT:case dT:case fT:case hT:case pT:case gT:case mT:return qp(e,n);case eT:return new r;case tT:case iT:return new r(e);case nT:return ZS(e);case rT:return new r;case sT:return XS(e)}}function Up(e){return typeof e.constructor=="function"&&!oc(e)?BN(Dp(e)):{}}var yT="[object Map]";function ET(e){return yn(e)&&zt(e)==yT}var bd=Mr&&Mr.isMap,xT=bd?ac(bd):ET,wT="[object Set]";function _T(e){return yn(e)&&zt(e)==wT}var yd=Mr&&Mr.isSet,vT=yd?ac(yd):_T,kT=1,$p="[object Arguments]",NT="[object Array]",AT="[object Boolean]",ST="[object Date]",TT="[object Error]",zp="[object Function]",CT="[object GeneratorFunction]",OT="[object Map]",IT="[object Number]",jp="[object Object]",RT="[object RegExp]",LT="[object Set]",MT="[object String]",DT="[object Symbol]",PT="[object WeakMap]",BT="[object ArrayBuffer]",FT="[object DataView]",qT="[object Float32Array]",UT="[object Float64Array]",$T="[object Int8Array]",zT="[object Int16Array]",jT="[object Int32Array]",HT="[object Uint8Array]",GT="[object Uint8ClampedArray]",KT="[object Uint16Array]",WT="[object Uint32Array]",Se={};Se[$p]=Se[NT]=Se[BT]=Se[FT]=Se[AT]=Se[ST]=Se[qT]=Se[UT]=Se[$T]=Se[zT]=Se[jT]=Se[OT]=Se[IT]=Se[jp]=Se[RT]=Se[LT]=Se[MT]=Se[DT]=Se[HT]=Se[GT]=Se[KT]=Se[WT]=!0;Se[TT]=Se[zp]=Se[PT]=!1;function Ns(e,t,n,r,i,s){var o,a=t&kT;if(o!==void 0)return o;if(!Bn(e))return e;var l=Zn(e);if(l)o=WS(e);else{var c=zt(e),u=c==zp||c==CT;if(Ni(e))return Fp(e,a);if(c==jp||c==$p||u&&!i)o=u?{}:Up(e);else{if(!Se[c])return i?e:{};o=bT(e,c,a)}}s||(s=new on);var d=s.get(e);if(d)return d;s.set(e,o),vT(e)?e.forEach(function(p){o.add(Ns(p,t,n,p,e,s))}):xT(e)&&e.forEach(function(p,m){o.set(m,Ns(p,t,n,m,e,s))});var h=il,f=l?void 0:h(e);return WN(f||e,function(p,m){f&&(m=p,p=e[m]),Sp(o,m,Ns(p,t,n,m,e,s))}),o}var VT=1,YT=4;function Tr(e){return Ns(e,VT|YT)}var ZT="__lodash_hash_undefined__";function XT(e){return this.__data__.set(e,ZT),this}function QT(e){return this.__data__.has(e)}function Us(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sr;++t<n;)this.add(e[t])}Us.prototype.add=Us.prototype.push=XT;Us.prototype.has=QT;function JT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function eC(e,t){return e.has(t)}var tC=1,nC=2;function Hp(e,t,n,r,i,s){var o=n&tC,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&nC?new Us:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var p=e[d],m=t[d];if(r)var b=o?r(m,p,d,t,e,s):r(p,m,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!JT(t,function(y,_){if(!eC(f,_)&&(p===y||i(p,y,n,r,s)))return f.push(_)})){h=!1;break}}else if(!(p===m||i(p,m,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function rC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function iC(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var sC=1,oC=2,aC="[object Boolean]",lC="[object Date]",cC="[object Error]",uC="[object Map]",dC="[object Number]",fC="[object RegExp]",hC="[object Set]",pC="[object String]",gC="[object Symbol]",mC="[object ArrayBuffer]",bC="[object DataView]",Ed=Dn?Dn.prototype:void 0,Aa=Ed?Ed.valueOf:void 0;function yC(e,t,n,r,i,s,o){switch(n){case bC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mC:return!(e.byteLength!=t.byteLength||!s(new qs(e),new qs(t)));case aC:case lC:case dC:return Bi(+e,+t);case cC:return e.name==t.name&&e.message==t.message;case fC:case pC:return e==t+"";case uC:var a=rC;case hC:var l=r&sC;if(a||(a=iC),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=oC,o.set(e,t);var u=Hp(a(e),a(t),r,i,s,o);return o.delete(e),u;case gC:if(Aa)return Aa.call(e)==Aa.call(t)}return!1}var EC=1,xC=Object.prototype,wC=xC.hasOwnProperty;function _C(e,t,n,r,i,s){var o=n&EC,a=il(e),l=a.length,c=il(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in t:wC.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){h=a[d];var y=e[h],_=t[h];if(r)var v=o?r(_,y,h,t,e,s):r(y,_,h,e,t,s);if(!(v===void 0?y===_||i(y,_,n,r,s):v)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var T=e.constructor,C=t.constructor;T!=C&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(m=!1)}return s.delete(e),s.delete(t),m}var vC=1,xd="[object Arguments]",wd="[object Array]",gs="[object Object]",kC=Object.prototype,_d=kC.hasOwnProperty;function NC(e,t,n,r,i,s){var o=Zn(e),a=Zn(t),l=o?wd:zt(e),c=a?wd:zt(t);l=l==xd?gs:l,c=c==xd?gs:c;var u=l==gs,d=c==gs,h=l==c;if(h&&Ni(e)){if(!Ni(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new on),o||lc(e)?Hp(e,t,n,r,i,s):yC(e,t,l,n,r,i,s);if(!(n&vC)){var f=u&&_d.call(e,"__wrapped__"),p=d&&_d.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,b=p?t.value():t;return s||(s=new on),i(m,b,n,r,s)}}return h?(s||(s=new on),_C(e,t,n,r,i,s)):!1}function Gp(e,t,n,r,i){return e===t?!0:e==null||t==null||!yn(e)&&!yn(t)?e!==e&&t!==t:NC(e,t,n,r,Gp,i)}function AC(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var SC=AC();function ll(e,t,n){(n!==void 0&&!Bi(e[t],n)||n===void 0&&!(t in e))&&sc(e,t,n)}function TC(e){return yn(e)&&io(e)}function cl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function CC(e){return QN(e,Mp(e))}function OC(e,t,n,r,i,s,o){var a=cl(e,n),l=cl(t,n),c=o.get(l);if(c){ll(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,d=u===void 0;if(d){var h=Zn(l),f=!h&&Ni(l),p=!h&&!f&&lc(l);u=l,h||f||p?Zn(a)?u=a:TC(a)?u=qN(a):f?(d=!1,u=Fp(l,!0)):p?(d=!1,u=qp(l,!0)):u=[]:NS(l)||rl(l)?(u=a,rl(a)?u=CC(a):(!Bn(a)||ic(a))&&(u=Up(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),ll(e,n,u)}function Kp(e,t,n,r,i){e!==t&&SC(t,function(s,o){if(i||(i=new on),Bn(s))OC(e,t,o,n,Kp,r,i);else{var a=r?r(cl(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ll(e,o,a)}},Mp)}function On(e,t){return Gp(e,t)}var Mn=rA(function(e,t,n){Kp(e,t,n)}),ee=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(ee||{});class ln{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const i=ee.TYPE&ee.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ee.LEVEL|i:ee.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Cr extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Wp=class ul{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const i=this.query(n);if(i==null)throw new Cr(`Unable to create ${n} blot`);const s=i,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),a=new s(t,o,r);return ul.blots.set(a.domNode,a),a}find(t,n=!1){return ul.find(t,n)}query(t,n=ee.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&ee.LEVEL&ee.BLOCK?r=this.types.block:t&ee.LEVEL&ee.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&ee.LEVEL&r.scope&&n&ee.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Cr("Invalid definition");if(r&&n.blotName==="abstract")throw new Cr("Cannot register abstract class");const s=r?n.blotName:i?n.attrName:void 0;return this.types[s]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(o=>o.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(o=>{(this.tags[o]==null||n.className==null)&&(this.tags[o]=n)}))),n})}};Wp.blots=new WeakMap;let Dr=Wp;function vd(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class IC extends ln{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){vd(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(vd(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const Wt=IC;function Sa(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class RC extends ln{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[Sa(this.keyName)]=n,!0):!1}remove(t){t.style[Sa(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[Sa(this.keyName)];return this.canAdd(t,n)?n:""}}const Fn=RC;class LC{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Dr.find(this.domNode);if(t==null)return;const n=ln.keys(this.domNode),r=Wt.keys(this.domNode),i=Fn.keys(this.domNode);n.concat(r).concat(i).forEach(s=>{const o=t.scroll.query(s,ee.ATTRIBUTE);o instanceof ln&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const ao=LC,Vp=class{constructor(t,n){this.scroll=t,this.domNode=n,Dr.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Cr("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),Dr.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,i){const s=this.isolate(t,n);if(this.scroll.query(r,ee.BLOT)!=null&&i)s.wrap(r,i);else if(this.scroll.query(r,ee.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);s.wrap(o),o.format(r,i)}}insertAt(t,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),s=this.split(t);this.parent.insertBefore(i,s||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Cr(`Cannot wrap ${t}`);return r.appendChild(this),r}};Vp.blotName="abstract";let Yp=Vp;const Zp=class extends Yp{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zp.scope=ee.INLINE_BLOT;let MC=Zp;const Ve=MC;class DC{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===t)return i;i+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let i=r();for(;i;){const s=i.length();if(t<s||n&&t===s&&(i.next==null||i.next.length()!==0))return[i,t];t-=s,i=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[i,s]=this.find(t);let o=t-s;const a=this.iterator(i);let l=a();for(;l&&o<t+n;){const c=l.length();t>o?r(l,t-o,Math.min(n,o+c-t)):r(l,0,Math.min(c,t+n-o)),o+=c,l=a()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let i=r();for(;i;)n=t(n,i),i=r();return n}}function kd(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(ee.INLINE);return Array.from(e.childNodes).forEach(i=>{r.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const Xp=class Cn extends Yp{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Cn.uiClass&&this.uiNode.classList.add(Cn.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new DC,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=kd(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Cr)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,i,s)=>{r.deleteAt(i,s)})}descendant(t,n=0){const[r,i]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,i]:r instanceof Cn?r.descendant(t,i):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(n,r,(o,a,l)=>{(t.blotName==null&&t(o)||t.blotName!=null&&o instanceof t)&&i.push(o),o instanceof Cn&&(i=i.concat(o.descendants(t,a,s))),s-=l}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ee.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof Cn?n.unwrap():n.remove())})}formatAt(t,n,r,i){this.children.forEachAt(t,n,(s,o,a)=>{s.formatAt(o,a,r,i)})}insertAt(t,n,r){const[i,s]=this.children.find(t);if(i)i.insertAt(s,n,r);else{const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(o)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,i]=this.children.find(t,n),s=[[this,t]];return r instanceof Cn?s.concat(r.path(i,n)):(r!=null&&s.push([r,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof Cn&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(i,s,o)=>{const a=i.split(s,n);a!=null&&r.appendChild(a)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],i=[];t.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(r.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(s);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),r.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,o)=>s===o?0:s.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let o=null;s.nextSibling!=null&&(o=this.scroll.find(s.nextSibling));const a=kd(s,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};Xp.uiClass="";let PC=Xp;const Gt=PC;function BC(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const wr=class _r extends Gt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(_r.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new ao(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof _r||(r=r.wrap(_r.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,ee.INLINE);if(r==null)return;r instanceof ln?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ee.ATTRIBUTE)?this.isolate(t,n).format(r,i):super.formatAt(t,n,r,i)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof _r&&r.prev===this&&BC(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof _r&&this.attributes.move(r),r}};wr.allowedChildren=[wr,Ve],wr.blotName="inline",wr.scope=ee.INLINE_BLOT,wr.tagName="SPAN";let FC=wr;const uc=FC,vr=class dl extends Gt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(dl.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new ao(this.domNode)}format(t,n){const r=this.scroll.query(t,ee.BLOCK);r!=null&&(r instanceof ln?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(dl.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.scroll.query(r,ee.BLOCK)!=null?this.format(r,i):super.formatAt(t,n,r,i)}insertAt(t,n,r){if(r==null||this.scroll.query(n,ee.INLINE)!=null)super.insertAt(t,n,r);else{const i=this.split(t);if(i!=null){const s=this.scroll.create(n,r);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};vr.blotName="block",vr.scope=ee.BLOCK_BLOT,vr.tagName="P",vr.allowedChildren=[uc,vr,Ve];let qC=vr;const Ti=qC,fl=class extends Gt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};fl.blotName="container",fl.scope=ee.BLOCK_BLOT;let UC=fl;const lo=UC;class $C extends Ve{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,i){t===0&&n===this.length()?this.format(r,i):super.formatAt(t,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const _t=$C,zC={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},jC=100,kr=class extends Gt{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,zC),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=ee.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,i){this.update(),super.formatAt(t,n,r,i)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)t.push(i.pop());const s=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&s(l.parent))},o=l=>{r.has(l.domNode)&&(l instanceof Gt&&l.children.forEach(o),r.delete(l.domNode),l.optimize(n))};let a=t;for(let l=0;a.length>0;l+=1){if(l>=jC)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(s(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const h=this.find(d,!1);s(h,!1),h instanceof Gt&&h.children.forEach(f=>{s(f,!1)})})):c.type==="attributes"&&s(u.prev)),s(u))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),i=a.slice();i.length>0;)t.push(i.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(i=>{const s=this.find(i.target,!0);return s==null?null:r.has(s.domNode)?(r.get(s.domNode).push(i),null):(r.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};kr.blotName="scroll",kr.defaultChild=Ti,kr.allowedChildren=[Ti,lo],kr.scope=ee.BLOCK_BLOT,kr.tagName="DIV";let HC=kr;const dc=HC,hl=class Qp extends Ve{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Qp&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};hl.blotName="text",hl.scope=ee.INLINE_BLOT;let GC=hl;const $s=GC,KC=Object.freeze(Object.defineProperty({__proto__:null,Attributor:ln,AttributorStore:ao,BlockBlot:Ti,ClassAttributor:Wt,ContainerBlot:lo,EmbedBlot:_t,InlineBlot:uc,LeafBlot:Ve,ParentBlot:Gt,Registry:Dr,Scope:ee,ScrollBlot:dc,StyleAttributor:Fn,TextBlot:$s},Symbol.toStringTag,{value:"Module"}));var pl={exports:{}},xt=-1,ot=1,Pe=0;function Ci(e,t,n,r,i){if(e===t)return e?[[Pe,e]]:[];if(n!=null){var s=tO(e,t,n);if(s)return s}var o=fc(e,t),a=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=co(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var c=WC(e,t);return a&&c.unshift([Pe,a]),l&&c.push([Pe,l]),hc(c,i),r&&ZC(c),c}function WC(e,t){var n;if(!e)return[[ot,t]];if(!t)return[[xt,e]];var r=e.length>t.length?e:t,i=e.length>t.length?t:e,s=r.indexOf(i);if(s!==-1)return n=[[ot,r.substring(0,s)],[Pe,i],[ot,r.substring(s+i.length)]],e.length>t.length&&(n[0][0]=n[2][0]=xt),n;if(i.length===1)return[[xt,e],[ot,t]];var o=YC(e,t);if(o){var a=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=Ci(a,c),f=Ci(l,u);return h.concat([[Pe,d]],f)}return VC(e,t)}function VC(e,t){for(var n=e.length,r=t.length,i=Math.ceil((n+r)/2),s=i,o=2*i,a=new Array(o),l=new Array(o),c=0;c<o;c++)a[c]=-1,l[c]=-1;a[s+1]=0,l[s+1]=0;for(var u=n-r,d=u%2!==0,h=0,f=0,p=0,m=0,b=0;b<i;b++){for(var y=-b+h;y<=b-f;y+=2){var _=s+y,v;y===-b||y!==b&&a[_-1]<a[_+1]?v=a[_+1]:v=a[_-1]+1;for(var T=v-y;v<n&&T<r&&e.charAt(v)===t.charAt(T);)v++,T++;if(a[_]=v,v>n)f+=2;else if(T>r)h+=2;else if(d){var C=s+u-y;if(C>=0&&C<o&&l[C]!==-1){var N=n-l[C];if(v>=N)return Nd(e,t,v,T)}}}for(var P=-b+p;P<=b-m;P+=2){var C=s+P,N;P===-b||P!==b&&l[C-1]<l[C+1]?N=l[C+1]:N=l[C-1]+1;for(var U=N-P;N<n&&U<r&&e.charAt(n-N-1)===t.charAt(r-U-1);)N++,U++;if(l[C]=N,N>n)m+=2;else if(U>r)p+=2;else if(!d){var _=s+u-P;if(_>=0&&_<o&&a[_]!==-1){var v=a[_],T=s+v-_;if(N=n-N,v>=N)return Nd(e,t,v,T)}}}}return[[xt,e],[ot,t]]}function Nd(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),o=e.substring(n),a=t.substring(r),l=Ci(i,s),c=Ci(o,a);return l.concat(c)}function fc(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return Jp(e.charCodeAt(i-1))&&i--,i}function Ad(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var s=0,o=1;;){var a=e.substring(i-o),l=t.indexOf(a);if(l==-1)return s;o+=l,(l==0||e.substring(i-o)==t.substring(0,o))&&(s=o,o++)}}function co(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return eg(e.charCodeAt(e.length-i))&&i--,i}function YC(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(f,p,m){for(var b=f.substring(m,m+Math.floor(f.length/4)),y=-1,_="",v,T,C,N;(y=p.indexOf(b,y+1))!==-1;){var P=fc(f.substring(m),p.substring(y)),U=co(f.substring(0,m),p.substring(0,y));_.length<U+P&&(_=p.substring(y-U,y)+p.substring(y,y+P),v=f.substring(0,m-U),T=f.substring(m+P),C=p.substring(0,y-U),N=p.substring(y+P))}return _.length*2>=f.length?[v,T,C,N,_]:null}var s=i(n,r,Math.ceil(n.length/4)),o=i(n,r,Math.ceil(n.length/2)),a;if(!s&&!o)return null;o?s?a=s[4].length>o[4].length?s:o:a=o:a=s;var l,c,u,d;e.length>t.length?(l=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],l=a[2],c=a[3]);var h=a[4];return[l,c,u,d,h]}function ZC(e){for(var t=!1,n=[],r=0,i=null,s=0,o=0,a=0,l=0,c=0;s<e.length;)e[s][0]==Pe?(n[r++]=s,o=l,a=c,l=0,c=0,i=e[s][1]):(e[s][0]==ot?l+=e[s][1].length:c+=e[s][1].length,i&&i.length<=Math.max(o,a)&&i.length<=Math.max(l,c)&&(e.splice(n[r-1],0,[xt,i]),e[n[r-1]+1][0]=ot,r--,r--,s=r>0?n[r-1]:-1,o=0,a=0,l=0,c=0,i=null,t=!0)),s++;for(t&&hc(e),JC(e),s=1;s<e.length;){if(e[s-1][0]==xt&&e[s][0]==ot){var u=e[s-1][1],d=e[s][1],h=Ad(u,d),f=Ad(d,u);h>=f?(h>=u.length/2||h>=d.length/2)&&(e.splice(s,0,[Pe,d.substring(0,h)]),e[s-1][1]=u.substring(0,u.length-h),e[s+1][1]=d.substring(h),s++):(f>=u.length/2||f>=d.length/2)&&(e.splice(s,0,[Pe,u.substring(0,f)]),e[s-1][0]=ot,e[s-1][1]=d.substring(0,d.length-f),e[s+1][0]=xt,e[s+1][1]=u.substring(f),s++),s++}s++}}var Sd=/[^a-zA-Z0-9]/,Td=/\s/,Cd=/[\r\n]/,XC=/\n\r?\n$/,QC=/^\r?\n\r?\n/;function JC(e){function t(f,p){if(!f||!p)return 6;var m=f.charAt(f.length-1),b=p.charAt(0),y=m.match(Sd),_=b.match(Sd),v=y&&m.match(Td),T=_&&b.match(Td),C=v&&m.match(Cd),N=T&&b.match(Cd),P=C&&f.match(XC),U=N&&p.match(QC);return P||U?5:C||N?4:y&&!v&&T?3:v||T?2:y||_?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==Pe&&e[n+1][0]==Pe){var r=e[n-1][1],i=e[n][1],s=e[n+1][1],o=co(r,i);if(o){var a=i.substring(i.length-o);r=r.substring(0,r.length-o),i=a+i.substring(0,i.length-o),s=a+s}for(var l=r,c=i,u=s,d=t(r,i)+t(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var h=t(r,i)+t(i,s);h>=d&&(d=h,l=r,c=i,u=s)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}}function hc(e,t){e.push([Pe,""]);for(var n=0,r=0,i=0,s="",o="",a;n<e.length;){if(n<e.length-1&&!e[n][1]){e.splice(n,1);continue}switch(e[n][0]){case ot:i++,o+=e[n][1],n++;break;case xt:r++,s+=e[n][1],n++;break;case Pe:var l=n-i-r-1;if(t){if(l>=0&&ng(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),s=c+s,o=c+o,!e[l][1]){e.splice(l,1),n--;var u=l-1;e[u]&&e[u][0]===ot&&(i++,o=e[u][1]+o,u--),e[u]&&e[u][0]===xt&&(r++,s=e[u][1]+s,u--),l=u}}if(tg(e[n][1])){var c=e[n][1].charAt(0);e[n][1]=e[n][1].slice(1),s+=c,o+=c}}if(n<e.length-1&&!e[n][1]){e.splice(n,1);break}if(s.length>0||o.length>0){s.length>0&&o.length>0&&(a=fc(o,s),a!==0&&(l>=0?e[l][1]+=o.substring(0,a):(e.splice(0,0,[Pe,o.substring(0,a)]),n++),o=o.substring(a),s=s.substring(a)),a=co(o,s),a!==0&&(e[n][1]=o.substring(o.length-a)+e[n][1],o=o.substring(0,o.length-a),s=s.substring(0,s.length-a)));var d=i+r;s.length===0&&o.length===0?(e.splice(n-d,d),n=n-d):s.length===0?(e.splice(n-d,d,[ot,o]),n=n-d+1):o.length===0?(e.splice(n-d,d,[xt,s]),n=n-d+1):(e.splice(n-d,d,[xt,s],[ot,o]),n=n-d+2)}n!==0&&e[n-1][0]===Pe?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,s="",o="";break}}e[e.length-1][1]===""&&e.pop();var h=!1;for(n=1;n<e.length-1;)e[n-1][0]===Pe&&e[n+1][0]===Pe&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),h=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),h=!0)),n++;h&&hc(e,t)}function Jp(e){return e>=55296&&e<=56319}function eg(e){return e>=56320&&e<=57343}function tg(e){return eg(e.charCodeAt(0))}function ng(e){return Jp(e.charCodeAt(e.length-1))}function eO(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function Ta(e,t,n,r){return ng(e)||tg(r)?null:eO([[Pe,e],[xt,t],[ot,n],[Pe,r]])}function tO(e,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,s=e.length,o=t.length;if(r.length===0&&(i===null||i.length===0)){var a=r.index,l=e.slice(0,a),c=e.slice(a),u=i?i.index:null;e:{var d=a+o-s;if(u!==null&&u!==d||d<0||d>o)break e;var h=t.slice(0,d),f=t.slice(d);if(f!==c)break e;var p=Math.min(a,d),m=l.slice(0,p),b=h.slice(0,p);if(m!==b)break e;var y=l.slice(p),_=h.slice(p);return Ta(m,y,_,c)}e:{if(u!==null&&u!==a)break e;var v=a,h=t.slice(0,v),f=t.slice(v);if(h!==l)break e;var T=Math.min(s-v,o-v),C=c.slice(c.length-T),N=f.slice(f.length-T);if(C!==N)break e;var y=c.slice(0,c.length-T),_=f.slice(0,f.length-T);return Ta(l,y,_,C)}}if(r.length>0&&i&&i.length===0)e:{var m=e.slice(0,r.index),C=e.slice(r.index+r.length),p=m.length,T=C.length;if(o<p+T)break e;var b=t.slice(0,p),N=t.slice(o-T);if(m!==b||C!==N)break e;var y=e.slice(p,s-T),_=t.slice(p,o-T);return Ta(m,y,_,C)}return null}function uo(e,t,n,r){return Ci(e,t,n,r,!0)}uo.INSERT=ot;uo.DELETE=xt;uo.EQUAL=Pe;var nO=uo,zs={exports:{}};zs.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",h="[object Map]",f="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",y="[object Set]",_="[object String]",v="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",U="[object Float64Array]",G="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",B="[object Uint8Array]",re="[object Uint8ClampedArray]",X="[object Uint16Array]",Y="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,q=/\w*$/,F=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,w={};w[s]=w[o]=w[C]=w[N]=w[a]=w[l]=w[P]=w[U]=w[G]=w[O]=w[j]=w[h]=w[f]=w[p]=w[b]=w[y]=w[_]=w[v]=w[B]=w[re]=w[X]=w[Y]=!0,w[c]=w[u]=w[T]=!1;var Q=typeof It=="object"&&It&&It.Object===Object&&It,ae=typeof self=="object"&&self&&self.Object===Object&&self,k=Q||ae||Function("return this")(),he=t&&!t.nodeType&&t,se=he&&!0&&e&&!e.nodeType&&e,we=se&&se.exports===he;function at(g,E){return g.set(E[0],E[1]),g}function Ne(g,E){return g.add(E),g}function Je(g,E){for(var A=-1,M=g?g.length:0;++A<M&&E(g[A],A,g)!==!1;);return g}function et(g,E){for(var A=-1,M=E.length,le=g.length;++A<M;)g[le+A]=E[A];return g}function lt(g,E,A,M){for(var le=-1,ne=g?g.length:0;++le<ne;)A=E(A,g[le],le,g);return A}function Lt(g,E){for(var A=-1,M=Array(g);++A<g;)M[A]=E(A);return M}function bt(g,E){return g==null?void 0:g[E]}function vt(g){var E=!1;if(g!=null&&typeof g.toString!="function")try{E=!!(g+"")}catch{}return E}function Re(g){var E=-1,A=Array(g.size);return g.forEach(function(M,le){A[++E]=[le,M]}),A}function pe(g,E){return function(A){return g(E(A))}}function je(g){var E=-1,A=Array(g.size);return g.forEach(function(M){A[++E]=M}),A}var ie=Array.prototype,Mt=Function.prototype,ve=Object.prototype,me=k["__core-js_shared__"],Dt=function(){var g=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ct=Mt.toString,He=ve.hasOwnProperty,kt=ve.toString,S=RegExp("^"+ct.call(He).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=we?k.Buffer:void 0,z=k.Symbol,W=k.Uint8Array,te=pe(Object.getPrototypeOf,Object),Ae=Object.create,ut=ve.propertyIsEnumerable,tt=ie.splice,Pt=Object.getOwnPropertySymbols,Nt=R?R.isBuffer:void 0,Be=pe(Object.keys,Object),yt=Ft(k,"DataView"),qe=Ft(k,"Map"),Bt=Ft(k,"Promise"),ur=Ft(k,"Set"),Wr=Ft(k,"WeakMap"),qn=Ft(Object,"create"),Vr=nt(yt),Un=nt(qe),Yr=nt(Bt),Zr=nt(ur),Xr=nt(Wr),kn=z?z.prototype:void 0,Ki=kn?kn.valueOf:void 0;function fn(g){var E=-1,A=g?g.length:0;for(this.clear();++E<A;){var M=g[E];this.set(M[0],M[1])}}function vo(){this.__data__=qn?qn(null):{}}function ko(g){return this.has(g)&&delete this.__data__[g]}function No(g){var E=this.__data__;if(qn){var A=E[g];return A===r?void 0:A}return He.call(E,g)?E[g]:void 0}function Wi(g){var E=this.__data__;return qn?E[g]!==void 0:He.call(E,g)}function Qr(g,E){var A=this.__data__;return A[g]=qn&&E===void 0?r:E,this}fn.prototype.clear=vo,fn.prototype.delete=ko,fn.prototype.get=No,fn.prototype.has=Wi,fn.prototype.set=Qr;function Ue(g){var E=-1,A=g?g.length:0;for(this.clear();++E<A;){var M=g[E];this.set(M[0],M[1])}}function Ao(){this.__data__=[]}function So(g){var E=this.__data__,A=fr(E,g);if(A<0)return!1;var M=E.length-1;return A==M?E.pop():tt.call(E,A,1),!0}function To(g){var E=this.__data__,A=fr(E,g);return A<0?void 0:E[A][1]}function Co(g){return fr(this.__data__,g)>-1}function Oo(g,E){var A=this.__data__,M=fr(A,g);return M<0?A.push([g,E]):A[M][1]=E,this}Ue.prototype.clear=Ao,Ue.prototype.delete=So,Ue.prototype.get=To,Ue.prototype.has=Co,Ue.prototype.set=Oo;function Ge(g){var E=-1,A=g?g.length:0;for(this.clear();++E<A;){var M=g[E];this.set(M[0],M[1])}}function Io(){this.__data__={hash:new fn,map:new(qe||Ue),string:new fn}}function Ro(g){return zn(this,g).delete(g)}function Lo(g){return zn(this,g).get(g)}function Mo(g){return zn(this,g).has(g)}function Do(g,E){return zn(this,g).set(g,E),this}Ge.prototype.clear=Io,Ge.prototype.delete=Ro,Ge.prototype.get=Lo,Ge.prototype.has=Mo,Ge.prototype.set=Do;function dt(g){this.__data__=new Ue(g)}function Po(){this.__data__=new Ue}function Bo(g){return this.__data__.delete(g)}function Fo(g){return this.__data__.get(g)}function qo(g){return this.__data__.has(g)}function Uo(g,E){var A=this.__data__;if(A instanceof Ue){var M=A.__data__;if(!qe||M.length<n-1)return M.push([g,E]),this;A=this.__data__=new Ge(M)}return A.set(g,E),this}dt.prototype.clear=Po,dt.prototype.delete=Bo,dt.prototype.get=Fo,dt.prototype.has=qo,dt.prototype.set=Uo;function dr(g,E){var A=ni(g)||pr(g)?Lt(g.length,String):[],M=A.length,le=!!M;for(var ne in g)He.call(g,ne)&&!(le&&(ne=="length"||ea(ne,M)))&&A.push(ne);return A}function Vi(g,E,A){var M=g[E];(!(He.call(g,E)&&Ji(M,A))||A===void 0&&!(E in g))&&(g[E]=A)}function fr(g,E){for(var A=g.length;A--;)if(Ji(g[A][0],E))return A;return-1}function Xt(g,E){return g&&ti(E,ii(E),g)}function Jr(g,E,A,M,le,ne,Ee){var ye;if(M&&(ye=ne?M(g,le,ne,Ee):M(g)),ye!==void 0)return ye;if(!Jt(g))return g;var Le=ni(g);if(Le){if(ye=Qo(g),!E)return Yo(g,ye)}else{var xe=pn(g),Ke=xe==u||xe==d;if(es(g))return hr(g,E);if(xe==p||xe==s||Ke&&!ne){if(vt(g))return ne?g:{};if(ye=Qt(Ke?{}:g),!E)return Zo(g,Xt(ye,g))}else{if(!w[xe])return ne?g:{};ye=Jo(g,xe,Jr,E)}}Ee||(Ee=new dt);var ft=Ee.get(g);if(ft)return ft;if(Ee.set(g,ye),!Le)var De=A?Xo(g):ii(g);return Je(De||g,function(We,$e){De&&($e=We,We=g[$e]),Vi(ye,$e,Jr(We,E,A,M,$e,g,Ee))}),ye}function $o(g){return Jt(g)?Ae(g):{}}function zo(g,E,A){var M=E(g);return ni(g)?M:et(M,A(g))}function jo(g){return kt.call(g)}function Ho(g){if(!Jt(g)||na(g))return!1;var E=ri(g)||vt(g)?S:F;return E.test(nt(g))}function Go(g){if(!Xi(g))return Be(g);var E=[];for(var A in Object(g))He.call(g,A)&&A!="constructor"&&E.push(A);return E}function hr(g,E){if(E)return g.slice();var A=new g.constructor(g.length);return g.copy(A),A}function ei(g){var E=new g.constructor(g.byteLength);return new W(E).set(new W(g)),E}function $n(g,E){var A=E?ei(g.buffer):g.buffer;return new g.constructor(A,g.byteOffset,g.byteLength)}function Yi(g,E,A){var M=E?A(Re(g),!0):Re(g);return lt(M,at,new g.constructor)}function Zi(g){var E=new g.constructor(g.source,q.exec(g));return E.lastIndex=g.lastIndex,E}function Ko(g,E,A){var M=E?A(je(g),!0):je(g);return lt(M,Ne,new g.constructor)}function Wo(g){return Ki?Object(Ki.call(g)):{}}function Vo(g,E){var A=E?ei(g.buffer):g.buffer;return new g.constructor(A,g.byteOffset,g.length)}function Yo(g,E){var A=-1,M=g.length;for(E||(E=Array(M));++A<M;)E[A]=g[A];return E}function ti(g,E,A,M){A||(A={});for(var le=-1,ne=E.length;++le<ne;){var Ee=E[le],ye=void 0;Vi(A,Ee,ye===void 0?g[Ee]:ye)}return A}function Zo(g,E){return ti(g,hn(g),E)}function Xo(g){return zo(g,ii,hn)}function zn(g,E){var A=g.__data__;return ta(E)?A[typeof E=="string"?"string":"hash"]:A.map}function Ft(g,E){var A=bt(g,E);return Ho(A)?A:void 0}var hn=Pt?pe(Pt,Object):ia,pn=jo;(yt&&pn(new yt(new ArrayBuffer(1)))!=N||qe&&pn(new qe)!=h||Bt&&pn(Bt.resolve())!=m||ur&&pn(new ur)!=y||Wr&&pn(new Wr)!=T)&&(pn=function(g){var E=kt.call(g),A=E==p?g.constructor:void 0,M=A?nt(A):void 0;if(M)switch(M){case Vr:return N;case Un:return h;case Yr:return m;case Zr:return y;case Xr:return T}return E});function Qo(g){var E=g.length,A=g.constructor(E);return E&&typeof g[0]=="string"&&He.call(g,"index")&&(A.index=g.index,A.input=g.input),A}function Qt(g){return typeof g.constructor=="function"&&!Xi(g)?$o(te(g)):{}}function Jo(g,E,A,M){var le=g.constructor;switch(E){case C:return ei(g);case a:case l:return new le(+g);case N:return $n(g,M);case P:case U:case G:case O:case j:case B:case re:case X:case Y:return Vo(g,M);case h:return Yi(g,M,A);case f:case _:return new le(g);case b:return Zi(g);case y:return Ko(g,M,A);case v:return Wo(g)}}function ea(g,E){return E=E??i,!!E&&(typeof g=="number"||K.test(g))&&g>-1&&g%1==0&&g<E}function ta(g){var E=typeof g;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?g!=="__proto__":g===null}function na(g){return!!Dt&&Dt in g}function Xi(g){var E=g&&g.constructor,A=typeof E=="function"&&E.prototype||ve;return g===A}function nt(g){if(g!=null){try{return ct.call(g)}catch{}try{return g+""}catch{}}return""}function Qi(g){return Jr(g,!0,!0)}function Ji(g,E){return g===E||g!==g&&E!==E}function pr(g){return ra(g)&&He.call(g,"callee")&&(!ut.call(g,"callee")||kt.call(g)==s)}var ni=Array.isArray;function gr(g){return g!=null&&ts(g.length)&&!ri(g)}function ra(g){return ns(g)&&gr(g)}var es=Nt||sa;function ri(g){var E=Jt(g)?kt.call(g):"";return E==u||E==d}function ts(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=i}function Jt(g){var E=typeof g;return!!g&&(E=="object"||E=="function")}function ns(g){return!!g&&typeof g=="object"}function ii(g){return gr(g)?dr(g):Go(g)}function ia(){return[]}function sa(){return!1}e.exports=Qi})(zs,zs.exports);var rg=zs.exports,js={exports:{}};js.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",b="[object Number]",y="[object Null]",_="[object Object]",v="[object Promise]",T="[object Proxy]",C="[object RegExp]",N="[object Set]",P="[object String]",U="[object Symbol]",G="[object Undefined]",O="[object WeakMap]",j="[object ArrayBuffer]",B="[object DataView]",re="[object Float32Array]",X="[object Float64Array]",Y="[object Int8Array]",I="[object Int16Array]",q="[object Int32Array]",F="[object Uint8Array]",K="[object Uint8ClampedArray]",w="[object Uint16Array]",Q="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,k=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,se={};se[re]=se[X]=se[Y]=se[I]=se[q]=se[F]=se[K]=se[w]=se[Q]=!0,se[a]=se[l]=se[j]=se[u]=se[B]=se[d]=se[h]=se[f]=se[m]=se[b]=se[_]=se[C]=se[N]=se[P]=se[O]=!1;var we=typeof It=="object"&&It&&It.Object===Object&&It,at=typeof self=="object"&&self&&self.Object===Object&&self,Ne=we||at||Function("return this")(),Je=t&&!t.nodeType&&t,et=Je&&!0&&e&&!e.nodeType&&e,lt=et&&et.exports===Je,Lt=lt&&we.process,bt=function(){try{return Lt&&Lt.binding&&Lt.binding("util")}catch{}}(),vt=bt&&bt.isTypedArray;function Re(g,E){for(var A=-1,M=g==null?0:g.length,le=0,ne=[];++A<M;){var Ee=g[A];E(Ee,A,g)&&(ne[le++]=Ee)}return ne}function pe(g,E){for(var A=-1,M=E.length,le=g.length;++A<M;)g[le+A]=E[A];return g}function je(g,E){for(var A=-1,M=g==null?0:g.length;++A<M;)if(E(g[A],A,g))return!0;return!1}function ie(g,E){for(var A=-1,M=Array(g);++A<g;)M[A]=E(A);return M}function Mt(g){return function(E){return g(E)}}function ve(g,E){return g.has(E)}function me(g,E){return g==null?void 0:g[E]}function Dt(g){var E=-1,A=Array(g.size);return g.forEach(function(M,le){A[++E]=[le,M]}),A}function ct(g,E){return function(A){return g(E(A))}}function He(g){var E=-1,A=Array(g.size);return g.forEach(function(M){A[++E]=M}),A}var kt=Array.prototype,S=Function.prototype,R=Object.prototype,z=Ne["__core-js_shared__"],W=S.toString,te=R.hasOwnProperty,Ae=function(){var g=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ut=R.toString,tt=RegExp("^"+W.call(te).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=lt?Ne.Buffer:void 0,Nt=Ne.Symbol,Be=Ne.Uint8Array,yt=R.propertyIsEnumerable,qe=kt.splice,Bt=Nt?Nt.toStringTag:void 0,ur=Object.getOwnPropertySymbols,Wr=Pt?Pt.isBuffer:void 0,qn=ct(Object.keys,Object),Vr=hn(Ne,"DataView"),Un=hn(Ne,"Map"),Yr=hn(Ne,"Promise"),Zr=hn(Ne,"Set"),Xr=hn(Ne,"WeakMap"),kn=hn(Object,"create"),Ki=nt(Vr),fn=nt(Un),vo=nt(Yr),ko=nt(Zr),No=nt(Xr),Wi=Nt?Nt.prototype:void 0,Qr=Wi?Wi.valueOf:void 0;function Ue(g){var E=-1,A=g==null?0:g.length;for(this.clear();++E<A;){var M=g[E];this.set(M[0],M[1])}}function Ao(){this.__data__=kn?kn(null):{},this.size=0}function So(g){var E=this.has(g)&&delete this.__data__[g];return this.size-=E?1:0,E}function To(g){var E=this.__data__;if(kn){var A=E[g];return A===r?void 0:A}return te.call(E,g)?E[g]:void 0}function Co(g){var E=this.__data__;return kn?E[g]!==void 0:te.call(E,g)}function Oo(g,E){var A=this.__data__;return this.size+=this.has(g)?0:1,A[g]=kn&&E===void 0?r:E,this}Ue.prototype.clear=Ao,Ue.prototype.delete=So,Ue.prototype.get=To,Ue.prototype.has=Co,Ue.prototype.set=Oo;function Ge(g){var E=-1,A=g==null?0:g.length;for(this.clear();++E<A;){var M=g[E];this.set(M[0],M[1])}}function Io(){this.__data__=[],this.size=0}function Ro(g){var E=this.__data__,A=hr(E,g);if(A<0)return!1;var M=E.length-1;return A==M?E.pop():qe.call(E,A,1),--this.size,!0}function Lo(g){var E=this.__data__,A=hr(E,g);return A<0?void 0:E[A][1]}function Mo(g){return hr(this.__data__,g)>-1}function Do(g,E){var A=this.__data__,M=hr(A,g);return M<0?(++this.size,A.push([g,E])):A[M][1]=E,this}Ge.prototype.clear=Io,Ge.prototype.delete=Ro,Ge.prototype.get=Lo,Ge.prototype.has=Mo,Ge.prototype.set=Do;function dt(g){var E=-1,A=g==null?0:g.length;for(this.clear();++E<A;){var M=g[E];this.set(M[0],M[1])}}function Po(){this.size=0,this.__data__={hash:new Ue,map:new(Un||Ge),string:new Ue}}function Bo(g){var E=Ft(this,g).delete(g);return this.size-=E?1:0,E}function Fo(g){return Ft(this,g).get(g)}function qo(g){return Ft(this,g).has(g)}function Uo(g,E){var A=Ft(this,g),M=A.size;return A.set(g,E),this.size+=A.size==M?0:1,this}dt.prototype.clear=Po,dt.prototype.delete=Bo,dt.prototype.get=Fo,dt.prototype.has=qo,dt.prototype.set=Uo;function dr(g){var E=-1,A=g==null?0:g.length;for(this.__data__=new dt;++E<A;)this.add(g[E])}function Vi(g){return this.__data__.set(g,r),this}function fr(g){return this.__data__.has(g)}dr.prototype.add=dr.prototype.push=Vi,dr.prototype.has=fr;function Xt(g){var E=this.__data__=new Ge(g);this.size=E.size}function Jr(){this.__data__=new Ge,this.size=0}function $o(g){var E=this.__data__,A=E.delete(g);return this.size=E.size,A}function zo(g){return this.__data__.get(g)}function jo(g){return this.__data__.has(g)}function Ho(g,E){var A=this.__data__;if(A instanceof Ge){var M=A.__data__;if(!Un||M.length<n-1)return M.push([g,E]),this.size=++A.size,this;A=this.__data__=new dt(M)}return A.set(g,E),this.size=A.size,this}Xt.prototype.clear=Jr,Xt.prototype.delete=$o,Xt.prototype.get=zo,Xt.prototype.has=jo,Xt.prototype.set=Ho;function Go(g,E){var A=pr(g),M=!A&&Ji(g),le=!A&&!M&&gr(g),ne=!A&&!M&&!le&&ns(g),Ee=A||M||le||ne,ye=Ee?ie(g.length,String):[],Le=ye.length;for(var xe in g)te.call(g,xe)&&!(Ee&&(xe=="length"||le&&(xe=="offset"||xe=="parent")||ne&&(xe=="buffer"||xe=="byteLength"||xe=="byteOffset")||Jo(xe,Le)))&&ye.push(xe);return ye}function hr(g,E){for(var A=g.length;A--;)if(Qi(g[A][0],E))return A;return-1}function ei(g,E,A){var M=E(g);return pr(g)?M:pe(M,A(g))}function $n(g){return g==null?g===void 0?G:y:Bt&&Bt in Object(g)?pn(g):Xi(g)}function Yi(g){return Jt(g)&&$n(g)==a}function Zi(g,E,A,M,le){return g===E?!0:g==null||E==null||!Jt(g)&&!Jt(E)?g!==g&&E!==E:Ko(g,E,A,M,Zi,le)}function Ko(g,E,A,M,le,ne){var Ee=pr(g),ye=pr(E),Le=Ee?l:Qt(g),xe=ye?l:Qt(E);Le=Le==a?_:Le,xe=xe==a?_:xe;var Ke=Le==_,ft=xe==_,De=Le==xe;if(De&&gr(g)){if(!gr(E))return!1;Ee=!0,Ke=!1}if(De&&!Ke)return ne||(ne=new Xt),Ee||ns(g)?ti(g,E,A,M,le,ne):Zo(g,E,Le,A,M,le,ne);if(!(A&i)){var We=Ke&&te.call(g,"__wrapped__"),$e=ft&&te.call(E,"__wrapped__");if(We||$e){var Nn=We?g.value():g,gn=$e?E.value():E;return ne||(ne=new Xt),le(Nn,gn,A,M,ne)}}return De?(ne||(ne=new Xt),Xo(g,E,A,M,le,ne)):!1}function Wo(g){if(!ts(g)||ta(g))return!1;var E=es(g)?tt:k;return E.test(nt(g))}function Vo(g){return Jt(g)&&ri(g.length)&&!!se[$n(g)]}function Yo(g){if(!na(g))return qn(g);var E=[];for(var A in Object(g))te.call(g,A)&&A!="constructor"&&E.push(A);return E}function ti(g,E,A,M,le,ne){var Ee=A&i,ye=g.length,Le=E.length;if(ye!=Le&&!(Ee&&Le>ye))return!1;var xe=ne.get(g);if(xe&&ne.get(E))return xe==E;var Ke=-1,ft=!0,De=A&s?new dr:void 0;for(ne.set(g,E),ne.set(E,g);++Ke<ye;){var We=g[Ke],$e=E[Ke];if(M)var Nn=Ee?M($e,We,Ke,E,g,ne):M(We,$e,Ke,g,E,ne);if(Nn!==void 0){if(Nn)continue;ft=!1;break}if(De){if(!je(E,function(gn,jn){if(!ve(De,jn)&&(We===gn||le(We,gn,A,M,ne)))return De.push(jn)})){ft=!1;break}}else if(!(We===$e||le(We,$e,A,M,ne))){ft=!1;break}}return ne.delete(g),ne.delete(E),ft}function Zo(g,E,A,M,le,ne,Ee){switch(A){case B:if(g.byteLength!=E.byteLength||g.byteOffset!=E.byteOffset)return!1;g=g.buffer,E=E.buffer;case j:return!(g.byteLength!=E.byteLength||!ne(new Be(g),new Be(E)));case u:case d:case b:return Qi(+g,+E);case h:return g.name==E.name&&g.message==E.message;case C:case P:return g==E+"";case m:var ye=Dt;case N:var Le=M&i;if(ye||(ye=He),g.size!=E.size&&!Le)return!1;var xe=Ee.get(g);if(xe)return xe==E;M|=s,Ee.set(g,E);var Ke=ti(ye(g),ye(E),M,le,ne,Ee);return Ee.delete(g),Ke;case U:if(Qr)return Qr.call(g)==Qr.call(E)}return!1}function Xo(g,E,A,M,le,ne){var Ee=A&i,ye=zn(g),Le=ye.length,xe=zn(E),Ke=xe.length;if(Le!=Ke&&!Ee)return!1;for(var ft=Le;ft--;){var De=ye[ft];if(!(Ee?De in E:te.call(E,De)))return!1}var We=ne.get(g);if(We&&ne.get(E))return We==E;var $e=!0;ne.set(g,E),ne.set(E,g);for(var Nn=Ee;++ft<Le;){De=ye[ft];var gn=g[De],jn=E[De];if(M)var Lc=Ee?M(jn,gn,De,E,g,ne):M(gn,jn,De,g,E,ne);if(!(Lc===void 0?gn===jn||le(gn,jn,A,M,ne):Lc)){$e=!1;break}Nn||(Nn=De=="constructor")}if($e&&!Nn){var rs=g.constructor,is=E.constructor;rs!=is&&"constructor"in g&&"constructor"in E&&!(typeof rs=="function"&&rs instanceof rs&&typeof is=="function"&&is instanceof is)&&($e=!1)}return ne.delete(g),ne.delete(E),$e}function zn(g){return ei(g,ii,Qo)}function Ft(g,E){var A=g.__data__;return ea(E)?A[typeof E=="string"?"string":"hash"]:A.map}function hn(g,E){var A=me(g,E);return Wo(A)?A:void 0}function pn(g){var E=te.call(g,Bt),A=g[Bt];try{g[Bt]=void 0;var M=!0}catch{}var le=ut.call(g);return M&&(E?g[Bt]=A:delete g[Bt]),le}var Qo=ur?function(g){return g==null?[]:(g=Object(g),Re(ur(g),function(E){return yt.call(g,E)}))}:ia,Qt=$n;(Vr&&Qt(new Vr(new ArrayBuffer(1)))!=B||Un&&Qt(new Un)!=m||Yr&&Qt(Yr.resolve())!=v||Zr&&Qt(new Zr)!=N||Xr&&Qt(new Xr)!=O)&&(Qt=function(g){var E=$n(g),A=E==_?g.constructor:void 0,M=A?nt(A):"";if(M)switch(M){case Ki:return B;case fn:return m;case vo:return v;case ko:return N;case No:return O}return E});function Jo(g,E){return E=E??o,!!E&&(typeof g=="number"||he.test(g))&&g>-1&&g%1==0&&g<E}function ea(g){var E=typeof g;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?g!=="__proto__":g===null}function ta(g){return!!Ae&&Ae in g}function na(g){var E=g&&g.constructor,A=typeof E=="function"&&E.prototype||R;return g===A}function Xi(g){return ut.call(g)}function nt(g){if(g!=null){try{return W.call(g)}catch{}try{return g+""}catch{}}return""}function Qi(g,E){return g===E||g!==g&&E!==E}var Ji=Yi(function(){return arguments}())?Yi:function(g){return Jt(g)&&te.call(g,"callee")&&!yt.call(g,"callee")},pr=Array.isArray;function ni(g){return g!=null&&ri(g.length)&&!es(g)}var gr=Wr||sa;function ra(g,E){return Zi(g,E)}function es(g){if(!ts(g))return!1;var E=$n(g);return E==f||E==p||E==c||E==T}function ri(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=o}function ts(g){var E=typeof g;return g!=null&&(E=="object"||E=="function")}function Jt(g){return g!=null&&typeof g=="object"}var ns=vt?Mt(vt):Vo;function ii(g){return ni(g)?Go(g):Yo(g)}function ia(){return[]}function sa(){return!1}e.exports=ra})(js,js.exports);var ig=js.exports,pc={};Object.defineProperty(pc,"__esModule",{value:!0});const rO=rg,iO=ig;var gl;(function(e){function t(s={},o={},a=!1){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});let l=rO(o);a||(l=Object.keys(l).reduce((c,u)=>(l[u]!=null&&(c[u]=l[u]),c),{}));for(const c in s)s[c]!==void 0&&o[c]===void 0&&(l[c]=s[c]);return Object.keys(l).length>0?l:void 0}e.compose=t;function n(s={},o={}){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});const a=Object.keys(s).concat(Object.keys(o)).reduce((l,c)=>(iO(s[c],o[c])||(l[c]=o[c]===void 0?null:o[c]),l),{});return Object.keys(a).length>0?a:void 0}e.diff=n;function r(s={},o={}){s=s||{};const a=Object.keys(o).reduce((l,c)=>(o[c]!==s[c]&&s[c]!==void 0&&(l[c]=o[c]),l),{});return Object.keys(s).reduce((l,c)=>(s[c]!==o[c]&&o[c]===void 0&&(l[c]=null),l),a)}e.invert=r;function i(s,o,a=!1){if(typeof s!="object")return o;if(typeof o!="object")return;if(!a)return o;const l=Object.keys(o).reduce((c,u)=>(s[u]===void 0&&(c[u]=o[u]),c),{});return Object.keys(l).length>0?l:void 0}e.transform=i})(gl||(gl={}));pc.default=gl;var fo={};Object.defineProperty(fo,"__esModule",{value:!0});var ml;(function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t})(ml||(ml={}));fo.default=ml;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});const Od=fo;class sO{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=Od.default.length(n);if(t>=i-r?(t=i-r,this.index+=1,this.offset=0):this.offset+=t,typeof n.delete=="number")return{delete:t};{const s={};return n.attributes&&(s.attributes=n.attributes),typeof n.retain=="number"?s.retain=t:typeof n.retain=="object"&&n.retain!==null?s.retain=n.retain:typeof n.insert=="string"?s.insert=n.insert.substr(r,t):s.insert=n.insert,s}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Od.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const t=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=n,[r].concat(i)}}else return[]}}gc.default=sO;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=nO,r=rg,i=ig,s=pc;t.AttributeMap=s.default;const o=fo;t.Op=o.default;const a=gc;t.OpIterator=a.default;const l="\0",c=(d,h)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const f=Object.keys(d)[0];if(!f||f!==Object.keys(h)[0])throw new Error(`embed types not matched: ${f} != ${Object.keys(h)[0]}`);return[f,d[f],h[f]]};class u{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,f){this.handlers[h]=f}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const f=this.handlers[h];if(!f)throw new Error(`no handlers for embed type "${h}"`);return f}insert(h,f){const p={};return typeof h=="string"&&h.length===0?this:(p.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,f){if(typeof h=="number"&&h<=0)return this;const p={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p)}push(h){let f=this.ops.length,p=this.ops[f-1];if(h=r(h),typeof p=="object"){if(typeof h.delete=="number"&&typeof p.delete=="number")return this.ops[f-1]={delete:p.delete+h.delete},this;if(typeof p.delete=="number"&&h.insert!=null&&(f-=1,p=this.ops[f-1],typeof p!="object"))return this.ops.unshift(h),this;if(i(h.attributes,p.attributes)){if(typeof h.insert=="string"&&typeof p.insert=="string")return this.ops[f-1]={insert:p.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof p.retain=="number")return this.ops[f-1]={retain:p.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const f=[],p=[];return this.forEach(m=>{(h(m)?f:p).push(m)}),[f,p]}reduce(h,f){return this.ops.reduce(h,f)}changeLength(){return this.reduce((h,f)=>f.insert?h+o.default.length(f):f.delete?h-f.delete:h,0)}length(){return this.reduce((h,f)=>h+o.default.length(f),0)}slice(h=0,f=1/0){const p=[],m=new a.default(this.ops);let b=0;for(;b<f&&m.hasNext();){let y;b<h?y=m.next(h-b):(y=m.next(f-b),p.push(y)),b+=o.default.length(y)}return new u(p)}compose(h){const f=new a.default(this.ops),p=new a.default(h.ops),m=[],b=p.peek();if(b!=null&&typeof b.retain=="number"&&b.attributes==null){let _=b.retain;for(;f.peekType()==="insert"&&f.peekLength()<=_;)_-=f.peekLength(),m.push(f.next());b.retain-_>0&&p.next(b.retain-_)}const y=new u(m);for(;f.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(f.peekType()==="delete")y.push(f.next());else{const _=Math.min(f.peekLength(),p.peekLength()),v=f.next(_),T=p.next(_);if(T.retain){const C={};if(typeof v.retain=="number")C.retain=typeof T.retain=="number"?_:T.retain;else if(typeof T.retain=="number")v.retain==null?C.insert=v.insert:C.retain=v.retain;else{const P=v.retain==null?"insert":"retain",[U,G,O]=c(v[P],T.retain),j=u.getHandler(U);C[P]={[U]:j.compose(G,O,P==="retain")}}const N=s.default.compose(v.attributes,T.attributes,typeof v.retain=="number");if(N&&(C.attributes=N),y.push(C),!p.hasNext()&&i(y.ops[y.ops.length-1],C)){const P=new u(f.rest());return y.concat(P).chop()}}else typeof T.delete=="number"&&(typeof v.retain=="number"||typeof v.retain=="object"&&v.retain!==null)&&y.push(T)}return y.chop()}concat(h){const f=new u(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f}diff(h,f){if(this.ops===h.ops)return new u;const p=[this,h].map(v=>v.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:l;const C=v===h?"on":"with";throw new Error("diff() called "+C+" non-document")}).join("")),m=new u,b=n(p[0],p[1],f,!0),y=new a.default(this.ops),_=new a.default(h.ops);return b.forEach(v=>{let T=v[1].length;for(;T>0;){let C=0;switch(v[0]){case n.INSERT:C=Math.min(_.peekLength(),T),m.push(_.next(C));break;case n.DELETE:C=Math.min(T,y.peekLength()),y.next(C),m.delete(C);break;case n.EQUAL:C=Math.min(y.peekLength(),_.peekLength(),T);const N=y.next(C),P=_.next(C);i(N.insert,P.insert)?m.retain(C,s.default.diff(N.attributes,P.attributes)):m.push(P).delete(C);break}T-=C}}),m.chop()}eachLine(h,f=`
35
+ `,1;if(He>1e5&&He>R.index*3)throw new Error("potential infinite loop, way more iterations than matches");return me+=z,z.length}const Re=U(I);if(!Re)throw Wn(s.replace("{}",I)),new Error('Unknown language: "'+I+'"');const pe=jk(Re);let je="",ie=K||pe;const Mt={},ve=new a.__emitter(a);Lt();let me="",Dt=0,ct=0,He=0,kt=!1;try{if(Re.__emitTokens)Re.__emitTokens(q,ve);else{for(ie.matcher.considerAll();;){He++,kt?kt=!1:ie.matcher.considerAll(),ie.matcher.lastIndex=ct;const S=ie.matcher.exec(q);if(!S)break;const R=q.substring(ct,S.index),z=vt(R,S);ct=S.index+z}vt(q.substring(ct))}return ve.finalize(),je=ve.toHTML(),{language:I,value:je,relevance:Dt,illegal:!1,_emitter:ve,_top:ie}}catch(S){if(S.message&&S.message.includes("Illegal"))return{language:I,value:va(q),illegal:!0,relevance:0,_illegalBy:{message:S.message,index:ct,context:q.slice(ct-100,ct+100),mode:S.mode,resultSoFar:je},_emitter:ve};if(i)return{language:I,value:va(q),illegal:!1,relevance:0,errorRaised:S,_emitter:ve,_top:ie};throw S}}function h(I){const q={value:va(I),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return q._emitter.addText(I),q}function f(I,q){q=q||a.languages||Object.keys(t);const F=h(I),K=q.filter(U).filter(O).map(he=>d(he,I,!1));K.unshift(F);const w=K.sort((he,se)=>{if(he.relevance!==se.relevance)return se.relevance-he.relevance;if(he.language&&se.language){if(U(he.language).supersetOf===se.language)return 1;if(U(se.language).supersetOf===he.language)return-1}return 0}),[Q,ae]=w,k=Q;return k.secondBest=ae,k}function p(I,q,F){const K=q&&n[q]||F;I.classList.add("hljs"),I.classList.add(`language-${K}`)}function m(I){let q=null;const F=c(I);if(l(F))return;if(X("before:highlightElement",{el:I,language:F}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),a.throwUnescapedHTML))throw new Kk("One of your code blocks includes unescaped HTML.",I.innerHTML);q=I;const K=q.textContent,w=F?u(K,{language:F,ignoreIllegals:!0}):f(K);I.innerHTML=w.value,I.dataset.highlighted="yes",p(I,F,w.language),I.result={language:w.language,re:w.relevance,relevance:w.relevance},w.secondBest&&(I.secondBest={language:w.secondBest.language,relevance:w.secondBest.relevance}),X("after:highlightElement",{el:I,result:w,text:K})}function b(I){a=Vu(a,I)}const y=()=>{T(),br("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){T(),br("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let v=!1;function T(){function I(){T()}if(document.readyState==="loading"){v||window.addEventListener("DOMContentLoaded",I,!1),v=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function C(I,q){let F=null;try{F=q(e)}catch(K){if(Wn("Language definition for '{}' could not be registered.".replace("{}",I)),i)Wn(K);else throw K;F=o}F.name||(F.name=I),t[I]=F,F.rawDefinition=q.bind(null,e),F.aliases&&G(F.aliases,{languageName:I})}function N(I){delete t[I];for(const q of Object.keys(n))n[q]===I&&delete n[q]}function P(){return Object.keys(t)}function U(I){return I=(I||"").toLowerCase(),t[I]||t[n[I]]}function G(I,{languageName:q}){typeof I=="string"&&(I=[I]),I.forEach(F=>{n[F.toLowerCase()]=q})}function O(I){const q=U(I);return q&&!q.disableAutodetect}function j(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=q=>{I["before:highlightBlock"](Object.assign({block:q.el},q))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=q=>{I["after:highlightBlock"](Object.assign({block:q.el},q))})}function B(I){j(I),r.push(I)}function re(I){const q=r.indexOf(I);q!==-1&&r.splice(q,1)}function X(I,q){const F=I;r.forEach(function(K){K[F]&&K[F](q)})}function Y(I){return br("10.7.0","highlightBlock will be removed entirely in v12.0"),br("10.7.0","Please use highlightElement now."),m(I)}Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:T,highlightElement:m,highlightBlock:Y,configure:b,initHighlighting:y,initHighlightingOnLoad:_,registerLanguage:C,unregisterLanguage:N,listLanguages:P,getLanguage:U,registerAliases:G,autoDetection:O,inherit:Vu,addPlugin:B,removePlugin:re}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=Gk,e.regex={concat:nr,lookahead:up,either:tc,optional:ak,anyNumberOfTimes:ok};for(const I in ps)typeof ps[I]=="object"&&lp(ps[I]);return Object.assign(e,ps),e},Lr=xp({});Lr.newInstance=()=>xp({});var Vk=Lr;Lr.HighlightJS=Lr;Lr.default=Lr;const Yk=Mi(Vk),Zu={},Zk="hljs-";function Xk(e){const t=Yk.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function n(l,c,u){const d=u||Zu,h=typeof d.prefix=="string"?d.prefix:Zk;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Qk,classPrefix:h});const f=t.highlight(c,{ignoreIllegals:!0,language:l});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const p=f._emitter.root,m=p.data;return m.language=f.language,m.relevance=f.relevance,p}function r(l,c){const d=(c||Zu).subset||i();let h=-1,f=0,p;for(;++h<d.length;){const m=d[h];if(!t.getLanguage(m))continue;const b=n(m,l,c);b.data&&b.data.relevance!==void 0&&b.data.relevance>f&&(f=b.data.relevance,p=b)}return p||{type:"root",children:[],data:{language:void 0,relevance:f}}}function i(){return t.listLanguages()}function s(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function o(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function a(l){return!!t.getLanguage(l)}}class Qk{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(o,a){return a?o+"_".repeat(a):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Ep=function(e){if(e==null)return nN;if(typeof e=="function")return ro(e);if(typeof e=="object")return Array.isArray(e)?Jk(e):eN(e);if(typeof e=="string")return tN(e);throw new Error("Expected function, string, or object as test")};function Jk(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ep(e[n]);return ro(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function eN(e){const t=e;return ro(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function tN(e){return ro(t);function t(n){return n&&n.type===e}}function ro(e){return t;function t(n,r,i){return!!(rN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nN(){return!0}function rN(e){return e!==null&&typeof e=="object"&&"type"in e}const wp=[],iN=!0,Xu=!1,sN="skip";function oN(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Ep(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=wp,p,m,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(f=aN(n(l,u)),f[0]===Xu))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==sN)for(m=(r?y.children.length:-1)+o,b=u.concat(y);m>-1&&m<y.children.length;){const _=y.children[m];if(p=a(_,m,b)(),p[0]===Xu)return p;m=typeof p[1]=="number"?p[1]:m+o}}return f}}}function aN(e){return Array.isArray(e)?e:typeof e=="number"?[iN,e]:e==null?wp:[e]}function lN(e,t,n,r){let i,s,o;s=t,o=n,i=r,oN(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const cN={};function _p(e){const t=e||cN,n=t.aliases,r=t.detect||!1,i=t.languages||tk,s=t.plainText,o=t.prefix,a=t.subset;let l="hljs";const c=Xk(i);if(n&&c.registerAlias(n),o){const u=o.indexOf("-");l=u===-1?o:o.slice(0,u)}return function(u,d){lN(u,"element",function(h,f,p){if(h.tagName!=="code"||!p||p.type!=="element"||p.tagName!=="pre")return;const m=uN(h);if(m===!1||!m&&!r||m&&s&&s.includes(m))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(l)||h.properties.className.unshift(l);const b=T_(h,{whitespace:"pre"});let y;try{y=m?c.highlight(m,b,{prefix:o}):c.highlightAuto(b,{prefix:o,subset:a})}catch(_){const v=_;if(m&&/Unknown language/.test(v.message)){d.message("Cannot highlight as `"+m+"`, it’s not registered",{ancestors:[p,h],cause:v,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw v}!m&&y.data&&y.data.language&&h.properties.className.push("language-"+y.data.language),y.children.length>0&&(h.children=y.children)})}}function uN(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function dN({article:e,onBack:t,onEdit:n,showActions:r=!1}){return E.jsxs("div",{className:"mx-auto max-w-4xl",children:[(t||r&&n)&&E.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t&&E.jsxs("button",{onClick:t,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Back"]}),r&&n&&E.jsxs("button",{onClick:()=>n(e),className:"flex items-center gap-2 rounded-md bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Edit"]})]}),E.jsxs("article",{className:"rounded-lg bg-white p-8 shadow-md",children:[E.jsxs("header",{className:"border-b border-gray-200 pb-6",children:[E.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:e.title}),E.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.dateAt&&E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),new Date(e.dateAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),e.category&&E.jsx("span",{className:"rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-800",children:e.category.title}),E.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-medium ${e.status===Fe.Published?"bg-green-100 text-green-800":e.status===Fe.Draft?"bg-gray-100 text-gray-800":e.status===Fe.Review?"bg-yellow-100 text-yellow-800":e.status===Fe.Scheduled?"bg-purple-100 text-purple-800":"bg-orange-100 text-orange-800"}`,children:Fe[e.status]})]}),e.tags&&e.tags.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.tags.map(i=>E.jsxs("span",{className:"rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",children:["#",i.title]},i.tagId))}),e.roles&&e.roles.length>0&&E.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:e.roles.map(i=>E.jsx("span",{className:"rounded-md bg-purple-100 px-3 py-1 text-sm text-purple-700",children:i.name},i.slug))})]}),E.jsx("div",{className:"prose prose-lg mt-8 max-w-none",children:E.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e.content})})]})]})}var vp=typeof global=="object"&&global&&global.Object===Object&&global,fN=typeof self=="object"&&self&&self.Object===Object&&self,dn=vp||fN||Function("return this")(),Dn=dn.Symbol,kp=Object.prototype,hN=kp.hasOwnProperty,pN=kp.toString,li=Dn?Dn.toStringTag:void 0;function gN(e){var t=hN.call(e,li),n=e[li];try{e[li]=void 0;var r=!0}catch{}var i=pN.call(e);return r&&(t?e[li]=n:delete e[li]),i}var mN=Object.prototype,bN=mN.toString;function yN(e){return bN.call(e)}var xN="[object Null]",EN="[object Undefined]",Qu=Dn?Dn.toStringTag:void 0;function zr(e){return e==null?e===void 0?EN:xN:Qu&&Qu in Object(e)?gN(e):yN(e)}function yn(e){return e!=null&&typeof e=="object"}var Zn=Array.isArray;function Bn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Np(e){return e}var wN="[object AsyncFunction]",_N="[object Function]",vN="[object GeneratorFunction]",kN="[object Proxy]";function ic(e){if(!Bn(e))return!1;var t=zr(e);return t==_N||t==vN||t==wN||t==kN}var ka=dn["__core-js_shared__"],Ju=function(){var e=/[^.]+$/.exec(ka&&ka.keys&&ka.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function NN(e){return!!Ju&&Ju in e}var AN=Function.prototype,SN=AN.toString;function rr(e){if(e!=null){try{return SN.call(e)}catch{}try{return e+""}catch{}}return""}var TN=/[\\^$.*+?()[\]{}|]/g,CN=/^\[object .+?Constructor\]$/,ON=Function.prototype,IN=Object.prototype,RN=ON.toString,LN=IN.hasOwnProperty,MN=RegExp("^"+RN.call(LN).replace(TN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DN(e){if(!Bn(e)||NN(e))return!1;var t=ic(e)?MN:CN;return t.test(rr(e))}function PN(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=PN(e,t);return DN(n)?n:void 0}var nl=ir(dn,"WeakMap"),ed=Object.create,BN=function(){function e(){}return function(t){if(!Bn(t))return{};if(ed)return ed(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function FN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function qN(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var UN=800,$N=16,zN=Date.now;function jN(e){var t=0,n=0;return function(){var r=zN(),i=$N-(r-n);if(n=r,i>0){if(++t>=UN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function HN(e){return function(){return e}}var Fs=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),GN=Fs?function(e,t){return Fs(e,"toString",{configurable:!0,enumerable:!1,value:HN(t),writable:!0})}:Np,KN=jN(GN);function WN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var VN=9007199254740991,YN=/^(?:0|[1-9]\d*)$/;function Ap(e,t){var n=typeof e;return t=t??VN,!!t&&(n=="number"||n!="symbol"&&YN.test(e))&&e>-1&&e%1==0&&e<t}function sc(e,t,n){t=="__proto__"&&Fs?Fs(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Bi(e,t){return e===t||e!==e&&t!==t}var ZN=Object.prototype,XN=ZN.hasOwnProperty;function Sp(e,t,n){var r=e[t];(!(XN.call(e,t)&&Bi(r,n))||n===void 0&&!(t in e))&&sc(e,t,n)}function QN(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?sc(n,a,l):Sp(n,a,l)}return n}var td=Math.max;function JN(e,t,n){return t=td(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=td(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),FN(e,this,a)}}function eA(e,t){return KN(JN(e,t,Np),e+"")}var tA=9007199254740991;function Tp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=tA}function io(e){return e!=null&&Tp(e.length)&&!ic(e)}function nA(e,t,n){if(!Bn(n))return!1;var r=typeof t;return(r=="number"?io(n)&&Ap(t,n.length):r=="string"&&t in n)?Bi(n[t],e):!1}function rA(e){return eA(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&nA(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var iA=Object.prototype;function oc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||iA;return e===n}function sA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var oA="[object Arguments]";function nd(e){return yn(e)&&zr(e)==oA}var Cp=Object.prototype,aA=Cp.hasOwnProperty,lA=Cp.propertyIsEnumerable,rl=nd(function(){return arguments}())?nd:function(e){return yn(e)&&aA.call(e,"callee")&&!lA.call(e,"callee")};function cA(){return!1}var Op=typeof exports=="object"&&exports&&!exports.nodeType&&exports,rd=Op&&typeof module=="object"&&module&&!module.nodeType&&module,uA=rd&&rd.exports===Op,id=uA?dn.Buffer:void 0,dA=id?id.isBuffer:void 0,Ni=dA||cA,fA="[object Arguments]",hA="[object Array]",pA="[object Boolean]",gA="[object Date]",mA="[object Error]",bA="[object Function]",yA="[object Map]",xA="[object Number]",EA="[object Object]",wA="[object RegExp]",_A="[object Set]",vA="[object String]",kA="[object WeakMap]",NA="[object ArrayBuffer]",AA="[object DataView]",SA="[object Float32Array]",TA="[object Float64Array]",CA="[object Int8Array]",OA="[object Int16Array]",IA="[object Int32Array]",RA="[object Uint8Array]",LA="[object Uint8ClampedArray]",MA="[object Uint16Array]",DA="[object Uint32Array]",Oe={};Oe[SA]=Oe[TA]=Oe[CA]=Oe[OA]=Oe[IA]=Oe[RA]=Oe[LA]=Oe[MA]=Oe[DA]=!0;Oe[fA]=Oe[hA]=Oe[NA]=Oe[pA]=Oe[AA]=Oe[gA]=Oe[mA]=Oe[bA]=Oe[yA]=Oe[xA]=Oe[EA]=Oe[wA]=Oe[_A]=Oe[vA]=Oe[kA]=!1;function PA(e){return yn(e)&&Tp(e.length)&&!!Oe[zr(e)]}function ac(e){return function(t){return e(t)}}var Ip=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bi=Ip&&typeof module=="object"&&module&&!module.nodeType&&module,BA=bi&&bi.exports===Ip,Na=BA&&vp.process,Mr=function(){try{var e=bi&&bi.require&&bi.require("util").types;return e||Na&&Na.binding&&Na.binding("util")}catch{}}(),sd=Mr&&Mr.isTypedArray,lc=sd?ac(sd):PA,FA=Object.prototype,qA=FA.hasOwnProperty;function Rp(e,t){var n=Zn(e),r=!n&&rl(e),i=!n&&!r&&Ni(e),s=!n&&!r&&!i&&lc(e),o=n||r||i||s,a=o?sA(e.length,String):[],l=a.length;for(var c in e)(t||qA.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ap(c,l)))&&a.push(c);return a}function Lp(e,t){return function(n){return e(t(n))}}var UA=Lp(Object.keys,Object),$A=Object.prototype,zA=$A.hasOwnProperty;function jA(e){if(!oc(e))return UA(e);var t=[];for(var n in Object(e))zA.call(e,n)&&n!="constructor"&&t.push(n);return t}function HA(e){return io(e)?Rp(e):jA(e)}function GA(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var KA=Object.prototype,WA=KA.hasOwnProperty;function VA(e){if(!Bn(e))return GA(e);var t=oc(e),n=[];for(var r in e)r=="constructor"&&(t||!WA.call(e,r))||n.push(r);return n}function Mp(e){return io(e)?Rp(e,!0):VA(e)}var Ai=ir(Object,"create");function YA(){this.__data__=Ai?Ai(null):{},this.size=0}function ZA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var XA="__lodash_hash_undefined__",QA=Object.prototype,JA=QA.hasOwnProperty;function eS(e){var t=this.__data__;if(Ai){var n=t[e];return n===XA?void 0:n}return JA.call(t,e)?t[e]:void 0}var tS=Object.prototype,nS=tS.hasOwnProperty;function rS(e){var t=this.__data__;return Ai?t[e]!==void 0:nS.call(t,e)}var iS="__lodash_hash_undefined__";function sS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ai&&t===void 0?iS:t,this}function Xn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xn.prototype.clear=YA;Xn.prototype.delete=ZA;Xn.prototype.get=eS;Xn.prototype.has=rS;Xn.prototype.set=sS;function oS(){this.__data__=[],this.size=0}function so(e,t){for(var n=e.length;n--;)if(Bi(e[n][0],t))return n;return-1}var aS=Array.prototype,lS=aS.splice;function cS(e){var t=this.__data__,n=so(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lS.call(t,n,1),--this.size,!0}function uS(e){var t=this.__data__,n=so(t,e);return n<0?void 0:t[n][1]}function dS(e){return so(this.__data__,e)>-1}function fS(e,t){var n=this.__data__,r=so(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function _n(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_n.prototype.clear=oS;_n.prototype.delete=cS;_n.prototype.get=uS;_n.prototype.has=dS;_n.prototype.set=fS;var Si=ir(dn,"Map");function hS(){this.size=0,this.__data__={hash:new Xn,map:new(Si||_n),string:new Xn}}function pS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function oo(e,t){var n=e.__data__;return pS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function gS(e){var t=oo(this,e).delete(e);return this.size-=t?1:0,t}function mS(e){return oo(this,e).get(e)}function bS(e){return oo(this,e).has(e)}function yS(e,t){var n=oo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sr.prototype.clear=hS;sr.prototype.delete=gS;sr.prototype.get=mS;sr.prototype.has=bS;sr.prototype.set=yS;function xS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Dp=Lp(Object.getPrototypeOf,Object),ES="[object Object]",wS=Function.prototype,_S=Object.prototype,Pp=wS.toString,vS=_S.hasOwnProperty,kS=Pp.call(Object);function NS(e){if(!yn(e)||zr(e)!=ES)return!1;var t=Dp(e);if(t===null)return!0;var n=vS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Pp.call(n)==kS}function AS(){this.__data__=new _n,this.size=0}function SS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function TS(e){return this.__data__.get(e)}function CS(e){return this.__data__.has(e)}var OS=200;function IS(e,t){var n=this.__data__;if(n instanceof _n){var r=n.__data__;if(!Si||r.length<OS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new sr(r)}return n.set(e,t),this.size=n.size,this}function on(e){var t=this.__data__=new _n(e);this.size=t.size}on.prototype.clear=AS;on.prototype.delete=SS;on.prototype.get=TS;on.prototype.has=CS;on.prototype.set=IS;var Bp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,od=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,RS=od&&od.exports===Bp,ad=RS?dn.Buffer:void 0,ld=ad?ad.allocUnsafe:void 0;function Fp(e,t){if(t)return e.slice();var n=e.length,r=ld?ld(n):new e.constructor(n);return e.copy(r),r}function LS(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function MS(){return[]}var DS=Object.prototype,PS=DS.propertyIsEnumerable,cd=Object.getOwnPropertySymbols,BS=cd?function(e){return e==null?[]:(e=Object(e),LS(cd(e),function(t){return PS.call(e,t)}))}:MS;function FS(e,t,n){var r=t(e);return Zn(e)?r:xS(r,n(e))}function il(e){return FS(e,HA,BS)}var sl=ir(dn,"DataView"),ol=ir(dn,"Promise"),al=ir(dn,"Set"),ud="[object Map]",qS="[object Object]",dd="[object Promise]",fd="[object Set]",hd="[object WeakMap]",pd="[object DataView]",US=rr(sl),$S=rr(Si),zS=rr(ol),jS=rr(al),HS=rr(nl),zt=zr;(sl&&zt(new sl(new ArrayBuffer(1)))!=pd||Si&&zt(new Si)!=ud||ol&&zt(ol.resolve())!=dd||al&&zt(new al)!=fd||nl&&zt(new nl)!=hd)&&(zt=function(e){var t=zr(e),n=t==qS?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case US:return pd;case $S:return ud;case zS:return dd;case jS:return fd;case HS:return hd}return t});var GS=Object.prototype,KS=GS.hasOwnProperty;function WS(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&KS.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var qs=dn.Uint8Array;function cc(e){var t=new e.constructor(e.byteLength);return new qs(t).set(new qs(e)),t}function VS(e,t){var n=cc(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var YS=/\w*$/;function ZS(e){var t=new e.constructor(e.source,YS.exec(e));return t.lastIndex=e.lastIndex,t}var gd=Dn?Dn.prototype:void 0,md=gd?gd.valueOf:void 0;function XS(e){return md?Object(md.call(e)):{}}function qp(e,t){var n=t?cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var QS="[object Boolean]",JS="[object Date]",eT="[object Map]",tT="[object Number]",nT="[object RegExp]",rT="[object Set]",iT="[object String]",sT="[object Symbol]",oT="[object ArrayBuffer]",aT="[object DataView]",lT="[object Float32Array]",cT="[object Float64Array]",uT="[object Int8Array]",dT="[object Int16Array]",fT="[object Int32Array]",hT="[object Uint8Array]",pT="[object Uint8ClampedArray]",gT="[object Uint16Array]",mT="[object Uint32Array]";function bT(e,t,n){var r=e.constructor;switch(t){case oT:return cc(e);case QS:case JS:return new r(+e);case aT:return VS(e);case lT:case cT:case uT:case dT:case fT:case hT:case pT:case gT:case mT:return qp(e,n);case eT:return new r;case tT:case iT:return new r(e);case nT:return ZS(e);case rT:return new r;case sT:return XS(e)}}function Up(e){return typeof e.constructor=="function"&&!oc(e)?BN(Dp(e)):{}}var yT="[object Map]";function xT(e){return yn(e)&&zt(e)==yT}var bd=Mr&&Mr.isMap,ET=bd?ac(bd):xT,wT="[object Set]";function _T(e){return yn(e)&&zt(e)==wT}var yd=Mr&&Mr.isSet,vT=yd?ac(yd):_T,kT=1,$p="[object Arguments]",NT="[object Array]",AT="[object Boolean]",ST="[object Date]",TT="[object Error]",zp="[object Function]",CT="[object GeneratorFunction]",OT="[object Map]",IT="[object Number]",jp="[object Object]",RT="[object RegExp]",LT="[object Set]",MT="[object String]",DT="[object Symbol]",PT="[object WeakMap]",BT="[object ArrayBuffer]",FT="[object DataView]",qT="[object Float32Array]",UT="[object Float64Array]",$T="[object Int8Array]",zT="[object Int16Array]",jT="[object Int32Array]",HT="[object Uint8Array]",GT="[object Uint8ClampedArray]",KT="[object Uint16Array]",WT="[object Uint32Array]",Se={};Se[$p]=Se[NT]=Se[BT]=Se[FT]=Se[AT]=Se[ST]=Se[qT]=Se[UT]=Se[$T]=Se[zT]=Se[jT]=Se[OT]=Se[IT]=Se[jp]=Se[RT]=Se[LT]=Se[MT]=Se[DT]=Se[HT]=Se[GT]=Se[KT]=Se[WT]=!0;Se[TT]=Se[zp]=Se[PT]=!1;function Ns(e,t,n,r,i,s){var o,a=t&kT;if(o!==void 0)return o;if(!Bn(e))return e;var l=Zn(e);if(l)o=WS(e);else{var c=zt(e),u=c==zp||c==CT;if(Ni(e))return Fp(e,a);if(c==jp||c==$p||u&&!i)o=u?{}:Up(e);else{if(!Se[c])return i?e:{};o=bT(e,c,a)}}s||(s=new on);var d=s.get(e);if(d)return d;s.set(e,o),vT(e)?e.forEach(function(p){o.add(Ns(p,t,n,p,e,s))}):ET(e)&&e.forEach(function(p,m){o.set(m,Ns(p,t,n,m,e,s))});var h=il,f=l?void 0:h(e);return WN(f||e,function(p,m){f&&(m=p,p=e[m]),Sp(o,m,Ns(p,t,n,m,e,s))}),o}var VT=1,YT=4;function Tr(e){return Ns(e,VT|YT)}var ZT="__lodash_hash_undefined__";function XT(e){return this.__data__.set(e,ZT),this}function QT(e){return this.__data__.has(e)}function Us(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new sr;++t<n;)this.add(e[t])}Us.prototype.add=Us.prototype.push=XT;Us.prototype.has=QT;function JT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function eC(e,t){return e.has(t)}var tC=1,nC=2;function Hp(e,t,n,r,i,s){var o=n&tC,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&nC?new Us:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var p=e[d],m=t[d];if(r)var b=o?r(m,p,d,t,e,s):r(p,m,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!JT(t,function(y,_){if(!eC(f,_)&&(p===y||i(p,y,n,r,s)))return f.push(_)})){h=!1;break}}else if(!(p===m||i(p,m,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function rC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function iC(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var sC=1,oC=2,aC="[object Boolean]",lC="[object Date]",cC="[object Error]",uC="[object Map]",dC="[object Number]",fC="[object RegExp]",hC="[object Set]",pC="[object String]",gC="[object Symbol]",mC="[object ArrayBuffer]",bC="[object DataView]",xd=Dn?Dn.prototype:void 0,Aa=xd?xd.valueOf:void 0;function yC(e,t,n,r,i,s,o){switch(n){case bC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mC:return!(e.byteLength!=t.byteLength||!s(new qs(e),new qs(t)));case aC:case lC:case dC:return Bi(+e,+t);case cC:return e.name==t.name&&e.message==t.message;case fC:case pC:return e==t+"";case uC:var a=rC;case hC:var l=r&sC;if(a||(a=iC),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=oC,o.set(e,t);var u=Hp(a(e),a(t),r,i,s,o);return o.delete(e),u;case gC:if(Aa)return Aa.call(e)==Aa.call(t)}return!1}var xC=1,EC=Object.prototype,wC=EC.hasOwnProperty;function _C(e,t,n,r,i,s){var o=n&xC,a=il(e),l=a.length,c=il(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in t:wC.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){h=a[d];var y=e[h],_=t[h];if(r)var v=o?r(_,y,h,t,e,s):r(y,_,h,e,t,s);if(!(v===void 0?y===_||i(y,_,n,r,s):v)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var T=e.constructor,C=t.constructor;T!=C&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(m=!1)}return s.delete(e),s.delete(t),m}var vC=1,Ed="[object Arguments]",wd="[object Array]",gs="[object Object]",kC=Object.prototype,_d=kC.hasOwnProperty;function NC(e,t,n,r,i,s){var o=Zn(e),a=Zn(t),l=o?wd:zt(e),c=a?wd:zt(t);l=l==Ed?gs:l,c=c==Ed?gs:c;var u=l==gs,d=c==gs,h=l==c;if(h&&Ni(e)){if(!Ni(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new on),o||lc(e)?Hp(e,t,n,r,i,s):yC(e,t,l,n,r,i,s);if(!(n&vC)){var f=u&&_d.call(e,"__wrapped__"),p=d&&_d.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,b=p?t.value():t;return s||(s=new on),i(m,b,n,r,s)}}return h?(s||(s=new on),_C(e,t,n,r,i,s)):!1}function Gp(e,t,n,r,i){return e===t?!0:e==null||t==null||!yn(e)&&!yn(t)?e!==e&&t!==t:NC(e,t,n,r,Gp,i)}function AC(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var SC=AC();function ll(e,t,n){(n!==void 0&&!Bi(e[t],n)||n===void 0&&!(t in e))&&sc(e,t,n)}function TC(e){return yn(e)&&io(e)}function cl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function CC(e){return QN(e,Mp(e))}function OC(e,t,n,r,i,s,o){var a=cl(e,n),l=cl(t,n),c=o.get(l);if(c){ll(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,d=u===void 0;if(d){var h=Zn(l),f=!h&&Ni(l),p=!h&&!f&&lc(l);u=l,h||f||p?Zn(a)?u=a:TC(a)?u=qN(a):f?(d=!1,u=Fp(l,!0)):p?(d=!1,u=qp(l,!0)):u=[]:NS(l)||rl(l)?(u=a,rl(a)?u=CC(a):(!Bn(a)||ic(a))&&(u=Up(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),ll(e,n,u)}function Kp(e,t,n,r,i){e!==t&&SC(t,function(s,o){if(i||(i=new on),Bn(s))OC(e,t,o,n,Kp,r,i);else{var a=r?r(cl(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ll(e,o,a)}},Mp)}function On(e,t){return Gp(e,t)}var Mn=rA(function(e,t,n){Kp(e,t,n)}),ee=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(ee||{});class ln{constructor(t,n,r={}){this.attrName=t,this.keyName=n;const i=ee.TYPE&ee.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ee.LEVEL|i:ee.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map(n=>n.name)}add(t,n){return this.canAdd(t,n)?(t.setAttribute(this.keyName,n),!0):!1}canAdd(t,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const n=t.getAttribute(this.keyName);return this.canAdd(t,n)&&n?n:""}}class Cr extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Wp=class ul{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,n=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(n){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,n)}return null}create(t,n,r){const i=this.query(n);if(i==null)throw new Cr(`Unable to create ${n} blot`);const s=i,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),a=new s(t,o,r);return ul.blots.set(a.domNode,a),a}find(t,n=!1){return ul.find(t,n)}query(t,n=ee.ANY){let r;return typeof t=="string"?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:typeof t=="number"?t&ee.LEVEL&ee.BLOCK?r=this.types.block:t&ee.LEVEL&ee.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[t.tagName]),r==null?null:"scope"in r&&n&ee.LEVEL&r.scope&&n&ee.TYPE&r.scope?r:null}register(...t){return t.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Cr("Invalid definition");if(r&&n.blotName==="abstract")throw new Cr("Cannot register abstract class");const s=r?n.blotName:i?n.attrName:void 0;return this.types[s]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(o=>o.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(o=>{(this.tags[o]==null||n.className==null)&&(this.tags[o]=n)}))),n})}};Wp.blots=new WeakMap;let Dr=Wp;function vd(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${t}-`)===0)}class IC extends ln{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(t,n){return this.canAdd(t,n)?(this.remove(t),t.classList.add(`${this.keyName}-${n}`),!0):!1}remove(t){vd(t,this.keyName).forEach(n=>{t.classList.remove(n)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const n=(vd(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,n)?n:""}}const Wt=IC;function Sa(e){const t=e.split("-"),n=t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return t[0]+n}class RC extends ln{static keys(t){return(t.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(t,n){return this.canAdd(t,n)?(t.style[Sa(this.keyName)]=n,!0):!1}remove(t){t.style[Sa(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const n=t.style[Sa(this.keyName)];return this.canAdd(t,n)?n:""}}const Fn=RC;class LC{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,n){n?t.add(this.domNode,n)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Dr.find(this.domNode);if(t==null)return;const n=ln.keys(this.domNode),r=Wt.keys(this.domNode),i=Fn.keys(this.domNode);n.concat(r).concat(i).forEach(s=>{const o=t.scroll.query(s,ee.ATTRIBUTE);o instanceof ln&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);t.format(n,r)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,n)=>(t[n]=this.attributes[n].value(this.domNode),t),{})}}const ao=LC,Vp=class{constructor(t,n){this.scroll=t,this.domNode=n,Dr.blots.set(n,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Cr("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof t=="string"?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof t=="number"&&(r=t),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),Dr.blots.delete(this.domNode)}deleteAt(t,n){this.isolate(t,n).remove()}formatAt(t,n,r,i){const s=this.isolate(t,n);if(this.scroll.query(r,ee.BLOT)!=null&&i)s.wrap(r,i);else if(this.scroll.query(r,ee.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);s.wrap(o),o.format(r,i)}}insertAt(t,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),s=this.split(t);this.parent.insertBefore(i,s||void 0)}isolate(t,n){const r=this.split(t);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,n){return t===0?this:this.next}update(t,n){}wrap(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Cr(`Cannot wrap ${t}`);return r.appendChild(this),r}};Vp.blotName="abstract";let Yp=Vp;const Zp=class extends Yp{static value(t){return!0}index(t,n){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(t,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zp.scope=ee.INLINE_BLOT;let MC=Zp;const Ve=MC;class DC{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const n=t.slice(1);this.append(...n)}}at(t){const n=this.iterator();let r=n();for(;r&&t>0;)t-=1,r=n();return r}contains(t){const n=this.iterator();let r=n();for(;r;){if(r===t)return!0;r=n()}return!1}indexOf(t){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===t)return i;i+=1,r=n()}return-1}insertBefore(t,n){t!=null&&(this.remove(t),t.next=n,n!=null?(t.prev=n.prev,n.prev!=null&&(n.prev.next=t),n.prev=t,n===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let n=0,r=this.head;for(;r!=null;){if(r===t)return n;n+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const n=t;return t!=null&&(t=t.next),n}}find(t,n=!1){const r=this.iterator();let i=r();for(;i;){const s=i.length();if(t<s||n&&t===s&&(i.next==null||i.next.length()!==0))return[i,t];t-=s,i=r()}return[null,0]}forEach(t){const n=this.iterator();let r=n();for(;r;)t(r),r=n()}forEachAt(t,n,r){if(n<=0)return;const[i,s]=this.find(t);let o=t-s;const a=this.iterator(i);let l=a();for(;l&&o<t+n;){const c=l.length();t>o?r(l,t-o,Math.min(n,o+c-t)):r(l,0,Math.min(c,t+n-o)),o+=c,l=a()}}map(t){return this.reduce((n,r)=>(n.push(t(r)),n),[])}reduce(t,n){const r=this.iterator();let i=r();for(;i;)n=t(n,i),i=r();return n}}function kd(e,t){const n=t.find(e);if(n)return n;try{return t.create(e)}catch{const r=t.create(ee.INLINE);return Array.from(e.childNodes).forEach(i=>{r.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(r.domNode,e),r.attach(),r}}const Xp=class Cn extends Yp{constructor(t,n){super(t,n),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,Cn.uiClass&&this.uiNode.classList.add(Cn.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new DC,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const n=kd(t,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Cr)return;throw n}})}deleteAt(t,n){if(t===0&&n===this.length())return this.remove();this.children.forEachAt(t,n,(r,i,s)=>{r.deleteAt(i,s)})}descendant(t,n=0){const[r,i]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,i]:r instanceof Cn?r.descendant(t,i):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(n,r,(o,a,l)=>{(t.blotName==null&&t(o)||t.blotName!=null&&o instanceof t)&&i.push(o),o instanceof Cn&&(i=i.concat(o.descendants(t,a,s))),s-=l}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ee.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof Cn?n.unwrap():n.remove())})}formatAt(t,n,r,i){this.children.forEachAt(t,n,(s,o,a)=>{s.formatAt(o,a,r,i)})}insertAt(t,n,r){const[i,s]=this.children.find(t);if(i)i.insertAt(s,n,r);else{const o=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(o)}}insertBefore(t,n){t.parent!=null&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,n||null),t.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce((t,n)=>t+n.length(),0)}moveChildren(t,n){this.children.forEach(r=>{t.insertBefore(r,n)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(t,n=!1){const[r,i]=this.children.find(t,n),s=[[this,t]];return r instanceof Cn?s.concat(r.path(i,n)):(r!=null&&s.push([r,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(t,n){const r=typeof t=="string"?this.scroll.create(t,n):t;return r instanceof Cn&&this.moveChildren(r),super.replaceWith(r)}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),(i,s,o)=>{const a=i.split(s,n);a!=null&&r.appendChild(a)}),r}splitAfter(t){const n=this.clone();for(;t.next!=null;)n.appendChild(t.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,n){const r=[],i=[];t.forEach(s=>{s.target===this.domNode&&s.type==="childList"&&(r.push(...s.addedNodes),i.push(...s.removedNodes))}),i.forEach(s=>{if(s.parentNode!=null&&s.tagName!=="IFRAME"&&document.body.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(s);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),r.filter(s=>s.parentNode===this.domNode&&s!==this.uiNode).sort((s,o)=>s===o?0:s.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(s=>{let o=null;s.nextSibling!=null&&(o=this.scroll.find(s.nextSibling));const a=kd(s,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};Xp.uiClass="";let PC=Xp;const Gt=PC;function BC(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}const wr=class _r extends Gt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(_r.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new ao(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof _r||(r=r.wrap(_r.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(t,ee.INLINE);if(r==null)return;r instanceof ln?this.attributes.attribute(r,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ee.ATTRIBUTE)?this.isolate(t,n).format(r,i):super.formatAt(t,n,r,i)}optimize(t){super.optimize(t);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof _r&&r.prev===this&&BC(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(t,n){const r=super.wrap(t,n);return r instanceof _r&&this.attributes.move(r),r}};wr.allowedChildren=[wr,Ve],wr.blotName="inline",wr.scope=ee.INLINE_BLOT,wr.tagName="SPAN";let FC=wr;const uc=FC,vr=class dl extends Gt{static create(t){return super.create(t)}static formats(t,n){const r=n.query(dl.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,n){super(t,n),this.attributes=new ao(this.domNode)}format(t,n){const r=this.scroll.query(t,ee.BLOCK);r!=null&&(r instanceof ln?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(dl.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){const t=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(t[this.statics.blotName]=n),t}formatAt(t,n,r,i){this.scroll.query(r,ee.BLOCK)!=null?this.format(r,i):super.formatAt(t,n,r,i)}insertAt(t,n,r){if(r==null||this.scroll.query(n,ee.INLINE)!=null)super.insertAt(t,n,r);else{const i=this.split(t);if(i!=null){const s=this.scroll.create(n,r);i.parent.insertBefore(s,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,n){const r=super.replaceWith(t,n);return this.attributes.copy(r),r}update(t,n){super.update(t,n),t.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};vr.blotName="block",vr.scope=ee.BLOCK_BLOT,vr.tagName="P",vr.allowedChildren=[uc,vr,Ve];let qC=vr;const Ti=qC,fl=class extends Gt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,n){super.deleteAt(t,n),this.enforceAllowedChildren()}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.enforceAllowedChildren()}insertAt(t,n,r){super.insertAt(t,n,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};fl.blotName="container",fl.scope=ee.BLOCK_BLOT;let UC=fl;const lo=UC;class $C extends Ve{static formats(t,n){}format(t,n){super.formatAt(0,this.length(),t,n)}formatAt(t,n,r,i){t===0&&n===this.length()?this.format(r,i):super.formatAt(t,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const _t=$C,zC={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},jC=100,kr=class extends Gt{constructor(t,n){super(null,n),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,zC),this.attach()}create(t,n){return this.registry.create(this,t,n)}find(t,n=!1){const r=this.registry.find(t,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,n=ee.ANY){return this.registry.query(t,n)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,n){this.update(),t===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(t,n)}formatAt(t,n,r,i){this.update(),super.formatAt(t,n,r,i)}insertAt(t,n,r){this.update(),super.insertAt(t,n,r)}optimize(t=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)t.push(i.pop());const s=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&s(l.parent))},o=l=>{r.has(l.domNode)&&(l instanceof Gt&&l.children.forEach(o),r.delete(l.domNode),l.optimize(n))};let a=t;for(let l=0;a.length>0;l+=1){if(l>=jC)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(s(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const h=this.find(d,!1);s(h,!1),h instanceof Gt&&h.children.forEach(f=>{s(f,!1)})})):c.type==="attributes"&&s(u.prev)),s(u))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),i=a.slice();i.length>0;)t.push(i.pop())}}update(t,n={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map(i=>{const s=this.find(i.target,!0);return s==null?null:r.has(s.domNode)?(r.get(s.domNode).push(i),null):(r.set(s.domNode,[i]),s)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(t,n)}};kr.blotName="scroll",kr.defaultChild=Ti,kr.allowedChildren=[Ti,lo],kr.scope=ee.BLOCK_BLOT,kr.tagName="DIV";let HC=kr;const dc=HC,hl=class Qp extends Ve{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,n){super(t,n),this.text=this.statics.value(this.domNode)}deleteAt(t,n){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+n)}index(t,n){return this.domNode===t?n:-1}insertAt(t,n,r){r==null?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,n,r)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Qp&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,n=!1){return[this.domNode,t]}split(t,n=!1){if(!n){if(t===0)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,n){t.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};hl.blotName="text",hl.scope=ee.INLINE_BLOT;let GC=hl;const $s=GC,KC=Object.freeze(Object.defineProperty({__proto__:null,Attributor:ln,AttributorStore:ao,BlockBlot:Ti,ClassAttributor:Wt,ContainerBlot:lo,EmbedBlot:_t,InlineBlot:uc,LeafBlot:Ve,ParentBlot:Gt,Registry:Dr,Scope:ee,ScrollBlot:dc,StyleAttributor:Fn,TextBlot:$s},Symbol.toStringTag,{value:"Module"}));var pl={exports:{}},Et=-1,ot=1,Pe=0;function Ci(e,t,n,r,i){if(e===t)return e?[[Pe,e]]:[];if(n!=null){var s=tO(e,t,n);if(s)return s}var o=fc(e,t),a=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=co(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var c=WC(e,t);return a&&c.unshift([Pe,a]),l&&c.push([Pe,l]),hc(c,i),r&&ZC(c),c}function WC(e,t){var n;if(!e)return[[ot,t]];if(!t)return[[Et,e]];var r=e.length>t.length?e:t,i=e.length>t.length?t:e,s=r.indexOf(i);if(s!==-1)return n=[[ot,r.substring(0,s)],[Pe,i],[ot,r.substring(s+i.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Et),n;if(i.length===1)return[[Et,e],[ot,t]];var o=YC(e,t);if(o){var a=o[0],l=o[1],c=o[2],u=o[3],d=o[4],h=Ci(a,c),f=Ci(l,u);return h.concat([[Pe,d]],f)}return VC(e,t)}function VC(e,t){for(var n=e.length,r=t.length,i=Math.ceil((n+r)/2),s=i,o=2*i,a=new Array(o),l=new Array(o),c=0;c<o;c++)a[c]=-1,l[c]=-1;a[s+1]=0,l[s+1]=0;for(var u=n-r,d=u%2!==0,h=0,f=0,p=0,m=0,b=0;b<i;b++){for(var y=-b+h;y<=b-f;y+=2){var _=s+y,v;y===-b||y!==b&&a[_-1]<a[_+1]?v=a[_+1]:v=a[_-1]+1;for(var T=v-y;v<n&&T<r&&e.charAt(v)===t.charAt(T);)v++,T++;if(a[_]=v,v>n)f+=2;else if(T>r)h+=2;else if(d){var C=s+u-y;if(C>=0&&C<o&&l[C]!==-1){var N=n-l[C];if(v>=N)return Nd(e,t,v,T)}}}for(var P=-b+p;P<=b-m;P+=2){var C=s+P,N;P===-b||P!==b&&l[C-1]<l[C+1]?N=l[C+1]:N=l[C-1]+1;for(var U=N-P;N<n&&U<r&&e.charAt(n-N-1)===t.charAt(r-U-1);)N++,U++;if(l[C]=N,N>n)m+=2;else if(U>r)p+=2;else if(!d){var _=s+u-P;if(_>=0&&_<o&&a[_]!==-1){var v=a[_],T=s+v-_;if(N=n-N,v>=N)return Nd(e,t,v,T)}}}}return[[Et,e],[ot,t]]}function Nd(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),o=e.substring(n),a=t.substring(r),l=Ci(i,s),c=Ci(o,a);return l.concat(c)}function fc(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(s,i)==t.substring(s,i)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return Jp(e.charCodeAt(i-1))&&i--,i}function Ad(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var s=0,o=1;;){var a=e.substring(i-o),l=t.indexOf(a);if(l==-1)return s;o+=l,(l==0||e.substring(i-o)==t.substring(0,o))&&(s=o,o++)}}function co(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,s=0;n<i;)e.substring(e.length-i,e.length-s)==t.substring(t.length-i,t.length-s)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return eg(e.charCodeAt(e.length-i))&&i--,i}function YC(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(f,p,m){for(var b=f.substring(m,m+Math.floor(f.length/4)),y=-1,_="",v,T,C,N;(y=p.indexOf(b,y+1))!==-1;){var P=fc(f.substring(m),p.substring(y)),U=co(f.substring(0,m),p.substring(0,y));_.length<U+P&&(_=p.substring(y-U,y)+p.substring(y,y+P),v=f.substring(0,m-U),T=f.substring(m+P),C=p.substring(0,y-U),N=p.substring(y+P))}return _.length*2>=f.length?[v,T,C,N,_]:null}var s=i(n,r,Math.ceil(n.length/4)),o=i(n,r,Math.ceil(n.length/2)),a;if(!s&&!o)return null;o?s?a=s[4].length>o[4].length?s:o:a=o:a=s;var l,c,u,d;e.length>t.length?(l=a[0],c=a[1],u=a[2],d=a[3]):(u=a[0],d=a[1],l=a[2],c=a[3]);var h=a[4];return[l,c,u,d,h]}function ZC(e){for(var t=!1,n=[],r=0,i=null,s=0,o=0,a=0,l=0,c=0;s<e.length;)e[s][0]==Pe?(n[r++]=s,o=l,a=c,l=0,c=0,i=e[s][1]):(e[s][0]==ot?l+=e[s][1].length:c+=e[s][1].length,i&&i.length<=Math.max(o,a)&&i.length<=Math.max(l,c)&&(e.splice(n[r-1],0,[Et,i]),e[n[r-1]+1][0]=ot,r--,r--,s=r>0?n[r-1]:-1,o=0,a=0,l=0,c=0,i=null,t=!0)),s++;for(t&&hc(e),JC(e),s=1;s<e.length;){if(e[s-1][0]==Et&&e[s][0]==ot){var u=e[s-1][1],d=e[s][1],h=Ad(u,d),f=Ad(d,u);h>=f?(h>=u.length/2||h>=d.length/2)&&(e.splice(s,0,[Pe,d.substring(0,h)]),e[s-1][1]=u.substring(0,u.length-h),e[s+1][1]=d.substring(h),s++):(f>=u.length/2||f>=d.length/2)&&(e.splice(s,0,[Pe,u.substring(0,f)]),e[s-1][0]=ot,e[s-1][1]=d.substring(0,d.length-f),e[s+1][0]=Et,e[s+1][1]=u.substring(f),s++),s++}s++}}var Sd=/[^a-zA-Z0-9]/,Td=/\s/,Cd=/[\r\n]/,XC=/\n\r?\n$/,QC=/^\r?\n\r?\n/;function JC(e){function t(f,p){if(!f||!p)return 6;var m=f.charAt(f.length-1),b=p.charAt(0),y=m.match(Sd),_=b.match(Sd),v=y&&m.match(Td),T=_&&b.match(Td),C=v&&m.match(Cd),N=T&&b.match(Cd),P=C&&f.match(XC),U=N&&p.match(QC);return P||U?5:C||N?4:y&&!v&&T?3:v||T?2:y||_?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==Pe&&e[n+1][0]==Pe){var r=e[n-1][1],i=e[n][1],s=e[n+1][1],o=co(r,i);if(o){var a=i.substring(i.length-o);r=r.substring(0,r.length-o),i=a+i.substring(0,i.length-o),s=a+s}for(var l=r,c=i,u=s,d=t(r,i)+t(i,s);i.charAt(0)===s.charAt(0);){r+=i.charAt(0),i=i.substring(1)+s.charAt(0),s=s.substring(1);var h=t(r,i)+t(i,s);h>=d&&(d=h,l=r,c=i,u=s)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}}function hc(e,t){e.push([Pe,""]);for(var n=0,r=0,i=0,s="",o="",a;n<e.length;){if(n<e.length-1&&!e[n][1]){e.splice(n,1);continue}switch(e[n][0]){case ot:i++,o+=e[n][1],n++;break;case Et:r++,s+=e[n][1],n++;break;case Pe:var l=n-i-r-1;if(t){if(l>=0&&ng(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),s=c+s,o=c+o,!e[l][1]){e.splice(l,1),n--;var u=l-1;e[u]&&e[u][0]===ot&&(i++,o=e[u][1]+o,u--),e[u]&&e[u][0]===Et&&(r++,s=e[u][1]+s,u--),l=u}}if(tg(e[n][1])){var c=e[n][1].charAt(0);e[n][1]=e[n][1].slice(1),s+=c,o+=c}}if(n<e.length-1&&!e[n][1]){e.splice(n,1);break}if(s.length>0||o.length>0){s.length>0&&o.length>0&&(a=fc(o,s),a!==0&&(l>=0?e[l][1]+=o.substring(0,a):(e.splice(0,0,[Pe,o.substring(0,a)]),n++),o=o.substring(a),s=s.substring(a)),a=co(o,s),a!==0&&(e[n][1]=o.substring(o.length-a)+e[n][1],o=o.substring(0,o.length-a),s=s.substring(0,s.length-a)));var d=i+r;s.length===0&&o.length===0?(e.splice(n-d,d),n=n-d):s.length===0?(e.splice(n-d,d,[ot,o]),n=n-d+1):o.length===0?(e.splice(n-d,d,[Et,s]),n=n-d+1):(e.splice(n-d,d,[Et,s],[ot,o]),n=n-d+2)}n!==0&&e[n-1][0]===Pe?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,i=0,r=0,s="",o="";break}}e[e.length-1][1]===""&&e.pop();var h=!1;for(n=1;n<e.length-1;)e[n-1][0]===Pe&&e[n+1][0]===Pe&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),h=!0):e[n][1].substring(0,e[n+1][1].length)==e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),h=!0)),n++;h&&hc(e,t)}function Jp(e){return e>=55296&&e<=56319}function eg(e){return e>=56320&&e<=57343}function tg(e){return eg(e.charCodeAt(0))}function ng(e){return Jp(e.charCodeAt(e.length-1))}function eO(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function Ta(e,t,n,r){return ng(e)||tg(r)?null:eO([[Pe,e],[Et,t],[ot,n],[Pe,r]])}function tO(e,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,s=e.length,o=t.length;if(r.length===0&&(i===null||i.length===0)){var a=r.index,l=e.slice(0,a),c=e.slice(a),u=i?i.index:null;e:{var d=a+o-s;if(u!==null&&u!==d||d<0||d>o)break e;var h=t.slice(0,d),f=t.slice(d);if(f!==c)break e;var p=Math.min(a,d),m=l.slice(0,p),b=h.slice(0,p);if(m!==b)break e;var y=l.slice(p),_=h.slice(p);return Ta(m,y,_,c)}e:{if(u!==null&&u!==a)break e;var v=a,h=t.slice(0,v),f=t.slice(v);if(h!==l)break e;var T=Math.min(s-v,o-v),C=c.slice(c.length-T),N=f.slice(f.length-T);if(C!==N)break e;var y=c.slice(0,c.length-T),_=f.slice(0,f.length-T);return Ta(l,y,_,C)}}if(r.length>0&&i&&i.length===0)e:{var m=e.slice(0,r.index),C=e.slice(r.index+r.length),p=m.length,T=C.length;if(o<p+T)break e;var b=t.slice(0,p),N=t.slice(o-T);if(m!==b||C!==N)break e;var y=e.slice(p,s-T),_=t.slice(p,o-T);return Ta(m,y,_,C)}return null}function uo(e,t,n,r){return Ci(e,t,n,r,!0)}uo.INSERT=ot;uo.DELETE=Et;uo.EQUAL=Pe;var nO=uo,zs={exports:{}};zs.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object GeneratorFunction]",h="[object Map]",f="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",y="[object Set]",_="[object String]",v="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",U="[object Float64Array]",G="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",B="[object Uint8Array]",re="[object Uint8ClampedArray]",X="[object Uint16Array]",Y="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,q=/\w*$/,F=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,w={};w[s]=w[o]=w[C]=w[N]=w[a]=w[l]=w[P]=w[U]=w[G]=w[O]=w[j]=w[h]=w[f]=w[p]=w[b]=w[y]=w[_]=w[v]=w[B]=w[re]=w[X]=w[Y]=!0,w[c]=w[u]=w[T]=!1;var Q=typeof It=="object"&&It&&It.Object===Object&&It,ae=typeof self=="object"&&self&&self.Object===Object&&self,k=Q||ae||Function("return this")(),he=t&&!t.nodeType&&t,se=he&&!0&&e&&!e.nodeType&&e,we=se&&se.exports===he;function at(g,x){return g.set(x[0],x[1]),g}function Ne(g,x){return g.add(x),g}function Je(g,x){for(var A=-1,M=g?g.length:0;++A<M&&x(g[A],A,g)!==!1;);return g}function et(g,x){for(var A=-1,M=x.length,le=g.length;++A<M;)g[le+A]=x[A];return g}function lt(g,x,A,M){for(var le=-1,ne=g?g.length:0;++le<ne;)A=x(A,g[le],le,g);return A}function Lt(g,x){for(var A=-1,M=Array(g);++A<g;)M[A]=x(A);return M}function bt(g,x){return g==null?void 0:g[x]}function vt(g){var x=!1;if(g!=null&&typeof g.toString!="function")try{x=!!(g+"")}catch{}return x}function Re(g){var x=-1,A=Array(g.size);return g.forEach(function(M,le){A[++x]=[le,M]}),A}function pe(g,x){return function(A){return g(x(A))}}function je(g){var x=-1,A=Array(g.size);return g.forEach(function(M){A[++x]=M}),A}var ie=Array.prototype,Mt=Function.prototype,ve=Object.prototype,me=k["__core-js_shared__"],Dt=function(){var g=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ct=Mt.toString,He=ve.hasOwnProperty,kt=ve.toString,S=RegExp("^"+ct.call(He).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=we?k.Buffer:void 0,z=k.Symbol,W=k.Uint8Array,te=pe(Object.getPrototypeOf,Object),Ae=Object.create,ut=ve.propertyIsEnumerable,tt=ie.splice,Pt=Object.getOwnPropertySymbols,Nt=R?R.isBuffer:void 0,Be=pe(Object.keys,Object),yt=Ft(k,"DataView"),qe=Ft(k,"Map"),Bt=Ft(k,"Promise"),ur=Ft(k,"Set"),Wr=Ft(k,"WeakMap"),qn=Ft(Object,"create"),Vr=nt(yt),Un=nt(qe),Yr=nt(Bt),Zr=nt(ur),Xr=nt(Wr),kn=z?z.prototype:void 0,Ki=kn?kn.valueOf:void 0;function fn(g){var x=-1,A=g?g.length:0;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function vo(){this.__data__=qn?qn(null):{}}function ko(g){return this.has(g)&&delete this.__data__[g]}function No(g){var x=this.__data__;if(qn){var A=x[g];return A===r?void 0:A}return He.call(x,g)?x[g]:void 0}function Wi(g){var x=this.__data__;return qn?x[g]!==void 0:He.call(x,g)}function Qr(g,x){var A=this.__data__;return A[g]=qn&&x===void 0?r:x,this}fn.prototype.clear=vo,fn.prototype.delete=ko,fn.prototype.get=No,fn.prototype.has=Wi,fn.prototype.set=Qr;function Ue(g){var x=-1,A=g?g.length:0;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Ao(){this.__data__=[]}function So(g){var x=this.__data__,A=fr(x,g);if(A<0)return!1;var M=x.length-1;return A==M?x.pop():tt.call(x,A,1),!0}function To(g){var x=this.__data__,A=fr(x,g);return A<0?void 0:x[A][1]}function Co(g){return fr(this.__data__,g)>-1}function Oo(g,x){var A=this.__data__,M=fr(A,g);return M<0?A.push([g,x]):A[M][1]=x,this}Ue.prototype.clear=Ao,Ue.prototype.delete=So,Ue.prototype.get=To,Ue.prototype.has=Co,Ue.prototype.set=Oo;function Ge(g){var x=-1,A=g?g.length:0;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Io(){this.__data__={hash:new fn,map:new(qe||Ue),string:new fn}}function Ro(g){return zn(this,g).delete(g)}function Lo(g){return zn(this,g).get(g)}function Mo(g){return zn(this,g).has(g)}function Do(g,x){return zn(this,g).set(g,x),this}Ge.prototype.clear=Io,Ge.prototype.delete=Ro,Ge.prototype.get=Lo,Ge.prototype.has=Mo,Ge.prototype.set=Do;function dt(g){this.__data__=new Ue(g)}function Po(){this.__data__=new Ue}function Bo(g){return this.__data__.delete(g)}function Fo(g){return this.__data__.get(g)}function qo(g){return this.__data__.has(g)}function Uo(g,x){var A=this.__data__;if(A instanceof Ue){var M=A.__data__;if(!qe||M.length<n-1)return M.push([g,x]),this;A=this.__data__=new Ge(M)}return A.set(g,x),this}dt.prototype.clear=Po,dt.prototype.delete=Bo,dt.prototype.get=Fo,dt.prototype.has=qo,dt.prototype.set=Uo;function dr(g,x){var A=ni(g)||pr(g)?Lt(g.length,String):[],M=A.length,le=!!M;for(var ne in g)He.call(g,ne)&&!(le&&(ne=="length"||ea(ne,M)))&&A.push(ne);return A}function Vi(g,x,A){var M=g[x];(!(He.call(g,x)&&Ji(M,A))||A===void 0&&!(x in g))&&(g[x]=A)}function fr(g,x){for(var A=g.length;A--;)if(Ji(g[A][0],x))return A;return-1}function Xt(g,x){return g&&ti(x,ii(x),g)}function Jr(g,x,A,M,le,ne,xe){var ye;if(M&&(ye=ne?M(g,le,ne,xe):M(g)),ye!==void 0)return ye;if(!Jt(g))return g;var Le=ni(g);if(Le){if(ye=Qo(g),!x)return Yo(g,ye)}else{var Ee=pn(g),Ke=Ee==u||Ee==d;if(es(g))return hr(g,x);if(Ee==p||Ee==s||Ke&&!ne){if(vt(g))return ne?g:{};if(ye=Qt(Ke?{}:g),!x)return Zo(g,Xt(ye,g))}else{if(!w[Ee])return ne?g:{};ye=Jo(g,Ee,Jr,x)}}xe||(xe=new dt);var ft=xe.get(g);if(ft)return ft;if(xe.set(g,ye),!Le)var De=A?Xo(g):ii(g);return Je(De||g,function(We,$e){De&&($e=We,We=g[$e]),Vi(ye,$e,Jr(We,x,A,M,$e,g,xe))}),ye}function $o(g){return Jt(g)?Ae(g):{}}function zo(g,x,A){var M=x(g);return ni(g)?M:et(M,A(g))}function jo(g){return kt.call(g)}function Ho(g){if(!Jt(g)||na(g))return!1;var x=ri(g)||vt(g)?S:F;return x.test(nt(g))}function Go(g){if(!Xi(g))return Be(g);var x=[];for(var A in Object(g))He.call(g,A)&&A!="constructor"&&x.push(A);return x}function hr(g,x){if(x)return g.slice();var A=new g.constructor(g.length);return g.copy(A),A}function ei(g){var x=new g.constructor(g.byteLength);return new W(x).set(new W(g)),x}function $n(g,x){var A=x?ei(g.buffer):g.buffer;return new g.constructor(A,g.byteOffset,g.byteLength)}function Yi(g,x,A){var M=x?A(Re(g),!0):Re(g);return lt(M,at,new g.constructor)}function Zi(g){var x=new g.constructor(g.source,q.exec(g));return x.lastIndex=g.lastIndex,x}function Ko(g,x,A){var M=x?A(je(g),!0):je(g);return lt(M,Ne,new g.constructor)}function Wo(g){return Ki?Object(Ki.call(g)):{}}function Vo(g,x){var A=x?ei(g.buffer):g.buffer;return new g.constructor(A,g.byteOffset,g.length)}function Yo(g,x){var A=-1,M=g.length;for(x||(x=Array(M));++A<M;)x[A]=g[A];return x}function ti(g,x,A,M){A||(A={});for(var le=-1,ne=x.length;++le<ne;){var xe=x[le],ye=void 0;Vi(A,xe,ye===void 0?g[xe]:ye)}return A}function Zo(g,x){return ti(g,hn(g),x)}function Xo(g){return zo(g,ii,hn)}function zn(g,x){var A=g.__data__;return ta(x)?A[typeof x=="string"?"string":"hash"]:A.map}function Ft(g,x){var A=bt(g,x);return Ho(A)?A:void 0}var hn=Pt?pe(Pt,Object):ia,pn=jo;(yt&&pn(new yt(new ArrayBuffer(1)))!=N||qe&&pn(new qe)!=h||Bt&&pn(Bt.resolve())!=m||ur&&pn(new ur)!=y||Wr&&pn(new Wr)!=T)&&(pn=function(g){var x=kt.call(g),A=x==p?g.constructor:void 0,M=A?nt(A):void 0;if(M)switch(M){case Vr:return N;case Un:return h;case Yr:return m;case Zr:return y;case Xr:return T}return x});function Qo(g){var x=g.length,A=g.constructor(x);return x&&typeof g[0]=="string"&&He.call(g,"index")&&(A.index=g.index,A.input=g.input),A}function Qt(g){return typeof g.constructor=="function"&&!Xi(g)?$o(te(g)):{}}function Jo(g,x,A,M){var le=g.constructor;switch(x){case C:return ei(g);case a:case l:return new le(+g);case N:return $n(g,M);case P:case U:case G:case O:case j:case B:case re:case X:case Y:return Vo(g,M);case h:return Yi(g,M,A);case f:case _:return new le(g);case b:return Zi(g);case y:return Ko(g,M,A);case v:return Wo(g)}}function ea(g,x){return x=x??i,!!x&&(typeof g=="number"||K.test(g))&&g>-1&&g%1==0&&g<x}function ta(g){var x=typeof g;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?g!=="__proto__":g===null}function na(g){return!!Dt&&Dt in g}function Xi(g){var x=g&&g.constructor,A=typeof x=="function"&&x.prototype||ve;return g===A}function nt(g){if(g!=null){try{return ct.call(g)}catch{}try{return g+""}catch{}}return""}function Qi(g){return Jr(g,!0,!0)}function Ji(g,x){return g===x||g!==g&&x!==x}function pr(g){return ra(g)&&He.call(g,"callee")&&(!ut.call(g,"callee")||kt.call(g)==s)}var ni=Array.isArray;function gr(g){return g!=null&&ts(g.length)&&!ri(g)}function ra(g){return ns(g)&&gr(g)}var es=Nt||sa;function ri(g){var x=Jt(g)?kt.call(g):"";return x==u||x==d}function ts(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=i}function Jt(g){var x=typeof g;return!!g&&(x=="object"||x=="function")}function ns(g){return!!g&&typeof g=="object"}function ii(g){return gr(g)?dr(g):Go(g)}function ia(){return[]}function sa(){return!1}e.exports=Qi})(zs,zs.exports);var rg=zs.exports,js={exports:{}};js.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",b="[object Number]",y="[object Null]",_="[object Object]",v="[object Promise]",T="[object Proxy]",C="[object RegExp]",N="[object Set]",P="[object String]",U="[object Symbol]",G="[object Undefined]",O="[object WeakMap]",j="[object ArrayBuffer]",B="[object DataView]",re="[object Float32Array]",X="[object Float64Array]",Y="[object Int8Array]",I="[object Int16Array]",q="[object Int32Array]",F="[object Uint8Array]",K="[object Uint8ClampedArray]",w="[object Uint16Array]",Q="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,k=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,se={};se[re]=se[X]=se[Y]=se[I]=se[q]=se[F]=se[K]=se[w]=se[Q]=!0,se[a]=se[l]=se[j]=se[u]=se[B]=se[d]=se[h]=se[f]=se[m]=se[b]=se[_]=se[C]=se[N]=se[P]=se[O]=!1;var we=typeof It=="object"&&It&&It.Object===Object&&It,at=typeof self=="object"&&self&&self.Object===Object&&self,Ne=we||at||Function("return this")(),Je=t&&!t.nodeType&&t,et=Je&&!0&&e&&!e.nodeType&&e,lt=et&&et.exports===Je,Lt=lt&&we.process,bt=function(){try{return Lt&&Lt.binding&&Lt.binding("util")}catch{}}(),vt=bt&&bt.isTypedArray;function Re(g,x){for(var A=-1,M=g==null?0:g.length,le=0,ne=[];++A<M;){var xe=g[A];x(xe,A,g)&&(ne[le++]=xe)}return ne}function pe(g,x){for(var A=-1,M=x.length,le=g.length;++A<M;)g[le+A]=x[A];return g}function je(g,x){for(var A=-1,M=g==null?0:g.length;++A<M;)if(x(g[A],A,g))return!0;return!1}function ie(g,x){for(var A=-1,M=Array(g);++A<g;)M[A]=x(A);return M}function Mt(g){return function(x){return g(x)}}function ve(g,x){return g.has(x)}function me(g,x){return g==null?void 0:g[x]}function Dt(g){var x=-1,A=Array(g.size);return g.forEach(function(M,le){A[++x]=[le,M]}),A}function ct(g,x){return function(A){return g(x(A))}}function He(g){var x=-1,A=Array(g.size);return g.forEach(function(M){A[++x]=M}),A}var kt=Array.prototype,S=Function.prototype,R=Object.prototype,z=Ne["__core-js_shared__"],W=S.toString,te=R.hasOwnProperty,Ae=function(){var g=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""}(),ut=R.toString,tt=RegExp("^"+W.call(te).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=lt?Ne.Buffer:void 0,Nt=Ne.Symbol,Be=Ne.Uint8Array,yt=R.propertyIsEnumerable,qe=kt.splice,Bt=Nt?Nt.toStringTag:void 0,ur=Object.getOwnPropertySymbols,Wr=Pt?Pt.isBuffer:void 0,qn=ct(Object.keys,Object),Vr=hn(Ne,"DataView"),Un=hn(Ne,"Map"),Yr=hn(Ne,"Promise"),Zr=hn(Ne,"Set"),Xr=hn(Ne,"WeakMap"),kn=hn(Object,"create"),Ki=nt(Vr),fn=nt(Un),vo=nt(Yr),ko=nt(Zr),No=nt(Xr),Wi=Nt?Nt.prototype:void 0,Qr=Wi?Wi.valueOf:void 0;function Ue(g){var x=-1,A=g==null?0:g.length;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Ao(){this.__data__=kn?kn(null):{},this.size=0}function So(g){var x=this.has(g)&&delete this.__data__[g];return this.size-=x?1:0,x}function To(g){var x=this.__data__;if(kn){var A=x[g];return A===r?void 0:A}return te.call(x,g)?x[g]:void 0}function Co(g){var x=this.__data__;return kn?x[g]!==void 0:te.call(x,g)}function Oo(g,x){var A=this.__data__;return this.size+=this.has(g)?0:1,A[g]=kn&&x===void 0?r:x,this}Ue.prototype.clear=Ao,Ue.prototype.delete=So,Ue.prototype.get=To,Ue.prototype.has=Co,Ue.prototype.set=Oo;function Ge(g){var x=-1,A=g==null?0:g.length;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Io(){this.__data__=[],this.size=0}function Ro(g){var x=this.__data__,A=hr(x,g);if(A<0)return!1;var M=x.length-1;return A==M?x.pop():qe.call(x,A,1),--this.size,!0}function Lo(g){var x=this.__data__,A=hr(x,g);return A<0?void 0:x[A][1]}function Mo(g){return hr(this.__data__,g)>-1}function Do(g,x){var A=this.__data__,M=hr(A,g);return M<0?(++this.size,A.push([g,x])):A[M][1]=x,this}Ge.prototype.clear=Io,Ge.prototype.delete=Ro,Ge.prototype.get=Lo,Ge.prototype.has=Mo,Ge.prototype.set=Do;function dt(g){var x=-1,A=g==null?0:g.length;for(this.clear();++x<A;){var M=g[x];this.set(M[0],M[1])}}function Po(){this.size=0,this.__data__={hash:new Ue,map:new(Un||Ge),string:new Ue}}function Bo(g){var x=Ft(this,g).delete(g);return this.size-=x?1:0,x}function Fo(g){return Ft(this,g).get(g)}function qo(g){return Ft(this,g).has(g)}function Uo(g,x){var A=Ft(this,g),M=A.size;return A.set(g,x),this.size+=A.size==M?0:1,this}dt.prototype.clear=Po,dt.prototype.delete=Bo,dt.prototype.get=Fo,dt.prototype.has=qo,dt.prototype.set=Uo;function dr(g){var x=-1,A=g==null?0:g.length;for(this.__data__=new dt;++x<A;)this.add(g[x])}function Vi(g){return this.__data__.set(g,r),this}function fr(g){return this.__data__.has(g)}dr.prototype.add=dr.prototype.push=Vi,dr.prototype.has=fr;function Xt(g){var x=this.__data__=new Ge(g);this.size=x.size}function Jr(){this.__data__=new Ge,this.size=0}function $o(g){var x=this.__data__,A=x.delete(g);return this.size=x.size,A}function zo(g){return this.__data__.get(g)}function jo(g){return this.__data__.has(g)}function Ho(g,x){var A=this.__data__;if(A instanceof Ge){var M=A.__data__;if(!Un||M.length<n-1)return M.push([g,x]),this.size=++A.size,this;A=this.__data__=new dt(M)}return A.set(g,x),this.size=A.size,this}Xt.prototype.clear=Jr,Xt.prototype.delete=$o,Xt.prototype.get=zo,Xt.prototype.has=jo,Xt.prototype.set=Ho;function Go(g,x){var A=pr(g),M=!A&&Ji(g),le=!A&&!M&&gr(g),ne=!A&&!M&&!le&&ns(g),xe=A||M||le||ne,ye=xe?ie(g.length,String):[],Le=ye.length;for(var Ee in g)te.call(g,Ee)&&!(xe&&(Ee=="length"||le&&(Ee=="offset"||Ee=="parent")||ne&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||Jo(Ee,Le)))&&ye.push(Ee);return ye}function hr(g,x){for(var A=g.length;A--;)if(Qi(g[A][0],x))return A;return-1}function ei(g,x,A){var M=x(g);return pr(g)?M:pe(M,A(g))}function $n(g){return g==null?g===void 0?G:y:Bt&&Bt in Object(g)?pn(g):Xi(g)}function Yi(g){return Jt(g)&&$n(g)==a}function Zi(g,x,A,M,le){return g===x?!0:g==null||x==null||!Jt(g)&&!Jt(x)?g!==g&&x!==x:Ko(g,x,A,M,Zi,le)}function Ko(g,x,A,M,le,ne){var xe=pr(g),ye=pr(x),Le=xe?l:Qt(g),Ee=ye?l:Qt(x);Le=Le==a?_:Le,Ee=Ee==a?_:Ee;var Ke=Le==_,ft=Ee==_,De=Le==Ee;if(De&&gr(g)){if(!gr(x))return!1;xe=!0,Ke=!1}if(De&&!Ke)return ne||(ne=new Xt),xe||ns(g)?ti(g,x,A,M,le,ne):Zo(g,x,Le,A,M,le,ne);if(!(A&i)){var We=Ke&&te.call(g,"__wrapped__"),$e=ft&&te.call(x,"__wrapped__");if(We||$e){var Nn=We?g.value():g,gn=$e?x.value():x;return ne||(ne=new Xt),le(Nn,gn,A,M,ne)}}return De?(ne||(ne=new Xt),Xo(g,x,A,M,le,ne)):!1}function Wo(g){if(!ts(g)||ta(g))return!1;var x=es(g)?tt:k;return x.test(nt(g))}function Vo(g){return Jt(g)&&ri(g.length)&&!!se[$n(g)]}function Yo(g){if(!na(g))return qn(g);var x=[];for(var A in Object(g))te.call(g,A)&&A!="constructor"&&x.push(A);return x}function ti(g,x,A,M,le,ne){var xe=A&i,ye=g.length,Le=x.length;if(ye!=Le&&!(xe&&Le>ye))return!1;var Ee=ne.get(g);if(Ee&&ne.get(x))return Ee==x;var Ke=-1,ft=!0,De=A&s?new dr:void 0;for(ne.set(g,x),ne.set(x,g);++Ke<ye;){var We=g[Ke],$e=x[Ke];if(M)var Nn=xe?M($e,We,Ke,x,g,ne):M(We,$e,Ke,g,x,ne);if(Nn!==void 0){if(Nn)continue;ft=!1;break}if(De){if(!je(x,function(gn,jn){if(!ve(De,jn)&&(We===gn||le(We,gn,A,M,ne)))return De.push(jn)})){ft=!1;break}}else if(!(We===$e||le(We,$e,A,M,ne))){ft=!1;break}}return ne.delete(g),ne.delete(x),ft}function Zo(g,x,A,M,le,ne,xe){switch(A){case B:if(g.byteLength!=x.byteLength||g.byteOffset!=x.byteOffset)return!1;g=g.buffer,x=x.buffer;case j:return!(g.byteLength!=x.byteLength||!ne(new Be(g),new Be(x)));case u:case d:case b:return Qi(+g,+x);case h:return g.name==x.name&&g.message==x.message;case C:case P:return g==x+"";case m:var ye=Dt;case N:var Le=M&i;if(ye||(ye=He),g.size!=x.size&&!Le)return!1;var Ee=xe.get(g);if(Ee)return Ee==x;M|=s,xe.set(g,x);var Ke=ti(ye(g),ye(x),M,le,ne,xe);return xe.delete(g),Ke;case U:if(Qr)return Qr.call(g)==Qr.call(x)}return!1}function Xo(g,x,A,M,le,ne){var xe=A&i,ye=zn(g),Le=ye.length,Ee=zn(x),Ke=Ee.length;if(Le!=Ke&&!xe)return!1;for(var ft=Le;ft--;){var De=ye[ft];if(!(xe?De in x:te.call(x,De)))return!1}var We=ne.get(g);if(We&&ne.get(x))return We==x;var $e=!0;ne.set(g,x),ne.set(x,g);for(var Nn=xe;++ft<Le;){De=ye[ft];var gn=g[De],jn=x[De];if(M)var Lc=xe?M(jn,gn,De,x,g,ne):M(gn,jn,De,g,x,ne);if(!(Lc===void 0?gn===jn||le(gn,jn,A,M,ne):Lc)){$e=!1;break}Nn||(Nn=De=="constructor")}if($e&&!Nn){var rs=g.constructor,is=x.constructor;rs!=is&&"constructor"in g&&"constructor"in x&&!(typeof rs=="function"&&rs instanceof rs&&typeof is=="function"&&is instanceof is)&&($e=!1)}return ne.delete(g),ne.delete(x),$e}function zn(g){return ei(g,ii,Qo)}function Ft(g,x){var A=g.__data__;return ea(x)?A[typeof x=="string"?"string":"hash"]:A.map}function hn(g,x){var A=me(g,x);return Wo(A)?A:void 0}function pn(g){var x=te.call(g,Bt),A=g[Bt];try{g[Bt]=void 0;var M=!0}catch{}var le=ut.call(g);return M&&(x?g[Bt]=A:delete g[Bt]),le}var Qo=ur?function(g){return g==null?[]:(g=Object(g),Re(ur(g),function(x){return yt.call(g,x)}))}:ia,Qt=$n;(Vr&&Qt(new Vr(new ArrayBuffer(1)))!=B||Un&&Qt(new Un)!=m||Yr&&Qt(Yr.resolve())!=v||Zr&&Qt(new Zr)!=N||Xr&&Qt(new Xr)!=O)&&(Qt=function(g){var x=$n(g),A=x==_?g.constructor:void 0,M=A?nt(A):"";if(M)switch(M){case Ki:return B;case fn:return m;case vo:return v;case ko:return N;case No:return O}return x});function Jo(g,x){return x=x??o,!!x&&(typeof g=="number"||he.test(g))&&g>-1&&g%1==0&&g<x}function ea(g){var x=typeof g;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?g!=="__proto__":g===null}function ta(g){return!!Ae&&Ae in g}function na(g){var x=g&&g.constructor,A=typeof x=="function"&&x.prototype||R;return g===A}function Xi(g){return ut.call(g)}function nt(g){if(g!=null){try{return W.call(g)}catch{}try{return g+""}catch{}}return""}function Qi(g,x){return g===x||g!==g&&x!==x}var Ji=Yi(function(){return arguments}())?Yi:function(g){return Jt(g)&&te.call(g,"callee")&&!yt.call(g,"callee")},pr=Array.isArray;function ni(g){return g!=null&&ri(g.length)&&!es(g)}var gr=Wr||sa;function ra(g,x){return Zi(g,x)}function es(g){if(!ts(g))return!1;var x=$n(g);return x==f||x==p||x==c||x==T}function ri(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=o}function ts(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Jt(g){return g!=null&&typeof g=="object"}var ns=vt?Mt(vt):Vo;function ii(g){return ni(g)?Go(g):Yo(g)}function ia(){return[]}function sa(){return!1}e.exports=ra})(js,js.exports);var ig=js.exports,pc={};Object.defineProperty(pc,"__esModule",{value:!0});const rO=rg,iO=ig;var gl;(function(e){function t(s={},o={},a=!1){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});let l=rO(o);a||(l=Object.keys(l).reduce((c,u)=>(l[u]!=null&&(c[u]=l[u]),c),{}));for(const c in s)s[c]!==void 0&&o[c]===void 0&&(l[c]=s[c]);return Object.keys(l).length>0?l:void 0}e.compose=t;function n(s={},o={}){typeof s!="object"&&(s={}),typeof o!="object"&&(o={});const a=Object.keys(s).concat(Object.keys(o)).reduce((l,c)=>(iO(s[c],o[c])||(l[c]=o[c]===void 0?null:o[c]),l),{});return Object.keys(a).length>0?a:void 0}e.diff=n;function r(s={},o={}){s=s||{};const a=Object.keys(o).reduce((l,c)=>(o[c]!==s[c]&&s[c]!==void 0&&(l[c]=o[c]),l),{});return Object.keys(s).reduce((l,c)=>(s[c]!==o[c]&&o[c]===void 0&&(l[c]=null),l),a)}e.invert=r;function i(s,o,a=!1){if(typeof s!="object")return o;if(typeof o!="object")return;if(!a)return o;const l=Object.keys(o).reduce((c,u)=>(s[u]===void 0&&(c[u]=o[u]),c),{});return Object.keys(l).length>0?l:void 0}e.transform=i})(gl||(gl={}));pc.default=gl;var fo={};Object.defineProperty(fo,"__esModule",{value:!0});var ml;(function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t})(ml||(ml={}));fo.default=ml;var gc={};Object.defineProperty(gc,"__esModule",{value:!0});const Od=fo;class sO{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=Od.default.length(n);if(t>=i-r?(t=i-r,this.index+=1,this.offset=0):this.offset+=t,typeof n.delete=="number")return{delete:t};{const s={};return n.attributes&&(s.attributes=n.attributes),typeof n.retain=="number"?s.retain=t:typeof n.retain=="object"&&n.retain!==null?s.retain=n.retain:typeof n.insert=="string"?s.insert=n.insert.substr(r,t):s.insert=n.insert,s}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Od.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const t=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=t,this.index=n,[r].concat(i)}}else return[]}}gc.default=sO;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=nO,r=rg,i=ig,s=pc;t.AttributeMap=s.default;const o=fo;t.Op=o.default;const a=gc;t.OpIterator=a.default;const l="\0",c=(d,h)=>{if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const f=Object.keys(d)[0];if(!f||f!==Object.keys(h)[0])throw new Error(`embed types not matched: ${f} != ${Object.keys(h)[0]}`);return[f,d[f],h[f]]};class u{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,f){this.handlers[h]=f}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const f=this.handlers[h];if(!f)throw new Error(`no handlers for embed type "${h}"`);return f}insert(h,f){const p={};return typeof h=="string"&&h.length===0?this:(p.insert=h,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,f){if(typeof h=="number"&&h<=0)return this;const p={retain:h};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(p.attributes=f),this.push(p)}push(h){let f=this.ops.length,p=this.ops[f-1];if(h=r(h),typeof p=="object"){if(typeof h.delete=="number"&&typeof p.delete=="number")return this.ops[f-1]={delete:p.delete+h.delete},this;if(typeof p.delete=="number"&&h.insert!=null&&(f-=1,p=this.ops[f-1],typeof p!="object"))return this.ops.unshift(h),this;if(i(h.attributes,p.attributes)){if(typeof h.insert=="string"&&typeof p.insert=="string")return this.ops[f-1]={insert:p.insert+h.insert},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof p.retain=="number")return this.ops[f-1]={retain:p.retain+h.retain},typeof h.attributes=="object"&&(this.ops[f-1].attributes=h.attributes),this}}return f===this.ops.length?this.ops.push(h):this.ops.splice(f,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const f=[],p=[];return this.forEach(m=>{(h(m)?f:p).push(m)}),[f,p]}reduce(h,f){return this.ops.reduce(h,f)}changeLength(){return this.reduce((h,f)=>f.insert?h+o.default.length(f):f.delete?h-f.delete:h,0)}length(){return this.reduce((h,f)=>h+o.default.length(f),0)}slice(h=0,f=1/0){const p=[],m=new a.default(this.ops);let b=0;for(;b<f&&m.hasNext();){let y;b<h?y=m.next(h-b):(y=m.next(f-b),p.push(y)),b+=o.default.length(y)}return new u(p)}compose(h){const f=new a.default(this.ops),p=new a.default(h.ops),m=[],b=p.peek();if(b!=null&&typeof b.retain=="number"&&b.attributes==null){let _=b.retain;for(;f.peekType()==="insert"&&f.peekLength()<=_;)_-=f.peekLength(),m.push(f.next());b.retain-_>0&&p.next(b.retain-_)}const y=new u(m);for(;f.hasNext()||p.hasNext();)if(p.peekType()==="insert")y.push(p.next());else if(f.peekType()==="delete")y.push(f.next());else{const _=Math.min(f.peekLength(),p.peekLength()),v=f.next(_),T=p.next(_);if(T.retain){const C={};if(typeof v.retain=="number")C.retain=typeof T.retain=="number"?_:T.retain;else if(typeof T.retain=="number")v.retain==null?C.insert=v.insert:C.retain=v.retain;else{const P=v.retain==null?"insert":"retain",[U,G,O]=c(v[P],T.retain),j=u.getHandler(U);C[P]={[U]:j.compose(G,O,P==="retain")}}const N=s.default.compose(v.attributes,T.attributes,typeof v.retain=="number");if(N&&(C.attributes=N),y.push(C),!p.hasNext()&&i(y.ops[y.ops.length-1],C)){const P=new u(f.rest());return y.concat(P).chop()}}else typeof T.delete=="number"&&(typeof v.retain=="number"||typeof v.retain=="object"&&v.retain!==null)&&y.push(T)}return y.chop()}concat(h){const f=new u(this.ops.slice());return h.ops.length>0&&(f.push(h.ops[0]),f.ops=f.ops.concat(h.ops.slice(1))),f}diff(h,f){if(this.ops===h.ops)return new u;const p=[this,h].map(v=>v.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:l;const C=v===h?"on":"with";throw new Error("diff() called "+C+" non-document")}).join("")),m=new u,b=n(p[0],p[1],f,!0),y=new a.default(this.ops),_=new a.default(h.ops);return b.forEach(v=>{let T=v[1].length;for(;T>0;){let C=0;switch(v[0]){case n.INSERT:C=Math.min(_.peekLength(),T),m.push(_.next(C));break;case n.DELETE:C=Math.min(T,y.peekLength()),y.next(C),m.delete(C);break;case n.EQUAL:C=Math.min(y.peekLength(),_.peekLength(),T);const N=y.next(C),P=_.next(C);i(N.insert,P.insert)?m.retain(C,s.default.diff(N.attributes,P.attributes)):m.push(P).delete(C);break}T-=C}}),m.chop()}eachLine(h,f=`
36
36
  `){const p=new a.default(this.ops);let m=new u,b=0;for(;p.hasNext();){if(p.peekType()!=="insert")return;const y=p.peek(),_=o.default.length(y)-p.peekLength(),v=typeof y.insert=="string"?y.insert.indexOf(f,_)-_:-1;if(v<0)m.push(p.next());else if(v>0)m.push(p.next(v));else{if(h(m,p.next(1).attributes||{},b)===!1)return;b+=1,m=new u}}m.length()>0&&h(m,{},b)}invert(h){const f=new u;return this.reduce((p,m)=>{if(m.insert)f.delete(o.default.length(m));else{if(typeof m.retain=="number"&&m.attributes==null)return f.retain(m.retain),p+m.retain;if(m.delete||typeof m.retain=="number"){const b=m.delete||m.retain;return h.slice(p,p+b).forEach(_=>{m.delete?f.push(_):m.retain&&m.attributes&&f.retain(o.default.length(_),s.default.invert(m.attributes,_.attributes))}),p+b}else if(typeof m.retain=="object"&&m.retain!==null){const b=h.slice(p,p+1),y=new a.default(b.ops).next(),[_,v,T]=c(m.retain,y.insert),C=u.getHandler(_);return f.retain({[_]:C.invert(v,T)},s.default.invert(m.attributes,y.attributes)),p+1}}return p},0),f.chop()}transform(h,f=!1){if(f=!!f,typeof h=="number")return this.transformPosition(h,f);const p=h,m=new a.default(this.ops),b=new a.default(p.ops),y=new u;for(;m.hasNext()||b.hasNext();)if(m.peekType()==="insert"&&(f||b.peekType()!=="insert"))y.retain(o.default.length(m.next()));else if(b.peekType()==="insert")y.push(b.next());else{const _=Math.min(m.peekLength(),b.peekLength()),v=m.next(_),T=b.next(_);if(v.delete)continue;if(T.delete)y.push(T);else{const C=v.retain,N=T.retain;let P=typeof N=="object"&&N!==null?N:_;if(typeof C=="object"&&C!==null&&typeof N=="object"&&N!==null){const U=Object.keys(C)[0];if(U===Object.keys(N)[0]){const G=u.getHandler(U);G&&(P={[U]:G.transform(C[U],N[U],f)})}}y.retain(P,s.default.transform(v.attributes,T.attributes,f))}}return y.chop()}transformPosition(h,f=!1){f=!!f;const p=new a.default(this.ops);let m=0;for(;p.hasNext()&&m<=h;){const b=p.peekLength(),y=p.peekType();if(p.next(),y==="delete"){h-=Math.min(b,h-m);continue}else y==="insert"&&(m<h||!f)&&(h+=b);m+=b}return h}}u.Op=o.default,u.OpIterator=a.default,u.AttributeMap=s.default,u.handlers={},t.default=u,e.exports=u,e.exports.default=u})(pl,pl.exports);var Rt=pl.exports;const J=Mi(Rt);class Vt extends _t{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Vt.blotName="break";Vt.tagName="BR";let Kt=class extends $s{};const oO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ho(e){return e.replace(/[&<>"']/g,t=>oO[t])}const sn=class sn extends uc{static compare(t,n){const r=sn.order.indexOf(t),i=sn.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}formatAt(t,n,r,i){if(sn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,ee.BLOT)){const s=this.isolate(t,n);i&&s.wrap(r,i)}else super.formatAt(t,n,r,i)}optimize(t){if(super.optimize(t),this.parent instanceof sn&&sn.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};V(sn,"allowedChildren",[sn,Vt,_t,Kt]),V(sn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let cn=sn;const Id=1;class ze extends Ti{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=sg(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,s){r<=0||(this.scroll.query(i,ee.BLOCK)?n+r===this.length()&&this.format(i,s):super.formatAt(n,Math.min(r,this.length()-n-1),i,s),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const s=r.split(`
37
37
  `),o=s.shift();o.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),n+o.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof Vt&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Id),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-Id)){const s=this.clone();return n===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const i=super.split(n,r);return this.cache={},i}}ze.blotName="block";ze.tagName="P";ze.defaultChild=Vt;ze.allowedChildren=[Vt,cn,_t,Kt];class Ot extends _t{attach(){super.attach(),this.attributes=new ao(this.domNode)}delta(){return new J().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,n){const r=this.scroll.query(t,ee.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(t,n,r,i){this.format(r,i)}insertAt(t,n,r){if(r!=null){super.insertAt(t,n,r);return}const i=n.split(`
38
38
  `),s=i.pop(),o=i.map(l=>{const c=this.scroll.create(ze.blotName);return c.insertAt(0,l),c}),a=this.split(t);o.forEach(l=>{this.parent.insertBefore(l,a)}),s&&this.parent.insertBefore(this.scroll.create("text",s),a)}}Ot.scope=ee.BLOCK_BLOT;function sg(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(Ve).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),Tt(r,{},t)),new J).insert(`
39
- `,Tt(e))}function Tt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||("formats"in e&&typeof e.formats=="function"&&(t={...t,...e.formats()},n&&delete t["code-token"]),e.parent==null||e.parent.statics.blotName==="scroll"||e.parent.statics.scope!==e.statics.scope)?t:Tt(e.parent,t,n)}const At=class At extends _t{static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(At.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==ee.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=At.CONTENTS.length,r.optimize(),r.formatAt(i,At.CONTENTS.length,t,n),this.savedLength=0)}index(t,n){return t===this.textNode?0:super.index(t,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof Kt?this.prev:null,r=n?n.length():0,i=this.next instanceof Kt?this.next:null,s=i?i.text:"",{textNode:o}=this,a=o.data.split(At.CONTENTS).join("");o.data=At.CONTENTS;let l;if(n)l=n,(a||i)&&(n.insertAt(n.length(),a+s),i&&i.remove());else if(i)l=i,i.insertAt(0,a);else{const c=document.createTextNode(a);l=this.scroll.create(c),this.parent.insertBefore(l,this)}if(this.remove(),t){const c=(h,f)=>n&&h===n.domNode?f:h===o?r+f-1:i&&h===i.domNode?r+a.length+f:null,u=c(t.start.node,t.start.offset),d=c(t.end.node,t.end.offset);if(u!==null&&d!==null)return{startNode:l.domNode,startOffset:u,endNode:l.domNode,endOffset:d}}return null}update(t,n){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(n.range=r)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=At.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};V(At,"blotName","cursor"),V(At,"className","ql-cursor"),V(At,"tagName","span"),V(At,"CONTENTS","\uFEFF");let Pr=At;var og={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function s(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,d||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,f=d.length,p=new Array(f);h<f;h++)p[h]=d[h].fn;return p},a.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},a.prototype.emit=function(c,u,d,h,f,p){var m=n?n+c:c;if(!this._events[m])return!1;var b=this._events[m],y=arguments.length,_,v;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),y){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,d),!0;case 4:return b.fn.call(b.context,u,d,h),!0;case 5:return b.fn.call(b.context,u,d,h,f),!0;case 6:return b.fn.call(b.context,u,d,h,f,p),!0}for(v=1,_=new Array(y-1);v<y;v++)_[v-1]=arguments[v];b.fn.apply(b.context,_)}else{var T=b.length,C;for(v=0;v<T;v++)switch(b[v].once&&this.removeListener(c,b[v].fn,void 0,!0),y){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,u);break;case 3:b[v].fn.call(b[v].context,u,d);break;case 4:b[v].fn.call(b[v].context,u,d,h);break;default:if(!_)for(C=1,_=new Array(y-1);C<y;C++)_[C-1]=arguments[C];b[v].fn.apply(b[v].context,_)}}return!0},a.prototype.on=function(c,u,d){return s(this,c,u,d,!1)},a.prototype.once=function(c,u,d){return s(this,c,u,d,!0)},a.prototype.removeListener=function(c,u,d,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===u&&(!h||p.once)&&(!d||p.context===d)&&o(this,f);else{for(var m=0,b=[],y=p.length;m<y;m++)(p[m].fn!==u||h&&!p[m].once||d&&p[m].context!==d)&&b.push(p[m]);b.length?this._events[f]=b.length===1?b[0]:b:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(og);var aO=og.exports;const lO=Mi(aO),bl=new WeakMap,yl=["error","warn","log","info"];let El="warn";function ag(e){if(El&&yl.indexOf(e)<=yl.indexOf(El)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function vn(e){return yl.reduce((t,n)=>(t[n]=ag.bind(console,n,e),t),{})}vn.level=e=>{El=e};ag.level=vn.level;const Ca=vn("quill:events"),cO=["selectionchange","mousedown","mouseup","click"];cO.forEach(e=>{document.addEventListener(e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const s=bl.get(i);s&&s.emitter&&s.emitter.handleDOM(...n)})})});class Z extends lO{constructor(){super(),this.domListeners={},this.on("error",Ca.error)}emit(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ca.log.call(Ca,...n),super.emit(...n)}handleDOM(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(this.domListeners[t.type]||[]).forEach(s=>{let{node:o,handler:a}=s;(t.target===o||o.contains(t.target))&&a(t,...r)})}listenDOM(t,n,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:n,handler:r})}}V(Z,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(Z,"sources",{API:"api",SILENT:"silent",USER:"user"});const Oa=vn("quill:selection");class Qn{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=n}}class uO{constructor(t,n){this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Qn(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Z.sources.USER),1)}),this.emitter.on(Z.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Z.events.SCROLL_UPDATE,(i,s)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const o=s.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?Z.sources.SILENT:i)}catch{}})}),this.emitter.on(Z.events.SCROLL_OPTIMIZE,(r,i)=>{if(i.range){const{startNode:s,startOffset:o,endNode:a,endOffset:l}=i.range;this.setNativeRange(s,o,a,l),this.update(Z.sources.SILENT)}}),this.update(Z.sources.SILENT)}handleComposition(){this.emitter.on(Z.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Z.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Z.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,n){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(t,ee.BLOCK))){if(r.start.node!==this.cursor.textNode){const i=this.scroll.find(r.start.node,!1);if(i==null)return;if(i instanceof Ve){const s=i.split(r.start.offset);i.parent.insertBefore(this.cursor,s)}else i.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;let i,[s,o]=this.scroll.leaf(t);if(s==null)return null;if(n>0&&o===s.length()){const[u]=this.scroll.leaf(t+1);if(u){const[d]=this.scroll.line(t),[h]=this.scroll.line(t+1);d===h&&(s=u,o=0)}}[i,o]=s.position(o,!0);const a=document.createRange();if(n>0)return a.setStart(i,o),[s,o]=this.scroll.leaf(t+n),s==null?null:([i,o]=s.position(o,!0),a.setEnd(i,o),a.getBoundingClientRect());let l="left",c;if(i instanceof Text){if(!i.data.length)return null;o<i.data.length?(a.setStart(i,o),a.setEnd(i,o+1)):(a.setStart(i,o-1),a.setEnd(i,o),l="right"),c=a.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;c=s.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:c.top+c.height,height:c.height,left:c[l],right:c[l],top:c.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const n=t.getRangeAt(0);if(n==null)return null;const r=this.normalizeNative(n);return Oa.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const n=this.getNativeRange();return n==null?[null,null]:[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Ia(this.root,document.activeElement)}normalizedToRange(t){const n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);const r=n.map(o=>{const[a,l]=o,c=this.scroll.find(a,!0),u=c.offset(this.scroll);return l===0?u:c instanceof Ve?u+c.index(a,l):u+c.length()}),i=Math.min(Math.max(...r),this.scroll.length()-1),s=Math.min(i,...r);return new Qn(s,i-s)}normalizeNative(t){if(!Ia(this.root,t.startContainer)||!t.collapsed&&!Ia(this.root,t.endContainer))return null;const n={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[n.start,n.end].forEach(r=>{let{node:i,offset:s}=r;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>s)i=i.childNodes[s],s=0;else if(i.childNodes.length===s)i=i.lastChild,i instanceof Text?s=i.data.length:i.childNodes.length>0?s=i.childNodes.length:s=i.childNodes.length+1;else break;r.node=i,r.offset=s}),n}rangeToNative(t){const n=this.scroll.length(),r=(i,s)=>{i=Math.min(n-1,i);const[o,a]=this.scroll.leaf(i);return o?o.position(a,s):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Oa.info("setNativeRange",t,n,r,i),t!=null&&(this.root.parentNode==null||t.parentNode==null||r.parentNode==null))return;const o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||s||t!==a.startContainer||n!==a.startOffset||r!==a.endContainer||i!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(n=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&r.tagName==="BR"&&(i=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const l=document.createRange();l.setStart(t,n),l.setEnd(r,i),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Z.sources.API;if(typeof n=="string"&&(r=n,n=!1),Oa.info("setRange",t),t!=null){const i=this.rangeToNative(t);this.setNativeRange(...i,n)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z.sources.USER;const n=this.lastRange,[r,i]=this.getRange();if(this.lastRange=r,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!On(n,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const s=[Z.events.SELECTION_CHANGE,Tr(this.lastRange),Tr(n),t];this.emitter.emit(Z.events.EDITOR_CHANGE,...s),t!==Z.sources.SILENT&&this.emitter.emit(...s)}}}function Ia(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}const dO=/^[ -~]*$/;class fO{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=Rd(t),i=new J;return pO(r.ops.slice()).reduce((o,a)=>{const l=Rt.Op.length(a);let c=a.attributes||{},u=!1,d=!1;if(a.insert!=null){if(i.retain(l),typeof a.insert=="string"){const p=a.insert;d=!p.endsWith(`
39
+ `,Tt(e))}function Tt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||("formats"in e&&typeof e.formats=="function"&&(t={...t,...e.formats()},n&&delete t["code-token"]),e.parent==null||e.parent.statics.blotName==="scroll"||e.parent.statics.scope!==e.statics.scope)?t:Tt(e.parent,t,n)}const At=class At extends _t{static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(At.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==ee.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=At.CONTENTS.length,r.optimize(),r.formatAt(i,At.CONTENTS.length,t,n),this.savedLength=0)}index(t,n){return t===this.textNode?0:super.index(t,n)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const n=this.prev instanceof Kt?this.prev:null,r=n?n.length():0,i=this.next instanceof Kt?this.next:null,s=i?i.text:"",{textNode:o}=this,a=o.data.split(At.CONTENTS).join("");o.data=At.CONTENTS;let l;if(n)l=n,(a||i)&&(n.insertAt(n.length(),a+s),i&&i.remove());else if(i)l=i,i.insertAt(0,a);else{const c=document.createTextNode(a);l=this.scroll.create(c),this.parent.insertBefore(l,this)}if(this.remove(),t){const c=(h,f)=>n&&h===n.domNode?f:h===o?r+f-1:i&&h===i.domNode?r+a.length+f:null,u=c(t.start.node,t.start.offset),d=c(t.end.node,t.end.offset);if(u!==null&&d!==null)return{startNode:l.domNode,startOffset:u,endNode:l.domNode,endOffset:d}}return null}update(t,n){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(n.range=r)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName==="A"){this.savedLength=At.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return""}};V(At,"blotName","cursor"),V(At,"className","ql-cursor"),V(At,"tagName","span"),V(At,"CONTENTS","\uFEFF");let Pr=At;var og={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function s(l,c,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,d||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,f=d.length,p=new Array(f);h<f;h++)p[h]=d[h].fn;return p},a.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},a.prototype.emit=function(c,u,d,h,f,p){var m=n?n+c:c;if(!this._events[m])return!1;var b=this._events[m],y=arguments.length,_,v;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),y){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,d),!0;case 4:return b.fn.call(b.context,u,d,h),!0;case 5:return b.fn.call(b.context,u,d,h,f),!0;case 6:return b.fn.call(b.context,u,d,h,f,p),!0}for(v=1,_=new Array(y-1);v<y;v++)_[v-1]=arguments[v];b.fn.apply(b.context,_)}else{var T=b.length,C;for(v=0;v<T;v++)switch(b[v].once&&this.removeListener(c,b[v].fn,void 0,!0),y){case 1:b[v].fn.call(b[v].context);break;case 2:b[v].fn.call(b[v].context,u);break;case 3:b[v].fn.call(b[v].context,u,d);break;case 4:b[v].fn.call(b[v].context,u,d,h);break;default:if(!_)for(C=1,_=new Array(y-1);C<y;C++)_[C-1]=arguments[C];b[v].fn.apply(b[v].context,_)}}return!0},a.prototype.on=function(c,u,d){return s(this,c,u,d,!1)},a.prototype.once=function(c,u,d){return s(this,c,u,d,!0)},a.prototype.removeListener=function(c,u,d,h){var f=n?n+c:c;if(!this._events[f])return this;if(!u)return o(this,f),this;var p=this._events[f];if(p.fn)p.fn===u&&(!h||p.once)&&(!d||p.context===d)&&o(this,f);else{for(var m=0,b=[],y=p.length;m<y;m++)(p[m].fn!==u||h&&!p[m].once||d&&p[m].context!==d)&&b.push(p[m]);b.length?this._events[f]=b.length===1?b[0]:b:o(this,f)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a})(og);var aO=og.exports;const lO=Mi(aO),bl=new WeakMap,yl=["error","warn","log","info"];let xl="warn";function ag(e){if(xl&&yl.indexOf(e)<=yl.indexOf(xl)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function vn(e){return yl.reduce((t,n)=>(t[n]=ag.bind(console,n,e),t),{})}vn.level=e=>{xl=e};ag.level=vn.level;const Ca=vn("quill:events"),cO=["selectionchange","mousedown","mouseup","click"];cO.forEach(e=>{document.addEventListener(e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(i=>{const s=bl.get(i);s&&s.emitter&&s.emitter.handleDOM(...n)})})});class Z extends lO{constructor(){super(),this.domListeners={},this.on("error",Ca.error)}emit(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ca.log.call(Ca,...n),super.emit(...n)}handleDOM(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(this.domListeners[t.type]||[]).forEach(s=>{let{node:o,handler:a}=s;(t.target===o||o.contains(t.target))&&a(t,...r)})}listenDOM(t,n,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:n,handler:r})}}V(Z,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(Z,"sources",{API:"api",SILENT:"silent",USER:"user"});const Oa=vn("quill:selection");class Qn{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=n}}class uO{constructor(t,n){this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Qn(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Z.sources.USER),1)}),this.emitter.on(Z.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Z.events.SCROLL_UPDATE,(i,s)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const o=s.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?Z.sources.SILENT:i)}catch{}})}),this.emitter.on(Z.events.SCROLL_OPTIMIZE,(r,i)=>{if(i.range){const{startNode:s,startOffset:o,endNode:a,endOffset:l}=i.range;this.setNativeRange(s,o,a,l),this.update(Z.sources.SILENT)}}),this.update(Z.sources.SILENT)}handleComposition(){this.emitter.on(Z.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Z.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Z.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,n){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(t,ee.BLOCK))){if(r.start.node!==this.cursor.textNode){const i=this.scroll.find(r.start.node,!1);if(i==null)return;if(i instanceof Ve){const s=i.split(r.start.offset);i.parent.insertBefore(this.cursor,s)}else i.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,n),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;let i,[s,o]=this.scroll.leaf(t);if(s==null)return null;if(n>0&&o===s.length()){const[u]=this.scroll.leaf(t+1);if(u){const[d]=this.scroll.line(t),[h]=this.scroll.line(t+1);d===h&&(s=u,o=0)}}[i,o]=s.position(o,!0);const a=document.createRange();if(n>0)return a.setStart(i,o),[s,o]=this.scroll.leaf(t+n),s==null?null:([i,o]=s.position(o,!0),a.setEnd(i,o),a.getBoundingClientRect());let l="left",c;if(i instanceof Text){if(!i.data.length)return null;o<i.data.length?(a.setStart(i,o),a.setEnd(i,o+1)):(a.setStart(i,o-1),a.setEnd(i,o),l="right"),c=a.getBoundingClientRect()}else{if(!(s.domNode instanceof Element))return null;c=s.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:c.top+c.height,height:c.height,left:c[l],right:c[l],top:c.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const n=t.getRangeAt(0);if(n==null)return null;const r=this.normalizeNative(n);return Oa.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const n=this.getNativeRange();return n==null?[null,null]:[this.normalizedToRange(n),n]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Ia(this.root,document.activeElement)}normalizedToRange(t){const n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);const r=n.map(o=>{const[a,l]=o,c=this.scroll.find(a,!0),u=c.offset(this.scroll);return l===0?u:c instanceof Ve?u+c.index(a,l):u+c.length()}),i=Math.min(Math.max(...r),this.scroll.length()-1),s=Math.min(i,...r);return new Qn(s,i-s)}normalizeNative(t){if(!Ia(this.root,t.startContainer)||!t.collapsed&&!Ia(this.root,t.endContainer))return null;const n={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[n.start,n.end].forEach(r=>{let{node:i,offset:s}=r;for(;!(i instanceof Text)&&i.childNodes.length>0;)if(i.childNodes.length>s)i=i.childNodes[s],s=0;else if(i.childNodes.length===s)i=i.lastChild,i instanceof Text?s=i.data.length:i.childNodes.length>0?s=i.childNodes.length:s=i.childNodes.length+1;else break;r.node=i,r.offset=s}),n}rangeToNative(t){const n=this.scroll.length(),r=(i,s)=>{i=Math.min(n-1,i);const[o,a]=this.scroll.leaf(i);return o?o.position(a,s):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Oa.info("setNativeRange",t,n,r,i),t!=null&&(this.root.parentNode==null||t.parentNode==null||r.parentNode==null))return;const o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||s||t!==a.startContainer||n!==a.startOffset||r!==a.endContainer||i!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(n=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&r.tagName==="BR"&&(i=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const l=document.createRange();l.setStart(t,n),l.setEnd(r,i),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Z.sources.API;if(typeof n=="string"&&(r=n,n=!1),Oa.info("setRange",t),t!=null){const i=this.rangeToNative(t);this.setNativeRange(...i,n)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z.sources.USER;const n=this.lastRange,[r,i]=this.getRange();if(this.lastRange=r,this.lastNative=i,this.lastRange!=null&&(this.savedRange=this.lastRange),!On(n,this.lastRange)){if(!this.composing&&i!=null&&i.native.collapsed&&i.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const s=[Z.events.SELECTION_CHANGE,Tr(this.lastRange),Tr(n),t];this.emitter.emit(Z.events.EDITOR_CHANGE,...s),t!==Z.sources.SILENT&&this.emitter.emit(...s)}}}function Ia(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}const dO=/^[ -~]*$/;class fO{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let n=this.scroll.length();this.scroll.batchStart();const r=Rd(t),i=new J;return pO(r.ops.slice()).reduce((o,a)=>{const l=Rt.Op.length(a);let c=a.attributes||{},u=!1,d=!1;if(a.insert!=null){if(i.retain(l),typeof a.insert=="string"){const p=a.insert;d=!p.endsWith(`
40
40
  `)&&(n<=o||!!this.scroll.descendant(Ot,o)[0]),this.scroll.insertAt(o,p);const[m,b]=this.scroll.line(o);let y=Mn({},Tt(m));if(m instanceof ze){const[_]=m.descendant(Ve,b);_&&(y=Mn(y,Tt(_)))}c=Rt.AttributeMap.diff(y,c)||{}}else if(typeof a.insert=="object"){const p=Object.keys(a.insert)[0];if(p==null)return o;const m=this.scroll.query(p,ee.INLINE)!=null;if(m)(n<=o||this.scroll.descendant(Ot,o)[0])&&(d=!0);else if(o>0){const[b,y]=this.scroll.descendant(Ve,o-1);b instanceof Kt?b.value()[y]!==`
41
41
  `&&(u=!0):b instanceof _t&&b.statics.scope===ee.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(o,p,a.insert[p]),m){const[b]=this.scroll.descendant(Ve,o);if(b){const y=Mn({},Tt(b));c=Rt.AttributeMap.diff(y,c)||{}}}}n+=l}else if(i.push(a),a.retain!==null&&typeof a.retain=="object"){const p=Object.keys(a.retain)[0];if(p==null)return o;this.scroll.updateEmbedAt(o,p,a.retain[p])}Object.keys(c).forEach(p=>{this.scroll.formatAt(o,l,p,c[p])});const h=u?1:0,f=d?1:0;return n+=h+f,i.retain(h),i.delete(f),o+l+h+f},0),i.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+Rt.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,n){return this.scroll.deleteAt(t,n),this.update(new J().retain(t).delete(n))}formatLine(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(s=>{this.scroll.lines(t,Math.max(n,1)).forEach(o=>{o.format(s,r[s])})}),this.scroll.optimize();const i=new J().retain(t).retain(n,Tr(r));return this.update(i)}formatText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(s=>{this.scroll.formatAt(t,n,s,r[s])});const i=new J().retain(t).retain(n,Tr(r));return this.update(i)}getContents(t,n){return this.delta.slice(t,t+n)}getDelta(){return this.scroll.lines().reduce((t,n)=>t.concat(n.delta()),new J)}getFormat(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],i=[];n===0?this.scroll.path(t).forEach(a=>{const[l]=a;l instanceof ze?r.push(l):l instanceof Ve&&i.push(l)}):(r=this.scroll.lines(t,n),i=this.scroll.descendants(Ve,t,n));const[s,o]=[r,i].map(a=>{const l=a.shift();if(l==null)return{};let c=Tt(l);for(;Object.keys(c).length>0;){const u=a.shift();if(u==null)return c;c=hO(Tt(u),c)}return c});return{...s,...o}}getHTML(t,n){const[r,i]=this.scroll.line(t);if(r){const s=r.length();return r.length()>=i+n&&!(i===0&&n===s)?Oi(r,i,n,!0):Oi(this.scroll,t,n,!0)}return""}getText(t,n){return this.getContents(t,n).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,n){const r=Rd(n),i=new J().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(i)}insertEmbed(t,n,r){return this.scroll.insertAt(t,n,r),this.update(new J().retain(t).insert({[n]:r}))}insertText(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n=n.replace(/\r\n/g,`
42
42
  `).replace(/\r/g,`
@@ -45,22 +45,22 @@ https://github.com/highlightjs/highlight.js/issues/2277`),w=I,K=q),F===void 0&&(
45
45
  `).replace(/\r/g,`
46
46
  `);return t.insert(r,n.attributes)}return t.push(n)},new J)}function Ld(e,t){let{index:n,length:r}=e;return new Qn(n+t,r)}function pO(e){const t=[];return e.forEach(n=>{typeof n.insert=="string"?n.insert.split(`
47
47
  `).forEach((i,s)=>{s&&t.push({insert:`
48
- `,attributes:n.attributes}),i&&t.push({insert:i,attributes:n.attributes})}):t.push(n)}),t}class Yt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=n}}V(Yt,"DEFAULTS",{});const ms="\uFEFF";class mc extends _t{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(ms),this.rightGuard=document.createTextNode(ms),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n=null,r;const i=t.data.split(ms).join("");if(t===this.leftGuard)if(this.prev instanceof Kt){const s=this.prev.length();this.prev.insertAt(s,i),n={startNode:this.prev.domNode,startOffset:s+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof Kt?(this.next.insertAt(0,i),n={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:i.length}));return t.data=ms,n}update(t,n){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(n.range=i)}})}}class gO{constructor(t,n){V(this,"isComposing",!1);this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;n&&!(n instanceof mc)&&(this.emitter.emit(Z.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Z.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Z.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Z.events.COMPOSITION_END,t),this.isComposing=!1}}const Ei=class Ei{constructor(t,n){V(this,"modules",{});this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}};V(Ei,"DEFAULTS",{modules:{}}),V(Ei,"themes",{default:Ei});let Br=Ei;const mO=e=>e.parentElement||e.getRootNode().host||null,bO=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},bs=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Md=(e,t,n,r,i,s)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+s:0,yO=(e,t)=>{var s,o,a;const n=e.ownerDocument;let r=t,i=e;for(;i;){const l=i===n.body,c=l?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??n.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??n.documentElement.clientHeight,left:0}:bO(i),u=getComputedStyle(i),d=Md(r.left,r.right,c.left,c.right,bs(u.scrollPaddingLeft),bs(u.scrollPaddingRight)),h=Md(r.top,r.bottom,c.top,c.bottom,bs(u.scrollPaddingTop),bs(u.scrollPaddingBottom));if(d||h)if(l)(a=n.defaultView)==null||a.scrollBy(d,h);else{const{scrollLeft:f,scrollTop:p}=i;h&&(i.scrollTop+=h),d&&(i.scrollLeft+=d);const m=i.scrollLeft-f,b=i.scrollTop-p;r={left:r.left-m,top:r.top-b,right:r.right-m,bottom:r.bottom-b}}i=l||u.position==="fixed"?null:mO(i)}},EO=100,xO=["block","break","cursor","inline","scroll","text"],wO=(e,t,n)=>{const r=new Dr;return xO.forEach(i=>{const s=t.query(i);s&&r.register(s)}),e.forEach(i=>{let s=t.query(i);s||n.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,o+=1,o>EO){n.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),r},Or=vn("quill"),ys=new Dr;Gt.uiClass="ql-ui";const $t=class $t{static debug(t){t===!0&&(t="log"),vn.level(t)}static find(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return bl.get(t)||ys.find(t,n)}static import(t){return this.imports[t]==null&&Or.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,n):Object.keys(t).forEach(i=>{this.register(i,t[i],n)})}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&Or.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&ys.register(n),typeof n.register=="function"&&n.register(ys)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=_O(t,n),this.container=this.options.container,this.container==null){Or.error("Invalid Quill container",t);return}this.options.debug&&$t.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",bl.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Z;const i=dc.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new fO(this.scroll),this.selection=new uO(this.scroll,this.emitter),this.composition=new gO(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Z.events.EDITOR_CHANGE,o=>{o===Z.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Z.events.SCROLL_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;qt.call(this,()=>this.editor.update(null,a,u),o)}),this.emitter.on(Z.events.SCROLL_EMBED_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;qt.call(this,()=>{const d=new J().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(d,[],u)},$t.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
48
+ `,attributes:n.attributes}),i&&t.push({insert:i,attributes:n.attributes})}):t.push(n)}),t}class Yt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=n}}V(Yt,"DEFAULTS",{});const ms="\uFEFF";class mc extends _t{constructor(t,n){super(t,n),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(ms),this.rightGuard=document.createTextNode(ms),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,n)}restore(t){let n=null,r;const i=t.data.split(ms).join("");if(t===this.leftGuard)if(this.prev instanceof Kt){const s=this.prev.length();this.prev.insertAt(s,i),n={startNode:this.prev.domNode,startOffset:s+i.length}}else r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this),n={startNode:r,startOffset:i.length};else t===this.rightGuard&&(this.next instanceof Kt?(this.next.insertAt(0,i),n={startNode:this.next.domNode,startOffset:i.length}):(r=document.createTextNode(i),this.parent.insertBefore(this.scroll.create(r),this.next),n={startNode:r,startOffset:i.length}));return t.data=ms,n}update(t,n){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const i=this.restore(r.target);i&&(n.range=i)}})}}class gO{constructor(t,n){V(this,"isComposing",!1);this.scroll=t,this.emitter=n,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const n=t.target instanceof Node?this.scroll.find(t.target,!0):null;n&&!(n instanceof mc)&&(this.emitter.emit(Z.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Z.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Z.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Z.events.COMPOSITION_END,t),this.isComposing=!1}}const xi=class xi{constructor(t,n){V(this,"modules",{});this.quill=t,this.options=n}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const n=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new n(this.quill,this.options.modules[t]||{}),this.modules[t]}};V(xi,"DEFAULTS",{modules:{}}),V(xi,"themes",{default:xi});let Br=xi;const mO=e=>e.parentElement||e.getRootNode().host||null,bO=e=>{const t=e.getBoundingClientRect(),n="offsetWidth"in e&&Math.abs(t.width)/e.offsetWidth||1,r="offsetHeight"in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},bs=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:t},Md=(e,t,n,r,i,s)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+s:0,yO=(e,t)=>{var s,o,a;const n=e.ownerDocument;let r=t,i=e;for(;i;){const l=i===n.body,c=l?{top:0,right:((s=window.visualViewport)==null?void 0:s.width)??n.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??n.documentElement.clientHeight,left:0}:bO(i),u=getComputedStyle(i),d=Md(r.left,r.right,c.left,c.right,bs(u.scrollPaddingLeft),bs(u.scrollPaddingRight)),h=Md(r.top,r.bottom,c.top,c.bottom,bs(u.scrollPaddingTop),bs(u.scrollPaddingBottom));if(d||h)if(l)(a=n.defaultView)==null||a.scrollBy(d,h);else{const{scrollLeft:f,scrollTop:p}=i;h&&(i.scrollTop+=h),d&&(i.scrollLeft+=d);const m=i.scrollLeft-f,b=i.scrollTop-p;r={left:r.left-m,top:r.top-b,right:r.right-m,bottom:r.bottom-b}}i=l||u.position==="fixed"?null:mO(i)}},xO=100,EO=["block","break","cursor","inline","scroll","text"],wO=(e,t,n)=>{const r=new Dr;return EO.forEach(i=>{const s=t.query(i);s&&r.register(s)}),e.forEach(i=>{let s=t.query(i);s||n.error(`Cannot register "${i}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;s;)if(r.register(s),s="blotName"in s?s.requiredContainer??null:null,o+=1,o>xO){n.error(`Cycle detected in registering blot requiredContainer: "${i}"`);break}}),r},Or=vn("quill"),ys=new Dr;Gt.uiClass="ql-ui";const $t=class $t{static debug(t){t===!0&&(t="log"),vn.level(t)}static find(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return bl.get(t)||ys.find(t,n)}static import(t){return this.imports[t]==null&&Or.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],n=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,n):Object.keys(t).forEach(i=>{this.register(i,t[i],n)})}else{const t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!r&&Or.warn(`Overwriting ${t} with`,n),this.imports[t]=n,(t.startsWith("blots/")||t.startsWith("formats/"))&&n&&typeof n!="boolean"&&n.blotName!=="abstract"&&ys.register(n),typeof n.register=="function"&&n.register(ys)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=_O(t,n),this.container=this.options.container,this.container==null){Or.error("Invalid Quill container",t);return}this.options.debug&&$t.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",bl.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Z;const i=dc.blotName,s=this.options.registry.query(i);if(!s||!("blotName"in s))throw new Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new s(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new fO(this.scroll),this.selection=new uO(this.scroll,this.emitter),this.composition=new gO(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Z.events.EDITOR_CHANGE,o=>{o===Z.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Z.events.SCROLL_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;qt.call(this,()=>this.editor.update(null,a,u),o)}),this.emitter.on(Z.events.SCROLL_EMBED_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),u=l&&c?{oldRange:l,newRange:c}:void 0;qt.call(this,()=>{const d=new J().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(d,[],u)},$t.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
49
49
  `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,n),t}blur(){this.selection.setRange(null)}deleteText(t,n,r){return[t,n,,r]=mn(t,n,r),qt.call(this,()=>this.editor.deleteText(t,n),r,t,-1*n)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const n=t();return this.allowReadOnlyEdits=!1,n}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Z.sources.API;return qt.call(this,()=>{const i=this.getSelection(!0);let s=new J;if(i==null)return s;if(this.scroll.query(t,ee.BLOCK))s=this.editor.formatLine(i.index,i.length,{[t]:n});else{if(i.length===0)return this.selection.format(t,n),s;s=this.editor.formatText(i.index,i.length,{[t]:n})}return this.setSelection(i,Z.sources.SILENT),s},r)}formatLine(t,n,r,i,s){let o;return[t,n,o,s]=mn(t,n,r,i,s),qt.call(this,()=>this.editor.formatLine(t,n,o),s,t,0)}formatText(t,n,r,i,s){let o;return[t,n,o,s]=mn(t,n,r,i,s),qt.call(this,()=>this.editor.formatText(t,n,o),s,t,0)}getBounds(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,n):r=this.selection.getBounds(t.index,t.length),!r)return null;const i=this.container.getBoundingClientRect();return{bottom:r.bottom-i.top,height:r.height,left:r.left-i.left,right:r.right-i.left,top:r.top-i.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,n]=mn(t,n),this.editor.getContents(t,n)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,n):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,n)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=mn(t,n),this.editor.getHTML(t,n)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(n=n??this.getLength()-t),[t,n]=mn(t,n),this.editor.getText(t,n)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$t.sources.API;return qt.call(this,()=>this.editor.insertEmbed(t,n,r),i,t)}insertText(t,n,r,i,s){let o;return[t,,o,s]=mn(t,0,r,i,s),qt.call(this,()=>this.editor.insertText(t,n,o),s,t,n.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,n,r){return[t,n,,r]=mn(t,n,r),qt.call(this,()=>this.editor.removeFormat(t,n),r,t)}scrollRectIntoView(t){yO(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,n=t&&this.selection.getBounds(t.index,t.length);n&&this.scrollRectIntoView(n)}setContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z.sources.API;return qt.call(this,()=>{t=new J(t);const r=this.getLength(),i=this.editor.deleteText(0,r),s=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return i.compose(s).compose(o)},n)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||$t.sources.API):([t,n,,r]=mn(t,n,r),this.selection.setRange(new Qn(Math.max(0,t),n),r),r!==Z.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z.sources.API;const r=new J().insert(t);return this.setContents(r,n)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z.sources.USER;const n=this.scroll.update(t);return this.selection.update(t),n}updateContents(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z.sources.API;return qt.call(this,()=>(t=new J(t),this.editor.applyDelta(t)),n,!0)}};V($t,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:ys,theme:"default"}),V($t,"events",Z.events),V($t,"sources",Z.sources),V($t,"version","2.0.3"),V($t,"imports",{delta:J,parchment:KC,"core/module":Yt,"core/theme":Br});let D=$t;function Dd(e){return typeof e=="string"?document.querySelector(e):e}function La(e){return Object.entries(e??{}).reduce((t,n)=>{let[r,i]=n;return{...t,[r]:i===!0?{}:i}},{})}function Pd(e){return Object.fromEntries(Object.entries(e).filter(t=>t[1]!==void 0))}function _O(e,t){const n=Dd(e);if(!n)throw new Error("Invalid Quill container");const i=!t.theme||t.theme===D.DEFAULTS.theme?Br:D.import(`themes/${t.theme}`);if(!i)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:s,...o}=D.DEFAULTS,{modules:a,...l}=i.DEFAULTS;let c=La(t.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=Mn({},La(s),La(a),c),d={...o,...Pd(l),...Pd(t)};let h=t.registry;return h?t.formats&&Or.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?wO(t.formats,d.registry,Or):d.registry,{...d,registry:h,container:n,theme:i,modules:Object.entries(u).reduce((f,p)=>{let[m,b]=p;if(!b)return f;const y=D.import(`modules/${m}`);return y==null?(Or.error(`Cannot load ${m} module. Are you sure you registered it?`),f):{...f,[m]:Mn({},y.DEFAULTS||{},b)}},{}),bounds:Dd(d.bounds)}}function qt(e,t,n,r){if(!this.isEnabled()&&t===Z.sources.USER&&!this.allowReadOnlyEdits)return new J;let i=n==null?null:this.getSelection();const s=this.editor.delta,o=e();if(i!=null&&(n===!0&&(n=i.index),r==null?i=Bd(i,o,t):r!==0&&(i=Bd(i,n,r,t)),this.setSelection(i,Z.sources.SILENT)),o.length()>0){const a=[Z.events.TEXT_CHANGE,o,s,t];this.emitter.emit(Z.events.EDITOR_CHANGE,...a),t!==Z.sources.SILENT&&this.emitter.emit(...a)}return o}function mn(e,t,n,r,i){let s={};return typeof e.index=="number"&&typeof e.length=="number"?typeof t!="number"?(i=r,r=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):typeof t!="number"&&(i=r,r=n,n=t,t=0),typeof n=="object"?(s=n,i=r):typeof n=="string"&&(r!=null?s[n]=r:i=n),i=i||Z.sources.API,[e,t,s,i]}function Bd(e,t,n,r){const i=typeof n=="number"?n:0;if(e==null)return null;let s,o;return t&&typeof t.transformPosition=="function"?[s,o]=[e.index,e.index+e.length].map(a=>t.transformPosition(a,r!==Z.sources.USER)):[s,o]=[e.index,e.index+e.length].map(a=>a<t||a===t&&r===Z.sources.USER?a:i>=0?a+i:Math.max(t,a+i)),new Qn(s,o-s)}class or extends lo{}function Fd(e){return e instanceof ze||e instanceof Ot}function qd(e){return typeof e.updateContent=="function"}class Ar extends dc{constructor(t,n,r){let{emitter:i}=r;super(t,n),this.emitter=i,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",s=>this.handleDragStart(s))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(Z.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(Z.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,n){this.emitter.emit(Z.events.SCROLL_EMBED_UPDATE,t,n)}deleteAt(t,n){const[r,i]=this.line(t),[s]=this.line(t+n);if(super.deleteAt(t,n),s!=null&&r!==s&&i>0){if(r instanceof Ot||s instanceof Ot){this.optimize();return}const o=s.children.head instanceof Vt?null:s.children.head;r.moveChildren(s,o),r.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,n,r,i){super.formatAt(t,n,r,i),this.optimize()}insertAt(t,n,r){if(t>=this.length())if(r==null||this.scroll.query(n,ee.BLOCK)==null){const i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),r==null&&n.endsWith(`
50
50
  `)?i.insertAt(0,n.slice(0,-1),r):i.insertAt(0,n,r)}else{const i=this.scroll.create(n,r);this.appendChild(i)}else super.insertAt(t,n,r);this.optimize()}insertBefore(t,n){if(t.statics.scope===ee.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,n)}else super.insertBefore(t,n)}insertContents(t,n){const r=this.deltaToRenderBlocks(n.concat(new J().insert(`
51
51
  `))),i=r.pop();if(i==null)return;this.batchStart();const s=r.shift();if(s){const l=s.type==="block"&&(s.delta.length()===0||!this.descendant(Ot,t)[0]&&t<this.length()),c=s.type==="block"?s.delta:new J().insert({[s.key]:s.value});Ma(this,t,c);const u=s.type==="block"?1:0,d=t+c.length()+u;l&&this.insertAt(d-1,`
52
52
  `);const h=Tt(this.line(t)[0]),f=Rt.AttributeMap.diff(h,s.attributes)||{};Object.keys(f).forEach(p=>{this.formatAt(d-1,1,p,f[p])}),t=d}let[o,a]=this.children.find(t);if(r.length&&(o&&(o=o.split(a),a=0),r.forEach(l=>{if(l.type==="block"){const c=this.createBlock(l.attributes,o||void 0);Ma(c,0,l.delta)}else{const c=this.create(l.key,l.value);this.insertBefore(c,o||void 0),Object.keys(l.attributes).forEach(u=>{c.format(u,l.attributes[u])})}})),i.type==="block"&&i.delta.length()){const l=o?o.offset(o.scroll)+a:this.length();Ma(this,l,i.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const n=this.path(t).pop();if(!n)return[null,-1];const[r,i]=n;return r instanceof Ve?[r,i]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Fd,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(i,s,o)=>{let a=[],l=o;return i.children.forEachAt(s,o,(c,u,d)=>{Fd(c)?a.push(c):c instanceof lo&&(a=a.concat(r(c,u,l))),l-=d}),a};return r(this,t,n)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,n),t.length>0&&this.emitter.emit(Z.events.SCROLL_OPTIMIZE,t,n))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let n=Z.sources.USER;typeof t=="string"&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:i}=r;const s=this.find(i,!0);return s&&!qd(s)}),t.length>0&&this.emitter.emit(Z.events.SCROLL_BEFORE_UPDATE,n,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(Z.events.SCROLL_UPDATE,n,t)}updateEmbedAt(t,n,r){const[i]=this.descendant(s=>s instanceof Ot,t);i&&i.statics.blotName===n&&qd(i)&&i.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const n=[];let r=new J;return t.forEach(i=>{const s=i==null?void 0:i.insert;if(s)if(typeof s=="string"){const o=s.split(`
53
- `);o.slice(0,-1).forEach(l=>{r.insert(l,i.attributes),n.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new J});const a=o[o.length-1];a&&r.insert(a,i.attributes)}else{const o=Object.keys(s)[0];if(!o)return;this.query(o,ee.INLINE)?r.push(i):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new J,n.push({type:"blockEmbed",key:o,value:s[o],attributes:i.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const i={};Object.entries(t).forEach(a=>{let[l,c]=a;this.query(l,ee.BLOCK&ee.BLOT)!=null?r=l:i[l]=c});const s=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(s,n||void 0);const o=s.length();return Object.entries(i).forEach(a=>{let[l,c]=a;s.formatAt(0,o,l,c)}),s}}V(Ar,"blotName","scroll"),V(Ar,"className","ql-editor"),V(Ar,"tagName","DIV"),V(Ar,"defaultChild",ze),V(Ar,"allowedChildren",[ze,Ot,or]);function Ma(e,t,n){n.reduce((r,i)=>{const s=Rt.Op.length(i);let o=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const a=i.insert;e.insertAt(r,a);const[l]=e.descendant(Ve,r),c=Tt(l);o=Rt.AttributeMap.diff(c,o)||{}}else if(typeof i.insert=="object"){const a=Object.keys(i.insert)[0];if(a==null)return r;if(e.insertAt(r,a,i.insert[a]),e.scroll.query(a,ee.INLINE)!=null){const[c]=e.descendant(Ve,r),u=Tt(c);o=Rt.AttributeMap.diff(u,o)||{}}}}return Object.keys(o).forEach(a=>{e.formatAt(r,s,a,o[a])}),r+s},t)}const bc={scope:ee.BLOCK,whitelist:["right","center","justify"]},vO=new ln("align","align",bc),lg=new Wt("align","ql-align",bc),cg=new Fn("align","text-align",bc);class ug extends Fn{value(t){let n=super.value(t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):n}}const kO=new Wt("color","ql-color",{scope:ee.INLINE}),yc=new ug("color","color",{scope:ee.INLINE}),NO=new Wt("background","ql-bg",{scope:ee.INLINE}),Ec=new ug("background","background-color",{scope:ee.INLINE});class ar extends or{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
53
+ `);o.slice(0,-1).forEach(l=>{r.insert(l,i.attributes),n.push({type:"block",delta:r,attributes:i.attributes??{}}),r=new J});const a=o[o.length-1];a&&r.insert(a,i.attributes)}else{const o=Object.keys(s)[0];if(!o)return;this.query(o,ee.INLINE)?r.push(i):(r.length()&&n.push({type:"block",delta:r,attributes:{}}),r=new J,n.push({type:"blockEmbed",key:o,value:s[o],attributes:i.attributes??{}}))}}),r.length()&&n.push({type:"block",delta:r,attributes:{}}),n}createBlock(t,n){let r;const i={};Object.entries(t).forEach(a=>{let[l,c]=a;this.query(l,ee.BLOCK&ee.BLOT)!=null?r=l:i[l]=c});const s=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(s,n||void 0);const o=s.length();return Object.entries(i).forEach(a=>{let[l,c]=a;s.formatAt(0,o,l,c)}),s}}V(Ar,"blotName","scroll"),V(Ar,"className","ql-editor"),V(Ar,"tagName","DIV"),V(Ar,"defaultChild",ze),V(Ar,"allowedChildren",[ze,Ot,or]);function Ma(e,t,n){n.reduce((r,i)=>{const s=Rt.Op.length(i);let o=i.attributes||{};if(i.insert!=null){if(typeof i.insert=="string"){const a=i.insert;e.insertAt(r,a);const[l]=e.descendant(Ve,r),c=Tt(l);o=Rt.AttributeMap.diff(c,o)||{}}else if(typeof i.insert=="object"){const a=Object.keys(i.insert)[0];if(a==null)return r;if(e.insertAt(r,a,i.insert[a]),e.scroll.query(a,ee.INLINE)!=null){const[c]=e.descendant(Ve,r),u=Tt(c);o=Rt.AttributeMap.diff(u,o)||{}}}}return Object.keys(o).forEach(a=>{e.formatAt(r,s,a,o[a])}),r+s},t)}const bc={scope:ee.BLOCK,whitelist:["right","center","justify"]},vO=new ln("align","align",bc),lg=new Wt("align","ql-align",bc),cg=new Fn("align","text-align",bc);class ug extends Fn{value(t){let n=super.value(t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${n.split(",").map(i=>`00${parseInt(i,10).toString(16)}`.slice(-2)).join("")}`):n}}const kO=new Wt("color","ql-color",{scope:ee.INLINE}),yc=new ug("color","color",{scope:ee.INLINE}),NO=new Wt("background","ql-bg",{scope:ee.INLINE}),xc=new ug("background","background-color",{scope:ee.INLINE});class ar extends or{static create(t){const n=super.create(t);return n.setAttribute("spellcheck","false"),n}code(t,n){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
54
54
  `).slice(t,t+n)}html(t,n){return`<pre>
55
55
  ${ho(this.code(t,n))}
56
- </pre>`}}class Xe extends ze{static register(){D.register(ar)}}V(Xe,"TAB"," ");class xc extends cn{}xc.blotName="code";xc.tagName="CODE";Xe.blotName="code-block";Xe.className="ql-code-block";Xe.tagName="DIV";ar.blotName="code-block-container";ar.className="ql-code-block-container";ar.tagName="DIV";ar.allowedChildren=[Xe];Xe.allowedChildren=[Kt,Vt,Pr];Xe.requiredContainer=ar;const wc={scope:ee.BLOCK,whitelist:["rtl"]},dg=new ln("direction","dir",wc),fg=new Wt("direction","ql-direction",wc),hg=new Fn("direction","direction",wc),pg={scope:ee.INLINE,whitelist:["serif","monospace"]},gg=new Wt("font","ql-font",pg);class AO extends Fn{value(t){return super.value(t).replace(/["']/g,"")}}const mg=new AO("font","font-family",pg),bg=new Wt("size","ql-size",{scope:ee.INLINE,whitelist:["small","large","huge"]}),yg=new Fn("size","font-size",{scope:ee.INLINE,whitelist:["10px","18px","32px"]}),SO=vn("quill:keyboard"),TO=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class po extends Yt{static match(t,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==t[r]&&n[r]!==null)?!1:n.key===t.key||n.key===t.which}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=OO(t);if(i==null){SO.warn("Attempted to add invalid keyboard binding",i);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach(o=>{const a={...i,key:o,...n,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const i=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(y=>po.match(t,y));if(i.length===0)return;const s=D.find(t.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,l]=this.quill.getLine(o.index),[c,u]=this.quill.getLeaf(o.index),[d,h]=o.length===0?[c,u]:this.quill.getLeaf(o.index+o.length),f=c instanceof $s?c.value().slice(0,u):"",p=d instanceof $s?d.value().slice(h):"",m={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:f,suffix:p,event:t};i.some(y=>{if(y.collapsed!=null&&y.collapsed!==m.collapsed||y.empty!=null&&y.empty!==m.empty||y.offset!=null&&y.offset!==m.offset)return!1;if(Array.isArray(y.format)){if(y.format.every(_=>m.format[_]==null))return!1}else if(typeof y.format=="object"&&!Object.keys(y.format).every(_=>y.format[_]===!0?m.format[_]!=null:y.format[_]===!1?m.format[_]==null:On(y.format[_],m.format[_])))return!1;return y.prefix!=null&&!y.prefix.test(m.prefix)||y.suffix!=null&&!y.suffix.test(m.suffix)?!1:y.handler.call(this,o,m,y)!==!0})&&t.preventDefault()})}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index-r).delete(r);if(n.offset===0){const[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=s.formats(),u=this.quill.getFormat(t.index-1,1);if(i=Rt.AttributeMap.diff(c,u)||{},Object.keys(i).length>0){const d=new J().retain(t.index+s.length()-2).retain(1,i);o=o.compose(d)}}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index).delete(r);if(n.offset>=s.length()-1){const[a]=this.quill.getLine(t.index+1);if(a){const l=s.formats(),c=this.quill.getFormat(t.index,1);i=Rt.AttributeMap.diff(l,c)||{},Object.keys(i).length>0&&(o=o.retain(a.length()-1).retain(1,i))}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDeleteRange(t){_c({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce((s,o)=>(this.quill.scroll.query(o,ee.BLOCK)&&!Array.isArray(n.format[o])&&(s[o]=n.format[o]),s),{}),i=new J().retain(t.index).delete(t.length).insert(`
56
+ </pre>`}}class Xe extends ze{static register(){D.register(ar)}}V(Xe,"TAB"," ");class Ec extends cn{}Ec.blotName="code";Ec.tagName="CODE";Xe.blotName="code-block";Xe.className="ql-code-block";Xe.tagName="DIV";ar.blotName="code-block-container";ar.className="ql-code-block-container";ar.tagName="DIV";ar.allowedChildren=[Xe];Xe.allowedChildren=[Kt,Vt,Pr];Xe.requiredContainer=ar;const wc={scope:ee.BLOCK,whitelist:["rtl"]},dg=new ln("direction","dir",wc),fg=new Wt("direction","ql-direction",wc),hg=new Fn("direction","direction",wc),pg={scope:ee.INLINE,whitelist:["serif","monospace"]},gg=new Wt("font","ql-font",pg);class AO extends Fn{value(t){return super.value(t).replace(/["']/g,"")}}const mg=new AO("font","font-family",pg),bg=new Wt("size","ql-size",{scope:ee.INLINE,whitelist:["small","large","huge"]}),yg=new Fn("size","font-size",{scope:ee.INLINE,whitelist:["10px","18px","32px"]}),SO=vn("quill:keyboard"),TO=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class po extends Yt{static match(t,n){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!n[r]!==t[r]&&n[r]!==null)?!1:n.key===t.key||n.key===t.which}constructor(t,n){super(t,n),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=OO(t);if(i==null){SO.warn("Attempted to add invalid keyboard binding",i);return}typeof n=="function"&&(n={handler:n}),typeof r=="function"&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach(o=>{const a={...i,key:o,...n,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const i=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(y=>po.match(t,y));if(i.length===0)return;const s=D.find(t.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,l]=this.quill.getLine(o.index),[c,u]=this.quill.getLeaf(o.index),[d,h]=o.length===0?[c,u]:this.quill.getLeaf(o.index+o.length),f=c instanceof $s?c.value().slice(0,u):"",p=d instanceof $s?d.value().slice(h):"",m={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:f,suffix:p,event:t};i.some(y=>{if(y.collapsed!=null&&y.collapsed!==m.collapsed||y.empty!=null&&y.empty!==m.empty||y.offset!=null&&y.offset!==m.offset)return!1;if(Array.isArray(y.format)){if(y.format.every(_=>m.format[_]==null))return!1}else if(typeof y.format=="object"&&!Object.keys(y.format).every(_=>y.format[_]===!0?m.format[_]!=null:y.format[_]===!1?m.format[_]==null:On(y.format[_],m.format[_])))return!1;return y.prefix!=null&&!y.prefix.test(m.prefix)||y.suffix!=null&&!y.suffix.test(m.suffix)?!1:y.handler.call(this,o,m,y)!==!0})&&t.preventDefault()})}handleBackspace(t,n){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index-r).delete(r);if(n.offset===0){const[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=s.formats(),u=this.quill.getFormat(t.index-1,1);if(i=Rt.AttributeMap.diff(c,u)||{},Object.keys(i).length>0){const d=new J().retain(t.index+s.length()-2).retain(1,i);o=o.compose(d)}}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDelete(t,n){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(n.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let i={};const[s]=this.quill.getLine(t.index);let o=new J().retain(t.index).delete(r);if(n.offset>=s.length()-1){const[a]=this.quill.getLine(t.index+1);if(a){const l=s.formats(),c=this.quill.getFormat(t.index,1);i=Rt.AttributeMap.diff(l,c)||{},Object.keys(i).length>0&&(o=o.retain(a.length()-1).retain(1,i))}}this.quill.updateContents(o,D.sources.USER),this.quill.focus()}handleDeleteRange(t){_c({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,n){const r=Object.keys(n.format).reduce((s,o)=>(this.quill.scroll.query(o,ee.BLOCK)&&!Array.isArray(n.format[o])&&(s[o]=n.format[o]),s),{}),i=new J().retain(t.index).delete(t.length).insert(`
57
57
  `,r);this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(t.index+1,D.sources.SILENT),this.quill.focus()}}const CO={bindings:{bold:Da("bold"),italic:Da("italic"),underline:Da("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",D.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",D.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(e,t){t.format.indent!=null?this.quill.format("indent","-1",D.sources.USER):t.format.list!=null&&this.quill.format("list",!1,D.sources.USER)}},"indent code-block":Ud(!0),"outdent code-block":Ud(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,D.sources.USER)}},tab:{key:"Tab",handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();const n=new J().retain(e.index).delete(e.length).insert(" ");return this.quill.updateContents(n,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,D.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,D.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(e,t){const n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,D.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(e){const[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:"checked"},i=new J().retain(e.index).insert(`
58
58
  `,r).retain(t.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(e.index+1,D.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(e,t){const[n,r]=this.quill.getLine(e.index),i=new J().retain(e.index).insert(`
59
59
  `,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(e.index+1,D.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(e){const t=this.quill.getModule("table");if(t){const[n,r,i,s]=t.getTable(e),o=IO(n,r,i,s);if(o==null)return;let a=n.offset();if(o<0){const l=new J().retain(a).insert(`
60
60
  `);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(e.index+1,e.length,D.sources.SILENT)}else if(o>0){a+=n.length();const l=new J().retain(a).insert(`
61
- `);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(a,D.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,D.sources.USER):this.quill.setSelection(i+r.length(),D.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",D.sources.USER),this.quill.history.cutoff();const o=new J().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,D.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const s=new J().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,D.sources.USER),this.quill.setSelection(e.index-1,D.sources.SILENT),!1}return!0}},"embed left":Es("ArrowLeft",!1),"embed left shift":Es("ArrowLeft",!0),"embed right":Es("ArrowRight",!1),"embed right shift":Es("ArrowRight",!0),"table down":$d(!1),"table up":$d(!0)}};po.DEFAULTS=CO;function Ud(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,s,D.sources.USER),this.quill.setSelection(t.index+s.length,D.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:a,length:l}=t;o.forEach((c,u)=>{e?(c.insertAt(0,s),u===0?a+=s.length:l+=s.length):c.domNode.textContent.startsWith(s)&&(c.deleteAt(0,s.length),u===0?a-=s.length:l-=s.length)}),this.quill.update(D.sources.USER),this.quill.setSelection(a,l,D.sources.SILENT)}}}function Es(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:i}=r;e==="ArrowRight"&&(i+=r.length+1);const[s]=this.quill.getLeaf(i);return s instanceof _t?(e==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,D.sources.USER):this.quill.setSelection(r.index-1,D.sources.USER):t?this.quill.setSelection(r.index,r.length+1,D.sources.USER):this.quill.setSelection(r.index+r.length+1,D.sources.USER),!1):!0}}}function Da(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],D.sources.USER)}}}function $d(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",i=n.line,s=i.parent[r];if(s!=null){if(s.statics.blotName==="table-row"){let o=s.children.head,a=i;for(;a.prev!=null;)a=a.prev,o=o.next;const l=o.offset(this.quill.scroll)+Math.min(n.offset,o.length()-1);this.quill.setSelection(l,0,D.sources.USER)}}else{const o=i.table()[r];o!=null&&(e?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,D.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,D.sources.USER))}return!1}}}function OO(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=Tr(e);else return null;return e.shortKey&&(e[TO]=e.shortKey,delete e.shortKey),e}function _c(e){let{quill:t,range:n}=e;const r=t.getLines(n);let i={};if(r.length>1){const s=r[0].formats(),o=r[r.length-1].formats();i=Rt.AttributeMap.diff(o,s)||{}}t.deleteText(n,D.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,D.sources.USER),t.setSelection(n.index,D.sources.SILENT)}function IO(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const RO=/font-weight:\s*normal/,LO=["P","OL","UL"],zd=e=>e&&LO.includes(e.tagName),MO=e=>{Array.from(e.querySelectorAll("br")).filter(t=>zd(t.previousElementSibling)&&zd(t.nextElementSibling)).forEach(t=>{var n;(n=t.parentNode)==null||n.removeChild(t)})},DO=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var n;return(n=t.getAttribute("style"))==null?void 0:n.match(RO)}).forEach(t=>{var r;const n=e.createDocumentFragment();n.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(n,t)})};function PO(e){e.querySelector('[id^="docs-internal-guid-"]')&&(DO(e),MO(e))}const BO=/\bmso-list:[^;]*ignore/i,FO=/\bmso-list:[^;]*\bl(\d+)/i,qO=/\bmso-list:[^;]*\blevel(\d+)/i,UO=(e,t)=>{const n=e.getAttribute("style"),r=n==null?void 0:n.match(FO);if(!r)return null;const i=Number(r[1]),s=n==null?void 0:n.match(qO),o=s?Number(s[1]):1,a=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:i,indent:o,type:c,element:e}},$O=e=>{var o,a;const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(l=>{(l.getAttribute("style")||"").match(BO)?n.push(l):r.push(l)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const i=e.documentElement.innerHTML,s=r.map(l=>UO(l,i)).filter(l=>l);for(;s.length;){const l=[];let c=s.shift();for(;c;)l.push(c),c=s.length&&((o=s[0])==null?void 0:o.element)===c.element.nextElementSibling&&s[0].id===c.id?s.shift():null;const u=document.createElement("ul");l.forEach(f=>{const p=document.createElement("li");p.setAttribute("data-list",f.type),f.indent>1&&p.setAttribute("class",`ql-indent-${f.indent-1}`),p.innerHTML=f.element.innerHTML,u.appendChild(p)});const d=(a=l[0])==null?void 0:a.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),l.slice(1).forEach(f=>{let{element:p}=f;h==null||h.removeChild(p)})}};function zO(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&$O(e)}const jO=[zO,PO],HO=e=>{e.documentElement&&jO.forEach(t=>{t(e)})},GO=vn("quill:clipboard"),KO=[[Node.TEXT_NODE,iI],[Node.TEXT_NODE,Hd],["br",XO],[Node.ELEMENT_NODE,Hd],[Node.ELEMENT_NODE,ZO],[Node.ELEMENT_NODE,YO],[Node.ELEMENT_NODE,nI],["li",eI],["ol, ul",tI],["pre",QO],["tr",rI],["b",Pa("bold")],["i",Pa("italic")],["strike",Pa("strike")],["style",JO]],WO=[vO,dg].reduce((e,t)=>(e[t.keyName]=t,e),{}),jd=[cg,Ec,yc,hg,mg,yg].reduce((e,t)=>(e[t.keyName]=t,e),{});class Eg extends Yt{constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],KO.concat(this.options.matchers??[]).forEach(r=>{let[i,s]=r;this.addMatcher(i,s)})}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[Xe.blotName])return new J().insert(r||"",{[Xe.blotName]:i[Xe.blotName]});if(!n)return new J().insert(r||"",i);const s=this.convertHTML(n);return Fi(s,`
61
+ `);this.quill.updateContents(l,D.sources.USER),this.quill.setSelection(a,D.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(e,t){const{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,D.sources.USER):this.quill.setSelection(i+r.length(),D.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query("list")==null)return!0;const{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let s;switch(t.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(e.index," ",D.sources.USER),this.quill.history.cutoff();const o=new J().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,D.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,D.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(e){const[t,n]=this.quill.getLine(e.index);let r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,r-=1,r<=0){const s=new J().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(s,D.sources.USER),this.quill.setSelection(e.index-1,D.sources.SILENT),!1}return!0}},"embed left":xs("ArrowLeft",!1),"embed left shift":xs("ArrowLeft",!0),"embed right":xs("ArrowRight",!1),"embed right shift":xs("ArrowRight",!0),"table down":$d(!1),"table up":$d(!0)}};po.DEFAULTS=CO;function Ud(e){return{key:"Tab",shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,s,D.sources.USER),this.quill.setSelection(t.index+s.length,D.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:a,length:l}=t;o.forEach((c,u)=>{e?(c.insertAt(0,s),u===0?a+=s.length:l+=s.length):c.domNode.textContent.startsWith(s)&&(c.deleteAt(0,s.length),u===0?a-=s.length:l-=s.length)}),this.quill.update(D.sources.USER),this.quill.setSelection(a,l,D.sources.SILENT)}}}function xs(e,t){return{key:e,shiftKey:t,altKey:null,[e==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:i}=r;e==="ArrowRight"&&(i+=r.length+1);const[s]=this.quill.getLeaf(i);return s instanceof _t?(e==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,D.sources.USER):this.quill.setSelection(r.index-1,D.sources.USER):t?this.quill.setSelection(r.index,r.length+1,D.sources.USER):this.quill.setSelection(r.index+r.length+1,D.sources.USER),!1):!0}}}function Da(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],D.sources.USER)}}}function $d(e){return{key:e?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,n){const r=e?"prev":"next",i=n.line,s=i.parent[r];if(s!=null){if(s.statics.blotName==="table-row"){let o=s.children.head,a=i;for(;a.prev!=null;)a=a.prev,o=o.next;const l=o.offset(this.quill.scroll)+Math.min(n.offset,o.length()-1);this.quill.setSelection(l,0,D.sources.USER)}}else{const o=i.table()[r];o!=null&&(e?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,D.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,D.sources.USER))}return!1}}}function OO(e){if(typeof e=="string"||typeof e=="number")e={key:e};else if(typeof e=="object")e=Tr(e);else return null;return e.shortKey&&(e[TO]=e.shortKey,delete e.shortKey),e}function _c(e){let{quill:t,range:n}=e;const r=t.getLines(n);let i={};if(r.length>1){const s=r[0].formats(),o=r[r.length-1].formats();i=Rt.AttributeMap.diff(o,s)||{}}t.deleteText(n,D.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,D.sources.USER),t.setSelection(n.index,D.sources.SILENT)}function IO(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const RO=/font-weight:\s*normal/,LO=["P","OL","UL"],zd=e=>e&&LO.includes(e.tagName),MO=e=>{Array.from(e.querySelectorAll("br")).filter(t=>zd(t.previousElementSibling)&&zd(t.nextElementSibling)).forEach(t=>{var n;(n=t.parentNode)==null||n.removeChild(t)})},DO=e=>{Array.from(e.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var n;return(n=t.getAttribute("style"))==null?void 0:n.match(RO)}).forEach(t=>{var r;const n=e.createDocumentFragment();n.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(n,t)})};function PO(e){e.querySelector('[id^="docs-internal-guid-"]')&&(DO(e),MO(e))}const BO=/\bmso-list:[^;]*ignore/i,FO=/\bmso-list:[^;]*\bl(\d+)/i,qO=/\bmso-list:[^;]*\blevel(\d+)/i,UO=(e,t)=>{const n=e.getAttribute("style"),r=n==null?void 0:n.match(FO);if(!r)return null;const i=Number(r[1]),s=n==null?void 0:n.match(qO),o=s?Number(s[1]):1,a=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:i,indent:o,type:c,element:e}},$O=e=>{var o,a;const t=Array.from(e.querySelectorAll("[style*=mso-list]")),n=[],r=[];t.forEach(l=>{(l.getAttribute("style")||"").match(BO)?n.push(l):r.push(l)}),n.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const i=e.documentElement.innerHTML,s=r.map(l=>UO(l,i)).filter(l=>l);for(;s.length;){const l=[];let c=s.shift();for(;c;)l.push(c),c=s.length&&((o=s[0])==null?void 0:o.element)===c.element.nextElementSibling&&s[0].id===c.id?s.shift():null;const u=document.createElement("ul");l.forEach(f=>{const p=document.createElement("li");p.setAttribute("data-list",f.type),f.indent>1&&p.setAttribute("class",`ql-indent-${f.indent-1}`),p.innerHTML=f.element.innerHTML,u.appendChild(p)});const d=(a=l[0])==null?void 0:a.element,{parentNode:h}=d??{};d&&(h==null||h.replaceChild(u,d)),l.slice(1).forEach(f=>{let{element:p}=f;h==null||h.removeChild(p)})}};function zO(e){e.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&$O(e)}const jO=[zO,PO],HO=e=>{e.documentElement&&jO.forEach(t=>{t(e)})},GO=vn("quill:clipboard"),KO=[[Node.TEXT_NODE,iI],[Node.TEXT_NODE,Hd],["br",XO],[Node.ELEMENT_NODE,Hd],[Node.ELEMENT_NODE,ZO],[Node.ELEMENT_NODE,YO],[Node.ELEMENT_NODE,nI],["li",eI],["ol, ul",tI],["pre",QO],["tr",rI],["b",Pa("bold")],["i",Pa("italic")],["strike",Pa("strike")],["style",JO]],WO=[vO,dg].reduce((e,t)=>(e[t.keyName]=t,e),{}),jd=[cg,xc,yc,hg,mg,yg].reduce((e,t)=>(e[t.keyName]=t,e),{});class xg extends Yt{constructor(t,n){super(t,n),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],KO.concat(this.options.matchers??[]).forEach(r=>{let[i,s]=r;this.addMatcher(i,s)})}addMatcher(t,n){this.matchers.push([t,n])}convert(t){let{html:n,text:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i[Xe.blotName])return new J().insert(r||"",{[Xe.blotName]:i[Xe.blotName]});if(!n)return new J().insert(r||"",i);const s=this.convertHTML(n);return Fi(s,`
62
62
  `)&&(s.ops[s.ops.length-1].attributes==null||i.table)?s.compose(new J().retain(s.length()-1).delete(1)):s}normalizeHTML(t){HO(t)}convertHTML(t){const n=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(n);const r=n.body,i=new WeakMap,[s,o]=this.prepareMatching(r,i);return vc(this.quill.scroll,r,s,o,i)}dangerouslyPasteHTML(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:D.sources.API;if(typeof t=="string"){const i=this.convert({html:t,text:""});this.quill.setContents(i,n),this.quill.setSelection(0,D.sources.SILENT)}else{const i=this.convert({html:n,text:""});this.quill.updateContents(new J().retain(t).concat(i),r),this.quill.setSelection(t+i.length(),D.sources.SILENT)}}onCaptureCopy(t){var o,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:i,text:s}=this.onCopy(r,n);(o=t.clipboardData)==null||o.setData("text/plain",s),(a=t.clipboardData)==null||a.setData("text/html",i),n&&_c({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(n=>n[0]!=="#").join(`
63
- `)}onCapturePaste(t){var o,a,l,c,u;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(o=t.clipboardData)==null?void 0:o.getData("text/html");let i=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!i){const d=(l=t.clipboardData)==null?void 0:l.getData("text/uri-list");d&&(i=this.normalizeURIList(d))}const s=Array.from(((c=t.clipboardData)==null?void 0:c.files)||[]);if(!r&&s.length>0){this.quill.uploader.upload(n,s);return}if(r&&s.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,s);return}}this.onPaste(n,{html:r,text:i})}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:i}=n;const s=this.quill.getFormat(t.index),o=this.convert({text:r,html:i},s);GO.log("onPaste",o,{text:r,html:i});const a=new J().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,D.sources.USER),this.quill.setSelection(a.length()-t.length,D.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],i=[];return this.matchers.forEach(s=>{const[o,a]=s;switch(o){case Node.TEXT_NODE:i.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(l=>{if(n.has(l)){const c=n.get(l);c==null||c.push(a)}else n.set(l,[a])});break}}),[r,i]}}V(Eg,"DEFAULTS",{matchers:[]});function lr(e,t,n,r){return r.query(t)?e.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[t])return i.push(s);const o=n?{[t]:n}:{};return i.insert(s.insert,{...o,...s.attributes})},new J):e}function Fi(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const i=e.ops[r];if(typeof i.insert!="string")break;n=i.insert+n}return n.slice(-1*t.length)===t}function Rn(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return n&&n.prototype instanceof _t?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}function VO(e,t){return e.previousElementSibling&&e.nextElementSibling&&!Rn(e.previousElementSibling,t)&&!Rn(e.nextElementSibling,t)}const xs=new WeakMap;function xg(e){return e==null?!1:(xs.has(e)||(e.tagName==="PRE"?xs.set(e,!0):xs.set(e,xg(e.parentNode))),xs.get(e))}function vc(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((s,o)=>o(t,s,e),new J):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,o)=>{let a=vc(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce((l,c)=>c(o,l,e),a),a=(i.get(o)||[]).reduce((l,c)=>c(o,l,e),a)),s.concat(a)},new J):new J}function Pa(e){return(t,n,r)=>lr(n,e,!0,r)}function YO(e,t,n){const r=ln.keys(e),i=Wt.keys(e),s=Fn.keys(e),o={};return r.concat(i).concat(s).forEach(a=>{let l=n.query(a,ee.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(e),o[l.attrName])||(l=WO[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(e)||void 0),l=jd[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=jd[a],o[l.attrName]=l.value(e)||void 0))}),Object.entries(o).reduce((a,l)=>{let[c,u]=l;return lr(a,c,u,n)},t)}function ZO(e,t,n){const r=n.query(e);if(r==null)return t;if(r.prototype instanceof _t){const i={},s=r.value(e);if(s!=null)return i[r.blotName]=s,new J().insert(i,r.formats(e,n))}else if(r.prototype instanceof Ti&&!Fi(t,`
63
+ `)}onCapturePaste(t){var o,a,l,c,u;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const n=this.quill.getSelection(!0);if(n==null)return;const r=(o=t.clipboardData)==null?void 0:o.getData("text/html");let i=(a=t.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!i){const d=(l=t.clipboardData)==null?void 0:l.getData("text/uri-list");d&&(i=this.normalizeURIList(d))}const s=Array.from(((c=t.clipboardData)==null?void 0:c.files)||[]);if(!r&&s.length>0){this.quill.uploader.upload(n,s);return}if(r&&s.length>0){const d=new DOMParser().parseFromString(r,"text/html");if(d.body.childElementCount===1&&((u=d.body.firstElementChild)==null?void 0:u.tagName)==="IMG"){this.quill.uploader.upload(n,s);return}}this.onPaste(n,{html:r,text:i})}onCopy(t){const n=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:n}}onPaste(t,n){let{text:r,html:i}=n;const s=this.quill.getFormat(t.index),o=this.convert({text:r,html:i},s);GO.log("onPaste",o,{text:r,html:i});const a=new J().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,D.sources.USER),this.quill.setSelection(a.length()-t.length,D.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,n){const r=[],i=[];return this.matchers.forEach(s=>{const[o,a]=s;switch(o){case Node.TEXT_NODE:i.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(l=>{if(n.has(l)){const c=n.get(l);c==null||c.push(a)}else n.set(l,[a])});break}}),[r,i]}}V(xg,"DEFAULTS",{matchers:[]});function lr(e,t,n,r){return r.query(t)?e.reduce((i,s)=>{if(!s.insert)return i;if(s.attributes&&s.attributes[t])return i.push(s);const o=n?{[t]:n}:{};return i.insert(s.insert,{...o,...s.attributes})},new J):e}function Fi(e,t){let n="";for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){const i=e.ops[r];if(typeof i.insert!="string")break;n=i.insert+n}return n.slice(-1*t.length)===t}function Rn(e,t){if(!(e instanceof Element))return!1;const n=t.query(e);return n&&n.prototype instanceof _t?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(e.tagName.toLowerCase())}function VO(e,t){return e.previousElementSibling&&e.nextElementSibling&&!Rn(e.previousElementSibling,t)&&!Rn(e.nextElementSibling,t)}const Es=new WeakMap;function Eg(e){return e==null?!1:(Es.has(e)||(e.tagName==="PRE"?Es.set(e,!0):Es.set(e,Eg(e.parentNode))),Es.get(e))}function vc(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((s,o)=>o(t,s,e),new J):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((s,o)=>{let a=vc(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce((l,c)=>c(o,l,e),a),a=(i.get(o)||[]).reduce((l,c)=>c(o,l,e),a)),s.concat(a)},new J):new J}function Pa(e){return(t,n,r)=>lr(n,e,!0,r)}function YO(e,t,n){const r=ln.keys(e),i=Wt.keys(e),s=Fn.keys(e),o={};return r.concat(i).concat(s).forEach(a=>{let l=n.query(a,ee.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(e),o[l.attrName])||(l=WO[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(e)||void 0),l=jd[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=jd[a],o[l.attrName]=l.value(e)||void 0))}),Object.entries(o).reduce((a,l)=>{let[c,u]=l;return lr(a,c,u,n)},t)}function ZO(e,t,n){const r=n.query(e);if(r==null)return t;if(r.prototype instanceof _t){const i={},s=r.value(e);if(s!=null)return i[r.blotName]=s,new J().insert(i,r.formats(e,n))}else if(r.prototype instanceof Ti&&!Fi(t,`
64
64
  `)&&t.insert(`
65
65
  `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return lr(t,r.blotName,r.formats(e,n),n);return t}function XO(e,t){return Fi(t,`
66
66
  `)||t.insert(`
@@ -69,18 +69,18 @@ ${ho(this.code(t,n))}
69
69
  `)){if(Rn(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
70
70
  `);if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(Rn(r,n))return t.insert(`
71
71
  `);const i=n.query(r);if(i&&i.prototype instanceof Ot)return t.insert(`
72
- `);r=r.firstChild}}}return t}function nI(e,t,n){var s;const r={},i=e.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((o,a)=>{let[l,c]=a;return lr(o,l,c,n)},t),parseFloat(i.textIndent||0)>0?new J().insert(" ").concat(t):t}function rI(e,t,n){var i,s;const r=((i=e.parentElement)==null?void 0:i.tagName)==="TABLE"?e.parentElement:(s=e.parentElement)==null?void 0:s.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(e)+1;return lr(t,"table",a,n)}return t}function iI(e,t,n){var i;let r=e.data;if(((i=e.parentElement)==null?void 0:i.tagName)==="O:P")return t.insert(r.trim());if(!xg(e)){if(r.trim().length===0&&r.includes(`
73
- `)&&!VO(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(e.previousSibling==null&&e.parentElement!=null&&Rn(e.parentElement,n)||e.previousSibling instanceof Element&&Rn(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(e.nextSibling==null&&e.parentElement!=null&&Rn(e.parentElement,n)||e.nextSibling instanceof Element&&Rn(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class wg extends Yt{constructor(n,r){super(n,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(D.events.EDITOR_CHANGE,(i,s,o,a)=>{i===D.events.SELECTION_CHANGE?s&&a!==D.sources.SILENT&&(this.currentRange=s):i===D.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===D.sources.USER?this.record(s,o):this.transform(s)),this.currentRange=xl(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const i=this.stack[n].pop();if(!i)return;const s=this.quill.getContents(),o=i.delta.invert(s);this.stack[r].push({delta:o,range:xl(i.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,D.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let i=n.invert(r),s=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(i=i.compose(a.delta),s=a.range)}else this.lastRecorded=o;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){Gd(this.stack.undo,n),Gd(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,D.sources.USER);else{const r=oI(this.quill.scroll,n.delta);this.quill.setSelection(r,D.sources.USER)}}}V(wg,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Gd(e,t){let n=t;for(let r=e.length-1;r>=0;r-=1){const i=e[r];e[r]={delta:n.transform(i.delta,!0),range:i.range&&xl(i.range,n)},n=i.delta.transform(n),e[r].delta.length()===0&&e.splice(r,1)}}function sI(e,t){const n=t.ops[t.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
74
- `):n.attributes!=null?Object.keys(n.attributes).some(r=>e.query(r,ee.BLOCK)!=null):!1}function oI(e,t){const n=t.reduce((i,s)=>i+(s.delete||0),0);let r=t.length()-n;return sI(e,t)&&(r-=1),r}function xl(e,t){if(!e)return e;const n=t.transformPosition(e.index),r=t.transformPosition(e.index+e.length);return{index:n,length:r-n}}class _g extends Yt{constructor(t,n){super(t,n),t.root.addEventListener("drop",r=>{var o;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const s=i&&t.selection.normalizeNative(i);if(s){const a=t.selection.normalizedToRange(s);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(t,n){const r=[];Array.from(n).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,t,r)}}_g.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(r=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(r)}));Promise.all(n).then(r=>{const i=r.reduce((s,o)=>s.insert({image:o}),new J().retain(e.index).delete(e.length));this.quill.updateContents(i,Z.sources.USER),this.quill.setSelection(e.index+r.length,Z.sources.SILENT)})}};const aI=["insertText","insertReplacementText"];let lI=class extends Yt{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(D.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){_c({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new J().retain(t.index).insert(n,r),D.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,D.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!aI.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=cI(t);if(r==null)return;const i=this.quill.selection.normalizeNative(n),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}};function cI(e){var t;return typeof e.data=="string"?e.data:(t=e.dataTransfer)!=null&&t.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}const uI=/Mac/i.test(navigator.platform),dI=100,fI=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||uI&&e.key==="a"&&e.ctrlKey===!0);class hI extends Yt{constructor(n,r){super(n,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:i,event:s}=r;if(!(i instanceof Gt)||!i.uiNode)return!0;const o=getComputedStyle(i.domNode).direction==="rtl";return o&&s.key!=="ArrowRight"||!o&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(s.shiftKey?1:0),D.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&fI(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+dI,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Gt)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),n.removeAllRanges(),n.addRange(s)}}D.register({"blots/block":ze,"blots/block/embed":Ot,"blots/break":Vt,"blots/container":or,"blots/cursor":Pr,"blots/embed":mc,"blots/inline":cn,"blots/scroll":Ar,"blots/text":Kt,"modules/clipboard":Eg,"modules/history":wg,"modules/keyboard":po,"modules/uploader":_g,"modules/input":lI,"modules/uiNode":hI});class pI extends Wt{add(t,n){let r=0;if(n==="+1"||n==="-1"){const i=this.value(t)||0;r=n==="+1"?i+1:i-1}else typeof n=="number"&&(r=n);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,n){return super.canAdd(t,n)||super.canAdd(t,parseInt(n,10))}value(t){return parseInt(super.value(t),10)||void 0}}const gI=new pI("indent","ql-indent",{scope:ee.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class wl extends ze{}V(wl,"blotName","blockquote"),V(wl,"tagName","blockquote");class _l extends ze{static formats(t){return this.tagName.indexOf(t.tagName)+1}}V(_l,"blotName","header"),V(_l,"tagName",["H1","H2","H3","H4","H5","H6"]);class qi extends or{}qi.blotName="list-container";qi.tagName="OL";class Ui extends ze{static create(t){const n=super.create();return n.setAttribute("data-list",t),n}static formats(t){return t.getAttribute("data-list")||void 0}static register(){D.register(qi)}constructor(t,n){super(t,n);const r=n.ownerDocument.createElement("span"),i=s=>{if(!t.isEnabled())return;const o=this.statics.formats(n,t);o==="checked"?(this.format("list","unchecked"),s.preventDefault()):o==="unchecked"&&(this.format("list","checked"),s.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-list",n):super.format(t,n)}}Ui.blotName="list";Ui.tagName="LI";qi.allowedChildren=[Ui];Ui.requiredContainer=qi;class Ii extends cn{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}V(Ii,"blotName","bold"),V(Ii,"tagName",["STRONG","B"]);class vl extends Ii{}V(vl,"blotName","italic"),V(vl,"tagName",["EM","I"]);class Ln extends cn{static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return vg(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t!==this.statics.blotName||!n?super.format(t,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}}V(Ln,"blotName","link"),V(Ln,"tagName","A"),V(Ln,"SANITIZED_URL","about:blank"),V(Ln,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function vg(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}class kl extends cn{static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}V(kl,"blotName","script"),V(kl,"tagName",["SUB","SUP"]);class Nl extends Ii{}V(Nl,"blotName","strike"),V(Nl,"tagName",["S","STRIKE"]);class Al extends cn{}V(Al,"blotName","underline"),V(Al,"tagName","U");class As extends mc{static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const n=super.create(t);return typeof t=="string"&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}V(As,"blotName","formula"),V(As,"className","ql-formula"),V(As,"tagName","SPAN");const Kd=["alt","height","width"];var _s;let mI=(_s=class extends _t{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Kd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return vg(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,n){Kd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}},V(_s,"blotName","image"),V(_s,"tagName","IMG"),_s);const Wd=["height","width"];class Ss extends Ot{static create(t){const n=super.create(t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","true"),n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Wd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static sanitize(t){return Ln.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,n){Wd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}V(Ss,"blotName","video"),V(Ss,"className","ql-video"),V(Ss,"tagName","IFRAME");const hi=new Wt("code-token","hljs",{scope:ee.INLINE});class En extends cn{static formats(t,n){for(;t!=null&&t!==n.domNode;){if(t.classList&&t.classList.contains(Xe.className))return super.formats(t,n);t=t.parentNode}}constructor(t,n,r){super(t,n,r),hi.add(this.domNode,r)}format(t,n){t!==En.blotName?super.format(t,n):n?hi.add(this.domNode,n):(hi.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),hi.value(this.domNode)||this.unwrap()}}En.blotName="code-token";En.className="ql-token";class Ct extends Xe{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("data-language",t),n}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-language",n):super.format(t,n)}replaceWith(t,n){return this.formatAt(0,this.length(),En.blotName,!1),super.replaceWith(t,n)}}class yi extends ar{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,n){t===Ct.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(t,n)}))}formatAt(t,n,r,i){r===Ct.blotName&&(this.forceNext=!0),super.formatAt(t,n,r,i)}highlight(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
72
+ `);r=r.firstChild}}}return t}function nI(e,t,n){var s;const r={},i=e.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((o,a)=>{let[l,c]=a;return lr(o,l,c,n)},t),parseFloat(i.textIndent||0)>0?new J().insert(" ").concat(t):t}function rI(e,t,n){var i,s;const r=((i=e.parentElement)==null?void 0:i.tagName)==="TABLE"?e.parentElement:(s=e.parentElement)==null?void 0:s.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(e)+1;return lr(t,"table",a,n)}return t}function iI(e,t,n){var i;let r=e.data;if(((i=e.parentElement)==null?void 0:i.tagName)==="O:P")return t.insert(r.trim());if(!Eg(e)){if(r.trim().length===0&&r.includes(`
73
+ `)&&!VO(e,n))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(e.previousSibling==null&&e.parentElement!=null&&Rn(e.parentElement,n)||e.previousSibling instanceof Element&&Rn(e.previousSibling,n))&&(r=r.replace(/^ /,"")),(e.nextSibling==null&&e.parentElement!=null&&Rn(e.parentElement,n)||e.nextSibling instanceof Element&&Rn(e.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class wg extends Yt{constructor(n,r){super(n,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(D.events.EDITOR_CHANGE,(i,s,o,a)=>{i===D.events.SELECTION_CHANGE?s&&a!==D.sources.SILENT&&(this.currentRange=s):i===D.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===D.sources.USER?this.record(s,o):this.transform(s)),this.currentRange=El(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",i=>{i.inputType==="historyUndo"?(this.undo(),i.preventDefault()):i.inputType==="historyRedo"&&(this.redo(),i.preventDefault())})}change(n,r){if(this.stack[n].length===0)return;const i=this.stack[n].pop();if(!i)return;const s=this.quill.getContents(),o=i.delta.invert(s);this.stack[r].push({delta:o,range:El(i.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(i.delta,D.sources.USER),this.ignoreChange=!1,this.restoreSelection(i)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(n,r){if(n.ops.length===0)return;this.stack.redo=[];let i=n.invert(r),s=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(i=i.compose(a.delta),s=a.range)}else this.lastRecorded=o;i.length()!==0&&(this.stack.undo.push({delta:i,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(n){Gd(this.stack.undo,n),Gd(this.stack.redo,n)}undo(){this.change("undo","redo")}restoreSelection(n){if(n.range)this.quill.setSelection(n.range,D.sources.USER);else{const r=oI(this.quill.scroll,n.delta);this.quill.setSelection(r,D.sources.USER)}}}V(wg,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Gd(e,t){let n=t;for(let r=e.length-1;r>=0;r-=1){const i=e[r];e[r]={delta:n.transform(i.delta,!0),range:i.range&&El(i.range,n)},n=i.delta.transform(n),e[r].delta.length()===0&&e.splice(r,1)}}function sI(e,t){const n=t.ops[t.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(`
74
+ `):n.attributes!=null?Object.keys(n.attributes).some(r=>e.query(r,ee.BLOCK)!=null):!1}function oI(e,t){const n=t.reduce((i,s)=>i+(s.delete||0),0);let r=t.length()-n;return sI(e,t)&&(r-=1),r}function El(e,t){if(!e)return e;const n=t.transformPosition(e.index),r=t.transformPosition(e.index+e.length);return{index:n,length:r-n}}class _g extends Yt{constructor(t,n){super(t,n),t.root.addEventListener("drop",r=>{var o;r.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const s=i&&t.selection.normalizeNative(i);if(s){const a=t.selection.normalizedToRange(s);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(t,n){const r=[];Array.from(n).forEach(i=>{var s;i&&((s=this.options.mimetypes)!=null&&s.includes(i.type))&&r.push(i)}),r.length>0&&this.options.handler.call(this,t,r)}}_g.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(e,t){if(!this.quill.scroll.query("image"))return;const n=t.map(r=>new Promise(i=>{const s=new FileReader;s.onload=()=>{i(s.result)},s.readAsDataURL(r)}));Promise.all(n).then(r=>{const i=r.reduce((s,o)=>s.insert({image:o}),new J().retain(e.index).delete(e.length));this.quill.updateContents(i,Z.sources.USER),this.quill.setSelection(e.index+r.length,Z.sources.SILENT)})}};const aI=["insertText","insertReplacementText"];let lI=class extends Yt{constructor(t,n){super(t,n),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(D.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){_c({range:t,quill:this.quill})}replaceText(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(n){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new J().retain(t.index).insert(n,r),D.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+n.length,0,D.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!aI.includes(t.inputType))return;const n=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!n||n.collapsed===!0)return;const r=cI(t);if(r==null)return;const i=this.quill.selection.normalizeNative(n),s=i?this.quill.selection.normalizedToRange(i):null;s&&this.replaceText(s,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}};function cI(e){var t;return typeof e.data=="string"?e.data:(t=e.dataTransfer)!=null&&t.types.includes("text/plain")?e.dataTransfer.getData("text/plain"):null}const uI=/Mac/i.test(navigator.platform),dI=100,fI=e=>!!(e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="Home"||uI&&e.key==="a"&&e.ctrlKey===!0);class hI extends Yt{constructor(n,r){super(n,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(n,r){let{line:i,event:s}=r;if(!(i instanceof Gt)||!i.uiNode)return!0;const o=getComputedStyle(i.domNode).direction==="rtl";return o&&s.key!=="ArrowRight"||!o&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(n.index-1,n.length+(s.shiftKey?1:0),D.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",n=>{!n.defaultPrevented&&fI(n)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+dI,this.isListening)return;this.isListening=!0;const n=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",n,{once:!0})}handleSelectionChange(){const n=document.getSelection();if(!n)return;const r=n.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const i=this.quill.scroll.find(r.startContainer);if(!(i instanceof Gt)||!i.uiNode)return;const s=document.createRange();s.setStartAfter(i.uiNode),s.setEndAfter(i.uiNode),n.removeAllRanges(),n.addRange(s)}}D.register({"blots/block":ze,"blots/block/embed":Ot,"blots/break":Vt,"blots/container":or,"blots/cursor":Pr,"blots/embed":mc,"blots/inline":cn,"blots/scroll":Ar,"blots/text":Kt,"modules/clipboard":xg,"modules/history":wg,"modules/keyboard":po,"modules/uploader":_g,"modules/input":lI,"modules/uiNode":hI});class pI extends Wt{add(t,n){let r=0;if(n==="+1"||n==="-1"){const i=this.value(t)||0;r=n==="+1"?i+1:i-1}else typeof n=="number"&&(r=n);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,n){return super.canAdd(t,n)||super.canAdd(t,parseInt(n,10))}value(t){return parseInt(super.value(t),10)||void 0}}const gI=new pI("indent","ql-indent",{scope:ee.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class wl extends ze{}V(wl,"blotName","blockquote"),V(wl,"tagName","blockquote");class _l extends ze{static formats(t){return this.tagName.indexOf(t.tagName)+1}}V(_l,"blotName","header"),V(_l,"tagName",["H1","H2","H3","H4","H5","H6"]);class qi extends or{}qi.blotName="list-container";qi.tagName="OL";class Ui extends ze{static create(t){const n=super.create();return n.setAttribute("data-list",t),n}static formats(t){return t.getAttribute("data-list")||void 0}static register(){D.register(qi)}constructor(t,n){super(t,n);const r=n.ownerDocument.createElement("span"),i=s=>{if(!t.isEnabled())return;const o=this.statics.formats(n,t);o==="checked"?(this.format("list","unchecked"),s.preventDefault()):o==="unchecked"&&(this.format("list","checked"),s.preventDefault())};r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),this.attachUI(r)}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-list",n):super.format(t,n)}}Ui.blotName="list";Ui.tagName="LI";qi.allowedChildren=[Ui];Ui.requiredContainer=qi;class Ii extends cn{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}V(Ii,"blotName","bold"),V(Ii,"tagName",["STRONG","B"]);class vl extends Ii{}V(vl,"blotName","italic"),V(vl,"tagName",["EM","I"]);class Ln extends cn{static create(t){const n=super.create(t);return n.setAttribute("href",this.sanitize(t)),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}static formats(t){return t.getAttribute("href")}static sanitize(t){return vg(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,n){t!==this.statics.blotName||!n?super.format(t,n):this.domNode.setAttribute("href",this.constructor.sanitize(n))}}V(Ln,"blotName","link"),V(Ln,"tagName","A"),V(Ln,"SANITIZED_URL","about:blank"),V(Ln,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function vg(e,t){const n=document.createElement("a");n.href=e;const r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}class kl extends cn{static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}V(kl,"blotName","script"),V(kl,"tagName",["SUB","SUP"]);class Nl extends Ii{}V(Nl,"blotName","strike"),V(Nl,"tagName",["S","STRIKE"]);class Al extends cn{}V(Al,"blotName","underline"),V(Al,"tagName","U");class As extends mc{static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const n=super.create(t);return typeof t=="string"&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}V(As,"blotName","formula"),V(As,"className","ql-formula"),V(As,"tagName","SPAN");const Kd=["alt","height","width"];var _s;let mI=(_s=class extends _t{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Kd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return vg(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,n){Kd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}},V(_s,"blotName","image"),V(_s,"tagName","IMG"),_s);const Wd=["height","width"];class Ss extends Ot{static create(t){const n=super.create(t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","true"),n.setAttribute("src",this.sanitize(t)),n}static formats(t){return Wd.reduce((n,r)=>(t.hasAttribute(r)&&(n[r]=t.getAttribute(r)),n),{})}static sanitize(t){return Ln.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,n){Wd.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):super.format(t,n)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}V(Ss,"blotName","video"),V(Ss,"className","ql-video"),V(Ss,"tagName","IFRAME");const hi=new Wt("code-token","hljs",{scope:ee.INLINE});class xn extends cn{static formats(t,n){for(;t!=null&&t!==n.domNode;){if(t.classList&&t.classList.contains(Xe.className))return super.formats(t,n);t=t.parentNode}}constructor(t,n,r){super(t,n,r),hi.add(this.domNode,r)}format(t,n){t!==xn.blotName?super.format(t,n):n?hi.add(this.domNode,n):(hi.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),hi.value(this.domNode)||this.unwrap()}}xn.blotName="code-token";xn.className="ql-token";class Ct extends Xe{static create(t){const n=super.create(t);return typeof t=="string"&&n.setAttribute("data-language",t),n}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,n){t===this.statics.blotName&&n?this.domNode.setAttribute("data-language",n):super.format(t,n)}replaceWith(t,n){return this.formatAt(0,this.length(),xn.blotName,!1),super.replaceWith(t,n)}}class yi extends ar{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,n){t===Ct.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(t,n)}))}formatAt(t,n,r,i){r===Ct.blotName&&(this.forceNext=!0),super.formatAt(t,n,r,i)}highlight(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const i=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
75
75
  `)}
76
- `,s=Ct.formats(this.children.head.domNode);if(n||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const o=this.children.reduce((l,c)=>l.concat(sg(c,!1)),new J),a=t(i,s);o.diff(a).reduce((l,c)=>{let{retain:u,attributes:d}=c;return u?(d&&Object.keys(d).forEach(h=>{[Ct.blotName,En.blotName].includes(h)&&this.formatAt(l,u,h,d[h])}),l+u):l},0)}this.cachedText=i,this.forceNext=!1}}html(t,n){const[r]=this.children.find(t);return`<pre data-language="${r?Ct.formats(r.domNode):"plain"}">
76
+ `,s=Ct.formats(this.children.head.domNode);if(n||this.forceNext||this.cachedText!==i){if(i.trim().length>0||this.cachedText==null){const o=this.children.reduce((l,c)=>l.concat(sg(c,!1)),new J),a=t(i,s);o.diff(a).reduce((l,c)=>{let{retain:u,attributes:d}=c;return u?(d&&Object.keys(d).forEach(h=>{[Ct.blotName,xn.blotName].includes(h)&&this.formatAt(l,u,h,d[h])}),l+u):l},0)}this.cachedText=i,this.forceNext=!1}}html(t,n){const[r]=this.children.find(t);return`<pre data-language="${r?Ct.formats(r.domNode):"plain"}">
77
77
  ${ho(this.code(t,n))}
78
- </pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const n=Ct.formats(this.children.head.domNode);n!==this.uiNode.value&&(this.uiNode.value=n)}}}yi.allowedChildren=[Ct];Ct.requiredContainer=yi;Ct.allowedChildren=[En,Pr,Kt,Vt];const bI=(e,t,n)=>{if(typeof e.versionString=="string"){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value};class kg extends Yt{static register(){D.register(En,!0),D.register(Ct,!0),D.register(yi,!0)}constructor(t,n){if(super(t,n),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,i)=>{let{key:s}=i;return r[s]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(D.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof yi))return;const n=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:i,label:s}=r;const o=n.ownerDocument.createElement("option");o.textContent=s,o.setAttribute("value",i),n.appendChild(o)}),n.addEventListener("change",()=>{t.format(Ct.blotName,n.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(n),t.children.head&&(n.value=Ct.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(D.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(D.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(yi):[t]).forEach(s=>{s.highlight(this.highlightBlot,n)}),this.quill.update(D.sources.SILENT),r!=null&&this.quill.setSelection(r,D.sources.SILENT)}highlightBlot(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(n=this.languages[n]?n:"plain",n==="plain")return ho(t).split(`
78
+ </pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const n=Ct.formats(this.children.head.domNode);n!==this.uiNode.value&&(this.uiNode.value=n)}}}yi.allowedChildren=[Ct];Ct.requiredContainer=yi;Ct.allowedChildren=[xn,Pr,Kt,Vt];const bI=(e,t,n)=>{if(typeof e.versionString=="string"){const r=e.versionString.split(".")[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value};class kg extends Yt{static register(){D.register(xn,!0),D.register(Ct,!0),D.register(yi,!0)}constructor(t,n){if(super(t,n),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,i)=>{let{key:s}=i;return r[s]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(D.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof yi))return;const n=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:i,label:s}=r;const o=n.ownerDocument.createElement("option");o.textContent=s,o.setAttribute("value",i),n.appendChild(o)}),n.addEventListener("change",()=>{t.format(Ct.blotName,n.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(n),t.children.head&&(n.value=Ct.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(D.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(D.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(yi):[t]).forEach(s=>{s.highlight(this.highlightBlot,n)}),this.quill.update(D.sources.SILENT),r!=null&&this.quill.setSelection(r,D.sources.SILENT)}highlightBlot(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(n=this.languages[n]?n:"plain",n==="plain")return ho(t).split(`
79
79
  `).reduce((i,s,o)=>(o!==0&&i.insert(`
80
- `,{[Xe.blotName]:n}),i.insert(s)),new J);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Xe.className),r.innerHTML=bI(this.options.hljs,n,t),vc(this.quill.scroll,r,[(i,s)=>{const o=hi.value(i);return o?s.compose(new J().retain(s.length(),{[En.blotName]:o})):s}],[(i,s)=>i.data.split(`
80
+ `,{[Xe.blotName]:n}),i.insert(s)),new J);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(Xe.className),r.innerHTML=bI(this.options.hljs,n,t),vc(this.quill.scroll,r,[(i,s)=>{const o=hi.value(i);return o?s.compose(new J().retain(s.length(),{[xn.blotName]:o})):s}],[(i,s)=>i.data.split(`
81
81
  `).reduce((o,a,l)=>(l!==0&&o.insert(`
82
- `,{[Xe.blotName]:n}),o.insert(a)),s)],new WeakMap)}}kg.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const xi=class xi extends ze{static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",kc()),n}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===xi.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};V(xi,"blotName","table"),V(xi,"tagName","TD");let jt=xi;class xn extends or{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return t.table===n.table&&t.table===r.table&&t.table===i.table}return!1}optimize(t){super.optimize(t),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),i=n.next.formats();if(r.table!==i.table){const s=this.splitAfter(n);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}V(xn,"blotName","table-row"),V(xn,"tagName","TR");class an extends or{}V(an,"blotName","table-body"),V(an,"tagName","TBODY");class Fr extends or{balanceCells(){const t=this.descendants(xn),n=t.reduce((r,i)=>Math.max(i.children.length,r),0);t.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=jt.formats(r.children.head.domNode));const s=this.scroll.create(jt.blotName,i);r.appendChild(s),s.optimize()})})}cells(t){return this.rows().map(n=>n.children.at(t))}deleteColumn(t){const[n]=this.descendant(an);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t);i!=null&&i.remove()})}insertColumn(t){const[n]=this.descendant(an);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t),s=jt.formats(r.children.head.domNode),o=this.scroll.create(jt.blotName,s);r.insertBefore(o,i)})}insertRow(t){const[n]=this.descendant(an);if(n==null||n.children.head==null)return;const r=kc(),i=this.scroll.create(xn.blotName);n.children.head.children.forEach(()=>{const o=this.scroll.create(jt.blotName,r);i.appendChild(o)});const s=n.children.at(t);n.insertBefore(i,s)}rows(){const t=this.children.head;return t==null?[]:t.children.map(n=>n)}}V(Fr,"blotName","table-container"),V(Fr,"tagName","TABLE");Fr.allowedChildren=[an];an.requiredContainer=Fr;an.allowedChildren=[xn];xn.requiredContainer=an;xn.allowedChildren=[jt];jt.requiredContainer=xn;function kc(){return`row-${Math.random().toString(36).slice(2,6)}`}class yI extends Yt{static register(){D.register(jt),D.register(xn),D.register(an),D.register(Fr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Fr).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,n]=this.getTable();n!=null&&(t.deleteColumn(n.cellOffset()),this.quill.update(D.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(D.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const n=t.offset();t.remove(),this.quill.update(D.sources.USER),this.quill.setSelection(n,D.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(t.index);if(n==null||n.statics.blotName!==jt.blotName)return[null,null,null,-1];const i=n.parent;return[i.parent.parent,i,n,r]}insertColumn(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const o=s.cellOffset();r.insertColumn(o+t),this.quill.update(D.sources.USER);let a=i.rowOffset();t===0&&(a+=1),this.quill.setSelection(n.index+a,n.length,D.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const o=i.rowOffset();r.insertRow(o+t),this.quill.update(D.sources.USER),t>0?this.quill.setSelection(n,D.sources.SILENT):this.quill.setSelection(n.index+i.children.length,n.length,D.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,n){const r=this.quill.getSelection();if(r==null)return;const i=new Array(t).fill(0).reduce(s=>{const o=new Array(n).fill(`
83
- `).join("");return s.insert(o,{table:kc()})},new J().retain(r.index));this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(r.index,D.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(D.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(D.events.TEXT_CHANGE,(r,i,s)=>{s===D.sources.USER&&this.balanceTables()}),!0):!1)})}}const Vd=vn("quill:toolbar");class Nc extends Yt{constructor(t,n){var r,i;if(super(t,n),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),EI(s,this.options.container),(i=(r=t.container)==null?void 0:r.parentNode)==null||i.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Vd.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var a;const o=(a=this.options.handlers)==null?void 0:a[s];o&&this.addHandler(s,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(D.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find(i=>i.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){Vd.warn("ignoring attaching to nonexistent format",n,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,i=>{let s;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const a=t.options[t.selectedIndex];a.hasAttribute("selected")?s=!1:s=a.value||!1}else t.classList.contains("ql-active")?s=!1:s=t.value||!t.hasAttribute("value"),i.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,s);else if(this.quill.scroll.query(n).prototype instanceof _t){if(s=prompt(`Enter ${n}`),!s)return;this.quill.updateContents(new J().retain(o.index).delete(o.length).insert({[n]:s}),D.sources.USER)}else this.quill.format(n,s,D.sources.USER);this.update(o)}),this.controls.push([n,t])}update(t){const n=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[i,s]=r;if(s.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(n[i]==null)o=s.querySelector("option[selected]");else if(!Array.isArray(n[i])){let a=n[i];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=s.querySelector(`option[value="${a}"]`)}o==null?(s.value="",s.selectedIndex=-1):o.selected=!0}else if(t==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const o=n[i],a=o===s.getAttribute("value")||o!=null&&o.toString()===s.getAttribute("value")||o==null&&!s.getAttribute("value");s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}else{const o=n[i]!=null;s.classList.toggle("ql-active",o),s.setAttribute("aria-pressed",o.toString())}})}}Nc.DEFAULTS={};function Yd(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function EI(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")Yd(r,i);else{const s=Object.keys(i)[0],o=i[s];Array.isArray(o)?xI(r,s,o):Yd(r,s,o)}}),e.appendChild(r)})}function xI(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),r.appendChild(s)}),e.appendChild(r)}Nc.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,ee.INLINE)!=null&&this.quill.format(n,!1,D.sources.USER)})}else this.quill.removeFormat(e.index,e.length,D.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",D.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,D.sources.USER),this.quill.format("direction",e,D.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,D.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,D.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,D.sources.USER):this.quill.format("list","unchecked",D.sources.USER):this.quill.format("list",e,D.sources.USER)}}};const wI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',_I='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',vI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',kI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',NI='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',AI='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',SI='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',TI='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Zd='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',CI='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',OI='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',II='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',RI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',LI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',MI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',DI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',PI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',BI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',FI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',qI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',UI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',$I='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',zI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',jI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',HI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',GI='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',KI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',WI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',VI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',YI='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',ZI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',XI='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',QI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ri={align:{"":wI,center:_I,right:vI,justify:kI},background:NI,blockquote:AI,bold:SI,clean:TI,code:Zd,"code-block":Zd,color:CI,direction:{"":OI,rtl:II},formula:RI,header:{1:LI,2:MI,3:DI,4:PI,5:BI,6:FI},italic:qI,image:UI,indent:{"+1":$I,"-1":zI},link:jI,list:{bullet:HI,check:GI,ordered:KI},script:{sub:WI,super:VI},strike:YI,table:ZI,underline:XI,video:QI},JI='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Xd=0;function Qd(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class go{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Qd(this.label,"aria-expanded"),Qd(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=JI,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${Xd}`,Xd+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r!=null&&r.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Ng extends go{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class Ag extends go{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const eR=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class Sg{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,eR(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let o=0;if(s.right>i.right&&(o=i.right-s.right,this.root.style.left=`${n+o}px`),s.left<i.left&&(o=i.left-s.left,this.root.style.left=`${n+o}px`),s.bottom>i.bottom){const a=s.bottom-s.top,l=t.bottom-t.top+a;this.root.style.top=`${r-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const tR=[!1,"center","right","justify"],nR=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],rR=[!1,"serif","monospace"],iR=["1","2","3",!1],sR=["small",!1,"large","huge"];class $i extends Br{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),n[s]!=null))if(s==="direction")r.innerHTML=n[s][""]+n[s].rtl;else if(typeof n[s]=="string")r.innerHTML=n[s];else{const o=r.value||"";o!=null&&n[s][o]&&(r.innerHTML=n[s][o])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&ci(i,tR),typeof n.align=="object"))return new Ag(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&ci(i,nR,s==="background"?"#ffffff":"#000000"),new Ng(i,n[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?ci(i,rR):i.classList.contains("ql-header")?ci(i,iR):i.classList.contains("ql-size")&&ci(i,sR)),new go(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Z.events.EDITOR_CHANGE,r)}}$i.DEFAULTS=Mn({},Br.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Tg extends Sg{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,Z.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Z.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=oR(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,Z.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Z.sources.USER),this.quill.setSelection(r+2,Z.sources.USER)}break}}this.textbox.value="",this.hide()}}function oR(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function ci(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const aR=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Cg extends Tg{constructor(t,n){super(t,n),this.quill.on(Z.events.EDITOR_CHANGE,(r,i,s,o)=>{if(r===Z.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&o===Z.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(i.index,i.length);if(a.length===1){const l=this.quill.getBounds(i);l!=null&&this.position(l)}else{const l=a[a.length-1],c=this.quill.getIndex(l),u=Math.min(l.length()-1,i.index+i.length-c),d=this.quill.getBounds(new Qn(c,u));d!=null&&this.position(d)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Z.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}V(Cg,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Og extends $i{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=aR),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Cg(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Ri),this.buildPickers(t.container.querySelectorAll("select"),Ri))}}Og.DEFAULTS=Mn({},$i.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,D.sources.USER)}}}}});const lR=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ig extends Tg{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",n=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),n.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",n=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Z.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(Z.events.SELECTION_CHANGE,(n,r,i)=>{if(n!=null){if(n.length===0&&i===Z.sources.USER){const[s,o]=this.quill.scroll.descendant(Ln,n.index);if(s!=null){this.linkRange=new Qn(n.index-o,s.length());const a=Ln.formats(s.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}V(Ig,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class Rg extends $i{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=lR),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ri),this.buildPickers(t.container.querySelectorAll("select"),Ri),this.tooltip=new Ig(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}Rg.DEFAULTS=Mn({},$i.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,D.sources.USER)}}}}});D.register({"attributors/attribute/direction":dg,"attributors/class/align":lg,"attributors/class/background":NO,"attributors/class/color":kO,"attributors/class/direction":fg,"attributors/class/font":gg,"attributors/class/size":bg,"attributors/style/align":cg,"attributors/style/background":Ec,"attributors/style/color":yc,"attributors/style/direction":hg,"attributors/style/font":mg,"attributors/style/size":yg},!0);D.register({"formats/align":lg,"formats/direction":fg,"formats/indent":gI,"formats/background":Ec,"formats/color":yc,"formats/font":gg,"formats/size":bg,"formats/blockquote":wl,"formats/code-block":Xe,"formats/header":_l,"formats/list":Ui,"formats/bold":Ii,"formats/code":xc,"formats/italic":vl,"formats/link":Ln,"formats/script":kl,"formats/strike":Nl,"formats/underline":Al,"formats/formula":As,"formats/image":mI,"formats/video":Ss,"modules/syntax":kg,"modules/table":yI,"modules/toolbar":Nc,"themes/bubble":Og,"themes/snow":Rg,"ui/icons":Ri,"ui/picker":go,"ui/icon-picker":Ag,"ui/color-picker":Ng,"ui/tooltip":Sg},!0);class mo extends H.Component{constructor(t){super(t),this.editingAreaRef=H.createRef(),this.containerRef=H.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,i,s,o)=>{var a,l;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.getSemanticHTML(),i,o,this.unprivilegedEditor):r==="selection-change"&&((l=this.onEditorChangeSelection)==null||l.call(this,i,o,this.unprivilegedEditor))};const n=this.isControlled()?t.value:t.defaultValue;this.value=n??""}validateProps(t){if(H.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(H.Children.count(t.children)){const n=H.Children.only(t.children);if((n==null?void 0:n.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(t,n){if(this.validateProps(t),!this.editor||this.state.generation!==n.generation)return!0;if("value"in t){const r=this.getEditorContents(),i=t.value??"";this.isEqualValue(i,r)||this.setEditorContents(this.editor,i)}return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!On(t[r],this.props[r]))}shouldComponentRegenerate(t){return this.dirtyProps.some(n=>!On(t[n],this.props[n]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(t,n){if(this.editor&&this.shouldComponentRegenerate(t)){const r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&t.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==n.generation){const{delta:r,selection:i}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const s=this.editor;s.setContents(r),Jd(()=>this.setEditorSelection(s,i))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,i;if(!this.editor)return;this.unhookEditor(this.editor);const t=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof t=="object"&&t&&"container"in t&&typeof t.container=="string"||typeof t=="string")){const s=(i=this.containerRef.current)==null?void 0:i.querySelector(".ql-toolbar");s&&s.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(t,n){const r=new D(t,n);return n.tabIndex!=null&&this.setEditorTabIndex(r,n.tabIndex),this.hookEditor(r),r}hookEditor(t){this.unprivilegedEditor=this.makeUnprivilegedEditor(t),t.on("editor-change",this.onEditorChange)}unhookEditor(t){t.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(t){return t&&t.ops}isEqualValue(t,n){return this.isDelta(t)&&this.isDelta(n)?On(t.ops,n.ops):On(t,n)}setEditorContents(t,n){this.value=n;const r=this.getEditorSelection();typeof n=="string"?t.setContents(t.clipboard.convert({html:n})):t.setContents(n),Jd(()=>this.setEditorSelection(t,r))}setEditorSelection(t,n){if(this.selection=n,n){const r=t.getLength();n.index=Math.max(0,Math.min(n.index,r-1)),n.length=Math.max(0,Math.min(n.length,r-1-n.index)),t.setSelection(n)}}setEditorTabIndex(t,n){var r;(r=t==null?void 0:t.scroll)!=null&&r.domNode&&(t.scroll.domNode.tabIndex=n)}setEditorReadOnly(t,n){n?t.disable():t.enable()}makeUnprivilegedEditor(t){const n=t;return{getHTML:()=>n.root.innerHTML,getSemanticHTML:n.getSemanticHTML.bind(n),getLength:n.getLength.bind(n),getText:n.getText.bind(n),getContents:n.getContents.bind(n),getSelection:n.getSelection.bind(n),getBounds:n.getBounds.bind(n)}}getEditingArea(){const t=this.editingAreaRef.current;if(!t)throw new Error("Cannot find element for editing area");if(t.nodeType===3)throw new Error("Editing area cannot be a text node");return t}renderEditingArea(){const{children:t,preserveWhitespace:n}=this.props,{generation:r}=this.state,i={key:r,ref:this.editingAreaRef};return H.Children.count(t)?H.cloneElement(H.Children.only(t),i):n?H.createElement("pre",{...i}):H.createElement("div",{...i})}render(){return H.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(t,n,r,i){var o,a;if(!this.editor)return;const s=this.isDelta(this.value)?i.getContents():i.getSemanticHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=n,this.value=s,(a=(o=this.props).onChange)==null||a.call(o,t,n,r,i))}onEditorChangeSelection(t,n,r){var a,l,c,u,d,h;if(!this.editor)return;const i=this.getEditorSelection(),s=!i&&t,o=i&&!t;On(t,i)||(this.selection=t,(l=(a=this.props).onChangeSelection)==null||l.call(a,t,n,r),s?(u=(c=this.props).onFocus)==null||u.call(c,t,n,r):o&&((h=(d=this.props).onBlur)==null||h.call(d,i,n,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}mo.displayName="React Quill";mo.Quill=D;mo.defaultProps={theme:"snow",modules:{},readOnly:!1};function Jd(e){Promise.resolve().then(e)}function Lg({value:e,onChange:t,placeholder:n="Write your content...",error:r}){const i=H.useRef(null),s=H.useMemo(()=>({toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],[{align:[]}],["link","image","video"],["blockquote","code-block"],["clean"]]}),[]),o=H.useMemo(()=>["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],[]);return x.jsxs("div",{className:`quill-editor-wrapper rounded-md border ${r?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:[x.jsx("style",{children:`
82
+ `,{[Xe.blotName]:n}),o.insert(a)),s)],new WeakMap)}}kg.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Ei=class Ei extends ze{static create(t){const n=super.create();return t?n.setAttribute("data-row",t):n.setAttribute("data-row",kc()),n}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===Ei.blotName&&n?this.domNode.setAttribute("data-row",n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};V(Ei,"blotName","table"),V(Ei,"tagName","TD");let jt=Ei;class En extends or{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),n=this.children.tail.formats(),r=this.next.children.head.formats(),i=this.next.children.tail.formats();return t.table===n.table&&t.table===r.table&&t.table===i.table}return!1}optimize(t){super.optimize(t),this.children.forEach(n=>{if(n.next==null)return;const r=n.formats(),i=n.next.formats();if(r.table!==i.table){const s=this.splitAfter(n);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}V(En,"blotName","table-row"),V(En,"tagName","TR");class an extends or{}V(an,"blotName","table-body"),V(an,"tagName","TBODY");class Fr extends or{balanceCells(){const t=this.descendants(En),n=t.reduce((r,i)=>Math.max(i.children.length,r),0);t.forEach(r=>{new Array(n-r.children.length).fill(0).forEach(()=>{let i;r.children.head!=null&&(i=jt.formats(r.children.head.domNode));const s=this.scroll.create(jt.blotName,i);r.appendChild(s),s.optimize()})})}cells(t){return this.rows().map(n=>n.children.at(t))}deleteColumn(t){const[n]=this.descendant(an);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t);i!=null&&i.remove()})}insertColumn(t){const[n]=this.descendant(an);n==null||n.children.head==null||n.children.forEach(r=>{const i=r.children.at(t),s=jt.formats(r.children.head.domNode),o=this.scroll.create(jt.blotName,s);r.insertBefore(o,i)})}insertRow(t){const[n]=this.descendant(an);if(n==null||n.children.head==null)return;const r=kc(),i=this.scroll.create(En.blotName);n.children.head.children.forEach(()=>{const o=this.scroll.create(jt.blotName,r);i.appendChild(o)});const s=n.children.at(t);n.insertBefore(i,s)}rows(){const t=this.children.head;return t==null?[]:t.children.map(n=>n)}}V(Fr,"blotName","table-container"),V(Fr,"tagName","TABLE");Fr.allowedChildren=[an];an.requiredContainer=Fr;an.allowedChildren=[En];En.requiredContainer=an;En.allowedChildren=[jt];jt.requiredContainer=En;function kc(){return`row-${Math.random().toString(36).slice(2,6)}`}class yI extends Yt{static register(){D.register(jt),D.register(En),D.register(an),D.register(Fr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Fr).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,n]=this.getTable();n!=null&&(t.deleteColumn(n.cellOffset()),this.quill.update(D.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(D.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const n=t.offset();t.remove(),this.quill.update(D.sources.USER),this.quill.setSelection(n,D.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[n,r]=this.quill.getLine(t.index);if(n==null||n.statics.blotName!==jt.blotName)return[null,null,null,-1];const i=n.parent;return[i.parent.parent,i,n,r]}insertColumn(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const o=s.cellOffset();r.insertColumn(o+t),this.quill.update(D.sources.USER);let a=i.rowOffset();t===0&&(a+=1),this.quill.setSelection(n.index+a,n.length,D.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const n=this.quill.getSelection();if(!n)return;const[r,i,s]=this.getTable(n);if(s==null)return;const o=i.rowOffset();r.insertRow(o+t),this.quill.update(D.sources.USER),t>0?this.quill.setSelection(n,D.sources.SILENT):this.quill.setSelection(n.index+i.children.length,n.length,D.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,n){const r=this.quill.getSelection();if(r==null)return;const i=new Array(t).fill(0).reduce(s=>{const o=new Array(n).fill(`
83
+ `).join("");return s.insert(o,{table:kc()})},new J().retain(r.index));this.quill.updateContents(i,D.sources.USER),this.quill.setSelection(r.index,D.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(D.events.SCROLL_OPTIMIZE,t=>{t.some(n=>["TD","TR","TBODY","TABLE"].includes(n.target.tagName)?(this.quill.once(D.events.TEXT_CHANGE,(r,i,s)=>{s===D.sources.USER&&this.balanceTables()}),!0):!1)})}}const Vd=vn("quill:toolbar");class Nc extends Yt{constructor(t,n){var r,i;if(super(t,n),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),xI(s,this.options.container),(i=(r=t.container)==null?void 0:r.parentNode)==null||i.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Vd.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var a;const o=(a=this.options.handlers)==null?void 0:a[s];o&&this.addHandler(s,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(D.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,n){this.handlers[t]=n}attach(t){let n=Array.from(t.classList).find(i=>i.indexOf("ql-")===0);if(!n)return;if(n=n.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[n]==null&&this.quill.scroll.query(n)==null){Vd.warn("ignoring attaching to nonexistent format",n,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,i=>{let s;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const a=t.options[t.selectedIndex];a.hasAttribute("selected")?s=!1:s=a.value||!1}else t.classList.contains("ql-active")?s=!1:s=t.value||!t.hasAttribute("value"),i.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[n]!=null)this.handlers[n].call(this,s);else if(this.quill.scroll.query(n).prototype instanceof _t){if(s=prompt(`Enter ${n}`),!s)return;this.quill.updateContents(new J().retain(o.index).delete(o.length).insert({[n]:s}),D.sources.USER)}else this.quill.format(n,s,D.sources.USER);this.update(o)}),this.controls.push([n,t])}update(t){const n=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[i,s]=r;if(s.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(n[i]==null)o=s.querySelector("option[selected]");else if(!Array.isArray(n[i])){let a=n[i];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=s.querySelector(`option[value="${a}"]`)}o==null?(s.value="",s.selectedIndex=-1):o.selected=!0}else if(t==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const o=n[i],a=o===s.getAttribute("value")||o!=null&&o.toString()===s.getAttribute("value")||o==null&&!s.getAttribute("value");s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}else{const o=n[i]!=null;s.classList.toggle("ql-active",o),s.setAttribute("aria-pressed",o.toString())}})}}Nc.DEFAULTS={};function Yd(e,t,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),n!=null?(r.value=n,r.setAttribute("aria-label",`${t}: ${n}`)):r.setAttribute("aria-label",t),e.appendChild(r)}function xI(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(n=>{const r=document.createElement("span");r.classList.add("ql-formats"),n.forEach(i=>{if(typeof i=="string")Yd(r,i);else{const s=Object.keys(i)[0],o=i[s];Array.isArray(o)?EI(r,s,o):Yd(r,s,o)}}),e.appendChild(r)})}function EI(e,t,n){const r=document.createElement("select");r.classList.add(`ql-${t}`),n.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),r.appendChild(s)}),e.appendChild(r)}Nc.DEFAULTS={container:null,handlers:{clean(){const e=this.quill.getSelection();if(e!=null)if(e.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(n=>{this.quill.scroll.query(n,ee.INLINE)!=null&&this.quill.format(n,!1,D.sources.USER)})}else this.quill.removeFormat(e.index,e.length,D.sources.USER)},direction(e){const{align:t}=this.quill.getFormat();e==="rtl"&&t==null?this.quill.format("align","right",D.sources.USER):!e&&t==="right"&&this.quill.format("align",!1,D.sources.USER),this.quill.format("direction",e,D.sources.USER)},indent(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e==="+1"||e==="-1"){let i=e==="+1"?1:-1;n.direction==="rtl"&&(i*=-1),this.quill.format("indent",r+i,D.sources.USER)}},link(e){e===!0&&(e=prompt("Enter link URL:")),this.quill.format("link",e,D.sources.USER)},list(e){const t=this.quill.getSelection(),n=this.quill.getFormat(t);e==="check"?n.list==="checked"||n.list==="unchecked"?this.quill.format("list",!1,D.sources.USER):this.quill.format("list","unchecked",D.sources.USER):this.quill.format("list",e,D.sources.USER)}}};const wI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',_I='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',vI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',kI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',NI='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',AI='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',SI='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',TI='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Zd='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',CI='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',OI='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',II='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',RI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',LI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',MI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',DI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',PI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',BI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',FI='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',qI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',UI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',$I='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',zI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',jI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',HI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',GI='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',KI='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',WI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',VI='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',YI='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',ZI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',XI='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',QI='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ri={align:{"":wI,center:_I,right:vI,justify:kI},background:NI,blockquote:AI,bold:SI,clean:TI,code:Zd,"code-block":Zd,color:CI,direction:{"":OI,rtl:II},formula:RI,header:{1:LI,2:MI,3:DI,4:PI,5:BI,6:FI},italic:qI,image:UI,indent:{"+1":$I,"-1":zI},link:jI,list:{bullet:HI,check:GI,ordered:KI},script:{sub:WI,super:VI},strike:YI,table:ZI,underline:XI,video:QI},JI='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Xd=0;function Qd(e,t){e.setAttribute(t,`${e.getAttribute(t)!=="true"}`)}class go{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),n.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Qd(this.label,"aria-expanded"),Qd(this.options,"aria-hidden")}buildItem(t){const n=document.createElement("span");n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&n.setAttribute("data-value",r),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",()=>{this.selectItem(n,!0)}),n.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(n,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),n}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=JI,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${Xd}`,Xd+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(n=>{const r=this.buildItem(n);t.appendChild(r),n.selected===!0&&this.selectItem(r)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");t!==r&&(r!=null&&r.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),n&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const n=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}class Ng extends go{constructor(t,n){super(t),this.label.innerHTML=n,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(t){const n=super.buildItem(t);return n.style.backgroundColor=t.getAttribute("value")||"",n}selectItem(t,n){super.selectItem(t,n);const r=this.label.querySelector(".ql-color-label"),i=t&&t.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=i:r.style.fill=i)}}class Ag extends go{constructor(t,n){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=n[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,n){super.selectItem(t,n);const r=t||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const eR=e=>{const{overflowY:t}=getComputedStyle(e,null);return t!=="visible"&&t!=="clip"};class Sg{constructor(t,n){this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,eR(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const n=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${n}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let o=0;if(s.right>i.right&&(o=i.right-s.right,this.root.style.left=`${n+o}px`),s.left<i.left&&(o=i.left-s.left,this.root.style.left=`${n+o}px`),s.bottom>i.bottom){const a=s.bottom-s.top,l=t.bottom-t.top+a;this.root.style.top=`${r-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const tR=[!1,"center","right","justify"],nR=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],rR=[!1,"serif","monospace"],iR=["1","2","3",!1],sR=["small",!1,"large","huge"];class $i extends Br{constructor(t,n){super(t,n);const r=i=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};t.emitter.listenDOM("click",document.body,r)}addModule(t){const n=super.addModule(t);return t==="toolbar"&&this.extendToolbar(n),n}buildButtons(t,n){Array.from(t).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),n[s]!=null))if(s==="direction")r.innerHTML=n[s][""]+n[s].rtl;else if(typeof n[s]=="string")r.innerHTML=n[s];else{const o=r.value||"";o!=null&&n[s][o]&&(r.innerHTML=n[s][o])}})})}buildPickers(t,n){this.pickers=Array.from(t).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&ci(i,tR),typeof n.align=="object"))return new Ag(i,n.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&ci(i,nR,s==="background"?"#ffffff":"#000000"),new Ng(i,n[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?ci(i,rR):i.classList.contains("ql-header")?ci(i,iR):i.classList.contains("ql-size")&&ci(i,sR)),new go(i)});const r=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Z.events.EDITOR_CHANGE,r)}}$i.DEFAULTS=Mn({},Br.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let e=this.container.querySelector("input.ql-image[type=file]");e==null&&(e=document.createElement("input"),e.setAttribute("type","file"),e.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),e.classList.add("ql-image"),e.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=""}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Tg extends Sg{constructor(t,n){super(t,n),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;n!=null?this.textbox.value=n:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:n}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,Z.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Z.sources.USER)),this.quill.root.scrollTop=n;break}case"video":t=oR(t);case"formula":{if(!t)break;const n=this.quill.getSelection(!0);if(n!=null){const r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,Z.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Z.sources.USER),this.quill.setSelection(r+2,Z.sources.USER)}break}}this.textbox.value="",this.hide()}}function oR(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:e}function ci(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(r=>{const i=document.createElement("option");r===n?i.setAttribute("selected","selected"):i.setAttribute("value",String(r)),e.appendChild(i)})}const aR=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Cg extends Tg{constructor(t,n){super(t,n),this.quill.on(Z.events.EDITOR_CHANGE,(r,i,s,o)=>{if(r===Z.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&o===Z.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(i.index,i.length);if(a.length===1){const l=this.quill.getBounds(i);l!=null&&this.position(l)}else{const l=a[a.length-1],c=this.quill.getIndex(l),u=Math.min(l.length()-1,i.index+i.length-c),d=this.quill.getBounds(new Qn(c,u));d!=null&&this.position(d)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Z.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const n=this.quill.getBounds(t);n!=null&&this.position(n)}},1)})}cancel(){this.show()}position(t){const n=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",n!==0&&(r.style.marginLeft=`${-1*n-r.offsetWidth/2}px`),n}}V(Cg,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Og extends $i{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=aR),super(t,n),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Cg(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Ri),this.buildPickers(t.container.querySelectorAll("select"),Ri))}}Og.DEFAULTS=Mn({},$i.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1,D.sources.USER)}}}}});const lR=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ig extends Tg{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",n=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),n.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",n=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Z.sources.USER),delete this.linkRange}n.preventDefault(),this.hide()}),this.quill.on(Z.events.SELECTION_CHANGE,(n,r,i)=>{if(n!=null){if(n.length===0&&i===Z.sources.USER){const[s,o]=this.quill.scroll.descendant(Ln,n.index);if(s!=null){this.linkRange=new Qn(n.index-o,s.length());const a=Ln.formats(s.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}V(Ig,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class Rg extends $i{constructor(t,n){n.modules.toolbar!=null&&n.modules.toolbar.container==null&&(n.modules.toolbar.container=lR),super(t,n),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Ri),this.buildPickers(t.container.querySelectorAll("select"),Ri),this.tooltip=new Ig(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(n,r)=>{t.handlers.link.call(t,!r.format.link)}))}}Rg.DEFAULTS=Mn({},$i.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){const t=this.quill.getSelection();if(t==null||t.length===0)return;let n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&n.indexOf("mailto:")!==0&&(n=`mailto:${n}`);const{tooltip:r}=this.quill.theme;r.edit("link",n)}else this.quill.format("link",!1,D.sources.USER)}}}}});D.register({"attributors/attribute/direction":dg,"attributors/class/align":lg,"attributors/class/background":NO,"attributors/class/color":kO,"attributors/class/direction":fg,"attributors/class/font":gg,"attributors/class/size":bg,"attributors/style/align":cg,"attributors/style/background":xc,"attributors/style/color":yc,"attributors/style/direction":hg,"attributors/style/font":mg,"attributors/style/size":yg},!0);D.register({"formats/align":lg,"formats/direction":fg,"formats/indent":gI,"formats/background":xc,"formats/color":yc,"formats/font":gg,"formats/size":bg,"formats/blockquote":wl,"formats/code-block":Xe,"formats/header":_l,"formats/list":Ui,"formats/bold":Ii,"formats/code":Ec,"formats/italic":vl,"formats/link":Ln,"formats/script":kl,"formats/strike":Nl,"formats/underline":Al,"formats/formula":As,"formats/image":mI,"formats/video":Ss,"modules/syntax":kg,"modules/table":yI,"modules/toolbar":Nc,"themes/bubble":Og,"themes/snow":Rg,"ui/icons":Ri,"ui/picker":go,"ui/icon-picker":Ag,"ui/color-picker":Ng,"ui/tooltip":Sg},!0);class mo extends H.Component{constructor(t){super(t),this.editingAreaRef=H.createRef(),this.containerRef=H.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,i,s,o)=>{var a,l;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.getSemanticHTML(),i,o,this.unprivilegedEditor):r==="selection-change"&&((l=this.onEditorChangeSelection)==null||l.call(this,i,o,this.unprivilegedEditor))};const n=this.isControlled()?t.value:t.defaultValue;this.value=n??""}validateProps(t){if(H.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(H.Children.count(t.children)){const n=H.Children.only(t.children);if((n==null?void 0:n.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(t,n){if(this.validateProps(t),!this.editor||this.state.generation!==n.generation)return!0;if("value"in t){const r=this.getEditorContents(),i=t.value??"";this.isEqualValue(i,r)||this.setEditorContents(this.editor,i)}return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!On(t[r],this.props[r]))}shouldComponentRegenerate(t){return this.dirtyProps.some(n=>!On(t[n],this.props[n]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(t,n){if(this.editor&&this.shouldComponentRegenerate(t)){const r=this.editor.getContents(),i=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:i},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&t.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==n.generation){const{delta:r,selection:i}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const s=this.editor;s.setContents(r),Jd(()=>this.setEditorSelection(s,i))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,i;if(!this.editor)return;this.unhookEditor(this.editor);const t=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof t=="object"&&t&&"container"in t&&typeof t.container=="string"||typeof t=="string")){const s=(i=this.containerRef.current)==null?void 0:i.querySelector(".ql-toolbar");s&&s.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(t,n){const r=new D(t,n);return n.tabIndex!=null&&this.setEditorTabIndex(r,n.tabIndex),this.hookEditor(r),r}hookEditor(t){this.unprivilegedEditor=this.makeUnprivilegedEditor(t),t.on("editor-change",this.onEditorChange)}unhookEditor(t){t.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(t){return t&&t.ops}isEqualValue(t,n){return this.isDelta(t)&&this.isDelta(n)?On(t.ops,n.ops):On(t,n)}setEditorContents(t,n){this.value=n;const r=this.getEditorSelection();typeof n=="string"?t.setContents(t.clipboard.convert({html:n})):t.setContents(n),Jd(()=>this.setEditorSelection(t,r))}setEditorSelection(t,n){if(this.selection=n,n){const r=t.getLength();n.index=Math.max(0,Math.min(n.index,r-1)),n.length=Math.max(0,Math.min(n.length,r-1-n.index)),t.setSelection(n)}}setEditorTabIndex(t,n){var r;(r=t==null?void 0:t.scroll)!=null&&r.domNode&&(t.scroll.domNode.tabIndex=n)}setEditorReadOnly(t,n){n?t.disable():t.enable()}makeUnprivilegedEditor(t){const n=t;return{getHTML:()=>n.root.innerHTML,getSemanticHTML:n.getSemanticHTML.bind(n),getLength:n.getLength.bind(n),getText:n.getText.bind(n),getContents:n.getContents.bind(n),getSelection:n.getSelection.bind(n),getBounds:n.getBounds.bind(n)}}getEditingArea(){const t=this.editingAreaRef.current;if(!t)throw new Error("Cannot find element for editing area");if(t.nodeType===3)throw new Error("Editing area cannot be a text node");return t}renderEditingArea(){const{children:t,preserveWhitespace:n}=this.props,{generation:r}=this.state,i={key:r,ref:this.editingAreaRef};return H.Children.count(t)?H.cloneElement(H.Children.only(t),i):n?H.createElement("pre",{...i}):H.createElement("div",{...i})}render(){return H.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(t,n,r,i){var o,a;if(!this.editor)return;const s=this.isDelta(this.value)?i.getContents():i.getSemanticHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=n,this.value=s,(a=(o=this.props).onChange)==null||a.call(o,t,n,r,i))}onEditorChangeSelection(t,n,r){var a,l,c,u,d,h;if(!this.editor)return;const i=this.getEditorSelection(),s=!i&&t,o=i&&!t;On(t,i)||(this.selection=t,(l=(a=this.props).onChangeSelection)==null||l.call(a,t,n,r),s?(u=(c=this.props).onFocus)==null||u.call(c,t,n,r):o&&((h=(d=this.props).onBlur)==null||h.call(d,i,n,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}mo.displayName="React Quill";mo.Quill=D;mo.defaultProps={theme:"snow",modules:{},readOnly:!1};function Jd(e){Promise.resolve().then(e)}function Lg({value:e,onChange:t,placeholder:n="Write your content...",error:r}){const i=H.useRef(null),s=H.useMemo(()=>({toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],[{align:[]}],["link","image","video"],["blockquote","code-block"],["clean"]]}),[]),o=H.useMemo(()=>["header","bold","italic","underline","strike","list","bullet","color","background","align","link","image","video","blockquote","code-block"],[]);return E.jsxs("div",{className:`quill-editor-wrapper rounded-md border ${r?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"}`,children:[E.jsx("style",{children:`
84
84
  /* Dark mode styles for Quill editor */
85
85
  .dark .quill-editor-wrapper .ql-toolbar {
86
86
  background-color: rgb(17 24 39);
@@ -163,12 +163,12 @@ ${ho(this.code(t,n))}
163
163
  .dark .quill-editor-wrapper .ql-toolbar .ql-picker-label.ql-active {
164
164
  color: rgb(96 165 250);
165
165
  }
166
- `}),x.jsx(mo,{ref:i,theme:"snow",value:e,onChange:t,placeholder:n,modules:s,formats:o,className:"min-h-[400px]"})]})}function Mg(e,t){return function(){return e.apply(t,arguments)}}const{toString:cR}=Object.prototype,{getPrototypeOf:Ac}=Object,{iterator:bo,toStringTag:Dg}=Symbol,yo=(e=>t=>{const n=cR.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zt=e=>(e=e.toLowerCase(),t=>yo(t)===e),Eo=e=>t=>typeof t===e,{isArray:jr}=Array,qr=Eo("undefined");function zi(e){return e!==null&&!qr(e)&&e.constructor!==null&&!qr(e.constructor)&&pt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pg=Zt("ArrayBuffer");function uR(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pg(e.buffer),t}const dR=Eo("string"),pt=Eo("function"),Bg=Eo("number"),ji=e=>e!==null&&typeof e=="object",fR=e=>e===!0||e===!1,Ts=e=>{if(yo(e)!=="object")return!1;const t=Ac(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Dg in e)&&!(bo in e)},hR=e=>{if(!ji(e)||zi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pR=Zt("Date"),gR=Zt("File"),mR=Zt("Blob"),bR=Zt("FileList"),yR=e=>ji(e)&&pt(e.pipe),ER=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pt(e.append)&&((t=yo(e))==="formdata"||t==="object"&&pt(e.toString)&&e.toString()==="[object FormData]"))},xR=Zt("URLSearchParams"),[wR,_R,vR,kR]=["ReadableStream","Request","Response","Headers"].map(Zt),NR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),jr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(zi(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Fg(e,t){if(zi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qg=e=>!qr(e)&&e!==Kn;function Sl(){const{caseless:e,skipUndefined:t}=qg(this)&&this||{},n={},r=(i,s)=>{const o=e&&Fg(n,s)||s;Ts(n[o])&&Ts(i)?n[o]=Sl(n[o],i):Ts(i)?n[o]=Sl({},i):jr(i)?n[o]=i.slice():(!t||!qr(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Hi(arguments[i],r);return n}const AR=(e,t,n,{allOwnKeys:r}={})=>(Hi(t,(i,s)=>{n&&pt(i)?e[s]=Mg(i,n):e[s]=i},{allOwnKeys:r}),e),SR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TR=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},CR=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Ac(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},OR=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IR=e=>{if(!e)return null;if(jr(e))return e;let t=e.length;if(!Bg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},RR=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ac(Uint8Array)),LR=(e,t)=>{const r=(e&&e[bo]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},MR=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DR=Zt("HTMLFormElement"),PR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ef=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BR=Zt("RegExp"),Ug=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Hi(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},FR=e=>{Ug(e,(t,n)=>{if(pt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qR=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jr(e)?r(e):r(String(e).split(t)),n},UR=()=>{},$R=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zR(e){return!!(e&&pt(e.append)&&e[Dg]==="FormData"&&e[bo])}const jR=e=>{const t=new Array(10),n=(r,i)=>{if(ji(r)){if(t.indexOf(r)>=0)return;if(zi(r))return r;if(!("toJSON"in r)){t[i]=r;const s=jr(r)?[]:{};return Hi(r,(o,a)=>{const l=n(o,i+1);!qr(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},HR=Zt("AsyncFunction"),GR=e=>e&&(ji(e)||pt(e))&&pt(e.then)&&pt(e.catch),$g=((e,t)=>e?setImmediate:t?((n,r)=>(Kn.addEventListener("message",({source:i,data:s})=>{i===Kn&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Kn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pt(Kn.postMessage)),KR=typeof queueMicrotask<"u"?queueMicrotask.bind(Kn):typeof process<"u"&&process.nextTick||$g,WR=e=>e!=null&&pt(e[bo]),L={isArray:jr,isArrayBuffer:Pg,isBuffer:zi,isFormData:ER,isArrayBufferView:uR,isString:dR,isNumber:Bg,isBoolean:fR,isObject:ji,isPlainObject:Ts,isEmptyObject:hR,isReadableStream:wR,isRequest:_R,isResponse:vR,isHeaders:kR,isUndefined:qr,isDate:pR,isFile:gR,isBlob:mR,isRegExp:BR,isFunction:pt,isStream:yR,isURLSearchParams:xR,isTypedArray:RR,isFileList:bR,forEach:Hi,merge:Sl,extend:AR,trim:NR,stripBOM:SR,inherits:TR,toFlatObject:CR,kindOf:yo,kindOfTest:Zt,endsWith:OR,toArray:IR,forEachEntry:LR,matchAll:MR,isHTMLForm:DR,hasOwnProperty:ef,hasOwnProp:ef,reduceDescriptors:Ug,freezeMethods:FR,toObjectSet:qR,toCamelCase:PR,noop:UR,toFiniteNumber:$R,findKey:Fg,global:Kn,isContextDefined:qg,isSpecCompliantForm:zR,toJSONObject:jR,isAsyncFn:HR,isThenable:GR,setImmediate:$g,asap:KR,isIterable:WR};function ce(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const zg=ce.prototype,jg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jg[e]={value:e}});Object.defineProperties(ce,jg);Object.defineProperty(zg,"isAxiosError",{value:!0});ce.from=(e,t,n,r,i,s)=>{const o=Object.create(zg);L.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,a,l,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const VR=null;function Tl(e){return L.isPlainObject(e)||L.isArray(e)}function Hg(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function tf(e,t,n){return e?e.concat(t).map(function(i,s){return i=Hg(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function YR(e){return L.isArray(e)&&!e.some(Tl)}const ZR=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function xo(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!L.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(L.isDate(p))return p.toISOString();if(L.isBoolean(p))return p.toString();if(!l&&L.isBlob(p))throw new ce("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(p)||L.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,b){let y=p;if(p&&!b&&typeof p=="object"){if(L.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(L.isArray(p)&&YR(p)||(L.isFileList(p)||L.endsWith(m,"[]"))&&(y=L.toArray(p)))return m=Hg(m),y.forEach(function(v,T){!(L.isUndefined(v)||v===null)&&t.append(o===!0?tf([m],T,s):o===null?m:m+"[]",c(v))}),!1}return Tl(p)?!0:(t.append(tf(b,m,s),c(p)),!1)}const d=[],h=Object.assign(ZR,{defaultVisitor:u,convertValue:c,isVisitable:Tl});function f(p,m){if(!L.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),L.forEach(p,function(y,_){(!(L.isUndefined(y)||y===null)&&i.call(t,y,L.isString(_)?_.trim():_,m,h))===!0&&f(y,m?m.concat(_):[_])}),d.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return f(e),t}function nf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Sc(e,t){this._pairs=[],e&&xo(e,this,t)}const Gg=Sc.prototype;Gg.append=function(t,n){this._pairs.push([t,n])};Gg.toString=function(t){const n=t?function(r){return t.call(this,r,nf)}:nf;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function XR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kg(e,t,n){if(!t)return e;const r=n&&n.encode||XR;L.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=L.isURLSearchParams(t)?t.toString():new Sc(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class rf{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},QR=typeof URLSearchParams<"u"?URLSearchParams:Sc,JR=typeof FormData<"u"?FormData:null,eL=typeof Blob<"u"?Blob:null,tL={isBrowser:!0,classes:{URLSearchParams:QR,FormData:JR,Blob:eL},protocols:["http","https","file","blob","url","data"]},Tc=typeof window<"u"&&typeof document<"u",Cl=typeof navigator=="object"&&navigator||void 0,nL=Tc&&(!Cl||["ReactNative","NativeScript","NS"].indexOf(Cl.product)<0),rL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iL=Tc&&window.location.href||"http://localhost",sL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tc,hasStandardBrowserEnv:nL,hasStandardBrowserWebWorkerEnv:rL,navigator:Cl,origin:iL},Symbol.toStringTag,{value:"Module"})),Ye={...sL,...tL};function oL(e,t){return xo(e,new Ye.classes.URLSearchParams,{visitor:function(n,r,i,s){return Ye.isNode&&L.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function aL(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lL(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Vg(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&L.isArray(i)?i.length:o,l?(L.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!L.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&L.isArray(i[o])&&(i[o]=lL(i[o])),!a)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(r,i)=>{t(aL(r),i,n,0)}),n}return null}function cL(e,t,n){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gi={transitional:Wg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=L.isObject(t);if(s&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return i?JSON.stringify(Vg(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return oL(t,this.formSerializer).toString();if((a=L.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return xo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),cL(t)):t}],transformResponse:[function(t){const n=this.transitional||Gi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?ce.from(a,ce.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Gi.headers[e]={}});const uL=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dL=e=>{const t={};let n,r,i;return e&&e.split(`
166
+ `}),E.jsx(mo,{ref:i,theme:"snow",value:e,onChange:t,placeholder:n,modules:s,formats:o,className:"min-h-[400px]"})]})}function Mg(e,t){return function(){return e.apply(t,arguments)}}const{toString:cR}=Object.prototype,{getPrototypeOf:Ac}=Object,{iterator:bo,toStringTag:Dg}=Symbol,yo=(e=>t=>{const n=cR.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zt=e=>(e=e.toLowerCase(),t=>yo(t)===e),xo=e=>t=>typeof t===e,{isArray:jr}=Array,qr=xo("undefined");function zi(e){return e!==null&&!qr(e)&&e.constructor!==null&&!qr(e.constructor)&&pt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Pg=Zt("ArrayBuffer");function uR(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Pg(e.buffer),t}const dR=xo("string"),pt=xo("function"),Bg=xo("number"),ji=e=>e!==null&&typeof e=="object",fR=e=>e===!0||e===!1,Ts=e=>{if(yo(e)!=="object")return!1;const t=Ac(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Dg in e)&&!(bo in e)},hR=e=>{if(!ji(e)||zi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},pR=Zt("Date"),gR=Zt("File"),mR=Zt("Blob"),bR=Zt("FileList"),yR=e=>ji(e)&&pt(e.pipe),xR=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pt(e.append)&&((t=yo(e))==="formdata"||t==="object"&&pt(e.toString)&&e.toString()==="[object FormData]"))},ER=Zt("URLSearchParams"),[wR,_R,vR,kR]=["ReadableStream","Request","Response","Headers"].map(Zt),NR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),jr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(zi(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Fg(e,t){if(zi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qg=e=>!qr(e)&&e!==Kn;function Sl(){const{caseless:e,skipUndefined:t}=qg(this)&&this||{},n={},r=(i,s)=>{const o=e&&Fg(n,s)||s;Ts(n[o])&&Ts(i)?n[o]=Sl(n[o],i):Ts(i)?n[o]=Sl({},i):jr(i)?n[o]=i.slice():(!t||!qr(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Hi(arguments[i],r);return n}const AR=(e,t,n,{allOwnKeys:r}={})=>(Hi(t,(i,s)=>{n&&pt(i)?e[s]=Mg(i,n):e[s]=i},{allOwnKeys:r}),e),SR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TR=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},CR=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Ac(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},OR=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IR=e=>{if(!e)return null;if(jr(e))return e;let t=e.length;if(!Bg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},RR=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ac(Uint8Array)),LR=(e,t)=>{const r=(e&&e[bo]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},MR=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},DR=Zt("HTMLFormElement"),PR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ef=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BR=Zt("RegExp"),Ug=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Hi(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},FR=e=>{Ug(e,(t,n)=>{if(pt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qR=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jr(e)?r(e):r(String(e).split(t)),n},UR=()=>{},$R=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zR(e){return!!(e&&pt(e.append)&&e[Dg]==="FormData"&&e[bo])}const jR=e=>{const t=new Array(10),n=(r,i)=>{if(ji(r)){if(t.indexOf(r)>=0)return;if(zi(r))return r;if(!("toJSON"in r)){t[i]=r;const s=jr(r)?[]:{};return Hi(r,(o,a)=>{const l=n(o,i+1);!qr(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},HR=Zt("AsyncFunction"),GR=e=>e&&(ji(e)||pt(e))&&pt(e.then)&&pt(e.catch),$g=((e,t)=>e?setImmediate:t?((n,r)=>(Kn.addEventListener("message",({source:i,data:s})=>{i===Kn&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Kn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pt(Kn.postMessage)),KR=typeof queueMicrotask<"u"?queueMicrotask.bind(Kn):typeof process<"u"&&process.nextTick||$g,WR=e=>e!=null&&pt(e[bo]),L={isArray:jr,isArrayBuffer:Pg,isBuffer:zi,isFormData:xR,isArrayBufferView:uR,isString:dR,isNumber:Bg,isBoolean:fR,isObject:ji,isPlainObject:Ts,isEmptyObject:hR,isReadableStream:wR,isRequest:_R,isResponse:vR,isHeaders:kR,isUndefined:qr,isDate:pR,isFile:gR,isBlob:mR,isRegExp:BR,isFunction:pt,isStream:yR,isURLSearchParams:ER,isTypedArray:RR,isFileList:bR,forEach:Hi,merge:Sl,extend:AR,trim:NR,stripBOM:SR,inherits:TR,toFlatObject:CR,kindOf:yo,kindOfTest:Zt,endsWith:OR,toArray:IR,forEachEntry:LR,matchAll:MR,isHTMLForm:DR,hasOwnProperty:ef,hasOwnProp:ef,reduceDescriptors:Ug,freezeMethods:FR,toObjectSet:qR,toCamelCase:PR,noop:UR,toFiniteNumber:$R,findKey:Fg,global:Kn,isContextDefined:qg,isSpecCompliantForm:zR,toJSONObject:jR,isAsyncFn:HR,isThenable:GR,setImmediate:$g,asap:KR,isIterable:WR};function ce(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const zg=ce.prototype,jg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jg[e]={value:e}});Object.defineProperties(ce,jg);Object.defineProperty(zg,"isAxiosError",{value:!0});ce.from=(e,t,n,r,i,s)=>{const o=Object.create(zg);L.toFlatObject(e,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,a,l,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const VR=null;function Tl(e){return L.isPlainObject(e)||L.isArray(e)}function Hg(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function tf(e,t,n){return e?e.concat(t).map(function(i,s){return i=Hg(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function YR(e){return L.isArray(e)&&!e.some(Tl)}const ZR=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function Eo(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!L.isUndefined(b[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(L.isDate(p))return p.toISOString();if(L.isBoolean(p))return p.toString();if(!l&&L.isBlob(p))throw new ce("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(p)||L.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,b){let y=p;if(p&&!b&&typeof p=="object"){if(L.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(L.isArray(p)&&YR(p)||(L.isFileList(p)||L.endsWith(m,"[]"))&&(y=L.toArray(p)))return m=Hg(m),y.forEach(function(v,T){!(L.isUndefined(v)||v===null)&&t.append(o===!0?tf([m],T,s):o===null?m:m+"[]",c(v))}),!1}return Tl(p)?!0:(t.append(tf(b,m,s),c(p)),!1)}const d=[],h=Object.assign(ZR,{defaultVisitor:u,convertValue:c,isVisitable:Tl});function f(p,m){if(!L.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),L.forEach(p,function(y,_){(!(L.isUndefined(y)||y===null)&&i.call(t,y,L.isString(_)?_.trim():_,m,h))===!0&&f(y,m?m.concat(_):[_])}),d.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return f(e),t}function nf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Sc(e,t){this._pairs=[],e&&Eo(e,this,t)}const Gg=Sc.prototype;Gg.append=function(t,n){this._pairs.push([t,n])};Gg.toString=function(t){const n=t?function(r){return t.call(this,r,nf)}:nf;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function XR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kg(e,t,n){if(!t)return e;const r=n&&n.encode||XR;L.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=L.isURLSearchParams(t)?t.toString():new Sc(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class rf{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},QR=typeof URLSearchParams<"u"?URLSearchParams:Sc,JR=typeof FormData<"u"?FormData:null,eL=typeof Blob<"u"?Blob:null,tL={isBrowser:!0,classes:{URLSearchParams:QR,FormData:JR,Blob:eL},protocols:["http","https","file","blob","url","data"]},Tc=typeof window<"u"&&typeof document<"u",Cl=typeof navigator=="object"&&navigator||void 0,nL=Tc&&(!Cl||["ReactNative","NativeScript","NS"].indexOf(Cl.product)<0),rL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iL=Tc&&window.location.href||"http://localhost",sL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tc,hasStandardBrowserEnv:nL,hasStandardBrowserWebWorkerEnv:rL,navigator:Cl,origin:iL},Symbol.toStringTag,{value:"Module"})),Ye={...sL,...tL};function oL(e,t){return Eo(e,new Ye.classes.URLSearchParams,{visitor:function(n,r,i,s){return Ye.isNode&&L.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function aL(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lL(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Vg(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&L.isArray(i)?i.length:o,l?(L.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!L.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&L.isArray(i[o])&&(i[o]=lL(i[o])),!a)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(r,i)=>{t(aL(r),i,n,0)}),n}return null}function cL(e,t,n){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gi={transitional:Wg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=L.isObject(t);if(s&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return i?JSON.stringify(Vg(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return oL(t,this.formSerializer).toString();if((a=L.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Eo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),cL(t)):t}],transformResponse:[function(t){const n=this.transitional||Gi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?ce.from(a,ce.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Gi.headers[e]={}});const uL=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),dL=e=>{const t={};let n,r,i;return e&&e.split(`
167
167
  `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&uL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},sf=Symbol("internals");function ui(e){return e&&String(e).trim().toLowerCase()}function Cs(e){return e===!1||e==null?e:L.isArray(e)?e.map(Cs):String(e)}function fL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const hL=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ba(e,t,n,r,i){if(L.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!L.isString(t)){if(L.isString(r))return t.indexOf(r)!==-1;if(L.isRegExp(r))return r.test(t)}}function pL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gL(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let gt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,c){const u=ui(l);if(!u)throw new Error("header name must be a non-empty string");const d=L.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Cs(a))}const o=(a,l)=>L.forEach(a,(c,u)=>s(c,u,l));if(L.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(L.isString(t)&&(t=t.trim())&&!hL(t))o(dL(t),n);else if(L.isObject(t)&&L.isIterable(t)){let a={},l,c;for(const u of t){if(!L.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?L.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ui(t),t){const r=L.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return fL(i);if(L.isFunction(n))return n.call(this,i,r);if(L.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ui(t),t){const r=L.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ba(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=ui(o),o){const a=L.findKey(r,o);a&&(!n||Ba(r,r[a],a,n))&&(delete r[a],i=!0)}}return L.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Ba(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return L.forEach(this,(i,s)=>{const o=L.findKey(r,s);if(o){n[o]=Cs(i),delete n[s];return}const a=t?pL(s):String(s).trim();a!==s&&delete n[s],n[a]=Cs(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return L.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&L.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
168
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[sf]=this[sf]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=ui(o);r[a]||(gL(i,o),r[a]=!0)}return L.isArray(t)?t.forEach(s):s(t),this}};gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(gt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});L.freezeMethods(gt);function Fa(e,t){const n=this||Gi,r=t||n,i=gt.from(r.headers);let s=r.data;return L.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Yg(e){return!!(e&&e.__CANCEL__)}function Hr(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(Hr,ce,{__CANCEL__:!0});function Zg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function yL(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Hs=(e,t,n=3)=>{let r=0;const i=bL(50,250);return yL(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},of=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},af=e=>(...t)=>L.asap(()=>e(...t)),EL=Ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ye.origin),Ye.navigator&&/(msie|trident)/i.test(Ye.navigator.userAgent)):()=>!0,xL=Ye.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];L.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),L.isString(r)&&a.push(`path=${r}`),L.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),L.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _L(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xg(e,t,n){let r=!wL(t);return e&&(r||n==!1)?_L(e,t):t}const lf=e=>e instanceof gt?{...e}:e;function Jn(e,t){t=t||{};const n={};function r(c,u,d,h){return L.isPlainObject(c)&&L.isPlainObject(u)?L.merge.call({caseless:h},c,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function i(c,u,d,h){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!L.isUndefined(u))return r(void 0,u)}function o(c,u){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(lf(c),lf(u),d,!0)};return L.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);L.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Qg=e=>{const t=Jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=gt.from(o),t.url=Kg(Xg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),L.isFormData(n)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(L.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&o.set(u,d)})}}if(Ye.hasStandardBrowserEnv&&(r&&L.isFunction(r)&&(r=r(t)),r||r!==!1&&EL(t.url))){const l=i&&s&&xL.read(s);l&&o.set(i,l)}return t},vL=typeof XMLHttpRequest<"u",kL=vL&&function(e){return new Promise(function(n,r){const i=Qg(e);let s=i.data;const o=gt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,f,p;function m(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function y(){if(!b)return;const v=gt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Zg(function(P){n(P),m()},function(P){r(P),m()},C),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new ce("Request aborted",ce.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const C=T&&T.message?T.message:"Network Error",N=new ce(C,ce.ERR_NETWORK,e,b);N.event=T||null,r(N),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Wg;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new ce(T,C.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&L.forEach(o.toJSON(),function(T,C){b.setRequestHeader(C,T)}),L.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),a&&a!=="json"&&(b.responseType=i.responseType),c&&([h,p]=Hs(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=Hs(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=v=>{b&&(r(!v||v.type?new Hr(null,e,b):v),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=mL(i.url);if(_&&Ye.protocols.indexOf(_)===-1){r(new ce("Unsupported protocol "+_+":",ce.ERR_BAD_REQUEST,e));return}b.send(s||null)})},NL=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof ce?u:new Hr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>L.asap(a),l}},AL=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},SL=async function*(e,t){for await(const n of TL(e))yield*AL(n,t)},TL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},cf=(e,t,n,r)=>{const i=SL(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},uf=64*1024,{isFunction:ws}=L,CL=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:df,TextEncoder:ff}=L.global,hf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},OL=e=>{e=L.merge.call({skipUndefined:!0},CL,e);const{fetch:t,Request:n,Response:r}=e,i=t?ws(t):typeof fetch=="function",s=ws(n),o=ws(r);if(!i)return!1;const a=i&&ws(df),l=i&&(typeof ff=="function"?(p=>m=>p.encode(m))(new ff):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&a&&hf(()=>{let p=!1;const m=new n(Ye.origin,{body:new df,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=o&&a&&hf(()=>L.isReadableStream(new r("").body)),d={stream:u&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(m,b)=>{let y=m&&m[p];if(y)return y.call(m);throw new ce(`Response type '${p}' is not supported`,ce.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(L.isBlob(p))return p.size;if(L.isSpecCompliantForm(p))return(await new n(Ye.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(L.isArrayBufferView(p)||L.isArrayBuffer(p))return p.byteLength;if(L.isURLSearchParams(p)&&(p=p+""),L.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const b=L.toFiniteNumber(p.getContentLength());return b??h(m)};return async p=>{let{url:m,method:b,data:y,signal:_,cancelToken:v,timeout:T,onDownloadProgress:C,onUploadProgress:N,responseType:P,headers:U,withCredentials:G="same-origin",fetchOptions:O}=Qg(p),j=t||fetch;P=P?(P+"").toLowerCase():"text";let B=NL([_,v&&v.toAbortSignal()],T),re=null;const X=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let Y;try{if(N&&c&&b!=="get"&&b!=="head"&&(Y=await f(U,y))!==0){let Q=new n(m,{method:"POST",body:y,duplex:"half"}),ae;if(L.isFormData(y)&&(ae=Q.headers.get("content-type"))&&U.setContentType(ae),Q.body){const[k,he]=of(Y,Hs(af(N)));y=cf(Q.body,uf,k,he)}}L.isString(G)||(G=G?"include":"omit");const I=s&&"credentials"in n.prototype,q={...O,signal:B,method:b.toUpperCase(),headers:U.normalize().toJSON(),body:y,duplex:"half",credentials:I?G:void 0};re=s&&new n(m,q);let F=await(s?j(re,O):j(m,q));const K=u&&(P==="stream"||P==="response");if(u&&(C||K&&X)){const Q={};["status","statusText","headers"].forEach(se=>{Q[se]=F[se]});const ae=L.toFiniteNumber(F.headers.get("content-length")),[k,he]=C&&of(ae,Hs(af(C),!0))||[];F=new r(cf(F.body,uf,k,()=>{he&&he(),X&&X()}),Q)}P=P||"text";let w=await d[L.findKey(d,P)||"text"](F,p);return!K&&X&&X(),await new Promise((Q,ae)=>{Zg(Q,ae,{data:w,headers:gt.from(F.headers),status:F.status,statusText:F.statusText,config:p,request:re})})}catch(I){throw X&&X(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,p,re),{cause:I.cause||I}):ce.from(I,I&&I.code,p,re)}}},IL=new Map,Jg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,l,c,u=IL;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:OL(t)),u=c;return c};Jg();const Cc={http:VR,xhr:kL,fetch:{get:Jg}};L.forEach(Cc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pf=e=>`- ${e}`,RL=e=>L.isFunction(e)||e===null||e===!1;function LL(e,t){e=L.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let a;if(i=r,!RL(r)&&(i=Cc[(a=String(r)).toLowerCase()],i===void 0))throw new ce(`Unknown adapter '${a}'`);if(i&&(L.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
168
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[sf]=this[sf]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=ui(o);r[a]||(gL(i,o),r[a]=!0)}return L.isArray(t)?t.forEach(s):s(t),this}};gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(gt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});L.freezeMethods(gt);function Fa(e,t){const n=this||Gi,r=t||n,i=gt.from(r.headers);let s=r.data;return L.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Yg(e){return!!(e&&e.__CANCEL__)}function Hr(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}L.inherits(Hr,ce,{__CANCEL__:!0});function Zg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function yL(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Hs=(e,t,n=3)=>{let r=0;const i=bL(50,250);return yL(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},of=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},af=e=>(...t)=>L.asap(()=>e(...t)),xL=Ye.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ye.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ye.origin),Ye.navigator&&/(msie|trident)/i.test(Ye.navigator.userAgent)):()=>!0,EL=Ye.hasStandardBrowserEnv?{write(e,t,n,r,i,s,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];L.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),L.isString(r)&&a.push(`path=${r}`),L.isString(i)&&a.push(`domain=${i}`),s===!0&&a.push("secure"),L.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _L(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xg(e,t,n){let r=!wL(t);return e&&(r||n==!1)?_L(e,t):t}const lf=e=>e instanceof gt?{...e}:e;function Jn(e,t){t=t||{};const n={};function r(c,u,d,h){return L.isPlainObject(c)&&L.isPlainObject(u)?L.merge.call({caseless:h},c,u):L.isPlainObject(u)?L.merge({},u):L.isArray(u)?u.slice():u}function i(c,u,d,h){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!L.isUndefined(u))return r(void 0,u)}function o(c,u){if(L.isUndefined(u)){if(!L.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(lf(c),lf(u),d,!0)};return L.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);L.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Qg=e=>{const t=Jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=gt.from(o),t.url=Kg(Xg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),L.isFormData(n)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(L.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&o.set(u,d)})}}if(Ye.hasStandardBrowserEnv&&(r&&L.isFunction(r)&&(r=r(t)),r||r!==!1&&xL(t.url))){const l=i&&s&&EL.read(s);l&&o.set(i,l)}return t},vL=typeof XMLHttpRequest<"u",kL=vL&&function(e){return new Promise(function(n,r){const i=Qg(e);let s=i.data;const o=gt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,f,p;function m(){f&&f(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function y(){if(!b)return;const v=gt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};Zg(function(P){n(P),m()},function(P){r(P),m()},C),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(y)},b.onabort=function(){b&&(r(new ce("Request aborted",ce.ECONNABORTED,e,b)),b=null)},b.onerror=function(T){const C=T&&T.message?T.message:"Network Error",N=new ce(C,ce.ERR_NETWORK,e,b);N.event=T||null,r(N),b=null},b.ontimeout=function(){let T=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Wg;i.timeoutErrorMessage&&(T=i.timeoutErrorMessage),r(new ce(T,C.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&L.forEach(o.toJSON(),function(T,C){b.setRequestHeader(C,T)}),L.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),a&&a!=="json"&&(b.responseType=i.responseType),c&&([h,p]=Hs(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=Hs(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(u=v=>{b&&(r(!v||v.type?new Hr(null,e,b):v),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=mL(i.url);if(_&&Ye.protocols.indexOf(_)===-1){r(new ce("Unsupported protocol "+_+":",ce.ERR_BAD_REQUEST,e));return}b.send(s||null)})},NL=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof ce?u:new Hr(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>L.asap(a),l}},AL=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},SL=async function*(e,t){for await(const n of TL(e))yield*AL(n,t)},TL=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},cf=(e,t,n,r)=>{const i=SL(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},uf=64*1024,{isFunction:ws}=L,CL=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:df,TextEncoder:ff}=L.global,hf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},OL=e=>{e=L.merge.call({skipUndefined:!0},CL,e);const{fetch:t,Request:n,Response:r}=e,i=t?ws(t):typeof fetch=="function",s=ws(n),o=ws(r);if(!i)return!1;const a=i&&ws(df),l=i&&(typeof ff=="function"?(p=>m=>p.encode(m))(new ff):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=s&&a&&hf(()=>{let p=!1;const m=new n(Ye.origin,{body:new df,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=o&&a&&hf(()=>L.isReadableStream(new r("").body)),d={stream:u&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(m,b)=>{let y=m&&m[p];if(y)return y.call(m);throw new ce(`Response type '${p}' is not supported`,ce.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(L.isBlob(p))return p.size;if(L.isSpecCompliantForm(p))return(await new n(Ye.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(L.isArrayBufferView(p)||L.isArrayBuffer(p))return p.byteLength;if(L.isURLSearchParams(p)&&(p=p+""),L.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const b=L.toFiniteNumber(p.getContentLength());return b??h(m)};return async p=>{let{url:m,method:b,data:y,signal:_,cancelToken:v,timeout:T,onDownloadProgress:C,onUploadProgress:N,responseType:P,headers:U,withCredentials:G="same-origin",fetchOptions:O}=Qg(p),j=t||fetch;P=P?(P+"").toLowerCase():"text";let B=NL([_,v&&v.toAbortSignal()],T),re=null;const X=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let Y;try{if(N&&c&&b!=="get"&&b!=="head"&&(Y=await f(U,y))!==0){let Q=new n(m,{method:"POST",body:y,duplex:"half"}),ae;if(L.isFormData(y)&&(ae=Q.headers.get("content-type"))&&U.setContentType(ae),Q.body){const[k,he]=of(Y,Hs(af(N)));y=cf(Q.body,uf,k,he)}}L.isString(G)||(G=G?"include":"omit");const I=s&&"credentials"in n.prototype,q={...O,signal:B,method:b.toUpperCase(),headers:U.normalize().toJSON(),body:y,duplex:"half",credentials:I?G:void 0};re=s&&new n(m,q);let F=await(s?j(re,O):j(m,q));const K=u&&(P==="stream"||P==="response");if(u&&(C||K&&X)){const Q={};["status","statusText","headers"].forEach(se=>{Q[se]=F[se]});const ae=L.toFiniteNumber(F.headers.get("content-length")),[k,he]=C&&of(ae,Hs(af(C),!0))||[];F=new r(cf(F.body,uf,k,()=>{he&&he(),X&&X()}),Q)}P=P||"text";let w=await d[L.findKey(d,P)||"text"](F,p);return!K&&X&&X(),await new Promise((Q,ae)=>{Zg(Q,ae,{data:w,headers:gt.from(F.headers),status:F.status,statusText:F.statusText,config:p,request:re})})}catch(I){throw X&&X(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,p,re),{cause:I.cause||I}):ce.from(I,I&&I.code,p,re)}}},IL=new Map,Jg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,a=o,l,c,u=IL;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:OL(t)),u=c;return c};Jg();const Cc={http:VR,xhr:kL,fetch:{get:Jg}};L.forEach(Cc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pf=e=>`- ${e}`,RL=e=>L.isFunction(e)||e===null||e===!1;function LL(e,t){e=L.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let a;if(i=r,!RL(r)&&(i=Cc[(a=String(r)).toLowerCase()],i===void 0))throw new ce(`Unknown adapter '${a}'`);if(i&&(L.isFunction(i)||(i=i.get(t))))break;s[a||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
169
169
  `+o.map(pf).join(`
170
170
  `):" "+pf(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const em={getAdapter:LL,adapters:Cc};function qa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hr(null,e)}function gf(e){return qa(e),e.headers=gt.from(e.headers),e.data=Fa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),em.getAdapter(e.adapter||Gi.adapter,e)(e).then(function(r){return qa(e),r.data=Fa.call(e,e.transformResponse,r),r.headers=gt.from(r.headers),r},function(r){return Yg(r)||(qa(e),r&&r.response&&(r.response.data=Fa.call(e,e.transformResponse,r.response),r.response.headers=gt.from(r.response.headers))),Promise.reject(r)})}const tm="1.13.2",wo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const mf={};wo.transitional=function(t,n,r){function i(s,o){return"[Axios v"+tm+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new ce(i(o," has been removed"+(n?" in "+n:"")),ce.ERR_DEPRECATED);return n&&!mf[o]&&(mf[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};wo.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ML(e,t,n){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new ce("option "+s+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ce("Unknown option "+s,ce.ERR_BAD_OPTION)}}const Os={assertOptions:ML,validators:wo},en=Os.validators;let Vn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new rf,response:new rf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
171
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Os.assertOptions(r,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},!1),i!=null&&(L.isFunction(i)?n.paramsSerializer={serialize:i}:Os.assertOptions(i,{encode:en.function,serialize:en.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Os.assertOptions(n,{baseUrl:en.spelling("baseURL"),withXsrfToken:en.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&L.merge(s.common,s[n.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=gt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[gf.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=gf.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jn(this.defaults,t);const n=Xg(t.baseURL,t.url,t.allowAbsoluteUrls);return Kg(n,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){Vn.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}});L.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Jn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Vn.prototype[t]=n(),Vn.prototype[t+"Form"]=n(!0)});let DL=class nm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nm(function(i){t=i}),cancel:t}}};function PL(e){return function(n){return e.apply(null,n)}}function BL(e){return L.isObject(e)&&e.isAxiosError===!0}const Ol={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ol).forEach(([e,t])=>{Ol[t]=e});function rm(e){const t=new Vn(e),n=Mg(Vn.prototype.request,t);return L.extend(n,Vn.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return rm(Jn(e,i))},n}const Ie=rm(Gi);Ie.Axios=Vn;Ie.CanceledError=Hr;Ie.CancelToken=DL;Ie.isCancel=Yg;Ie.VERSION=tm;Ie.toFormData=xo;Ie.AxiosError=ce;Ie.Cancel=Ie.CanceledError;Ie.all=function(t){return Promise.all(t)};Ie.spread=PL;Ie.isAxiosError=BL;Ie.mergeConfig=Jn;Ie.AxiosHeaders=gt;Ie.formToJSON=e=>Vg(L.isHTMLForm(e)?new FormData(e):e);Ie.getAdapter=em.getAdapter;Ie.HttpStatusCode=Ol;Ie.default=Ie;const{Axios:N2,AxiosError:A2,CanceledError:S2,isCancel:T2,CancelToken:C2,VERSION:O2,all:I2,Cancel:R2,isAxiosError:L2,spread:M2,toFormData:D2,AxiosHeaders:P2,HttpStatusCode:B2,formToJSON:F2,getAdapter:q2,mergeConfig:U2}=Ie,rt={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`,IMAGE_UPLOAD:"/api/Image/uploadImage",INSERT_WITH_AI:"/api/article/insertWithAI",UPDATE_WITH_AI:"/api/article/updateWithAI"};class im{constructor(t){this.client=t}async uploadImage(t){const n=new FormData;n.append("file",t),console.log("[ArticleAPI] uploadImage - Request:",{fileName:t.name,fileSize:t.size});const r=await this.client.post(rt.IMAGE_UPLOAD,n,{headers:{"Content-Type":"multipart/form-data"}});return console.log("[ArticleAPI] uploadImage - Response:",r.data),r.data}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:rt.ARTICLES,params:i});const s=await this.client.get(rt.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",s.data),this.transformArticleDates(s.data)}async filterArticles(t,n,r=1,i=10){const s={page:r,pageSize:i};t&&t.length>0&&(s.roles=t.join(",")),n!==void 0&&(s.parentId=n);const o=await this.client.get(rt.ARTICLES_FILTER,{params:s});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(rt.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.post(rt.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.put(rt.ARTICLES,t);return console.log("[ArticleAPI] updateArticle - Response:",n.data),this.transformArticleDate(n.data)}async deleteArticle(t){console.log("[ArticleAPI] deleteArticle - Request:",{id:t,url:rt.ARTICLE_BY_ID(t)}),await this.client.delete(rt.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}async createArticleWithAI(t){console.log("[ArticleAPI] createArticleWithAI - Request:",{url:rt.INSERT_WITH_AI,data:t});const n=await this.client.post(rt.INSERT_WITH_AI,t);return console.log("[ArticleAPI] createArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}async updateArticleWithAI(t){if(!t.articleId)throw new Error("articleId is required for updateWithAI");console.log("[ArticleAPI] updateArticleWithAI - Request:",{url:rt.UPDATE_WITH_AI,data:t});const n=await this.client.put(rt.UPDATE_WITH_AI,t);return console.log("[ArticleAPI] updateArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}transformArticleDate(t){return{...t,dateAt:t.dateAt?new Date(t.dateAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0,category:t.category?{...t.category,createdAt:t.category.createdAt?new Date(t.category.createdAt):void 0,updatedAt:t.category.updatedAt?new Date(t.category.updatedAt):void 0}:void 0}}transformArticleDates(t){return{...t,items:t.items.map(n=>this.transformArticleDate(n))}}}const tn={CATEGORIES:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class sm{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:tn.CATEGORIES});const t=await this.client.get(tn.CATEGORIES);return console.log("[CategoryAPI] listCategories - Response:",t.data),this.transformCategoryDates(t.data)}async filterCategories(t,n){const r={};t&&t.length>0&&(r.roles=t.join(",")),n!==void 0&&(r.parentId=n);const i=await this.client.get(tn.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(tn.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.post(tn.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.put(tn.CATEGORIES,t);return console.log("[CategoryAPI] updateCategory - Response:",n.data),this.transformCategoryDate(n.data)}async deleteCategory(t){console.log("[CategoryAPI] deleteCategory - Request:",{id:t,url:tn.CATEGORY_BY_ID(t)}),await this.client.delete(tn.CATEGORY_BY_ID(t)),console.log("[CategoryAPI] deleteCategory - Success")}transformCategoryDate(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0}}transformCategoryDates(t){return t.map(n=>this.transformCategoryDate(n))}}const Ut={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class om{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Ut.TAGS});const t=await this.client.get(Ut.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Ut.TAG_BY_ID(t)});const n=await this.client.get(Ut.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.post(Ut.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.put(Ut.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Ut.TAG_BY_ID(t)}),await this.client.delete(Ut.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Ut.TAG_MERGE(t,n);console.log("[TagAPI] mergeTags - Request:",{url:r,sourceTagId:t,targetTagId:n}),await this.client.post(r),console.log("[TagAPI] mergeTags - Success")}}const am=H.createContext(void 0);function FL({config:e,children:t}){const n=H.useMemo(()=>{const r=e.apiClient||Ie.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json",...e.headers}}),i=new im(r),s=new sm(r),o=new om(r);return{config:e,apiClient:r,articleApi:i,categoryApi:s,tagApi:o}},[e]);return x.jsx(am.Provider,{value:n,children:t})}function Gr(){const e=H.useContext(am);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function qL({article:e,categories:t=[],onSave:n,onCancel:r,loading:i=!1}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(""),[u,d]=H.useState(""),[h,f]=H.useState(""),[p,m]=H.useState(!1),[b,y]=H.useState(Fe.Draft),[_,v]=H.useState(null),[T,C]=H.useState(""),[N,P]=H.useState(""),[U,G]=H.useState(""),[O,j]=H.useState({});H.useEffect(()=>{var I,q;e&&(a(e.title),c(e.content),d(e.imageName||""),console.log("imageName:",e.imageName),e.imageName&&f(e.imageName),y(e.status),v(e.categoryId||null),C(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),P(((I=e.tags)==null?void 0:I.map(F=>F.title).join(", "))||""),G(((q=e.roles)==null?void 0:q.map(F=>F.slug).join(", "))||""))},[e]);const B=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),j(I),Object.keys(I).length===0},re=async I=>{if(I.preventDefault(),!B())return;const q=U.split(",").map(K=>K.trim()).filter(K=>K.length>0),F={title:o.trim(),content:l.trim(),imageName:u||void 0,status:b,categoryId:_||void 0,dateAt:T||void 0,tagList:N.trim()||void 0,roleIds:q.length>0?q:void 0};e?await n({articleId:e.articleId,...F}):await n(F)},X=async I=>{var K;const q=(K=I.target.files)==null?void 0:K[0];if(!q)return;if(!q.type.startsWith("image/")){j({...O,image:"Please select an image file"});return}if(q.size>5*1024*1024){j({...O,image:"Image size must be less than 5MB"});return}j({...O,image:""});const F=new FileReader;F.onloadend=()=>{f(F.result)},F.readAsDataURL(q);try{m(!0);const w=await s.uploadImage(q);d(w),j({...O,image:""})}catch(w){console.error("Error uploading image:",w),j({...O,image:"Failed to upload image. Please try again."})}finally{m(!1)}},Y=()=>{f(""),d("")};return x.jsxs("form",{onSubmit:re,className:"space-y-6",children:[x.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[x.jsxs("div",{className:"col-span-2 p-4",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),x.jsx("input",{id:"title",type:"text",value:o,onChange:I=>a(I.target.value),className:`w-full rounded-md border ${O.title?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"} px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter article title"}),O.title&&x.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.title})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),x.jsx("input",{id:"dateAt",type:"datetime-local",value:T,onChange:I=>C(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),x.jsxs("select",{id:"category",value:_||"",onChange:I=>v(I.target.value?Number(I.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[x.jsx("option",{value:"",children:"No Category"}),t.map(I=>x.jsx("option",{value:I.categoryId,children:I.title},I.categoryId))]})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),x.jsxs("select",{id:"status",value:b,onChange:I=>y(Number(I.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[x.jsx("option",{value:Fe.Draft,children:"Draft"}),x.jsx("option",{value:Fe.Published,children:"Published"}),x.jsx("option",{value:Fe.Archived,children:"Archived"}),x.jsx("option",{value:Fe.Scheduled,children:"Scheduled"}),x.jsx("option",{value:Fe.Review,children:"Review"})]})]})]}),x.jsx("div",{className:"col-span-1",children:x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"image",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Featured Image"}),h?x.jsxs("div",{className:"relative",children:[x.jsx("img",{src:h,alt:"Preview",className:"w-full h-[250px] object-cover rounded-md border border-gray-300 dark:border-gray-600",style:{height:"250px"}}),x.jsx("button",{type:"button",onClick:Y,className:"absolute top-2 right-2 rounded-full bg-red-600 p-2 text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500",disabled:p,style:{top:"2px",right:"2px"},children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:x.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),p&&x.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 rounded-md",children:x.jsx("span",{className:"text-white text-sm",children:"Uploading..."})})]}):x.jsx("div",{className:"flex items-center",children:x.jsx("input",{id:"image",type:"file",accept:"image/*",onChange:X,disabled:p,className:"block w-full text-sm text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer bg-white dark:bg-gray-900 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500"})}),O.image&&x.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.image}),x.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"JPG, PNG, GIF. Max 5MB"})]})})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),x.jsx(Lg,{value:l,onChange:c,placeholder:"Write your article content...",error:O.content}),O.content&&x.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.content})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),x.jsx("input",{id:"tags",type:"text",value:N,onChange:I=>P(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter tags separated by commas (e.g., AI, Technology, Innovation)"}),x.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of tags. Tags will be created automatically if they don't exist."})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),x.jsx("input",{id:"roles",type:"text",value:U,onChange:I=>G(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter role slugs separated by commas (e.g., admin, editor)"}),x.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),x.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[x.jsx("button",{type:"button",onClick:r,disabled:i,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:"Cancel"}),x.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update Article":"Create Article"})]})]})}function UL({mode:e,articleId:t,onSuccess:n,onCancel:r,className:i=""}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(!1),[u,d]=H.useState(!1),[h,f]=H.useState(null),[p,m]=H.useState(""),b=()=>o.trim()?o.trim().length<10?(f("Prompt must be at least 10 characters long"),!1):o.length>2e3?(f("Prompt must be less than 2000 characters"),!1):!0:(f("Prompt is required"),!1),y=async()=>{if(b()){if(e==="update"&&!t){f("Article ID is required for update mode");return}d(!0),f(null),m(e==="create"?"Creating article with AI...":"Updating article with AI...");try{const C={...e==="update"&&t&&{articleId:t},prompt:o.trim(),generateImage:l};l&&m("Generating content and image with AI... This may take a few moments.");let N;e==="create"?N=await s.createArticleWithAI(C):N=await s.updateArticleWithAI(C),m(""),n(N),a(""),c(!1)}catch(C){console.error("Error generating article with AI:",C),f(C.message||"Failed to generate article with AI. Please try again."),m("")}finally{d(!1)}}},_=()=>{!u&&r&&r()},v=e==="create"?'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")':'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")',T=()=>{const C="w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",N=h&&!o.trim()?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600";return`${C} ${N}`};return x.jsxs("div",{className:`space-y-6 ${i}`,children:[x.jsx("div",{className:"rounded-lg border border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-900/20 p-4",children:x.jsxs("div",{className:"flex items-start gap-3",children:[x.jsx("svg",{className:"h-6 w-6 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),x.jsxs("div",{children:[x.jsx("h3",{className:"text-lg font-semibold text-blue-900 dark:text-blue-100",children:e==="create"?"Create Article with AI":"Update Article with AI"}),x.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300 mt-1",children:e==="create"?"Use AI to generate a complete article with title, content, and tags based on your description.":"Use AI to modify the existing article content based on your instructions. The AI will receive the current article as context."})]})]})}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"prompt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Description / Instructions *"}),x.jsx("textarea",{id:"prompt",value:o,onChange:C=>a(C.target.value),rows:6,disabled:u,className:T(),placeholder:v,minLength:10,maxLength:2e3}),x.jsxs("div",{className:"flex justify-between items-center",children:[x.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[o.length," / 2000 characters (minimum 10)"]}),h&&x.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})]})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[x.jsx("input",{type:"checkbox",checked:l,onChange:C=>c(C.target.checked),disabled:u,className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),x.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Generate image with DALL-E 3"})]}),x.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ml-6",children:"AI will create an illustrative image for the article. This may take a few extra seconds."})]}),u&&p&&x.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4",children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("svg",{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),x.jsxs("div",{children:[x.jsx("p",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-100",children:p}),x.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:"Please wait..."})]})]})}),x.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[r&&x.jsx("button",{type:"button",onClick:_,disabled:u,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),x.jsx("button",{type:"button",onClick:y,disabled:u||o.trim().length<10,className:"rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:u?x.jsxs(x.Fragment,{children:[x.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),x.jsx("span",{children:"Generating..."})]}):x.jsxs(x.Fragment,{children:[x.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),x.jsx("span",{children:e==="create"?"Create with AI":"Update with AI"})]})})]})]})}function $L({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:s="400px"}){const[o,a]=H.useState("edit");return x.jsxs("div",{className:"space-y-2",children:[r&&x.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),x.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[x.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[x.jsx("button",{type:"button",onClick:()=>a("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),x.jsx("button",{type:"button",onClick:()=>a("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),x.jsx("div",{style:{minHeight:s},children:o==="edit"?x.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:s}}):x.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?x.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e}):x.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&x.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),x.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[x.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),x.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"**bold text**"})," - Bold"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"*italic text*"})," - Italic"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"[link](url)"})," - Link"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"- item"})," - Bullet list"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"1. item"})," - Numbered list"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"`code`"})," - Inline code"]}),x.jsxs("div",{children:[x.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
171
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Os.assertOptions(r,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},!1),i!=null&&(L.isFunction(i)?n.paramsSerializer={serialize:i}:Os.assertOptions(i,{encode:en.function,serialize:en.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Os.assertOptions(n,{baseUrl:en.spelling("baseURL"),withXsrfToken:en.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&L.merge(s.common,s[n.method]);s&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=gt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[gf.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d<h;)u=u.then(p[d++],p[d++]);return u}h=a.length;let f=n;for(;d<h;){const p=a[d++],m=a[d++];try{f=p(f)}catch(b){m.call(this,b);break}}try{u=gf.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Jn(this.defaults,t);const n=Xg(t.baseURL,t.url,t.allowAbsoluteUrls);return Kg(n,t.params,t.paramsSerializer)}};L.forEach(["delete","get","head","options"],function(t){Vn.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}});L.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Jn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Vn.prototype[t]=n(),Vn.prototype[t+"Form"]=n(!0)});let DL=class nm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nm(function(i){t=i}),cancel:t}}};function PL(e){return function(n){return e.apply(null,n)}}function BL(e){return L.isObject(e)&&e.isAxiosError===!0}const Ol={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ol).forEach(([e,t])=>{Ol[t]=e});function rm(e){const t=new Vn(e),n=Mg(Vn.prototype.request,t);return L.extend(n,Vn.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return rm(Jn(e,i))},n}const Ie=rm(Gi);Ie.Axios=Vn;Ie.CanceledError=Hr;Ie.CancelToken=DL;Ie.isCancel=Yg;Ie.VERSION=tm;Ie.toFormData=Eo;Ie.AxiosError=ce;Ie.Cancel=Ie.CanceledError;Ie.all=function(t){return Promise.all(t)};Ie.spread=PL;Ie.isAxiosError=BL;Ie.mergeConfig=Jn;Ie.AxiosHeaders=gt;Ie.formToJSON=e=>Vg(L.isHTMLForm(e)?new FormData(e):e);Ie.getAdapter=em.getAdapter;Ie.HttpStatusCode=Ol;Ie.default=Ie;const{Axios:NM,AxiosError:AM,CanceledError:SM,isCancel:TM,CancelToken:CM,VERSION:OM,all:IM,Cancel:RM,isAxiosError:LM,spread:MM,toFormData:DM,AxiosHeaders:PM,HttpStatusCode:BM,formToJSON:FM,getAdapter:qM,mergeConfig:UM}=Ie,rt={ARTICLES:"/api/article",ARTICLES_FILTER:"/api/article/filter",ARTICLE_BY_ID:e=>`/api/article/${e}`,IMAGE_UPLOAD:"/api/Image/uploadImage",INSERT_WITH_AI:"/api/article/insertWithAI",UPDATE_WITH_AI:"/api/article/updateWithAI"};class im{constructor(t){this.client=t}async uploadImage(t){const n=new FormData;n.append("file",t),console.log("[ArticleAPI] uploadImage - Request:",{fileName:t.name,fileSize:t.size});const r=await this.client.post(rt.IMAGE_UPLOAD,n,{headers:{"Content-Type":"multipart/form-data"}});return console.log("[ArticleAPI] uploadImage - Response:",r.data),r.data}async listArticles(t,n=1,r=10){const i={page:n,pageSize:r};t&&(i.categoryId=t),console.log("[ArticleAPI] listArticles - Request:",{url:rt.ARTICLES,params:i});const s=await this.client.get(rt.ARTICLES,{params:i});return console.log("[ArticleAPI] listArticles - Response:",s.data),this.transformArticleDates(s.data)}async filterArticles(t,n,r=1,i=10){const s={page:r,pageSize:i};t&&t.length>0&&(s.roles=t.join(",")),n!==void 0&&(s.parentId=n);const o=await this.client.get(rt.ARTICLES_FILTER,{params:s});return this.transformArticleDates(o.data)}async getArticleById(t){const n=await this.client.get(rt.ARTICLE_BY_ID(t));return this.transformArticleDate(n.data)}async createArticle(t){console.log("[ArticleAPI] createArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.post(rt.ARTICLES,t);return console.log("[ArticleAPI] createArticle - Response:",n.data),this.transformArticleDate(n.data)}async updateArticle(t){console.log("[ArticleAPI] updateArticle - Request:",{url:rt.ARTICLES,data:t});const n=await this.client.put(rt.ARTICLES,t);return console.log("[ArticleAPI] updateArticle - Response:",n.data),this.transformArticleDate(n.data)}async deleteArticle(t){console.log("[ArticleAPI] deleteArticle - Request:",{id:t,url:rt.ARTICLE_BY_ID(t)}),await this.client.delete(rt.ARTICLE_BY_ID(t)),console.log("[ArticleAPI] deleteArticle - Success")}async createArticleWithAI(t){console.log("[ArticleAPI] createArticleWithAI - Request:",{url:rt.INSERT_WITH_AI,data:t});const n=await this.client.post(rt.INSERT_WITH_AI,t);return console.log("[ArticleAPI] createArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}async updateArticleWithAI(t){if(!t.articleId)throw new Error("articleId is required for updateWithAI");console.log("[ArticleAPI] updateArticleWithAI - Request:",{url:rt.UPDATE_WITH_AI,data:t});const n=await this.client.put(rt.UPDATE_WITH_AI,t);return console.log("[ArticleAPI] updateArticleWithAI - Response:",n.data),this.transformArticleDate(n.data)}transformArticleDate(t){return{...t,dateAt:t.dateAt?new Date(t.dateAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0,category:t.category?{...t.category,createdAt:t.category.createdAt?new Date(t.category.createdAt):void 0,updatedAt:t.category.updatedAt?new Date(t.category.updatedAt):void 0}:void 0}}transformArticleDates(t){return{...t,items:t.items.map(n=>this.transformArticleDate(n))}}}const tn={CATEGORIES:"/api/category",CATEGORIES_FILTER:"/api/category/filter",CATEGORY_BY_ID:e=>`/api/category/${e}`};class sm{constructor(t){this.client=t}async listCategories(){console.log("[CategoryAPI] listCategories - Request:",{url:tn.CATEGORIES});const t=await this.client.get(tn.CATEGORIES);return console.log("[CategoryAPI] listCategories - Response:",t.data),this.transformCategoryDates(t.data)}async filterCategories(t,n){const r={};t&&t.length>0&&(r.roles=t.join(",")),n!==void 0&&(r.parentId=n);const i=await this.client.get(tn.CATEGORIES_FILTER,{params:r});return this.transformCategoryDates(i.data)}async getCategoryById(t){const n=await this.client.get(tn.CATEGORY_BY_ID(t));return this.transformCategoryDate(n.data)}async createCategory(t){console.log("[CategoryAPI] createCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.post(tn.CATEGORIES,t);return console.log("[CategoryAPI] createCategory - Response:",n.data),this.transformCategoryDate(n.data)}async updateCategory(t){console.log("[CategoryAPI] updateCategory - Request:",{url:tn.CATEGORIES,data:t});const n=await this.client.put(tn.CATEGORIES,t);return console.log("[CategoryAPI] updateCategory - Response:",n.data),this.transformCategoryDate(n.data)}async deleteCategory(t){console.log("[CategoryAPI] deleteCategory - Request:",{id:t,url:tn.CATEGORY_BY_ID(t)}),await this.client.delete(tn.CATEGORY_BY_ID(t)),console.log("[CategoryAPI] deleteCategory - Success")}transformCategoryDate(t){return{...t,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0}}transformCategoryDates(t){return t.map(n=>this.transformCategoryDate(n))}}const Ut={TAGS:"/api/tag",TAG_BY_ID:e=>`/api/tag/${e}`,TAG_MERGE:(e,t)=>`/api/Tag/merge/${e}/${t}`};class om{constructor(t){this.client=t}async listTags(){console.log("[TagAPI] listTags - Request:",{url:Ut.TAGS});const t=await this.client.get(Ut.TAGS);return console.log("[TagAPI] listTags - Response:",t.data),t.data}async getTagById(t){console.log("[TagAPI] getTagById - Request:",{id:t,url:Ut.TAG_BY_ID(t)});const n=await this.client.get(Ut.TAG_BY_ID(t));return console.log("[TagAPI] getTagById - Response:",n.data),n.data}async createTag(t){console.log("[TagAPI] createTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.post(Ut.TAGS,t);return console.log("[TagAPI] createTag - Response:",n.data),n.data}async updateTag(t){console.log("[TagAPI] updateTag - Request:",{url:Ut.TAGS,data:t});const n=await this.client.put(Ut.TAGS,t);return console.log("[TagAPI] updateTag - Response:",n.data),n.data}async deleteTag(t){console.log("[TagAPI] deleteTag - Request:",{id:t,url:Ut.TAG_BY_ID(t)}),await this.client.delete(Ut.TAG_BY_ID(t)),console.log("[TagAPI] deleteTag - Success")}async mergeTags(t,n){const r=Ut.TAG_MERGE(t,n);console.log("[TagAPI] mergeTags - Request:",{url:r,sourceTagId:t,targetTagId:n}),await this.client.post(r),console.log("[TagAPI] mergeTags - Success")}}const am=H.createContext(void 0);function FL({config:e,children:t}){const n=H.useMemo(()=>{const r=e.apiClient||Ie.create({baseURL:e.apiUrl,headers:{"Content-Type":"application/json",...e.headers}}),i=new im(r),s=new sm(r),o=new om(r);return{config:e,apiClient:r,articleApi:i,categoryApi:s,tagApi:o}},[e]);return E.jsx(am.Provider,{value:n,children:t})}function Gr(){const e=H.useContext(am);if(!e)throw new Error("useNNews must be used within a NNewsProvider");return e}function qL({article:e,categories:t=[],onSave:n,onCancel:r,loading:i=!1}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(""),[u,d]=H.useState(""),[h,f]=H.useState(""),[p,m]=H.useState(!1),[b,y]=H.useState(Fe.Draft),[_,v]=H.useState(null),[T,C]=H.useState(""),[N,P]=H.useState(""),[U,G]=H.useState(""),[O,j]=H.useState({});H.useEffect(()=>{var I,q;e&&(a(e.title),c(e.content),d(e.imageName||""),console.log("imageName:",e.imageName),e.imageName&&f(e.imageName),y(e.status),v(e.categoryId||null),C(e.dateAt?new Date(e.dateAt).toISOString().slice(0,16):""),P(((I=e.tags)==null?void 0:I.map(F=>F.title).join(", "))||""),G(((q=e.roles)==null?void 0:q.map(F=>F.slug).join(", "))||""))},[e]);const B=()=>{const I={};return o.trim()||(I.title="Title is required"),l.trim()||(I.content="Content is required"),j(I),Object.keys(I).length===0},re=async I=>{if(I.preventDefault(),!B())return;const q=U.split(",").map(K=>K.trim()).filter(K=>K.length>0),F={title:o.trim(),content:l.trim(),imageName:u||void 0,status:b,categoryId:_||void 0,dateAt:T||void 0,tagList:N.trim()||void 0,roleIds:q.length>0?q:void 0};e?await n({articleId:e.articleId,...F}):await n(F)},X=async I=>{var K;const q=(K=I.target.files)==null?void 0:K[0];if(!q)return;if(!q.type.startsWith("image/")){j({...O,image:"Please select an image file"});return}if(q.size>5*1024*1024){j({...O,image:"Image size must be less than 5MB"});return}j({...O,image:""});const F=new FileReader;F.onloadend=()=>{f(F.result)},F.readAsDataURL(q);try{m(!0);const w=await s.uploadImage(q);d(w),j({...O,image:""})}catch(w){console.error("Error uploading image:",w),j({...O,image:"Failed to upload image. Please try again."})}finally{m(!1)}},Y=()=>{f(""),d("")};return E.jsxs("form",{onSubmit:re,className:"space-y-6",children:[E.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[E.jsxs("div",{className:"col-span-2 p-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:I=>a(I.target.value),className:`w-full rounded-md border ${O.title?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600"} px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter article title"}),O.title&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"dateAt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Publication Date"}),E.jsx("input",{id:"dateAt",type:"datetime-local",value:T,onChange:I=>C(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"category",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Category"}),E.jsxs("select",{id:"category",value:_||"",onChange:I=>v(I.target.value?Number(I.target.value):null),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"No Category"}),t.map(I=>E.jsx("option",{value:I.categoryId,children:I.title},I.categoryId))]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"status",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),E.jsxs("select",{id:"status",value:b,onChange:I=>y(Number(I.target.value)),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:Fe.Draft,children:"Draft"}),E.jsx("option",{value:Fe.Published,children:"Published"}),E.jsx("option",{value:Fe.Archived,children:"Archived"}),E.jsx("option",{value:Fe.Scheduled,children:"Scheduled"}),E.jsx("option",{value:Fe.Review,children:"Review"})]})]})]}),E.jsx("div",{className:"col-span-1",children:E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"image",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Featured Image"}),h?E.jsxs("div",{className:"relative",children:[E.jsx("img",{src:h,alt:"Preview",className:"w-full h-[250px] object-cover rounded-md border border-gray-300 dark:border-gray-600",style:{height:"250px"}}),E.jsx("button",{type:"button",onClick:Y,className:"absolute top-2 right-2 rounded-full bg-red-600 p-2 text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500",disabled:p,style:{top:"2px",right:"2px"},children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:E.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})}),p&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-50 rounded-md",children:E.jsx("span",{className:"text-white text-sm",children:"Uploading..."})})]}):E.jsx("div",{className:"flex items-center",children:E.jsx("input",{id:"image",type:"file",accept:"image/*",onChange:X,disabled:p,className:"block w-full text-sm text-gray-900 dark:text-gray-100 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer bg-white dark:bg-gray-900 focus:outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500"})}),O.image&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.image}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"JPG, PNG, GIF. Max 5MB"})]})})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Content *"}),E.jsx(Lg,{value:l,onChange:c,placeholder:"Write your article content...",error:O.content}),O.content&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:O.content})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"tags",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Tags"}),E.jsx("input",{id:"tags",type:"text",value:N,onChange:I=>P(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter tags separated by commas (e.g., AI, Technology, Innovation)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of tags. Tags will be created automatically if they don't exist."})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"roles",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Roles"}),E.jsx("input",{id:"roles",type:"text",value:U,onChange:I=>G(I.target.value),className:"w-full rounded-md border border-gray-300 dark:border-gray-600 px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Enter role slugs separated by commas (e.g., admin, editor)"}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated list of role slugs."})]}),E.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:r,disabled:i,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update Article":"Create Article"})]})]})}function UL({mode:e,articleId:t,isOpen:n,onSuccess:r,onClose:i}){const{articleApi:s}=Gr(),[o,a]=H.useState(""),[l,c]=H.useState(!1),[u,d]=H.useState(!1),[h,f]=H.useState(null),[p,m]=H.useState(""),b=()=>o.trim()?o.trim().length<10?(f("Prompt must be at least 10 characters long"),!1):o.length>2e3?(f("Prompt must be less than 2000 characters"),!1):!0:(f("Prompt is required"),!1),y=async()=>{if(b()){if(e==="update"&&!t){f("Article ID is required for update mode");return}d(!0),f(null),m(e==="create"?"Creating article with AI...":"Updating article with AI...");try{const C={...e==="update"&&t&&{articleId:t},prompt:o.trim(),generateImage:l};l&&m("Generating content and image with AI... This may take a few moments.");let N;e==="create"?N=await s.createArticleWithAI(C):N=await s.updateArticleWithAI(C),m(""),r(N),a(""),c(!1),i()}catch(C){console.error("Error generating article with AI:",C),f(C.message||"Failed to generate article with AI. Please try again."),m("")}finally{d(!1)}}},_=()=>{u||(a(""),c(!1),f(null),i())},v=e==="create"?'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")':'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")',T=()=>{const C="w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",N=h&&!o.trim()?"border-red-300 dark:border-red-600":"border-gray-300 dark:border-gray-600";return`${C} ${N}`};return n?E.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:E.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4 text-center sm:p-0",children:[E.jsx("div",{className:"fixed inset-0 bg-gray-500 dark:bg-gray-900 bg-opacity-75 dark:bg-opacity-75 transition-opacity",onClick:_}),E.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:[E.jsxs("div",{className:"bg-white dark:bg-gray-800 px-6 pb-4 pt-5",children:[E.jsxs("div",{className:"flex items-start justify-between mb-4",children:[E.jsxs("div",{className:"flex items-start gap-3",children:[E.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900",children:E.jsx("svg",{className:"h-6 w-6 text-blue-600 dark:text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),E.jsxs("div",{children:[E.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",id:"modal-title",children:e==="create"?"Create Article with AI":"Update Article with AI"}),E.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:e==="create"?"Use AI to generate a complete article with title, content, and tags based on your description.":"Use AI to modify the existing article content based on your instructions."})]})]}),E.jsxs("button",{type:"button",onClick:_,disabled:u,className:"rounded-md text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",children:[E.jsx("span",{className:"sr-only",children:"Close"}),E.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]})]}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"prompt",className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Description / Instructions *"}),E.jsx("textarea",{id:"prompt",value:o,onChange:C=>a(C.target.value),rows:6,disabled:u,className:T(),placeholder:v,minLength:10,maxLength:2e3}),E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[o.length," / 2000 characters (minimum 10)"]}),h&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:h})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"checkbox",checked:l,onChange:C=>c(C.target.checked),disabled:u,className:"h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}),E.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Generate image with DALL-E 3"})]}),E.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 ml-6",children:"AI will create an illustrative image for the article. This may take a few extra seconds."})]}),u&&p&&E.jsx("div",{className:"rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4",children:E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsxs("svg",{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-100",children:p}),E.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:"Please wait..."})]})]})})]})]}),E.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 px-6 py-4 flex justify-end gap-3",children:[E.jsx("button",{type:"button",onClick:_,disabled:u,className:"rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),E.jsx("button",{type:"button",onClick:y,disabled:u||o.trim().length<10,className:"rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:u?E.jsxs(E.Fragment,{children:[E.jsxs("svg",{className:"h-4 w-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[E.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),E.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),E.jsx("span",{children:"Generating..."})]}):E.jsxs(E.Fragment,{children:[E.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),E.jsx("span",{children:e==="create"?"Create with AI":"Update with AI"})]})})]})]})]})}):null}function $L({value:e,onChange:t,placeholder:n="Write your content in Markdown...",label:r,error:i,minHeight:s="400px"}){const[o,a]=H.useState("edit");return E.jsxs("div",{className:"space-y-2",children:[r&&E.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r}),E.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900",children:[E.jsxs("div",{className:"flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800",children:[E.jsx("button",{type:"button",onClick:()=>a("edit"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="edit"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Edit"}),E.jsx("button",{type:"button",onClick:()=>a("preview"),className:`flex-1 px-4 py-2 text-sm font-medium ${o==="preview"?"border-b-2 border-blue-600 bg-white dark:bg-gray-900 text-blue-600 dark:text-blue-400":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100"}`,children:"Preview"})]}),E.jsx("div",{style:{minHeight:s},children:o==="edit"?E.jsx("textarea",{value:e,onChange:l=>t(l.target.value),placeholder:n,className:"h-full w-full resize-none border-0 p-4 font-mono text-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-0",style:{minHeight:s}}):E.jsx("div",{className:"prose dark:prose-invert max-w-none p-4 text-gray-900 dark:text-gray-100",children:e?E.jsx(ch,{remarkPlugins:[qh],rehypePlugins:[_p],children:e}):E.jsx("div",{className:"text-gray-400 dark:text-gray-500",children:"Nothing to preview"})})})]}),i&&E.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:i}),E.jsxs("div",{className:"rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400",children:[E.jsx("p",{className:"font-medium",children:"Markdown Syntax Help:"}),E.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[E.jsxs("div",{children:[E.jsx("strong",{children:"# Heading 1"})," - Main heading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"## Heading 2"})," - Subheading"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"**bold text**"})," - Bold"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"*italic text*"})," - Italic"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"[link](url)"})," - Link"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"![alt](image.jpg)"})," - Image"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"- item"})," - Bullet list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"1. item"})," - Numbered list"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"`code`"})," - Inline code"]}),E.jsxs("div",{children:[E.jsx("strong",{children:"```language```"})," - Code block"]})]})]})]})}/**
172
172
  * @license lucide-react v0.462.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
@@ -203,7 +203,7 @@ ${ho(this.code(t,n))}
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const um=Oc("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function KL({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No categories found"}){return t?x.jsx("div",{className:"flex items-center justify-center p-8",children:x.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?x.jsx("div",{className:"rounded-md bg-red-50 p-4",children:x.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?x.jsx("div",{className:"flex items-center justify-center p-8",children:x.jsx("div",{className:"text-gray-500",children:a})}):x.jsx("div",{className:"w-full overflow-x-auto",children:x.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[x.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:x.jsxs("tr",{children:[x.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:"Title"}),x.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:"Articles"}),x.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:"Parent"}),o&&x.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:"Actions"})]})}),x.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>x.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[x.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:x.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(l),children:l.title})}),x.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),x.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.parentId?`Parent ID: ${l.parentId}`:"-"}),o&&x.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:x.jsxs("div",{className:"flex justify-end gap-2",children:[i&&x.jsx("button",{onClick:()=>i(l),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:x.jsx(cm,{className:"h-4 w-4"})}),s&&x.jsx("button",{onClick:()=>s(l),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:x.jsx(um,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function WL({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const[o,a]=H.useState(""),[l,c]=H.useState(null),[u,d]=H.useState({});H.useEffect(()=>{e?(a(e.title),c(e.parentId||null)):h()},[e,n]);const h=()=>{a(""),c(null),d({})},f=()=>{const b={};return o.trim()||(b.title="Title is required"),d(b),Object.keys(b).length===0},p=async b=>{if(b.preventDefault(),!f())return;const y={title:o.trim(),parentId:l||void 0};try{e?await i({categoryId:e.categoryId,...y}):await i(y),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const m=t.filter(b=>b.categoryId!==(e==null?void 0:e.categoryId));return x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:x.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[x.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),x.jsxs("form",{onSubmit:p,className:"space-y-4",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),x.jsx("input",{id:"title",type:"text",value:o,onChange:b=>a(b.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),u.title&&x.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),m.length>0&&x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),x.jsxs("select",{id:"parent",value:l||"",onChange:b=>c(b.target.value?Number(b.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[x.jsx("option",{value:"",children:"None (Top Level)"}),m.map(b=>x.jsx("option",{value:b.categoryId,children:b.title},b.categoryId))]})]}),x.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[x.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),x.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:s?"Saving...":e?"Update":"Create"})]})]})]})})}function VL({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:s,onMergeClick:o,showActions:a=!1,emptyMessage:l="No tags found"}){return t?x.jsx("div",{className:"flex items-center justify-center p-8",children:x.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?x.jsx("div",{className:"rounded-md bg-red-50 p-4",children:x.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?x.jsx("div",{className:"flex items-center justify-center p-8",children:x.jsx("div",{className:"text-gray-500",children:l})}):x.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>x.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[x.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(c),children:["#",c.title]}),c.articleCount!==void 0&&x.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),a&&(i||s||o)&&x.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&x.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:x.jsx(cm,{className:"h-4 w-4"})}),o&&x.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:x.jsx(GL,{className:"h-4 w-4"})}),s&&x.jsx("button",{onClick:()=>s(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:x.jsx(um,{className:"h-4 w-4"})})]})]},c.tagId))})}function YL({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[s,o]=H.useState(""),[a,l]=H.useState(""),[c,u]=H.useState({});H.useEffect(()=>{e?(o(e.title),l(e.slug||"")):d()},[e,t]);const d=()=>{o(""),l(""),u({})},h=()=>{const p={};return s.trim()||(p.title="Title is required"),u(p),Object.keys(p).length===0},f=async p=>{if(p.preventDefault(),!h())return;const m={title:s.trim(),slug:a.trim()||void 0};try{e?await r({tagId:e.tagId,...m}):await r(m),n()}catch(b){console.error("Failed to save tag:",b)}};return t?x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:x.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[x.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),x.jsxs("form",{onSubmit:f,className:"space-y-4",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),x.jsx("input",{id:"title",type:"text",value:s,onChange:p=>o(p.target.value),className:`w-full rounded-md border ${c.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter tag title"}),c.title&&x.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),x.jsx("input",{id:"slug",type:"text",value:a,onChange:p=>l(p.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"tag-slug (optional)"}),x.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),x.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[x.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),x.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update":"Create"})]})]})]})}):null}function ZL({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const[o,a]=H.useState(null),[l,c]=H.useState({}),u=t.filter(f=>f.tagId!==e.tagId);H.useEffect(()=>{n||(a(null),c({}))},[n]);const d=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},h=async f=>{if(f.preventDefault(),!(!d()||!o))try{await i(e.tagId||0,o),r()}catch(p){console.error("Failed to merge tags:",p)}};return n?x.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:x.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[x.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),x.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:x.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",x.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),x.jsxs("form",{onSubmit:h,className:"space-y-4",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),x.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[x.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&x.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),x.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>a(Number(f.target.value)),className:`w-full rounded-md border ${l.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[x.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>x.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&x.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),x.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&x.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:x.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),x.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[x.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),x.jsx("button",{type:"submit",disabled:s||u.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Merging...":"Merge Tags"})]})]})]})}):null}function XL(){const{articleApi:e}=Gr(),[t,n]=H.useState(null),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;m!=null&&m.roles&&m.roles.length>0?b=await e.filterArticles(m.roles,m.categoryId,m.page,m.pageSize):b=await e.listArticles(m==null?void 0:m.categoryId,m==null?void 0:m.page,m==null?void 0:m.pageSize),n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch articles");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getArticleById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch article");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create article");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update article");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteArticle(m),a&&await c(a)}catch(b){const y=b instanceof Error?b:new Error("Failed to delete article");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a&&await c(a)},[a,c]);return{articles:t,loading:r,error:s,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:h,deleteArticle:f,refresh:p}}function QL(){const{categoryApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;if(m!=null&&m.roles&&m.roles.length>0?b=await e.filterCategories(m.roles,m.parentId):(m==null?void 0:m.parentId)!==void 0?b=await e.filterCategories(void 0,m.parentId):b=await e.listCategories(),m!=null&&m.searchTerm){const y=m.searchTerm.toLowerCase();b=b.filter(_=>_.title.toLowerCase().includes(y))}n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch categories");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getCategoryById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch category");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create category");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update category");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteCategory(m),a!==void 0?await c(a):await c()}catch(b){const y=b instanceof Error?b:new Error("Failed to delete category");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{categories:t,loading:r,error:s,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:h,deleteCategory:f,refresh:p}}function JL(){const{tagApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async b=>{i(!0),o(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const _=b.searchTerm.toLowerCase();y=y.filter(v=>v.title.toLowerCase().includes(_)||v.slug&&v.slug.toLowerCase().includes(_))}n(y)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tags");throw o(_),_}finally{i(!1)}},[e]),u=H.useCallback(async b=>{i(!0),o(null);try{return await e.getTagById(b)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tag");throw o(_),_}finally{i(!1)}},[e]),d=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.createTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to create tag");throw o(_),_}finally{i(!1)}},[e,a,c]),h=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.updateTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to update tag");throw o(_),_}finally{i(!1)}},[e,a,c]),f=H.useCallback(async b=>{i(!0),o(null);try{await e.deleteTag(b),a!==void 0?await c(a):await c()}catch(y){const _=y instanceof Error?y:new Error("Failed to delete tag");throw o(_),_}finally{i(!1)}},[e,a,c]),p=H.useCallback(async(b,y)=>{i(!0),o(null);try{await e.mergeTags(b,y),a!==void 0?await c(a):await c()}catch(_){const v=_ instanceof Error?_:new Error("Failed to merge tags");throw o(v),v}finally{i(!1)}},[e,a,c]),m=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{tags:t,loading:r,error:s,fetchTags:c,getTagById:u,createTag:d,updateTag:h,deleteTag:f,mergeTags:p,refresh:m}}function bf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eM(...e){return t=>{let n=!1;const r=e.map(i=>{const s=bf(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():bf(e[i],null)}}}}var tM=Symbol.for("react.lazy"),Gs=fe[" use ".trim().toString()];function nM(e){return typeof e=="object"&&e!==null&&"then"in e}function dm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tM&&"_payload"in e&&nM(e._payload)}function fm(e){const t=iM(e),n=fe.forwardRef((r,i)=>{let{children:s,...o}=r;dm(s)&&typeof Gs=="function"&&(s=Gs(s._payload));const a=fe.Children.toArray(s),l=a.find(oM);if(l){const c=l.props.children,u=a.map(d=>d===l?fe.Children.count(c)>1?fe.Children.only(null):fe.isValidElement(c)?c.props.children:null:d);return x.jsx(t,{...o,ref:i,children:fe.isValidElement(c)?fe.cloneElement(c,void 0,u):null})}return x.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var rM=fm("Slot");function iM(e){const t=fe.forwardRef((n,r)=>{let{children:i,...s}=n;if(dm(i)&&typeof Gs=="function"&&(i=Gs(i._payload)),fe.isValidElement(i)){const o=lM(i),a=aM(s,i.props);return i.type!==fe.Fragment&&(a.ref=r?eM(r,o):o),fe.cloneElement(i,a)}return fe.Children.count(i)>1?fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sM=Symbol("radix.slottable");function oM(e){return fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sM}function aM(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function lM(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pm(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hm(e))&&(r&&(r+=" "),r+=t);return r}const yf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ef=pm,gm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ef(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=yf(u)||yf(d);return i[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,h]:c},[]);return Ef(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ic="-",cM=e=>{const t=dM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Ic);return a[0]===""&&a.length!==1&&a.shift(),mm(a,t)||uM(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},mm=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?mm(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Ic);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},xf=/^\[(.+)\]$/,uM=e=>{if(xf.test(e)){const t=xf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},dM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return hM(Object.entries(e.classGroups),n).forEach(([s,o])=>{Il(o,r,s,t)}),r},Il=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:wf(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(fM(i)){Il(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Il(o,wf(t,s),n,r)})})},wf=(e,t)=>{let n=e;return t.split(Ic).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},fM=e=>e.isThemeGetter,hM=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,pM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bm="!",gM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(bm),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},mM=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},bM=e=>({cache:pM(e.cacheSize),parseClassName:gM(e),...cM(e)}),yM=/\s+/,EM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(yM);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const b=mM(u).join(":"),y=d?b+bm:b,_=y+m;if(s.includes(_))continue;s.push(_);const v=i(m,p);for(let T=0;T<v.length;++T){const C=v[T];s.push(y+C)}a=c+(a.length>0?" "+a:a)}return a};function xM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ym(t))&&(r&&(r+=" "),r+=n);return r}const ym=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ym(e[r]))&&(n&&(n+=" "),n+=t);return n};function wM(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=bM(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=EM(l,n);return i(l,u),u}return function(){return s(xM.apply(null,arguments))}}const Ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Em=/^\[(?:([a-z-]+):)?(.+)\]$/i,_M=/^\d+\/\d+$/,vM=new Set(["px","full","screen"]),kM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Ir(e)||vM.has(e)||_M.test(e),Sn=e=>Kr(e,"length",PM),Ir=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>Kr(e,"number",Ir),di=e=>!!e&&Number.isInteger(Number(e)),CM=e=>e.endsWith("%")&&Ir(e.slice(0,-1)),ue=e=>Em.test(e),Tn=e=>kM.test(e),OM=new Set(["length","size","percentage"]),IM=e=>Kr(e,OM,xm),RM=e=>Kr(e,"position",xm),LM=new Set(["image","url"]),MM=e=>Kr(e,LM,FM),DM=e=>Kr(e,"",BM),fi=()=>!0,Kr=(e,t,n)=>{const r=Em.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},PM=e=>NM.test(e)&&!AM.test(e),xm=()=>!1,BM=e=>SM.test(e),FM=e=>TM.test(e),qM=()=>{const e=Ce("colors"),t=Ce("spacing"),n=Ce("blur"),r=Ce("brightness"),i=Ce("borderColor"),s=Ce("borderRadius"),o=Ce("borderSpacing"),a=Ce("borderWidth"),l=Ce("contrast"),c=Ce("grayscale"),u=Ce("hueRotate"),d=Ce("invert"),h=Ce("gap"),f=Ce("gradientColorStops"),p=Ce("gradientColorStopPositions"),m=Ce("inset"),b=Ce("margin"),y=Ce("opacity"),_=Ce("padding"),v=Ce("saturate"),T=Ce("scale"),C=Ce("sepia"),N=Ce("skew"),P=Ce("space"),U=Ce("translate"),G=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ue,t],B=()=>[ue,t],re=()=>["",bn,Sn],X=()=>["auto",Ir,ue],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",ue],w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ir,ue];return{cacheSize:500,separator:":",theme:{colors:[fi],spacing:[bn,Sn],blur:["none","",Tn,ue],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Tn,ue],borderSpacing:B(),borderWidth:re(),contrast:Q(),grayscale:K(),hueRotate:Q(),invert:K(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[CM,Sn],inset:j(),margin:j(),opacity:Q(),padding:B(),saturate:Q(),scale:Q(),sepia:K(),skew:Q(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ue]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",di,ue]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",di,ue]}],"grid-cols":[{"grid-cols":[fi]}],"col-start-end":[{col:["auto",{span:["full",di,ue]},ue]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[fi]}],"row-start-end":[{row:["auto",{span:[di,ue]},ue]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ua]}],"font-family":[{font:[fi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",Ir,Ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bn,Sn]}],"underline-offset":[{"underline-offset":["auto",bn,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),RM]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IM]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},MM]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[bn,ue]}],"outline-w":[{outline:[bn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[bn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tn,DM]}],"shadow-color":[{shadow:[fi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[di,ue]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bn,Sn,Ua]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},UM=wM(qM);function cr(...e){return UM(pm(e))}const $M=gm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-outline bg-background text-outline-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",ghost:"hover:bg-gray-100 dark:hover:bg-gray-800",link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wm=fe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?rM:"button";return x.jsx(o,{className:cr($M({variant:t,size:n,className:e})),ref:s,...i})});wm.displayName="Button";const _m=fe.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:cr("flex h-10 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));_m.displayName="Input";var zM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=zM.reduce((e,t)=>{const n=fm(`Primitive.${t}`),r=fe.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),jM="Label",vm=fe.forwardRef((e,t)=>x.jsx(_o.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vm.displayName=jM;var km=vm;const HM=gm("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nm=fe.forwardRef(({className:e,...t},n)=>x.jsx(km,{ref:n,className:cr(HM(),e),...t}));Nm.displayName=km.displayName;function GM(e,t=[]){let n=[];function r(s,o){const a=fe.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=d=>{var y;const{scope:h,children:f,...p}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=fe.useMemo(()=>p,Object.values(p));return x.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function u(d,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,p=fe.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>fe.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return fe.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,KM(i,...t)]}function KM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return fe.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function WM(e){const t=fe.useRef(e);return fe.useEffect(()=>{t.current=e}),fe.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Rl=globalThis!=null&&globalThis.document?fe.useLayoutEffect:()=>{},Ll={exports:{}},$a={};/**
206
+ */const um=Oc("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function KL({categories:e,loading:t=!1,error:n=null,onCategoryClick:r,onEditClick:i,onDeleteClick:s,showActions:o=!1,emptyMessage:a="No categories found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading categories..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading categories: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:a})}):E.jsx("div",{className:"w-full overflow-x-auto",children:E.jsxs("table",{className:"w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700",children:[E.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800",children:E.jsxs("tr",{children:[E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]",children:"Title"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]",children:"Articles"}),E.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]",children:"Parent"}),o&&E.jsx("th",{scope:"col",className:"px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]",children:"Actions"})]})}),E.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:e.map(l=>E.jsxs("tr",{className:"hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100",children:E.jsx("div",{className:r?"cursor-pointer hover:text-blue-600 dark:hover:text-blue-400":"",onClick:()=>r==null?void 0:r(l),children:l.title})}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.articleCount||0}),E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",children:l.parentId?`Parent ID: ${l.parentId}`:"-"}),o&&E.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:E.jsxs("div",{className:"flex justify-end gap-2",children:[i&&E.jsx("button",{onClick:()=>i(l),className:"text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(l),className:"text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})})]},l.categoryId))})]})})}function WL({category:e,categories:t=[],isOpen:n,onClose:r,onSave:i,loading:s=!1}){const[o,a]=H.useState(""),[l,c]=H.useState(null),[u,d]=H.useState({});H.useEffect(()=>{e?(a(e.title),c(e.parentId||null)):h()},[e,n]);const h=()=>{a(""),c(null),d({})},f=()=>{const b={};return o.trim()||(b.title="Title is required"),d(b),Object.keys(b).length===0},p=async b=>{if(b.preventDefault(),!f())return;const y={title:o.trim(),parentId:l||void 0};try{e?await i({categoryId:e.categoryId,...y}):await i(y),r()}catch(_){console.error("Failed to save category:",_)}};if(!n)return null;const m=t.filter(b=>b.categoryId!==(e==null?void 0:e.categoryId));return E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-lg rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Category":"Create Category"}),E.jsxs("form",{onSubmit:p,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:o,onChange:b=>a(b.target.value),className:`w-full rounded-md border ${u.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter category title"}),u.title&&E.jsx("p",{className:"text-sm text-red-600",children:u.title})]}),m.length>0&&E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"parent",className:"block text-sm font-medium text-gray-700",children:"Parent Category"}),E.jsxs("select",{id:"parent",value:l||"",onChange:b=>c(b.target.value?Number(b.target.value):null),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[E.jsx("option",{value:"",children:"None (Top Level)"}),m.map(b=>E.jsx("option",{value:b.categoryId,children:b.title},b.categoryId))]})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:s?"Saving...":e?"Update":"Create"})]})]})]})})}function VL({tags:e,loading:t=!1,error:n=null,onTagClick:r,onEditClick:i,onDeleteClick:s,onMergeClick:o,showActions:a=!1,emptyMessage:l="No tags found"}){return t?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:"Loading tags..."})}):n?E.jsx("div",{className:"rounded-md bg-red-50 p-4",children:E.jsxs("div",{className:"text-sm text-red-800",children:["Error loading tags: ",n.message]})}):e.length===0?E.jsx("div",{className:"flex items-center justify-center p-8",children:E.jsx("div",{className:"text-gray-500",children:l})}):E.jsx("div",{className:"flex flex-wrap gap-3",children:e.map(c=>E.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",children:[E.jsxs("span",{className:`text-sm font-medium text-gray-900 ${r?"cursor-pointer hover:text-blue-600":""}`,onClick:()=>r==null?void 0:r(c),children:["#",c.title]}),c.articleCount!==void 0&&E.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full",children:c.articleCount}),a&&(i||s||o)&&E.jsxs("div",{className:"flex gap-1 ml-2",children:[i&&E.jsx("button",{onClick:()=>i(c),className:"rounded p-1 text-blue-600 hover:bg-blue-50 transition-colors",title:"Edit",children:E.jsx(cm,{className:"h-4 w-4"})}),o&&E.jsx("button",{onClick:()=>o(c),className:"rounded p-1 text-purple-600 hover:bg-purple-50 transition-colors",title:"Merge",children:E.jsx(GL,{className:"h-4 w-4"})}),s&&E.jsx("button",{onClick:()=>s(c),className:"rounded p-1 text-red-600 hover:bg-red-50 transition-colors",title:"Delete",children:E.jsx(um,{className:"h-4 w-4"})})]})]},c.tagId))})}function YL({tag:e,isOpen:t,onClose:n,onSave:r,loading:i=!1}){const[s,o]=H.useState(""),[a,l]=H.useState(""),[c,u]=H.useState({});H.useEffect(()=>{e?(o(e.title),l(e.slug||"")):d()},[e,t]);const d=()=>{o(""),l(""),u({})},h=()=>{const p={};return s.trim()||(p.title="Title is required"),u(p),Object.keys(p).length===0},f=async p=>{if(p.preventDefault(),!h())return;const m={title:s.trim(),slug:a.trim()||void 0};try{e?await r({tagId:e.tagId,...m}):await r(m),n()}catch(b){console.error("Failed to save tag:",b)}};return t?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:e?"Edit Tag":"Create Tag"}),E.jsxs("form",{onSubmit:f,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700",children:"Title *"}),E.jsx("input",{id:"title",type:"text",value:s,onChange:p=>o(p.target.value),className:`w-full rounded-md border ${c.title?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,placeholder:"Enter tag title"}),c.title&&E.jsx("p",{className:"text-sm text-red-600",children:c.title})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-gray-700",children:"Slug"}),E.jsx("input",{id:"slug",type:"text",value:a,onChange:p=>l(p.target.value),className:"w-full rounded-md border border-gray-300 px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"tag-slug (optional)"}),E.jsx("p",{className:"text-xs text-gray-500",children:"URL-friendly version of the title. Leave empty to auto-generate."})]}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:n,disabled:i,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50",children:i?"Saving...":e?"Update":"Create"})]})]})]})}):null}function ZL({sourceTag:e,availableTags:t,isOpen:n,onClose:r,onMerge:i,loading:s=!1}){const[o,a]=H.useState(null),[l,c]=H.useState({}),u=t.filter(f=>f.tagId!==e.tagId);H.useEffect(()=>{n||(a(null),c({}))},[n]);const d=()=>{const f={};return o||(f.targetTag="Please select a target tag"),c(f),Object.keys(f).length===0},h=async f=>{if(f.preventDefault(),!(!d()||!o))try{await i(e.tagId||0,o),r()}catch(p){console.error("Failed to merge tags:",p)}};return n?E.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:E.jsxs("div",{className:"w-full max-w-md rounded-lg bg-white p-6 shadow-xl",children:[E.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"Merge Tags"}),E.jsx("div",{className:"mb-6 rounded-md bg-blue-50 p-4",children:E.jsxs("p",{className:"text-sm text-blue-800",children:["All articles tagged with"," ",E.jsxs("strong",{className:"font-semibold",children:["#",e.title]})," will be moved to the selected target tag, and the source tag will be deleted."]})}),E.jsxs("form",{onSubmit:h,className:"space-y-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Source Tag"}),E.jsxs("div",{className:"rounded-md border border-gray-300 bg-gray-50 px-4 py-2",children:[E.jsxs("span",{className:"font-medium text-gray-900",children:["#",e.title]}),e.slug&&E.jsxs("span",{className:"ml-2 text-xs font-mono text-gray-500",children:["(",e.slug,")"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("label",{htmlFor:"targetTag",className:"block text-sm font-medium text-gray-700",children:"Target Tag *"}),E.jsxs("select",{id:"targetTag",value:o||"",onChange:f=>a(Number(f.target.value)),className:`w-full rounded-md border ${l.targetTag?"border-red-300":"border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,children:[E.jsx("option",{value:"",children:"Select target tag"}),u.map(f=>E.jsxs("option",{value:f.tagId,children:["#",f.title," ",f.slug?`(${f.slug})`:""]},f.tagId))]}),l.targetTag&&E.jsx("p",{className:"text-sm text-red-600",children:l.targetTag}),E.jsx("p",{className:"text-xs text-gray-500",children:"Select the tag that will receive all articles from the source tag"})]}),u.length===0&&E.jsx("div",{className:"rounded-md bg-yellow-50 p-4",children:E.jsx("p",{className:"text-sm text-yellow-800",children:"No other tags available. You need at least 2 tags to perform a merge."})}),E.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[E.jsx("button",{type:"button",onClick:r,disabled:s,className:"rounded-md border border-gray-300 px-6 py-2 text-gray-700 hover:bg-gray-50 disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"submit",disabled:s||u.length===0,className:"rounded-md bg-blue-600 px-6 py-2 text-white hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?"Merging...":"Merge Tags"})]})]})]})}):null}function XL(){const{articleApi:e}=Gr(),[t,n]=H.useState(null),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;m!=null&&m.roles&&m.roles.length>0?b=await e.filterArticles(m.roles,m.categoryId,m.page,m.pageSize):b=await e.listArticles(m==null?void 0:m.categoryId,m==null?void 0:m.page,m==null?void 0:m.pageSize),n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch articles");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getArticleById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch article");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create article");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateArticle(m);return a&&await c(a),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update article");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteArticle(m),a&&await c(a)}catch(b){const y=b instanceof Error?b:new Error("Failed to delete article");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a&&await c(a)},[a,c]);return{articles:t,loading:r,error:s,fetchArticles:c,getArticleById:u,createArticle:d,updateArticle:h,deleteArticle:f,refresh:p}}function QL(){const{categoryApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async m=>{i(!0),o(null),l(m);try{let b;if(m!=null&&m.roles&&m.roles.length>0?b=await e.filterCategories(m.roles,m.parentId):(m==null?void 0:m.parentId)!==void 0?b=await e.filterCategories(void 0,m.parentId):b=await e.listCategories(),m!=null&&m.searchTerm){const y=m.searchTerm.toLowerCase();b=b.filter(_=>_.title.toLowerCase().includes(y))}n(b)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch categories");throw o(y),y}finally{i(!1)}},[e]),u=H.useCallback(async m=>{i(!0),o(null);try{return await e.getCategoryById(m)}catch(b){const y=b instanceof Error?b:new Error("Failed to fetch category");throw o(y),y}finally{i(!1)}},[e]),d=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.createCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to create category");throw o(y),y}finally{i(!1)}},[e,a,c]),h=H.useCallback(async m=>{i(!0),o(null);try{const b=await e.updateCategory(m);return a!==void 0?await c(a):await c(),b}catch(b){const y=b instanceof Error?b:new Error("Failed to update category");throw o(y),y}finally{i(!1)}},[e,a,c]),f=H.useCallback(async m=>{i(!0),o(null);try{await e.deleteCategory(m),a!==void 0?await c(a):await c()}catch(b){const y=b instanceof Error?b:new Error("Failed to delete category");throw o(y),y}finally{i(!1)}},[e,a,c]),p=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{categories:t,loading:r,error:s,fetchCategories:c,getCategoryById:u,createCategory:d,updateCategory:h,deleteCategory:f,refresh:p}}function JL(){const{tagApi:e}=Gr(),[t,n]=H.useState([]),[r,i]=H.useState(!1),[s,o]=H.useState(null),[a,l]=H.useState(),c=H.useCallback(async b=>{i(!0),o(null),l(b);try{let y=await e.listTags();if(b!=null&&b.searchTerm){const _=b.searchTerm.toLowerCase();y=y.filter(v=>v.title.toLowerCase().includes(_)||v.slug&&v.slug.toLowerCase().includes(_))}n(y)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tags");throw o(_),_}finally{i(!1)}},[e]),u=H.useCallback(async b=>{i(!0),o(null);try{return await e.getTagById(b)}catch(y){const _=y instanceof Error?y:new Error("Failed to fetch tag");throw o(_),_}finally{i(!1)}},[e]),d=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.createTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to create tag");throw o(_),_}finally{i(!1)}},[e,a,c]),h=H.useCallback(async b=>{i(!0),o(null);try{const y=await e.updateTag(b);return a!==void 0?await c(a):await c(),y}catch(y){const _=y instanceof Error?y:new Error("Failed to update tag");throw o(_),_}finally{i(!1)}},[e,a,c]),f=H.useCallback(async b=>{i(!0),o(null);try{await e.deleteTag(b),a!==void 0?await c(a):await c()}catch(y){const _=y instanceof Error?y:new Error("Failed to delete tag");throw o(_),_}finally{i(!1)}},[e,a,c]),p=H.useCallback(async(b,y)=>{i(!0),o(null);try{await e.mergeTags(b,y),a!==void 0?await c(a):await c()}catch(_){const v=_ instanceof Error?_:new Error("Failed to merge tags");throw o(v),v}finally{i(!1)}},[e,a,c]),m=H.useCallback(async()=>{a!==void 0?await c(a):await c()},[a,c]);return{tags:t,loading:r,error:s,fetchTags:c,getTagById:u,createTag:d,updateTag:h,deleteTag:f,mergeTags:p,refresh:m}}function bf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e2(...e){return t=>{let n=!1;const r=e.map(i=>{const s=bf(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():bf(e[i],null)}}}}var t2=Symbol.for("react.lazy"),Gs=fe[" use ".trim().toString()];function n2(e){return typeof e=="object"&&e!==null&&"then"in e}function dm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===t2&&"_payload"in e&&n2(e._payload)}function fm(e){const t=i2(e),n=fe.forwardRef((r,i)=>{let{children:s,...o}=r;dm(s)&&typeof Gs=="function"&&(s=Gs(s._payload));const a=fe.Children.toArray(s),l=a.find(o2);if(l){const c=l.props.children,u=a.map(d=>d===l?fe.Children.count(c)>1?fe.Children.only(null):fe.isValidElement(c)?c.props.children:null:d);return E.jsx(t,{...o,ref:i,children:fe.isValidElement(c)?fe.cloneElement(c,void 0,u):null})}return E.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var r2=fm("Slot");function i2(e){const t=fe.forwardRef((n,r)=>{let{children:i,...s}=n;if(dm(i)&&typeof Gs=="function"&&(i=Gs(i._payload)),fe.isValidElement(i)){const o=l2(i),a=a2(s,i.props);return i.type!==fe.Fragment&&(a.ref=r?e2(r,o):o),fe.cloneElement(i,a)}return fe.Children.count(i)>1?fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s2=Symbol("radix.slottable");function o2(e){return fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s2}function a2(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function l2(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pm(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hm(e))&&(r&&(r+=" "),r+=t);return r}const yf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xf=pm,gm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xf(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const h=yf(u)||yf(d);return i[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,b]=p;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,h]:c},[]);return xf(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ic="-",c2=e=>{const t=d2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Ic);return a[0]===""&&a.length!==1&&a.shift(),mm(a,t)||u2(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},mm=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?mm(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Ic);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Ef=/^\[(.+)\]$/,u2=e=>{if(Ef.test(e)){const t=Ef.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},d2=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return h2(Object.entries(e.classGroups),n).forEach(([s,o])=>{Il(o,r,s,t)}),r},Il=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:wf(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(f2(i)){Il(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Il(o,wf(t,s),n,r)})})},wf=(e,t)=>{let n=e;return t.split(Ic).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},f2=e=>e.isThemeGetter,h2=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,p2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bm="!",g2=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===i&&(r||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(bm),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},m2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},b2=e=>({cache:p2(e.cacheSize),parseClassName:g2(e),...c2(e)}),y2=/\s+/,x2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(y2);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(c);let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){a=c+(a.length>0?" "+a:a);continue}if(m=r(h),!m){a=c+(a.length>0?" "+a:a);continue}p=!1}const b=m2(u).join(":"),y=d?b+bm:b,_=y+m;if(s.includes(_))continue;s.push(_);const v=i(m,p);for(let T=0;T<v.length;++T){const C=v[T];s.push(y+C)}a=c+(a.length>0?" "+a:a)}return a};function E2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ym(t))&&(r&&(r+=" "),r+=n);return r}const ym=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ym(e[r]))&&(n&&(n+=" "),n+=t);return n};function w2(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=b2(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=x2(l,n);return i(l,u),u}return function(){return s(E2.apply(null,arguments))}}const Ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xm=/^\[(?:([a-z-]+):)?(.+)\]$/i,_2=/^\d+\/\d+$/,v2=new Set(["px","full","screen"]),k2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,A2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,S2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Ir(e)||v2.has(e)||_2.test(e),Sn=e=>Kr(e,"length",P2),Ir=e=>!!e&&!Number.isNaN(Number(e)),Ua=e=>Kr(e,"number",Ir),di=e=>!!e&&Number.isInteger(Number(e)),C2=e=>e.endsWith("%")&&Ir(e.slice(0,-1)),ue=e=>xm.test(e),Tn=e=>k2.test(e),O2=new Set(["length","size","percentage"]),I2=e=>Kr(e,O2,Em),R2=e=>Kr(e,"position",Em),L2=new Set(["image","url"]),M2=e=>Kr(e,L2,F2),D2=e=>Kr(e,"",B2),fi=()=>!0,Kr=(e,t,n)=>{const r=xm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},P2=e=>N2.test(e)&&!A2.test(e),Em=()=>!1,B2=e=>S2.test(e),F2=e=>T2.test(e),q2=()=>{const e=Ce("colors"),t=Ce("spacing"),n=Ce("blur"),r=Ce("brightness"),i=Ce("borderColor"),s=Ce("borderRadius"),o=Ce("borderSpacing"),a=Ce("borderWidth"),l=Ce("contrast"),c=Ce("grayscale"),u=Ce("hueRotate"),d=Ce("invert"),h=Ce("gap"),f=Ce("gradientColorStops"),p=Ce("gradientColorStopPositions"),m=Ce("inset"),b=Ce("margin"),y=Ce("opacity"),_=Ce("padding"),v=Ce("saturate"),T=Ce("scale"),C=Ce("sepia"),N=Ce("skew"),P=Ce("space"),U=Ce("translate"),G=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ue,t],B=()=>[ue,t],re=()=>["",bn,Sn],X=()=>["auto",Ir,ue],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",ue],w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Ir,ue];return{cacheSize:500,separator:":",theme:{colors:[fi],spacing:[bn,Sn],blur:["none","",Tn,ue],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Tn,ue],borderSpacing:B(),borderWidth:re(),contrast:Q(),grayscale:K(),hueRotate:Q(),invert:K(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[C2,Sn],inset:j(),margin:j(),opacity:Q(),padding:B(),saturate:Q(),scale:Q(),sepia:K(),skew:Q(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Tn]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ue]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",di,ue]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",di,ue]}],"grid-cols":[{"grid-cols":[fi]}],"col-start-end":[{col:["auto",{span:["full",di,ue]},ue]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[fi]}],"row-start-end":[{row:["auto",{span:[di,ue]},ue]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Tn]},Tn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Tn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ua]}],"font-family":[{font:[fi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",Ir,Ua]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bn,Sn]}],"underline-offset":[{"underline-offset":["auto",bn,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),R2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",I2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[bn,ue]}],"outline-w":[{outline:[bn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[bn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tn,D2]}],"shadow-color":[{shadow:[fi]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Tn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[di,ue]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bn,Sn,Ua]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},U2=w2(q2);function cr(...e){return U2(pm(e))}const $2=gm("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-outline bg-background text-outline-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-gray-200 text-gray-900 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",ghost:"hover:bg-gray-100 dark:hover:bg-gray-800",link:"text-blue-600 dark:text-blue-400 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wm=fe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?r2:"button";return E.jsx(o,{className:cr($2({variant:t,size:n,className:e})),ref:s,...i})});wm.displayName="Button";const _m=fe.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:cr("flex h-10 w-full rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));_m.displayName="Input";var z2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_o=z2.reduce((e,t)=>{const n=fm(`Primitive.${t}`),r=fe.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),j2="Label",vm=fe.forwardRef((e,t)=>E.jsx(_o.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vm.displayName=j2;var km=vm;const H2=gm("text-sm font-medium leading-none text-gray-900 dark:text-gray-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nm=fe.forwardRef(({className:e,...t},n)=>E.jsx(km,{ref:n,className:cr(H2(),e),...t}));Nm.displayName=km.displayName;function G2(e,t=[]){let n=[];function r(s,o){const a=fe.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const c=d=>{var y;const{scope:h,children:f,...p}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=fe.useMemo(()=>p,Object.values(p));return E.jsx(m.Provider,{value:b,children:f})};c.displayName=s+"Provider";function u(d,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,p=fe.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(o=>fe.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return fe.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,K2(i,...t)]}function K2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return fe.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function W2(e){const t=fe.useRef(e);return fe.useEffect(()=>{t.current=e}),fe.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Rl=globalThis!=null&&globalThis.document?fe.useLayoutEffect:()=>{},Ll={exports:{}},$a={};/**
207
207
  * @license React
208
208
  * use-sync-external-store-shim.production.js
209
209
  *
@@ -211,7 +211,7 @@ ${ho(this.code(t,n))}
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var _f;function VM(){if(_f)return $a;_f=1;var e=H;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,b=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&b({inst:m})},[d,f,h]),i(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),o(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return $a.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$a}var za={};/**
214
+ */var _f;function V2(){if(_f)return $a;_f=1;var e=H;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,b=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&b({inst:m})},[d,f,h]),i(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),o(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return $a.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,$a}var za={};/**
215
215
  * @license React
216
216
  * use-sync-external-store-shim.development.js
217
217
  *
@@ -219,5 +219,5 @@ ${ho(this.code(t,n))}
219
219
  *
220
220
  * This source code is licensed under the MIT license found in the
221
221
  * LICENSE file in the root directory of this source tree.
222
- */var vf;function YM(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!d){var b=p();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=o({inst:{value:m,getSnapshot:p}});var y=b[0].inst,_=b[1];return l(function(){y.value=m,y.getSnapshot=p,n(y)&&_({inst:y})},[f,m,p]),a(function(){return n(y)&&_({inst:y}),f(function(){n(y)&&_({inst:y})})},[f]),c(m),m}function n(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!s(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=H,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;za.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),za}process.env.NODE_ENV==="production"?Ll.exports=VM():Ll.exports=YM();var ZM=Ll.exports;function XM(){return ZM.useSyncExternalStore(QM,()=>!0,()=>!1)}function QM(){return()=>{}}var Rc="Avatar",[JM]=GM(Rc),[e2,Am]=JM(Rc),Sm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=fe.useState("idle");return x.jsx(e2,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:x.jsx(_o.span,{...r,ref:t})})});Sm.displayName=Rc;var Tm="AvatarImage",Cm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,o=Am(Tm,n),a=t2(r,s),l=WM(c=>{i(c),o.onImageLoadingStatusChange(c)});return Rl(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?x.jsx(_o.img,{...s,ref:t,src:r}):null});Cm.displayName=Tm;var Om="AvatarFallback",Im=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=Am(Om,n),[o,a]=fe.useState(r===void 0);return fe.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?x.jsx(_o.span,{...i,ref:t}):null});Im.displayName=Om;function kf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function t2(e,{referrerPolicy:t,crossOrigin:n}){const r=XM(),i=fe.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=fe.useState(()=>kf(s,e));return Rl(()=>{a(kf(s,e))},[s,e]),Rl(()=>{const l=d=>()=>{a(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),o}var Rm=Sm,Lm=Cm,Mm=Im;const Dm=fe.forwardRef(({className:e,...t},n)=>x.jsx(Rm,{ref:n,className:cr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dm.displayName=Rm.displayName;const Pm=fe.forwardRef(({className:e,...t},n)=>x.jsx(Lm,{ref:n,className:cr("aspect-square h-full w-full",e),...t}));Pm.displayName=Lm.displayName;const Bm=fe.forwardRef(({className:e,...t},n)=>x.jsx(Mm,{ref:n,className:cr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Bm.displayName=Mm.displayName;function n2(e){if(e=e.replace(/[^\d]/g,""),e.length!==11||/^(\d)\1+$/.test(e))return!1;let t=0;for(let r=0;r<9;r++)t+=parseInt(e.charAt(r))*(10-r);let n=11-t%11;if(n>=10&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let r=0;r<10;r++)t+=parseInt(e.charAt(r))*(11-r);return n=11-t%11,n>=10&&(n=0),n===parseInt(e.charAt(10))}function r2(e){if(e=e.replace(/[^\d]/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,n=e.substring(0,t);const r=e.substring(t);let i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(r.charAt(0)))return!1;t=t+1,n=e.substring(0,t),i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);return o=i%11<2?0:11-i%11,o===parseInt(r.charAt(1))}function i2(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function s2(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function o2(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):t.length===10?t.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):e}function a2(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):t.length===14?t.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"$1.$2.$3/$4-$5"):e}function l2(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function c2(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:s=!0,requireSpecialChars:o=!0}=t,a=[];let l=0;e.length<n?a.push(`Password must be at least ${n} characters long`):(l++,e.length>=12&&l++),r&&!/[A-Z]/.test(e)?a.push("Password must contain at least one uppercase letter"):/[A-Z]/.test(e)&&l++,i&&!/[a-z]/.test(e)?a.push("Password must contain at least one lowercase letter"):/[a-z]/.test(e)&&l++,s&&!/\d/.test(e)?a.push("Password must contain at least one number"):/\d/.test(e)&&l++,o&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?a.push("Password must contain at least one special character"):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&l++;const c=a.length===0;return{score:Math.min(l,4),feedback:a,isValid:c}}function u2(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function d2(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}function f2(e){return e.map(t=>t.title).join(", ")}function Fm(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function h2(e){return!e||e.trim().length<10?{valid:!1,error:"Prompt must be at least 10 characters long"}:e.length>2e3?{valid:!1,error:"Prompt must be less than 2000 characters"}:{valid:!0}}function p2(e){if(!e||!e.trim())return{valid:!0,tags:[]};const t=Fm(e);return t.length===0?{valid:!1,error:"Invalid tag format. Use comma-separated values."}:e.split(",").some(i=>i.trim().length===0&&i.length>0)?{valid:!1,error:"Tags cannot be empty. Remove extra commas."}:t.filter(i=>i.length>50).length>0?{valid:!1,error:"Individual tags must be less than 50 characters"}:{valid:!0,tags:t}}exports.AIArticleGenerator=UL;exports.ArticleAPI=im;exports.ArticleEditor=qL;exports.ArticleList=zm;exports.ArticleStatus=Fe;exports.ArticleViewer=dN;exports.Avatar=Dm;exports.AvatarFallback=Bm;exports.AvatarImage=Pm;exports.Button=wm;exports.CategoryAPI=sm;exports.CategoryList=KL;exports.CategoryModal=WL;exports.Input=_m;exports.Label=Nm;exports.MarkdownEditor=$L;exports.NNewsProvider=FL;exports.RichTextEditor=Lg;exports.TagAPI=om;exports.TagList=VL;exports.TagMerge=ZL;exports.TagModal=YL;exports.cn=cr;exports.debounce=u2;exports.formatDocument=a2;exports.formatPhone=o2;exports.formatZipCode=l2;exports.stringToTagsPreview=Fm;exports.tagsToString=f2;exports.throttle=d2;exports.useArticles=XL;exports.useCategories=QL;exports.useNNews=Gr;exports.useTags=JL;exports.validateCNPJ=r2;exports.validateCPF=n2;exports.validateEmail=i2;exports.validatePasswordStrength=c2;exports.validatePhone=s2;exports.validatePrompt=h2;exports.validateTagList=p2;
222
+ */var vf;function Y2(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}function t(f,p){u||i.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!d){var b=p();s(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=o({inst:{value:m,getSnapshot:p}});var y=b[0].inst,_=b[1];return l(function(){y.value=m,y.getSnapshot=p,n(y)&&_({inst:y})},[f,m,p]),a(function(){return n(y)&&_({inst:y}),f(function(){n(y)&&_({inst:y})})},[f]),c(m),m}function n(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!s(f,m)}catch{return!0}}function r(f,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=H,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;za.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),za}process.env.NODE_ENV==="production"?Ll.exports=V2():Ll.exports=Y2();var Z2=Ll.exports;function X2(){return Z2.useSyncExternalStore(Q2,()=>!0,()=>!1)}function Q2(){return()=>{}}var Rc="Avatar",[J2]=G2(Rc),[eM,Am]=J2(Rc),Sm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=fe.useState("idle");return E.jsx(eM,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(_o.span,{...r,ref:t})})});Sm.displayName=Rc;var Tm="AvatarImage",Cm=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,o=Am(Tm,n),a=tM(r,s),l=W2(c=>{i(c),o.onImageLoadingStatusChange(c)});return Rl(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?E.jsx(_o.img,{...s,ref:t,src:r}):null});Cm.displayName=Tm;var Om="AvatarFallback",Im=fe.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,s=Am(Om,n),[o,a]=fe.useState(r===void 0);return fe.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?E.jsx(_o.span,{...i,ref:t}):null});Im.displayName=Om;function kf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tM(e,{referrerPolicy:t,crossOrigin:n}){const r=X2(),i=fe.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=fe.useState(()=>kf(s,e));return Rl(()=>{a(kf(s,e))},[s,e]),Rl(()=>{const l=d=>()=>{a(d)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),o}var Rm=Sm,Lm=Cm,Mm=Im;const Dm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Rm,{ref:n,className:cr("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Dm.displayName=Rm.displayName;const Pm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Lm,{ref:n,className:cr("aspect-square h-full w-full",e),...t}));Pm.displayName=Lm.displayName;const Bm=fe.forwardRef(({className:e,...t},n)=>E.jsx(Mm,{ref:n,className:cr("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Bm.displayName=Mm.displayName;function nM(e){if(e=e.replace(/[^\d]/g,""),e.length!==11||/^(\d)\1+$/.test(e))return!1;let t=0;for(let r=0;r<9;r++)t+=parseInt(e.charAt(r))*(10-r);let n=11-t%11;if(n>=10&&(n=0),n!==parseInt(e.charAt(9)))return!1;t=0;for(let r=0;r<10;r++)t+=parseInt(e.charAt(r))*(11-r);return n=11-t%11,n>=10&&(n=0),n===parseInt(e.charAt(10))}function rM(e){if(e=e.replace(/[^\d]/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,n=e.substring(0,t);const r=e.substring(t);let i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);let o=i%11<2?0:11-i%11;if(o!==parseInt(r.charAt(0)))return!1;t=t+1,n=e.substring(0,t),i=0,s=t-7;for(let a=t;a>=1;a--)i+=parseInt(n.charAt(t-a))*s--,s<2&&(s=9);return o=i%11<2?0:11-i%11,o===parseInt(r.charAt(1))}function iM(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function sM(e){const t=e.replace(/[^\d]/g,"");return t.length>=10&&t.length<=11}function oM(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):t.length===10?t.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):e}function aM(e){const t=e.replace(/[^\d]/g,"");return t.length===11?t.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):t.length===14?t.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"$1.$2.$3/$4-$5"):e}function lM(e){const t=e.replace(/[^\d]/g,"");return t.length===8?t.replace(/(\d{5})(\d{3})/,"$1-$2"):e}function cM(e,t={}){const{minLength:n=8,requireUppercase:r=!0,requireLowercase:i=!0,requireNumbers:s=!0,requireSpecialChars:o=!0}=t,a=[];let l=0;e.length<n?a.push(`Password must be at least ${n} characters long`):(l++,e.length>=12&&l++),r&&!/[A-Z]/.test(e)?a.push("Password must contain at least one uppercase letter"):/[A-Z]/.test(e)&&l++,i&&!/[a-z]/.test(e)?a.push("Password must contain at least one lowercase letter"):/[a-z]/.test(e)&&l++,s&&!/\d/.test(e)?a.push("Password must contain at least one number"):/\d/.test(e)&&l++,o&&!/[!@#$%^&*(),.?":{}|<>]/.test(e)?a.push("Password must contain at least one special character"):/[!@#$%^&*(),.?":{}|<>]/.test(e)&&l++;const c=a.length===0;return{score:Math.min(l,4),feedback:a,isValid:c}}function uM(e,t){let n=null;return function(...i){const s=()=>{n=null,e(...i)};n&&clearTimeout(n),n=setTimeout(s,t)}}function dM(e,t){let n;return function(...i){n||(e(...i),n=!0,setTimeout(()=>n=!1,t))}}function fM(e){return e.map(t=>t.title).join(", ")}function Fm(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function hM(e){return!e||e.trim().length<10?{valid:!1,error:"Prompt must be at least 10 characters long"}:e.length>2e3?{valid:!1,error:"Prompt must be less than 2000 characters"}:{valid:!0}}function pM(e){if(!e||!e.trim())return{valid:!0,tags:[]};const t=Fm(e);return t.length===0?{valid:!1,error:"Invalid tag format. Use comma-separated values."}:e.split(",").some(i=>i.trim().length===0&&i.length>0)?{valid:!1,error:"Tags cannot be empty. Remove extra commas."}:t.filter(i=>i.length>50).length>0?{valid:!1,error:"Individual tags must be less than 50 characters"}:{valid:!0,tags:t}}exports.AIArticleGenerator=UL;exports.ArticleAPI=im;exports.ArticleEditor=qL;exports.ArticleList=zm;exports.ArticleStatus=Fe;exports.ArticleViewer=dN;exports.Avatar=Dm;exports.AvatarFallback=Bm;exports.AvatarImage=Pm;exports.Button=wm;exports.CategoryAPI=sm;exports.CategoryList=KL;exports.CategoryModal=WL;exports.Input=_m;exports.Label=Nm;exports.MarkdownEditor=$L;exports.NNewsProvider=FL;exports.RichTextEditor=Lg;exports.TagAPI=om;exports.TagList=VL;exports.TagMerge=ZL;exports.TagModal=YL;exports.cn=cr;exports.debounce=uM;exports.formatDocument=aM;exports.formatPhone=oM;exports.formatZipCode=lM;exports.stringToTagsPreview=Fm;exports.tagsToString=fM;exports.throttle=dM;exports.useArticles=XL;exports.useCategories=QL;exports.useNNews=Gr;exports.useTags=JL;exports.validateCNPJ=rM;exports.validateCPF=nM;exports.validateEmail=iM;exports.validatePasswordStrength=cM;exports.validatePhone=sM;exports.validatePrompt=hM;exports.validateTagList=pM;
223
223
  //# sourceMappingURL=index.cjs.map