orcal-ui 0.4.1 → 0.4.2

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/orcal-ui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function n(e){return function(){var n=this,r=arguments;return new Promise(function(o,a){var i=e.apply(n,r);function l(e){t(i,o,a,l,c,"next",e)}function c(e){t(i,o,a,l,c,"throw",e)}l(void 0)})}}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return c(u,"_invoke",function(n,r,o){var a,l,c,s=0,u=o||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return a=t,l=0,c=e,p.n=n,i}};function f(n,r){for(l=n,c=r,t=0;!d&&s&&!o&&t<u.length;t++){var o,a=u[t],f=p.p,h=a[2];n>3?(o=h===r)&&(c=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=f&&((o=n<2&&f<a[1])?(l=0,p.v=r,p.n=a[1]):f<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,p.n=h,l=0))}if(o||n>1)return i;throw d=!0,r}return function(o,u,h){if(s>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),l=u,c=h;(t=l<2?e:c)||!d;){a||(l?l<3?(l>1&&(p.n=-1),f(l,c)):p.n=c:p.v=c);try{if(s=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(d=p.n<0)?c:n.call(r,p))!==i)break}catch(t){a=e,l=1,c=t}finally{s=1}}return{value:t,done:d}}}(n,o,a),!0),u}var i={};function s(){}function u(){}function d(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(c(t={},r,function(){return this}),t),f=d.prototype=s.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=d,c(f,"constructor",d),c(d,"constructor",u),u.displayName="GeneratorFunction",c(d,o,"GeneratorFunction"),c(f),c(f,o,"Generator"),c(f,r,function(){return this}),c(f,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:h}})()}function c(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,t,n,r){function a(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},c(e,t,n,r)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function p(){}function f(){}const h=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,g={};function x(e,t){return((t||g).jsx?m:h).test(e)}const v=/[ \t\n\f\r]/g;function b(e){return""===e.replace(v,"")}class y{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function w(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new y(n,r,t)}function k(e){return e.toLowerCase()}y.prototype.normal={},y.prototype.property={},y.prototype.space=void 0;class E{constructor(e,t){this.attribute=t,this.property=e}}E.prototype.attribute="",E.prototype.booleanish=!1,E.prototype.boolean=!1,E.prototype.commaOrSpaceSeparated=!1,E.prototype.commaSeparated=!1,E.prototype.defined=!1,E.prototype.mustUseProperty=!1,E.prototype.number=!1,E.prototype.overloadedBoolean=!1,E.prototype.property="",E.prototype.spaceSeparated=!1,E.prototype.space=void 0;let R=0;const N=T(),S=T(),C=T(),z=T(),_=T(),I=T(),M=T();function T(){return 2**++R}var O=Object.freeze({__proto__:null,boolean:N,booleanish:S,overloadedBoolean:C,number:z,spaceSeparated:_,commaSeparated:I,commaOrSpaceSeparated:M});const P=Object.keys(O);class j extends E{constructor(e,t,n,r){let o=-1;if(super(e,t),A(this,"space",r),"number"==typeof n)for(;++o<P.length;){const e=P[o];A(this,P[o],(n&O[e])===O[e])}}}function A(e,t,n){n&&(e[t]=n)}function L(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new j(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[k(r)]=r,n[k(a.attribute)]=r}return new y(t,n,e.space)}j.prototype.defined=!0;const D=L({properties:{ariaActiveDescendant:null,ariaAtomic:S,ariaAutoComplete:null,ariaBusy:S,ariaChecked:S,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:_,ariaCurrent:null,ariaDescribedBy:_,ariaDetails:null,ariaDisabled:S,ariaDropEffect:_,ariaErrorMessage:null,ariaExpanded:S,ariaFlowTo:_,ariaGrabbed:S,ariaHasPopup:null,ariaHidden:S,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_,ariaLevel:z,ariaLive:null,ariaModal:S,ariaMultiLine:S,ariaMultiSelectable:S,ariaOrientation:null,ariaOwns:_,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:S,ariaReadOnly:S,ariaRelevant:null,ariaRequired:S,ariaRoleDescription:_,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:S,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function F(e,t){return t in e?e[t]:t}function B(e,t){return F(e,t.toLowerCase())}const H=L({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:I,acceptCharset:_,accessKey:_,action:null,allow:null,allowFullScreen:N,allowPaymentRequest:N,allowUserMedia:N,alt:null,as:null,async:N,autoCapitalize:null,autoComplete:_,autoFocus:N,autoPlay:N,blocking:_,capture:null,charSet:null,checked:N,cite:null,className:_,cols:z,colSpan:null,content:null,contentEditable:S,controls:N,controlsList:_,coords:z|I,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N,defer:N,dir:null,dirName:null,disabled:N,download:C,draggable:S,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N,formTarget:null,headers:_,height:z,hidden:C,high:z,href:null,hrefLang:null,htmlFor:_,httpEquiv:_,id:null,imageSizes:null,imageSrcSet:null,inert:N,inputMode:null,integrity:null,is:null,isMap:N,itemId:null,itemProp:_,itemRef:_,itemScope:N,itemType:_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:N,muted:N,name:null,nonce:null,noModule:N,noValidate:N,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:N,optimum:z,pattern:null,ping:_,placeholder:null,playsInline:N,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N,referrerPolicy:null,rel:_,required:N,reversed:N,rows:z,rowSpan:z,sandbox:_,scope:null,scoped:N,seamless:N,selected:N,shadowRootClonable:N,shadowRootDelegatesFocus:N,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:S,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:N,useMap:null,value:S,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N,declare:N,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:N,noHref:N,noShade:N,noWrap:N,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:S,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N,disableRemotePlayback:N,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:B}),U=L({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:M,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:_,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:N,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:I,g2:I,glyphName:I,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,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:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,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:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F}),V=L({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),q=L({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B}),W=L({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Y={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"},X=/[A-Z]/g,Q=/-[a-z]/g,K=/^data[-\w.:]+$/i;function Z(e){return"-"+e.toLowerCase()}function $(e){return e.charAt(1).toUpperCase()}const G=w([D,H,V,q,W],"html"),J=w([D,U,V,q,W],"svg");var ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne={},re=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,oe=/\n/g,ae=/^\s*/,ie=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,le=/^:\s*/,ce=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,se=/^[;\s]*/,ue=/^\s+|\s+$/g,de="";function pe(e){return e?e.replace(ue,de):de}var fe=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(oe);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new i(e),s(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(o){var a=new Error(t.source+":"+n+":"+r+": "+o);if(a.reason=o,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function s(){c(ae)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;de!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,de===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=a(),t=c(ie);if(t){if(d(),!c(le))return l("property missing ':'");var n=c(ce),r=e({type:"declaration",property:pe(t[0].replace(re,de)),value:n?pe(n[0].replace(re,de)):de});return c(se),r}}return i.prototype.content=e,s(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},he=ee&&ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ne,"__esModule",{value:!0}),ne.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,me.default)(e),o="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:a}=e;o?t(r,a,e):a&&(n=n||{},n[r]=a)}),n};const me=he(fe);var ge={};Object.defineProperty(ge,"__esModule",{value:!0}),ge.camelCase=void 0;var xe=/^--[a-zA-Z0-9_-]+$/,ve=/-([a-z])/g,be=/^[^-]+$/,ye=/^-(webkit|moz|ms|o|khtml)-/,we=/^-(ms)-/,ke=function(e,t){return t.toUpperCase()},Ee=function(e,t){return"".concat(t,"-")};ge.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||be.test(e)||xe.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(we,Ee):e.replace(ye,Ee)).replace(ve,ke))};var Re=(ee&&ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ne),Ne=ge;function Se(e,t){var n={};return e&&"string"==typeof e?((0,Re.default)(e,function(e,r){e&&r&&(n[(0,Ne.camelCase)(e,t)]=r)}),n):n}Se.default=Se;var Ce=te(Se);const ze=Ie("end"),_e=Ie("start");function Ie(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Me(e){return e&&"object"==typeof e?"position"in e||"type"in e?Oe(e.position):"start"in e||"end"in e?Oe(e):"line"in e||"column"in e?Te(e):"":""}function Te(e){return Pe(e&&e.line)+":"+Pe(e&&e.column)}function Oe(e){return Te(e&&e.start)+"-"+Te(e&&e.end)}function Pe(e){return e&&"number"==typeof e?e:1}class je extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},a=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(a=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=Me(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}je.prototype.file="",je.prototype.name="",je.prototype.reason="",je.prototype.message="",je.prototype.stack="",je.prototype.column=void 0,je.prototype.line=void 0,je.prototype.ancestors=void 0,je.prototype.cause=void 0,je.prototype.fatal=void 0,je.prototype.place=void 0,je.prototype.ruleId=void 0,je.prototype.source=void 0;const Ae={}.hasOwnProperty,Le=new Map,De=/[A-Z]/g,Fe=new Set(["table","tbody","thead","tfoot","tr"]),Be=new Set(["td","th"]),He="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ue(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,a){const i=Array.isArray(o.children),l=_e(n);return t(r,o,a,i,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,a){const i=Array.isArray(o.children)?n:t;return a?i(r,o,a):i(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?J:G,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=Ve(o,e,void 0);return a&&"string"!=typeof a?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Ve(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=J,e.schema=o);e.ancestors.push(t);const a=Qe(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Ae.call(t.properties,o)){const a=Xe(e,o,t.properties[o]);if(a){const[o,i]=a;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&Be.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=Ye(e,t);Fe.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&b(t.value):b(t));var t}));return qe(e,i,a,t),We(i,l),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ke(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=J,e.schema=o);e.ancestors.push(t);const a=null===t.name?e.Fragment:Qe(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];p(t.type);const o=t.expression;p(o.type);const a=o.properties[0];p(a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ke(e,t.position);else{const o=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];p(t.type),a=e.evaluater.evaluateExpression(t.expression)}else Ke(e,t.position);else a=null===r.value||r.value;n[o]=a}return n}(e,t),l=Ye(e,t);return qe(e,i,a,t),We(i,l),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ke(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return We(r,Ye(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function qe(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function We(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ye(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Le;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const l=Ve(e,a,i);void 0!==l&&n.push(l)}return n}function Xe(e,t,n){const r=function(e,t){const n=k(t);let r=t,o=E;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&K.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Q,$);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Q.test(e)){let n=e.replace(X,Z);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=j}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ce(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new je("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=He+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Ae.call(e,n)&&(t[Ze(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Y[r.property]||r.property:r.attribute,n]}}function Qe(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=x(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=x(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Ae.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ke(e)}function Ke(e,t){const n=new je("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=He+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ze(e){let t=e.replace(De,$e);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function $e(e){return"-"+e.toLowerCase()}const Ge={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"]};var Je="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};Je.setTimeout,Je.clearTimeout;var et=Je.performance||{};et.now||et.mozNow||et.msNow||et.oNow||et.webkitNow;var tt={exports:{}},nt={};const rt=React;
3
+ var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return c(u,"_invoke",function(n,r,o){var a,l,c,s=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,c=e,f.n=n,i}};function p(n,r){for(l=n,c=r,t=0;!d&&s&&!o&&t<u.length;t++){var o,a=u[t],p=f.p,h=a[2];n>3?(o=h===r)&&(c=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(l=0,f.v=r,f.n=a[1]):p<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,f.n=h,l=0))}if(o||n>1)return i;throw d=!0,r}return function(o,u,h){if(s>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),l=u,c=h;(t=l<2?e:c)||!d;){a||(l?l<3?(l>1&&(f.n=-1),p(l,c)):f.n=c:f.v=c);try{if(s=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==i)break}catch(t){a=e,l=1,c=t}finally{s=1}}return{value:t,done:d}}}(n,o,a),!0),u}var i={};function s(){}function u(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(c(t={},r,function(){return this}),t),p=d.prototype=s.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=d,c(p,"constructor",d),c(d,"constructor",u),u.displayName="GeneratorFunction",c(d,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,r,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:h}})()}function c(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,t,n,r){function a(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},c(e,t,n,r)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return l}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||d(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function f(){}function p(){}const h=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,g={};function x(e,t){return((t||g).jsx?m:h).test(e)}const v=/[ \t\n\f\r]/g;function b(e){return""===e.replace(v,"")}class y{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function w(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new y(n,r,t)}function k(e){return e.toLowerCase()}y.prototype.normal={},y.prototype.property={},y.prototype.space=void 0;class E{constructor(e,t){this.attribute=t,this.property=e}}E.prototype.attribute="",E.prototype.booleanish=!1,E.prototype.boolean=!1,E.prototype.commaOrSpaceSeparated=!1,E.prototype.commaSeparated=!1,E.prototype.defined=!1,E.prototype.mustUseProperty=!1,E.prototype.number=!1,E.prototype.overloadedBoolean=!1,E.prototype.property="",E.prototype.spaceSeparated=!1,E.prototype.space=void 0;let R=0;const S=T(),C=T(),N=T(),z=T(),I=T(),_=T(),M=T();function T(){return 2**++R}var A=Object.freeze({__proto__:null,boolean:S,booleanish:C,overloadedBoolean:N,number:z,spaceSeparated:I,commaSeparated:_,commaOrSpaceSeparated:M});const O=Object.keys(A);class j extends E{constructor(e,t,n,r){let o=-1;if(super(e,t),P(this,"space",r),"number"==typeof n)for(;++o<O.length;){const e=O[o];P(this,O[o],(n&A[e])===A[e])}}}function P(e,t,n){n&&(e[t]=n)}function L(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new j(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[k(r)]=r,n[k(a.attribute)]=r}return new y(t,n,e.space)}j.prototype.defined=!0;const D=L({properties:{ariaActiveDescendant:null,ariaAtomic:C,ariaAutoComplete:null,ariaBusy:C,ariaChecked:C,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:I,ariaCurrent:null,ariaDescribedBy:I,ariaDetails:null,ariaDisabled:C,ariaDropEffect:I,ariaErrorMessage:null,ariaExpanded:C,ariaFlowTo:I,ariaGrabbed:C,ariaHasPopup:null,ariaHidden:C,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:I,ariaLevel:z,ariaLive:null,ariaModal:C,ariaMultiLine:C,ariaMultiSelectable:C,ariaOrientation:null,ariaOwns:I,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:C,ariaReadOnly:C,ariaRelevant:null,ariaRequired:C,ariaRoleDescription:I,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:C,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function F(e,t){return t in e?e[t]:t}function B(e,t){return F(e,t.toLowerCase())}const H=L({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_,acceptCharset:I,accessKey:I,action:null,allow:null,allowFullScreen:S,allowPaymentRequest:S,allowUserMedia:S,alt:null,as:null,async:S,autoCapitalize:null,autoComplete:I,autoFocus:S,autoPlay:S,blocking:I,capture:null,charSet:null,checked:S,cite:null,className:I,cols:z,colSpan:null,content:null,contentEditable:C,controls:S,controlsList:I,coords:z|_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:S,defer:S,dir:null,dirName:null,disabled:S,download:N,draggable:C,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:S,formTarget:null,headers:I,height:z,hidden:N,high:z,href:null,hrefLang:null,htmlFor:I,httpEquiv:I,id:null,imageSizes:null,imageSrcSet:null,inert:S,inputMode:null,integrity:null,is:null,isMap:S,itemId:null,itemProp:I,itemRef:I,itemScope:S,itemType:I,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:S,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:S,muted:S,name:null,nonce:null,noModule:S,noValidate:S,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:S,optimum:z,pattern:null,ping:I,placeholder:null,playsInline:S,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:S,referrerPolicy:null,rel:I,required:S,reversed:S,rows:z,rowSpan:z,sandbox:I,scope:null,scoped:S,seamless:S,selected:S,shadowRootClonable:S,shadowRootDelegatesFocus:S,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:C,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:S,useMap:null,value:C,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:I,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:S,declare:S,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:S,noHref:S,noShade:S,noWrap:S,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:C,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:S,disableRemotePlayback:S,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:B}),U=L({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:M,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:I,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:S,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:_,g2:_,glyphName:_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,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:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:I,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,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:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F}),q=L({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),V=L({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B}),W=L({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Y={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"},$=/[A-Z]/g,Q=/-[a-z]/g,X=/^data[-\w.:]+$/i;function K(e){return"-"+e.toLowerCase()}function Z(e){return e.charAt(1).toUpperCase()}const G=w([D,H,q,V,W],"html"),J=w([D,U,q,V,W],"svg");var ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne={},re=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,oe=/\n/g,ae=/^\s*/,ie=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,le=/^:\s*/,ce=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,se=/^[;\s]*/,ue=/^\s+|\s+$/g,de="";function fe(e){return e?e.replace(ue,de):de}var pe=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(oe);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new i(e),s(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function l(o){var a=new Error(t.source+":"+n+":"+r+": "+o);if(a.reason=o,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function s(){c(ae)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=a();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;de!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,de===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function f(){var e=a(),t=c(ie);if(t){if(d(),!c(le))return l("property missing ':'");var n=c(ce),r=e({type:"declaration",property:fe(t[0].replace(re,de)),value:n?fe(n[0].replace(re,de)):de});return c(se),r}}return i.prototype.content=e,s(),function(){var e,t=[];for(u(t);e=f();)!1!==e&&(t.push(e),u(t));return t}()},he=ee&&ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ne,"__esModule",{value:!0}),ne.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,me.default)(e),o="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:a}=e;o?t(r,a,e):a&&(n=n||{},n[r]=a)}),n};const me=he(pe);var ge={};Object.defineProperty(ge,"__esModule",{value:!0}),ge.camelCase=void 0;var xe=/^--[a-zA-Z0-9_-]+$/,ve=/-([a-z])/g,be=/^[^-]+$/,ye=/^-(webkit|moz|ms|o|khtml)-/,we=/^-(ms)-/,ke=function(e,t){return t.toUpperCase()},Ee=function(e,t){return"".concat(t,"-")};ge.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||be.test(e)||xe.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(we,Ee):e.replace(ye,Ee)).replace(ve,ke))};var Re=(ee&&ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ne),Se=ge;function Ce(e,t){var n={};return e&&"string"==typeof e?((0,Re.default)(e,function(e,r){e&&r&&(n[(0,Se.camelCase)(e,t)]=r)}),n):n}Ce.default=Ce;var Ne=te(Ce);const ze=_e("end"),Ie=_e("start");function _e(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Me(e){return e&&"object"==typeof e?"position"in e||"type"in e?Ae(e.position):"start"in e||"end"in e?Ae(e):"line"in e||"column"in e?Te(e):"":""}function Te(e){return Oe(e&&e.line)+":"+Oe(e&&e.column)}function Ae(e){return Te(e&&e.start)+"-"+Te(e&&e.end)}function Oe(e){return e&&"number"==typeof e?e:1}class je extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},a=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(a=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=Me(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}je.prototype.file="",je.prototype.name="",je.prototype.reason="",je.prototype.message="",je.prototype.stack="",je.prototype.column=void 0,je.prototype.line=void 0,je.prototype.ancestors=void 0,je.prototype.cause=void 0,je.prototype.fatal=void 0,je.prototype.place=void 0,je.prototype.ruleId=void 0,je.prototype.source=void 0;const Pe={}.hasOwnProperty,Le=new Map,De=/[A-Z]/g,Fe=new Set(["table","tbody","thead","tfoot","tr"]),Be=new Set(["td","th"]),He="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ue(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,a){const i=Array.isArray(o.children),l=Ie(n);return t(r,o,a,i,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,a){const i=Array.isArray(o.children)?n:t;return a?i(r,o,a):i(r,o)}}(0,t.jsx,t.jsxs)}const o={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?J:G,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},a=qe(o,e,void 0);return a&&"string"!=typeof a?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function qe(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=J,e.schema=o);e.ancestors.push(t);const a=Qe(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Pe.call(t.properties,o)){const a=$e(e,o,t.properties[o]);if(a){const[o,i]=a;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&Be.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=Ye(e,t);Fe.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&b(t.value):b(t));var t}));return Ve(e,i,a,t),We(i,l),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Xe(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=J,e.schema=o);e.ancestors.push(t);const a=null===t.name?e.Fragment:Qe(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];f(t.type);const o=t.expression;f(o.type);const a=o.properties[0];f(a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xe(e,t.position);else{const o=r.name;let a;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];f(t.type),a=e.evaluater.evaluateExpression(t.expression)}else Xe(e,t.position);else a=null===r.value||r.value;n[o]=a}return n}(e,t),l=Ye(e,t);return Ve(e,i,a,t),We(i,l),e.ancestors.pop(),e.schema=r,e.create(t,a,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xe(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return We(r,Ye(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Ve(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function We(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ye(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Le;for(;++r<t.children.length;){const a=t.children[r];let i;if(e.passKeys){const e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const l=qe(e,a,i);void 0!==l&&n.push(l)}return n}function $e(e,t,n){const r=function(e,t){const n=k(t);let r=t,o=E;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&X.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Q,Z);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Q.test(e)){let n=e.replace($,K);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=j}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ne(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new je("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=He+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Pe.call(e,n)&&(t[Ke(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Y[r.property]||r.property:r.attribute,n]}}function Qe(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=x(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=x(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Pe.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xe(e)}function Xe(e,t){const n=new je("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=He+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ke(e){let t=e.replace(De,Ze);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Ze(e){return"-"+e.toLowerCase()}const Ge={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"]};var Je="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};Je.setTimeout,Je.clearTimeout;var et=Je.performance||{};et.now||et.mozNow||et.msNow||et.oNow||et.webkitNow;var tt={exports:{}},nt={};const rt=React;
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.min.js
@@ -9,29 +9,29 @@ var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toS
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
- */var ot;tt.exports=function(){if(ot)return nt;ot=1;var e=rt,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(e,n,i){var l,c={},s=null,u=null;for(l in void 0!==i&&(s=""+i),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,l)&&!a.hasOwnProperty(l)&&(c[l]=n[l]);if(e&&e.defaultProps)for(l in n=e.defaultProps)void 0===c[l]&&(c[l]=n[l]);return{$$typeof:t,type:e,key:s,ref:u,props:c,_owner:o.current}}return nt.Fragment=n,nt.jsx=i,nt.jsxs=i,nt}();var at=tt.exports;const it={};function lt(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ct(e.children,t,n)}return Array.isArray(e)?ct(e,t,n):""}function ct(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=lt(e[o],t,n);return r.join("")}const st=document.createElement("i");function ut(e){const t="&"+e+";";st.innerHTML=t;const n=st.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function dt(e,t,n,r){const o=e.length;let a,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function pt(e,t){return e.length>0?(dt(e,e.length,0,t),e):t}const ft={}.hasOwnProperty;function ht(e,t){let n;for(n in t){const r=(ft.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){ft.call(r,a)||(r[a]=[]);const e=o[a];mt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function mt(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);dt(e,0,0,r)}function gt(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function xt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=It(/[A-Za-z]/),bt=It(/[\dA-Za-z]/),yt=It(/[#-'*+\--9=?A-Z^-~]/);function wt(e){return null!==e&&(e<32||127===e)}const kt=It(/\d/),Et=It(/[\dA-Fa-f]/),Rt=It(/[!-/:-@[-`{-~]/);function Nt(e){return null!==e&&e<-2}function St(e){return null!==e&&(e<0||32===e)}function Ct(e){return-2===e||-1===e||32===e}const zt=It(/\p{P}|\p{S}/u),_t=It(/\s/);function It(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Mt(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(37===a&&bt(e.charCodeAt(n+1))&&bt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(i=String.fromCharCode(a,t),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Tt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(Ct(r))return e.enter(n),i(r);return t(r)};function i(r){return Ct(r)&&a++<o?(e.consume(r),i):(e.exit(n),t(r))}}const Ot={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Tt(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Nt(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Pt={tokenize:function(e){const t=this,n=[];let r,o,a,i=0;return l;function l(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,c,s)(r)}return s(r)}function c(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){o=t.events[a][1].end;break}x(i);let l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return dt(t.events,a+1,0,t.events.slice(n)),t.events.length=l,s(e)}return l(e)}function s(o){if(i===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jt,u,d)(o)}function u(e){return r&&v(),x(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(jt,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&v(),x(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),x(0),void e.consume(n)):Nt(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,l):(e.consume(n),m)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let o,l,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(o){l=t.events[c][1].end;break}o=!0}for(x(i),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;dt(t.events,c+1,0,t.events.slice(n)),t.events.length=e}}function x(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},jt={tokenize:function(e,t,n){return Tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function At(e){return null===e||St(e)||_t(e)?1:zt(e)?2:void 0}function Lt(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Dt={name:"attention",resolveAll:function(e,t){let n,r,o,a,i,l,c,s,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Ft(d,-l),Ft(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[u][1].start={...i.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=pt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=pt(c,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=pt(c,Lt(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=pt(c,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(s=2,c=pt(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):s=0,dt(e,n-1,u-n+3,c),u=n+c.length-s-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=At(r);let a;return function(t){return a=t,e.enter("attentionSequence"),i(t)};function i(l){if(l===a)return e.consume(l),i;const c=e.exit("attentionSequence"),s=At(l),u=!s||2===s&&o||n.includes(l),d=!o||2===o&&s||n.includes(r);return c._open=Boolean(42===a?u:u&&(o||!d)),c._close=Boolean(42===a?d:d&&(s||!u)),t(l)}}};function Ft(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Bt={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return vt(t)?(e.consume(t),a):64===t?n(t):c(t)}function a(e){return 43===e||45===e||46===e||bt(e)?(r=1,i(e)):c(e)}function i(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||bt(t))&&r++<32?(e.consume(t),i):(r=0,c(t))}function l(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wt(r)?n(r):(e.consume(r),l)}function c(t){return 64===t?(e.consume(t),s):yt(t)?(e.consume(t),c):n(t)}function s(e){return bt(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,s):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||bt(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Ht={partial:!0,tokenize:function(e,t,n){return function(t){return Ct(t)?Tt(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Nt(e)?t(e):n(e)}}};const Ut={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Ct(t))return Tt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(Ut,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Ct(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Vt={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Rt(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const qt={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,a,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=bt,s(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Et,s):(e.enter("characterReferenceValue"),o=7,a=kt,s(t))}function s(l){if(59===l&&i){const o=e.exit("characterReferenceValue");return a!==bt||ut(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return a(l)&&i++<o?(e.consume(l),s):n(l)}}};const Wt={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Yt={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c}function c(t){return e.enter("codeFencedFence"),Ct(t)?Tt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===a?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===a?(o++,e.consume(t),u):o>=l?(e.exit("codeFencedFenceSequence"),Ct(t)?Tt(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Nt(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,i=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===a?(l++,e.consume(t),c):l<3?n(t):(e.exit("codeFencedFenceSequence"),Ct(t)?Tt(e,s,"whitespace")(t):s(t))}function s(n){return null===n||Nt(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Wt,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Nt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):Ct(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Tt(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||Nt(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Nt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===a?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&Ct(t)?Tt(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||Nt(t)?e.check(Wt,f,v)(t):(e.enter("codeFlowValue"),x(t))}function x(t){return null===t||Nt(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),x)}function v(n){return e.exit("codeFenced"),t(n)}}};const Xt={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Tt(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?l(t):Nt(t)?e.attempt(Qt,a,l)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Nt(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function l(n){return e.exit("codeIndented"),t(n)}}},Qt={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Nt(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Tt(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Nt(e)?o(e):n(e)}}};const Kt={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),a++,i):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,s(t)):Nt(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||Nt(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function s(n){return 96===n?(e.consume(n),r++,s):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",c(n))}}};class Zt{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&$t(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),$t(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),$t(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);$t(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);$t(this.left,t.reverse())}}}function $t(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 Gt(e){const t={};let n,r,o,a,i,l,c,s=-1;const u=new Zt(e);for(;++s<u.length;){for(;s in t;)s=t[s];if(n=u.get(s),s&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(s-1)[1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Jt(u,s)),s=t[s],c=!0);else if(n[1]._container){for(o=s,r=void 0;o--;)if(a=u.get(o),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=o);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,s),i.unshift(n),u.splice(r,s-r+1,i))}}return dt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Jt(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const l=i.events,c=[],s={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++o)[1]!==f;);a.push(o),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<l.length;)"exit"===l[p][0]&&"enter"===l[p-1][0]&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=l.slice(g[p],g[p+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),p=-1;++p<c.length;)s[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return s}const en={resolve:function(e){return Gt(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Nt(t)?e.check(tn,a,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},tn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Tt(e,o,"linePrefix")};function o(o){if(null===o||Nt(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function nn(e,t,n,r,o,a,i,l,c){const s=c||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(a),e.consume(t),e.exit(a),d;if(null===t||32===t||41===t||wt(t))return n(t);return e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||Nt(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(o){return u||null!==o&&41!==o&&!St(o)?u<s&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||wt(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function rn(e,t,n,r,o,a){const i=this;let l,c=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(a),s};function s(d){return c>999||null===d||91===d||93===d&&!l||94===d&&!c&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(a),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):Nt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Nt(t)||c++>999?(e.exit("chunkString"),s(t)):(e.consume(t),l||(l=!Ct(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}function on(e,t,n,r,o,a){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,l;return n(t)};function l(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(a),c(n))}function c(t){return t===i?(e.exit(a),l(i)):null===t?n(t):Nt(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Tt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===i||null===t||Nt(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:s)}function u(t){return t===i||92===t?(e.consume(t),s):s(t)}}function an(e,t){let n;return function r(o){if(Nt(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(Ct(o))return Tt(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const ln={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return rn.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return o=xt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return St(t)?an(e,l)(t):l(t)}function l(t){return nn(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(cn,s,s)(t)}function s(t){return Ct(t)?Tt(e,u,"whitespace")(t):u(t)}function u(a){return null===a||Nt(a)?(e.exit("definition"),r.parser.defined.push(o),t(a)):n(a)}}},cn={partial:!0,tokenize:function(e,t,n){return function(t){return St(t)?an(e,r)(t):n(t)};function r(t){return on(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Ct(t)?Tt(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Nt(e)?t(e):n(e)}}};const sn={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Nt(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const un={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);o-2>a&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4);o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},dt(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||St(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Nt(n)?(e.exit("atxHeading"),t(n)):Ct(n)?Tt(e,a,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),a(t))}function l(t){return null===t||35===t||St(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),l)}}};const dn=["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"],pn=["pre","script","style","textarea"],fn={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,a,i,l,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),a=!0,f):63===l?(e.consume(l),o=3,r.interrupt?t:P):vt(l)?(e.consume(l),i=String.fromCharCode(l),h):n(l)}function u(a){return 45===a?(e.consume(a),o=2,d):91===a?(e.consume(a),o=5,l=0,p):vt(a)?(e.consume(a),o=4,r.interrupt?t:P):n(a)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:P):n(o)}function p(o){const a="CDATA[";return o===a.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:S:p):n(o)}function f(t){return vt(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(l){if(null===l||47===l||62===l||St(l)){const c=47===l,s=i.toLowerCase();return c||a||!pn.includes(s)?dn.includes(i.toLowerCase())?(o=6,c?(e.consume(l),m):r.interrupt?t(l):S(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):a?g(l):x(l)):(o=1,r.interrupt?t(l):S(l))}return 45===l||bt(l)?(e.consume(l),i+=String.fromCharCode(l),h):n(l)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:S):n(o)}function g(t){return Ct(t)?(e.consume(t),g):R(t)}function x(t){return 47===t?(e.consume(t),R):58===t||95===t||vt(t)?(e.consume(t),v):Ct(t)?(e.consume(t),x):R(t)}function v(t){return 45===t||46===t||58===t||95===t||bt(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),y):Ct(t)?(e.consume(t),b):x(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,w):Ct(t)?(e.consume(t),y):k(t)}function w(t){return t===c?(e.consume(t),c=null,E):null===t||Nt(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||St(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||Ct(e)?x(e):n(e)}function R(t){return 62===t?(e.consume(t),N):n(t)}function N(t){return null===t||Nt(t)?S(t):Ct(t)?(e.consume(t),N):n(t)}function S(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),M):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),P):93===t&&5===o?(e.consume(t),O):!Nt(t)||6!==o&&7!==o?null===t||Nt(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),S):(e.exit("htmlFlowData"),e.check(hn,A,C)(t))}function C(t){return e.check(mn,z,A)(t)}function z(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return null===t||Nt(t)?C(t):(e.enter("htmlFlowData"),S(t))}function I(t){return 45===t?(e.consume(t),P):S(t)}function M(t){return 47===t?(e.consume(t),i="",T):S(t)}function T(t){if(62===t){const n=i.toLowerCase();return pn.includes(n)?(e.consume(t),j):S(t)}return vt(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),T):S(t)}function O(t){return 93===t?(e.consume(t),P):S(t)}function P(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),P):S(t)}function j(t){return null===t||Nt(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),j)}function A(n){return e.exit("htmlFlow"),t(n)}}},hn={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Ht,t,n)}}},mn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Nt(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const gn={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,a,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),y):63===t?(e.consume(t),v):vt(t)?(e.consume(t),E):n(t)}function c(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),a=0,f):vt(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Nt(t)?(i=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?M(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Nt(t)?(i=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?M(t):93===t?(e.consume(t),g):h(t)}function x(t){return null===t||62===t?M(t):Nt(t)?(i=x,T(t)):(e.consume(t),x)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):Nt(t)?(i=v,T(t)):(e.consume(t),v)}function b(e){return 62===e?M(e):v(e)}function y(t){return vt(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||bt(t)?(e.consume(t),w):k(t)}function k(t){return Nt(t)?(i=k,T(t)):Ct(t)?(e.consume(t),k):M(t)}function E(t){return 45===t||bt(t)?(e.consume(t),E):47===t||62===t||St(t)?R(t):n(t)}function R(t){return 47===t?(e.consume(t),M):58===t||95===t||vt(t)?(e.consume(t),N):Nt(t)?(i=R,T(t)):Ct(t)?(e.consume(t),R):M(t)}function N(t){return 45===t||46===t||58===t||95===t||bt(t)?(e.consume(t),N):S(t)}function S(t){return 61===t?(e.consume(t),C):Nt(t)?(i=S,T(t)):Ct(t)?(e.consume(t),S):R(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,z):Nt(t)?(i=C,T(t)):Ct(t)?(e.consume(t),C):(e.consume(t),_)}function z(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):Nt(t)?(i=z,T(t)):(e.consume(t),z)}function _(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||St(t)?R(t):(e.consume(t),_)}function I(e){return 47===e||62===e||St(e)?R(e):n(e)}function M(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return Ct(t)?Tt(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),i(t)}}};const xn={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&dt(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,a,i=e.length,l=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=i);const c={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,t],["enter",s,t]],a=pt(a,e.slice(r+1,r+l+3)),a=pt(a,[["enter",u,t]]),a=pt(a,Lt(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),a=pt(a,[["exit",u,t],e[o-2],e[o-1],["exit",s,t]]),a=pt(a,e.slice(o+1)),a=pt(a,[["exit",c,t]]),dt(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let o,a,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return a=r.parser.defined.includes(xt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l};function l(t){return 40===t?e.attempt(vn,s,a?s:u)(t):91===t?e.attempt(bn,s,a?c:u)(t):a?s(t):u(t)}function c(t){return e.attempt(yn,s,u)(t)}function s(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},vn={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return St(t)?an(e,o)(t):o(t)}function o(t){return 41===t?s(t):nn(e,a,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return St(t)?an(e,l)(t):s(t)}function i(e){return n(e)}function l(t){return 34===t||39===t||40===t?on(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function c(t){return St(t)?an(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},bn={tokenize:function(e,t,n){const r=this;return function(t){return rn.call(r,e,o,a,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(xt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},yn={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const wn={name:"labelStartImage",resolveAll:xn.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const kn={name:"labelStartLink",resolveAll:xn.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const En={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Tt(e,t,"linePrefix")}}};const Rn={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),i(a)):o>=3&&(null===a||Nt(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),Ct(t)?Tt(e,a,"whitespace")(t):a(t))}}};const Nn={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ht,o,a);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Tt(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Ct(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Cn,t,i)(n))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Tt(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:kt(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Rn,n,c)(t):c(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return kt(t)&&++i<10?(e.consume(t),l):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):n(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Ht,r.interrupt?n:s,e.attempt(Sn,d,u))}function s(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return Ct(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Sn={partial:!0,tokenize:function(e,t,n){const r=this;return Tt(e,function(e){const o=r.events[r.events.length-1];return!Ct(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Cn={partial:!0,tokenize:function(e,t,n){const r=this;return Tt(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const zn={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),o||"definition"!==e[a][1].type||(o=a);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){i="paragraph"===r.events[l][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===o?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),Ct(t)?Tt(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Nt(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const _n={tokenize:function(e){const t=this,n=e.attempt(Ht,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Tt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(en,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const In={resolveAll:Pn()},Mn=On("string"),Tn=On("text");function On(e){return{resolveAll:Pn("text"===e?jn:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,a,i);return a;function a(e){return c(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return c(e)?(t.exit("data"),o(e)):(t.consume(e),l)}function c(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Pn(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function jn(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let a,i=o.length,l=-1,c=0;for(;i--;){const e=o[i];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)a=!0,c++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const o={type:n===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:r.start._bufferIndex+l,_index:r.start._index+i,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const An={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Ut},Ln={91:ln},Dn={[-2]:Xt,[-1]:Xt,32:Xt},Fn={35:un,42:Rn,45:[zn,Rn],60:fn,61:zn,95:Rn,96:Yt,126:Yt},Bn={38:qt,92:Vt},Hn={[-5]:En,[-4]:En,[-3]:En,33:wn,38:qt,42:Dt,60:[Bt,gn],91:kn,92:[sn,Vt],93:xn,95:Dt,96:Kt},Un={null:[Dt,In]};var Vn=Object.freeze({__proto__:null,document:An,contentInitial:Ln,flowInitial:Dn,flow:Fn,string:Bn,text:Hn,insideSpan:Un,attentionMarkers:{null:[42,95]},disable:{null:[]}});function qn(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 o={},a=[];let i=[],l=[];const c={attempt:g(function(e,t){x(e,t.from)}),check:g(m),consume:function(e){Nt(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));s.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),s.events.push(["enter",n,s]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=p(),s.events.push(["exit",t,s]),t},interrupt:g(m,{interrupt:!0})},s={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if("string"==typeof a)i=a;else switch(a){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(a)}o=-2===a,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=pt(i,e),f(),null!==i[i.length-1])return[];return x(t,0),s.events=Lt(a,s.events,s),s.events}};let u=t.tokenize.call(s,c);return t.resolveAll&&a.push(t),s;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:a}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,a){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=s.previous,n=s.currentConstruct,o=s.events.length,a=Array.from(l);return{from:o,restore:i};function i(){r=e,s.previous=t,s.currentConstruct=n,s.events.length=o,l=a,v()}}(),d=e,e.partial||(s.currentConstruct=e);if(e.name&&s.parser.constructs.disable.null.includes(e.name))return x();return e.tokenize.call(t?Object.assign(Object.create(s),t):s,c,g,x)(n)}}function g(t){return e(d,f),o}function x(e){return f.restore(),++u<i.length?m(i[u]):a}}}function x(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&dt(s.events,t,s.events.length-t,e.resolve(s.events.slice(t),s)),e.resolveTo&&(s.events=e.resolveTo(s.events,s))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Wn(e){const t=function(e){const t={};let n=-1;for(;++n<e.length;)ht(t,e[n]);return t}([Vn,...(e||{}).extensions||[]]),n={constructs:t,content:r(Ot),defined:[],document:r(Pt),flow:r(_n),lazy:{},string:r(Mn),text:r(Tn)};return n;function r(e){return function(t){return qn(n,e,t)}}}const Yn=/[\0\t\n\r]/g;const Xn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qn(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return gt(n.slice(t?2:1),t?16:10)}return ut(n)||e}const Kn={}.hasOwnProperty;function Zn(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:N,autolinkEmail:N,atxHeading:a($),blockQuote:a(Y),characterEscape:N,characterReference:N,codeFenced:a(X),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(X,i),codeText:a(Q,i),codeTextData:N,data:N,codeFlowValue:N,definition:a(K),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Z),hardBreakEscape:a(G),hardBreakTrailing:a(G),htmlFlow:a(J,i),htmlFlowData:N,htmlText:a(J,i),htmlTextData:N,image:a(ee),label:i,link:a(te),listItem:a(re),listItemValue:p,listOrdered:a(ne,d),listUnordered:a(ne),paragraph:a(oe),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a($),strong:a(ae),thematicBreak:a(le)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:W,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:V,codeFenced:c(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:S,codeIndented:c(x),codeText:c(M),codeTextData:S,data:S,definition:c(),definitionDestinationString:y,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(_),htmlFlowData:S,htmlText:c(I),htmlTextData:S,image:c(O),label:j,labelText:P,lineEnding:C,link:c(T),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:A,resourceTitleString:L,resource:D,setextHeading:c(R),setextHeadingLineSequence:E,setextHeadingText:k,strong:c(),thematicBreak:c()}};Gn(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:l,exit:s,buffer:i,resume:u,data:n},c=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])c.push(d);else{d=o(e,c.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Kn.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||er).call(a,void 0,e[0])}for(r.position={start:$n(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$n(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,a,i,l=t-1,c=-1,s=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?c++:c--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||c||a||(a=l),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=l;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!o||a<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(l,0,["enter",o,t[2]]),l++,n++,a=void 0,i=!0}}}return e[t][1]._spread=s,n}function a(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:$n(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Me({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||er).call(this,e,r[0])}n.position.end=$n(e.end)}function u(){return function(e,t){const n=t||it;return lt(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=xt(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function y(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function N(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:$n(e.start),end:void 0},t.push(n)),this.stack.push(n)}function S(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$n(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=$n(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(N.call(this,e),S.call(this,e))}function z(){this.data.atHardBreak=!0}function _(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function M(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Xn,Qn)}(t),n.identifier=xt(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function A(){const e=this.resume();this.stack[this.stack.length-1].url=e}function L(){const e=this.resume();this.stack[this.stack.length-1].title=e}function D(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=xt(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=gt(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=ut(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=$n(e.end)}function q(e){S.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){S.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Y(){return{type:"blockquote",children:[]}}function X(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Z(){return{type:"emphasis",children:[]}}function $(){return{type:"heading",depth:0,children:[]}}function G(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Gt(e););return e}(Wn(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,a,i){const l=[];let c,s,u,d,p;for(o=n+("string"==typeof o?o.toString():new TextDecoder(a||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(Yn.lastIndex=u,c=Yn.exec(o),d=c&&void 0!==c.index?c.index:o.length,p=o.charCodeAt(d),!c){n=o.slice(u);break}if(10===p&&u===d&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<d&&(l.push(o.slice(u,d)),t+=d-u),p){case 0:l.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),l.push(-2);t++<s;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function $n(e){return{line:e.line,column:e.column,offset:e.offset}}function Gn(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Gn(e,r):Jn(e,r)}}function Jn(e,t){let n;for(n in t)if(Kn.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 er(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Me({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Me({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Me({start:t.start,end:t.end})+") is still open")}function tr(e){const t=this;t.parser=function(n){return Zn(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function nr(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&"text"===a.type?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function rr(e){const t=e.spread;return null==t?e.children.length>1:t}function or(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(ar(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(ar(t.slice(o),o>0,!1)),a.join("")}function ar(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const ir={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Mt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,c);const s={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,s),e.applyData(t,s)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nr(e,t);const o={src:Mt(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:Mt(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nr(e,t);const o={href:Mt(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:Mt(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rr(n[r])}return t}(n):rr(t),a={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const c=r[r.length-1];c&&(o||"element"!==c.type||"p"!==c.tagName)&&i.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=_e(t.children[1]),i=ze(t.children[t.children.length-1]);a&&i&&(r.position={start:a,end:i}),o.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,i=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<i;){const n=t.children[l],r={},i=a?a[l]:void 0;i&&(r.align=i);let s={type:"element",tagName:o,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(n,s)),c.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){const n={type:"text",value:or(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:lr,yaml:lr,definition:lr,footnoteDefinition:lr};function lr(){}const cr="object"==typeof self?self:globalThis,sr=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[a,i]=t[o];switch(a){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new cr[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new cr[a](i),o)};return r})(new Map,e)(0),ur="",{toString:dr}={},{keys:pr}=Object,fr=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=dr.call(e).slice(8,-1);switch(n){case"Array":return[1,ur];case"Object":return[2,ur];case"Date":return[3,ur];case"RegExp":return[4,ur];case"Map":return[5,ur];case"Set":return[6,ur];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},hr=([e,t])=>0===e&&("function"===t||"symbol"===t),mr=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},a=r=>{if(n.has(r))return n.get(r);let[i,l]=fr(r);switch(i){case 0:{let t=r;switch(l){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([i,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([i,e],r);for(const t of r)e.push(a(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],c=o([i,n],r);for(const t of pr(r))!e&&hr(fr(r[t]))||n.push([a(t),a(r[t])]);return c}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!hr(fr(n))&&!hr(fr(o)))&&t.push([a(n),a(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)!e&&hr(fr(n))||t.push(a(n));return n}}const{message:c}=r;return o([i,{name:l,message:c}],r)};return a})(!(t||n),!!t,new Map,r)(e),r};var gr="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?sr(mr(e,t)):structuredClone(e):(e,t)=>sr(mr(e,t));function xr(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 vr(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const br=function(e){if(null==e)return wr;if("function"==typeof e)return yr(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=br(e[n]);return yr(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return yr(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return yr(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function yr(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function wr(){return!0}const kr=[],Er=!0,Rr=!1;function Nr(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const a=br(o),i=r?-1:1;!function e(o,l,c){const s=o&&"object"==typeof o?o:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let s,u,d,p=kr;if((!t||a(o,l,c[c.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Er,e];return null==e?kr:[e]}(n(o,c)),p[0]===Rr))return p;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=c.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(s=e(n,u,d)(),s[0]===Rr)return s;u="number"==typeof s[1]?s[1]:u+i}}return p}}(e,void 0,[])()}function Sr(e,t,n,r){let o,a,i;"function"==typeof t&&"function"!=typeof n?(a=void 0,i=t,o=n):(a=t,i=n,o=r),Nr(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},o)}const Cr={}.hasOwnProperty,zr={};function _r(e,t){e.position&&(t.position=function(e){const t=_e(e),n=ze(e);if(t&&n)return{start:t,end:n}}(e))}function Ir(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,gr(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Mr(e,t){const n=t.data||{},r=!("value"in t)||Cr.call(n,"hProperties")||Cr.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Tr(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Or(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Pr(e,t){const n=function(e,t){const n=t||zr,r=new Map,o=new Map,a=new Map,i={...ir,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Or(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Or(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Ir,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=l.handlers[n];if(Cr.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=gr(n);return r.children=l.all(e),r}return gr(e)}return(l.options.unknownHandler||Mr)(l,e,t)},options:n,patch:_r,wrap:Tr};return Sr(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||xr,r=e.options.footnoteBackLabel||vr,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[c]);if(!o)continue;const a=e.all(o),i=String(o.identifier).toUpperCase(),s=Mt(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(c,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else a.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(a,!0)};e.patch(o,h),l.push(h)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...gr(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:"\n"},o),a}function jr(e,t){return e&&"run"in e?async function(n,r){const o=Pr(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Pr(n,{file:r,...e||t})}}function Ar(e){if(e)throw e}var Lr=Object.prototype.hasOwnProperty,Dr=Object.prototype.toString,Fr=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,Hr=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Dr.call(e)},Ur=function(e){if(!e||"[object Object]"!==Dr.call(e))return!1;var t,n=Lr.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Lr.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Lr.call(e,t)},Vr=function(e,t){Fr&&"__proto__"===t.name?Fr(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},qr=function(e,t){if("__proto__"===t){if(!Lr.call(e,t))return;if(Br)return Br(e,t).value}return e[t]},Wr=function e(){var t,n,r,o,a,i,l=arguments[0],c=1,s=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},c=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});c<s;++c)if(null!=(t=arguments[c]))for(n in t)r=qr(l,n),l!==(o=qr(t,n))&&(u&&o&&(Ur(o)||(a=Hr(o)))?(a?(a=!1,i=r&&Hr(r)?r:[]):i=r&&Ur(r)?r:{},Vr(l,{name:n,newValue:e(u,i,o)})):void 0!==o&&Vr(l,{name:n,newValue:o}));return l},Yr=te(Wr);function Xr(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Qr(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(a,...i){const l=e[++n];let c=-1;if(a)r(a);else{for(;++c<t.length;)null!==i[c]&&void 0!==i[c]||(i[c]=t[c]);t=i,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(a,o):i instanceof Error?o(i):a(i))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(l,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Kr={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Zr(e);let n,r=0,o=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,l=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(o=a):(l=-1,o=i));r===o?o=i:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Zr(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Zr(e);let t,n=e.length,r=-1,o=0,a=-1,i=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?a<0?a=n:1!==i&&(i=1):a>-1&&(i=-1);else if(t){o=n+1;break}}if(a<0||r<0||0===i||1===i&&a===r-1&&a===o+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Zr(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Zr(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",a=0,i=-1,l=0,c=-1;for(;++c<=e.length;){if(c<e.length)n=e.codePointAt(c);else{if(47===n)break;n=47}if(47===n){if(i===c-1||1===l);else if(i!==c-1&&2===l){if(o.length<2||2!==a||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",a=0):(o=o.slice(0,r),a=o.length-1-o.lastIndexOf("/")),i=c,l=0;continue}}else if(o.length>0){o="",a=0,i=c,l=0;continue}t&&(o=o.length>0?o+"/..":"..",a=2)}else o.length>0?o+="/"+e.slice(i+1,c):o=e.slice(i+1,c),a=c-i-1;i=c,l=0}else 46===n&&l>-1?l++:l=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Zr(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $r={cwd:function(){return"/"}};function Gr(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Jr(e){if("string"==typeof e)e=new URL(e);else if(!Gr(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const eo=["history","path","basename","stem","extname","dirname"];class to{constructor(e){let t;t=e?Gr(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":$r.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<eo.length;){const e=eo[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)eo.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Kr.basename(this.path):void 0}set basename(e){ro(e,"basename"),no(e,"basename"),this.path=Kr.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Kr.dirname(this.path):void 0}set dirname(e){oo(this.basename,"dirname"),this.path=Kr.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Kr.extname(this.path):void 0}set extname(e){if(no(e,"extname"),oo(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kr.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Gr(e)&&(e=Jr(e)),ro(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Kr.basename(this.path,this.extname):void 0}set stem(e){ro(e,"stem"),no(e,"stem"),this.path=Kr.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new je(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function no(e,t){if(e&&e.includes(Kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kr.sep+"`")}function ro(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function oo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const ao=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},io={}.hasOwnProperty;class lo extends ao{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=Qr()}copy(){const e=new lo;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Yr(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(po("data",this.frozen),this.namespace[e]=t,this):io.call(this.namespace,e)&&this.namespace[e]||void 0:e?(po("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=mo(e),n=this.parser||this.Parser;return so("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),so("process",this.parser||this.Parser),uo("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const a=mo(e),i=n.parse(a);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,a,function(e,t,r){if(e||!t||!r)return l(e);const o=t,a=n.stringify(o,r);var i;"string"==typeof(i=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=a:r.result=a,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),so("processSync",this.parser||this.Parser),uo("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Ar(e),t=r}),ho("processSync","process",n),t}run(e,t,n){fo(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,a){const i=mo(t);r.run(e,i,function(t,r,i){const l=r||e;t?a(t):o?o(l):n(void 0,l,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Ar(e),n=t,r=!0}),ho("runSync","run",r),n}stringify(e,t){this.freeze();const n=mo(t),r=this.compiler||this.Compiler;return uo("stringify",r),fo(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(po("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):a(e)}return this;function o(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=Yr(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function l(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const i=n[o][1];Xr(i)&&Xr(r)&&(r=Yr(!0,i,r)),n[o]=[e,r,...a]}}}}const co=(new lo).freeze();function so(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function uo(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function po(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 fo(e){if(!Xr(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ho(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function mo(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new to(e)}const go=[],xo={allowDangerousHtml:!0},vo=/^(https?|ircs?|mailto|xmpp)$/i,bo=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yo(e){const t=function(e){const t=e.rehypePlugins||go,n=e.remarkPlugins||go,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xo}:xo,o=co().use(tr).use(n).use(jr,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new to;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,i=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||wo;for(const e of bo)Object.hasOwn(t,e.from)&&f((e.from,e.to&&e.to,e.id));return Sr(e,s),Ue(e,{Fragment:at.Fragment,components:o,ignoreInvalidStyle:!0,jsx:at.jsx,jsxs:at.jsxs,passKeys:!0,passNode:!0});function s(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return i?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ge)if(Object.hasOwn(Ge,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ge[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let i=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&r&&"number"==typeof t&&(i=!r(e,t,o)),i&&o&&"number"==typeof t)return l&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function wo(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||vo.test(e.slice(0,t))?e:""}
12
+ */var ot;tt.exports=function(){if(ot)return nt;ot=1;var e=rt,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(e,n,i){var l,c={},s=null,u=null;for(l in void 0!==i&&(s=""+i),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,l)&&!a.hasOwnProperty(l)&&(c[l]=n[l]);if(e&&e.defaultProps)for(l in n=e.defaultProps)void 0===c[l]&&(c[l]=n[l]);return{$$typeof:t,type:e,key:s,ref:u,props:c,_owner:o.current}}return nt.Fragment=n,nt.jsx=i,nt.jsxs=i,nt}();var at=tt.exports;const it={};function lt(e,t){const n=t||it;return ct(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ct(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return st(e.children,t,n)}return Array.isArray(e)?st(e,t,n):""}function st(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ct(e[o],t,n);return r.join("")}const ut=document.createElement("i");function dt(e){const t="&"+e+";";ut.innerHTML=t;const n=ut.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function ft(e,t,n,r){const o=e.length;let a,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function pt(e,t){return e.length>0?(ft(e,e.length,0,t),e):t}const ht={}.hasOwnProperty;function mt(e){const t={};let n=-1;for(;++n<e.length;)gt(t,e[n]);return t}function gt(e,t){let n;for(n in t){const r=(ht.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){ht.call(r,a)||(r[a]=[]);const e=o[a];xt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function xt(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ft(e,0,0,r)}function vt(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function bt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=Tt(/[A-Za-z]/),wt=Tt(/[\dA-Za-z]/),kt=Tt(/[#-'*+\--9=?A-Z^-~]/);function Et(e){return null!==e&&(e<32||127===e)}const Rt=Tt(/\d/),St=Tt(/[\dA-Fa-f]/),Ct=Tt(/[!-/:-@[-`{-~]/);function Nt(e){return null!==e&&e<-2}function zt(e){return null!==e&&(e<0||32===e)}function It(e){return-2===e||-1===e||32===e}const _t=Tt(/\p{P}|\p{S}/u),Mt=Tt(/\s/);function Tt(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function At(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let i="";if(37===a&&wt(e.charCodeAt(n+1))&&wt(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){const t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(i=String.fromCharCode(a,t),o=1):i="�"}else i=String.fromCharCode(a);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ot(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return function(r){if(It(r))return e.enter(n),i(r);return t(r)};function i(r){return It(r)&&a++<o?(e.consume(r),i):(e.exit(n),t(r))}}const jt={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ot(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Nt(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Pt={tokenize:function(e){const t=this,n=[];let r,o,a,i=0;return l;function l(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,c,s)(r)}return s(r)}function c(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){o=t.events[a][1].end;break}x(i);let l=n;for(;l<t.events.length;)t.events[l][1].end={...o},l++;return ft(t.events,a+1,0,t.events.slice(n)),t.events.length=l,s(e)}return l(e)}function s(o){if(i===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lt,u,d)(o)}function u(e){return r&&v(),x(i),f(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(Lt,p,h)(n)}function p(e){return i++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),x(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),x(0),void e.consume(n)):Nt(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,l):(e.consume(n),m)}function g(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(l),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<a&&(!r.events[e][1].end||r.events[e][1].end.offset>a))return;const n=t.events.length;let o,l,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(o){l=t.events[c][1].end;break}o=!0}for(x(i),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;ft(t.events,c+1,0,t.events.slice(n)),t.events.length=e}}function x(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Lt={tokenize:function(e,t,n){return Ot(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Dt(e){return null===e||zt(e)||Mt(e)?1:_t(e)?2:void 0}function Ft(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Bt={name:"attention",resolveAll:function(e,t){let n,r,o,a,i,l,c,s,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};Ht(d,-l),Ht(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:l>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:l>1?"strong":"emphasis",start:{...a.start},end:{...i.end}},e[n][1].end={...a.start},e[u][1].start={...i.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=pt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=pt(c,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=pt(c,Ft(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=pt(c,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(s=2,c=pt(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):s=0,ft(e,n-1,u-n+3,c),u=n+c.length-s-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Dt(r);let a;return function(t){return a=t,e.enter("attentionSequence"),i(t)};function i(l){if(l===a)return e.consume(l),i;const c=e.exit("attentionSequence"),s=Dt(l),u=!s||2===s&&o||n.includes(l),d=!o||2===o&&s||n.includes(r);return c._open=Boolean(42===a?u:u&&(o||!d)),c._close=Boolean(42===a?d:d&&(s||!u)),t(l)}}};function Ht(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ut={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return yt(t)?(e.consume(t),a):64===t?n(t):c(t)}function a(e){return 43===e||45===e||46===e||wt(e)?(r=1,i(e)):c(e)}function i(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||wt(t))&&r++<32?(e.consume(t),i):(r=0,c(t))}function l(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Et(r)?n(r):(e.consume(r),l)}function c(t){return 64===t?(e.consume(t),s):kt(t)?(e.consume(t),c):n(t)}function s(e){return wt(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,s):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||wt(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const qt={partial:!0,tokenize:function(e,t,n){return function(t){return It(t)?Ot(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Nt(e)?t(e):n(e)}}};const Vt={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(It(t))return Ot(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(Vt,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return It(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Wt={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ct(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Yt={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,a,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=wt,s(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=St,s):(e.enter("characterReferenceValue"),o=7,a=Rt,s(t))}function s(l){if(59===l&&i){const o=e.exit("characterReferenceValue");return a!==wt||dt(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return a(l)&&i++<o?(e.consume(l),s):n(l)}}};const $t={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Qt={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),c}function c(t){return e.enter("codeFencedFence"),It(t)?Ot(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===a?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===a?(o++,e.consume(t),u):o>=l?(e.exit("codeFencedFenceSequence"),It(t)?Ot(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Nt(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let a,i=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,a=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(t)}(t)};function c(t){return t===a?(l++,e.consume(t),c):l<3?n(t):(e.exit("codeFencedFenceSequence"),It(t)?Ot(e,s,"whitespace")(t):s(t))}function s(n){return null===n||Nt(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check($t,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Nt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):It(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ot(e,d,"whitespace")(t)):96===t&&t===a?n(t):(e.consume(t),u)}function d(t){return null===t||Nt(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||Nt(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===a?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&It(t)?Ot(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||Nt(t)?e.check($t,p,v)(t):(e.enter("codeFlowValue"),x(t))}function x(t){return null===t||Nt(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),x)}function v(n){return e.exit("codeFenced"),t(n)}}};const Xt={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Ot(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):n(e)}function a(t){return null===t?l(t):Nt(t)?e.attempt(Kt,a,l)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Nt(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),i)}function l(n){return e.exit("codeIndented"),t(n)}}},Kt={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Nt(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Ot(e,a,"linePrefix",5)(t)}function a(e){const a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Nt(e)?o(e):n(e)}}};const Zt={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),a++,i):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(o=e.enter("codeTextSequence"),r=0,s(t)):Nt(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||Nt(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),c)}function s(n){return 96===n?(e.consume(n),r++,s):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",c(n))}}};class Gt{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Jt(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Jt(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Jt(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Jt(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Jt(this.left,t.reverse())}}}function Jt(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 en(e){const t={};let n,r,o,a,i,l,c,s=-1;const u=new Gt(e);for(;++s<u.length;){for(;s in t;)s=t[s];if(n=u.get(s),s&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(s-1)[1].type&&(l=n[1]._tokenizer.events,o=0,o<l.length&&"lineEndingBlank"===l[o][1].type&&(o+=2),o<l.length&&"content"===l[o][1].type))for(;++o<l.length&&"content"!==l[o][1].type;)"chunkText"===l[o][1].type&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,tn(u,s)),s=t[s],c=!0);else if(n[1]._container){for(o=s,r=void 0;o--;)if(a=u.get(o),"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=o);else if("linePrefix"!==a[1].type&&"listItemIndent"!==a[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,s),i.unshift(n),u.splice(r,s-r+1,i))}}return ft(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function tn(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const l=i.events,c=[],s={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);a.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)"exit"===l[f][0]&&"enter"===l[f-1][0]&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=l.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)s[h+c[f][0]]=h+c[f][1],h+=c[f][1]-c[f][0]-1;return s}const nn={resolve:function(e){return en(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Nt(t)?e.check(rn,a,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},rn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ot(e,o,"linePrefix")};function o(o){if(null===o||Nt(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function on(e,t,n,r,o,a,i,l,c){const s=c||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(a),e.consume(t),e.exit(a),d;if(null===t||32===t||41===t||Et(t))return n(t);return e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||Nt(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!zt(o)?u<s&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||Et(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function an(e,t,n,r,o,a){const i=this;let l,c=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(a),s};function s(d){return c>999||null===d||91===d||93===d&&!l||94===d&&!c&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(a),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):Nt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Nt(t)||c++>999?(e.exit("chunkString"),s(t)):(e.consume(t),l||(l=!It(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}}function ln(e,t,n,r,o,a){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,l;return n(t)};function l(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(a),c(n))}function c(t){return t===i?(e.exit(a),l(i)):null===t?n(t):Nt(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ot(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===i||null===t||Nt(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?u:s)}function u(t){return t===i||92===t?(e.consume(t),s):s(t)}}function cn(e,t){let n;return function r(o){if(Nt(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(It(o))return Ot(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const sn={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return an.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function a(t){return o=bt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return zt(t)?cn(e,l)(t):l(t)}function l(t){return on(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function c(t){return e.attempt(un,s,s)(t)}function s(t){return It(t)?Ot(e,u,"whitespace")(t):u(t)}function u(a){return null===a||Nt(a)?(e.exit("definition"),r.parser.defined.push(o),t(a)):n(a)}}},un={partial:!0,tokenize:function(e,t,n){return function(t){return zt(t)?cn(e,r)(t):n(t)};function r(t){return ln(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return It(t)?Ot(e,a,"whitespace")(t):a(t)}function a(e){return null===e||Nt(e)?t(e):n(e)}}};const dn={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Nt(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const fn={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);o-2>a&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(a===o-1||o-4>a&&"whitespace"===e[o-2][1].type)&&(o-=a+1===o?2:4);o>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[o][1].end},r={type:"chunkText",start:e[a][1].start,end:e[o][1].end,contentType:"text"},ft(e,a,o-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||zt(t)?(e.exit("atxHeadingSequence"),a(t)):n(t)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Nt(n)?(e.exit("atxHeading"),t(n)):It(n)?Ot(e,a,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),a(t))}function l(t){return null===t||35===t||zt(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),l)}}};const pn=["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"],hn=["pre","script","style","textarea"],mn={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,a,i,l,c;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(l){return 33===l?(e.consume(l),u):47===l?(e.consume(l),a=!0,p):63===l?(e.consume(l),o=3,r.interrupt?t:O):yt(l)?(e.consume(l),i=String.fromCharCode(l),h):n(l)}function u(a){return 45===a?(e.consume(a),o=2,d):91===a?(e.consume(a),o=5,l=0,f):yt(a)?(e.consume(a),o=4,r.interrupt?t:O):n(a)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function f(o){const a="CDATA[";return o===a.charCodeAt(l++)?(e.consume(o),6===l?r.interrupt?t:C:f):n(o)}function p(t){return yt(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(l){if(null===l||47===l||62===l||zt(l)){const c=47===l,s=i.toLowerCase();return c||a||!hn.includes(s)?pn.includes(i.toLowerCase())?(o=6,c?(e.consume(l),m):r.interrupt?t(l):C(l)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):a?g(l):x(l)):(o=1,r.interrupt?t(l):C(l))}return 45===l||wt(l)?(e.consume(l),i+=String.fromCharCode(l),h):n(l)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return It(t)?(e.consume(t),g):R(t)}function x(t){return 47===t?(e.consume(t),R):58===t||95===t||yt(t)?(e.consume(t),v):It(t)?(e.consume(t),x):R(t)}function v(t){return 45===t||46===t||58===t||95===t||wt(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),y):It(t)?(e.consume(t),b):x(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),c=t,w):It(t)?(e.consume(t),y):k(t)}function w(t){return t===c?(e.consume(t),c=null,E):null===t||Nt(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||zt(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||It(e)?x(e):n(e)}function R(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||Nt(t)?C(t):It(t)?(e.consume(t),S):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),_):60===t&&1===o?(e.consume(t),M):62===t&&4===o?(e.consume(t),j):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),A):!Nt(t)||6!==o&&7!==o?null===t||Nt(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(gn,P,N)(t))}function N(t){return e.check(xn,z,P)(t)}function z(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||Nt(t)?N(t):(e.enter("htmlFlowData"),C(t))}function _(t){return 45===t?(e.consume(t),O):C(t)}function M(t){return 47===t?(e.consume(t),i="",T):C(t)}function T(t){if(62===t){const n=i.toLowerCase();return hn.includes(n)?(e.consume(t),j):C(t)}return yt(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),T):C(t)}function A(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),j):45===t&&2===o?(e.consume(t),O):C(t)}function j(t){return null===t||Nt(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),j)}function P(n){return e.exit("htmlFlow"),t(n)}}},gn={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(qt,t,n)}}},xn={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Nt(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const vn={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,a,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),y):63===t?(e.consume(t),v):yt(t)?(e.consume(t),E):n(t)}function c(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),a=0,p):yt(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Nt(t)?(i=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?M(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(a++)?(e.consume(t),6===a?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Nt(t)?(i=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?M(t):93===t?(e.consume(t),g):h(t)}function x(t){return null===t||62===t?M(t):Nt(t)?(i=x,T(t)):(e.consume(t),x)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):Nt(t)?(i=v,T(t)):(e.consume(t),v)}function b(e){return 62===e?M(e):v(e)}function y(t){return yt(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||wt(t)?(e.consume(t),w):k(t)}function k(t){return Nt(t)?(i=k,T(t)):It(t)?(e.consume(t),k):M(t)}function E(t){return 45===t||wt(t)?(e.consume(t),E):47===t||62===t||zt(t)?R(t):n(t)}function R(t){return 47===t?(e.consume(t),M):58===t||95===t||yt(t)?(e.consume(t),S):Nt(t)?(i=R,T(t)):It(t)?(e.consume(t),R):M(t)}function S(t){return 45===t||46===t||58===t||95===t||wt(t)?(e.consume(t),S):C(t)}function C(t){return 61===t?(e.consume(t),N):Nt(t)?(i=C,T(t)):It(t)?(e.consume(t),C):R(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,z):Nt(t)?(i=N,T(t)):It(t)?(e.consume(t),N):(e.consume(t),I)}function z(t){return t===o?(e.consume(t),o=void 0,_):null===t?n(t):Nt(t)?(i=z,T(t)):(e.consume(t),z)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||zt(t)?R(t):(e.consume(t),I)}function _(e){return 47===e||62===e||zt(e)?R(e):n(e)}function M(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return It(t)?Ot(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),i(t)}}};const bn={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&ft(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,a,i=e.length,l=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(o=i);const c={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",c,t],["enter",s,t]],a=pt(a,e.slice(r+1,r+l+3)),a=pt(a,[["enter",u,t]]),a=pt(a,Ft(t.parser.constructs.insideSpan.null,e.slice(r+l+4,o-3),t)),a=pt(a,[["exit",u,t],e[o-2],e[o-1],["exit",s,t]]),a=pt(a,e.slice(o+1)),a=pt(a,[["exit",c,t]]),ft(e,r,e.length,a),e},tokenize:function(e,t,n){const r=this;let o,a,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return a=r.parser.defined.includes(bt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l};function l(t){return 40===t?e.attempt(yn,s,a?s:u)(t):91===t?e.attempt(wn,s,a?c:u)(t):a?s(t):u(t)}function c(t){return e.attempt(kn,s,u)(t)}function s(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},yn={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return zt(t)?cn(e,o)(t):o(t)}function o(t){return 41===t?s(t):on(e,a,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return zt(t)?cn(e,l)(t):s(t)}function i(e){return n(e)}function l(t){return 34===t||39===t||40===t?ln(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function c(t){return zt(t)?cn(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},wn={tokenize:function(e,t,n){const r=this;return function(t){return an.call(r,e,o,a,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(bt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},kn={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const En={name:"labelStartImage",resolveAll:bn.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Rn={name:"labelStartLink",resolveAll:bn.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Sn={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ot(e,t,"linePrefix")}}};const Cn={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,a(e)}(t)};function a(a){return a===r?(e.enter("thematicBreakSequence"),i(a)):o>=3&&(null===a||Nt(a))?(e.exit("thematicBreak"),t(a)):n(a)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),It(t)?Ot(e,a,"whitespace")(t):a(t))}}};const Nn={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(qt,o,a);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ot(e,t,"listItemIndent",r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!It(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(In,t,i)(n))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ot(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Rt(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Cn,n,c)(t):c(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return Rt(t)&&++i<10?(e.consume(t),l):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):n(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(qt,r.interrupt?n:s,e.attempt(zn,d,u))}function s(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function u(t){return It(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},zn={partial:!0,tokenize:function(e,t,n){const r=this;return Ot(e,function(e){const o=r.events[r.events.length-1];return!It(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},In={partial:!0,tokenize:function(e,t,n){const r=this;return Ot(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const _n={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),o||"definition"!==e[a][1].type||(o=a);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){i="paragraph"===r.events[l][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),a(t)}(t);return n(t)};function a(t){return t===o?(e.consume(t),a):(e.exit("setextHeadingLineSequence"),It(t)?Ot(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Nt(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Mn={tokenize:function(e){const t=this,n=e.attempt(qt,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Ot(e,e.attempt(this.parser.constructs.flow,r,e.attempt(nn,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Tn={resolveAll:Pn()},An=jn("string"),On=jn("text");function jn(e){return{resolveAll:Pn("text"===e?Ln:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,a,i);return a;function a(e){return c(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return c(e)?(t.exit("data"),o(e)):(t.consume(e),l)}function c(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Pn(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function Ln(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let a,i=o.length,l=-1,c=0;for(;i--;){const e=o[i];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)c++,l--;if(l)break;l=-1}else if(-2===e)a=!0,c++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const o={type:n===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:r.start._bufferIndex+l,_index:r.start._index+i,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Dn={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Vt},Fn={91:sn},Bn={[-2]:Xt,[-1]:Xt,32:Xt},Hn={35:fn,42:Cn,45:[_n,Cn],60:mn,61:_n,95:Cn,96:Qt,126:Qt},Un={38:Yt,92:Wt},qn={[-5]:Sn,[-4]:Sn,[-3]:Sn,33:En,38:Yt,42:Bt,60:[Ut,vn],91:Rn,92:[dn,Wt],93:bn,95:Bt,96:Zt},Vn={null:[Bt,Tn]};var Wn=Object.freeze({__proto__:null,document:Dn,contentInitial:Fn,flowInitial:Bn,flow:Hn,string:Un,text:qn,insideSpan:Vn,attentionMarkers:{null:[42,95]},disable:{null:[]}});function Yn(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 o={},a=[];let i=[],l=[];const c={attempt:g(function(e,t){x(e,t.from)}),check:g(m),consume:function(e){Nt(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));s.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),s.events.push(["enter",n,s]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=f(),s.events.push(["exit",t,s]),t},interrupt:g(m,{interrupt:!0})},s={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let i;if("string"==typeof a)i=a;else switch(a){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(a)}o=-2===a,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=pt(i,e),p(),null!==i[i.length-1])return[];return x(t,0),s.events=Ft(a,s.events,s),s.events}};let u=t.tokenize.call(s,c);return t.resolveAll&&a.push(t),s;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,a)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}a>0&&i.push(e[o].slice(0,a))}return i}(i,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:a}}function p(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,a){let i,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?a:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=s.previous,n=s.currentConstruct,o=s.events.length,a=Array.from(l);return{from:o,restore:i};function i(){r=e,s.previous=t,s.currentConstruct=n,s.events.length=o,l=a,v()}}(),d=e,e.partial||(s.currentConstruct=e);if(e.name&&s.parser.constructs.disable.null.includes(e.name))return x();return e.tokenize.call(t?Object.assign(Object.create(s),t):s,c,g,x)(n)}}function g(t){return e(d,p),o}function x(e){return p.restore(),++u<i.length?m(i[u]):a}}}function x(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ft(s.events,t,s.events.length-t,e.resolve(s.events.slice(t),s)),e.resolveTo&&(s.events=e.resolveTo(s.events,s))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const $n=/[\0\t\n\r]/g;const Qn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Xn(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return vt(n.slice(t?2:1),t?16:10)}return dt(n)||e}const Kn={}.hasOwnProperty;function Zn(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:a(Z),blockQuote:a(Y),characterEscape:S,characterReference:S,codeFenced:a($),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a($,i),codeText:a(Q,i),codeTextData:S,data:S,codeFlowValue:S,definition:a(X),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(K),hardBreakEscape:a(G),hardBreakTrailing:a(G),htmlFlow:a(J,i),htmlFlowData:S,htmlText:a(J,i),htmlTextData:S,image:a(ee),label:i,link:a(te),listItem:a(re),listItemValue:f,listOrdered:a(ne,d),listUnordered:a(ne),paragraph:a(oe),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Z),strong:a(ae),thematicBreak:a(le)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:W,autolinkProtocol:V,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:q,codeFenced:c(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:C,codeIndented:c(x),codeText:c(M),codeTextData:C,data:C,definition:c(),definitionDestinationString:y,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(I),htmlFlowData:C,htmlText:c(_),htmlTextData:C,image:c(A),label:j,labelText:O,lineEnding:N,link:c(T),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:P,resourceTitleString:L,resource:D,setextHeading:c(R),setextHeadingLineSequence:E,setextHeadingText:k,strong:c(),thematicBreak:c()}};Jn(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const a={stack:[r],tokenStack:[],config:t,enter:l,exit:s,buffer:i,resume:u,data:n},c=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])c.push(d);else{d=o(e,c.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Kn.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){const e=a.tokenStack[a.tokenStack.length-1];(e[1]||tr).call(a,void 0,e[0])}for(r.position={start:Gn(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Gn(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,a,i,l=t-1,c=-1,s=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?c++:c--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||c||a||(a=l),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=l;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!o||a<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(l,0,["enter",o,t[2]]),l++,n++,a=void 0,i=!0}}}return e[t][1]._spread=s,n}function a(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Gn(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Me({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||tr).call(this,e,r[0])}n.position.end=Gn(e.end)}function u(){return lt(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bt(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function y(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Gn(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Gn(e.end)}function N(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Gn(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),C.call(this,e))}function z(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){const e=this.resume();this.stack[this.stack.length-1].value=e}function M(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function A(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Qn,Xn)}(t),n.identifier=bt(t).toLowerCase()}function j(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function P(){const e=this.resume();this.stack[this.stack.length-1].url=e}function L(){const e=this.resume();this.stack[this.stack.length-1].title=e}function D(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bt(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=vt(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=dt(t)}this.stack[this.stack.length-1].value+=r}function q(e){this.stack.pop().position.end=Gn(e.end)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Y(){return{type:"blockquote",children:[]}}function $(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function G(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!en(e););return e}(function(e){const t={constructs:mt([Wn,...(e||{}).extensions||[]]),content:n(jt),defined:[],document:n(Pt),flow:n(Mn),lazy:{},string:n(An),text:n(On)};return t;function n(e){return function(n){return Yn(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,a,i){const l=[];let c,s,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(a||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if($n.lastIndex=u,c=$n.exec(o),d=c&&void 0!==c.index?c.index:o.length,f=o.charCodeAt(d),!c){n=o.slice(u);break}if(10===f&&u===d&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),u<d&&(l.push(o.slice(u,d)),t+=d-u),f){case 0:l.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),l.push(-2);t++<s;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function Gn(e){return{line:e.line,column:e.column,offset:e.offset}}function Jn(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jn(e,r):er(e,r)}}function er(e,t){let n;for(n in t)if(Kn.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 tr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Me({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Me({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Me({start:t.start,end:t.end})+") is still open")}function nr(e){const t=this;t.parser=function(n){return Zn(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rr(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&"text"===a.type?a.value="["+a.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function or(e){const t=e.spread;return null==t?e.children.length>1:t}function ar(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(ir(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(ir(t.slice(o),o>0,!1)),a.join("")}function ir(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const lr={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=At(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let i,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,c);const s={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,s),e.applyData(t,s)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rr(e,t);const o={src:At(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){const n={src:At(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rr(e,t);const o={href:At(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){const n={href:At(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=or(n[r])}return t}(n):or(t),a={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const e=r[l];(o||0!==l||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const c=r[r.length-1];c&&(o||"element"!==c.type||"p"!==c.tagName)&&i.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:a,children:i};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Ie(t.children[1]),i=ze(t.children[t.children.length-1]);a&&i&&(r.position={start:a,end:i}),o.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,i=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<i;){const n=t.children[l],r={},i=a?a[l]:void 0;i&&(r.align=i);let s={type:"element",tagName:o,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(n,s)),c.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){const n={type:"text",value:ar(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:cr,yaml:cr,definition:cr,footnoteDefinition:cr};function cr(){}const sr="object"==typeof self?self:globalThis,ur=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[a,i]=t[o];switch(a){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new sr[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new sr[a](i),o)};return r})(new Map,e)(0),dr="",{toString:fr}={},{keys:pr}=Object,hr=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=fr.call(e).slice(8,-1);switch(n){case"Array":return[1,dr];case"Object":return[2,dr];case"Date":return[3,dr];case"RegExp":return[4,dr];case"Map":return[5,dr];case"Set":return[6,dr];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},mr=([e,t])=>0===e&&("function"===t||"symbol"===t),gr=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},a=r=>{if(n.has(r))return n.get(r);let[i,l]=hr(r);switch(i){case 0:{let t=r;switch(l){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return o([-1],r)}return o([i,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),o([l,[...e]],r)}const e=[],t=o([i,e],r);for(const t of r)e.push(a(t));return t}case 2:{if(l)switch(l){case"BigInt":return o([l,r.toString()],r);case"Boolean":case"Number":case"String":return o([l,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const n=[],c=o([i,n],r);for(const t of pr(r))!e&&mr(hr(r[t]))||n.push([a(t),a(r[t])]);return c}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!mr(hr(n))&&!mr(hr(o)))&&t.push([a(n),a(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)!e&&mr(hr(n))||t.push(a(n));return n}}const{message:c}=r;return o([i,{name:l,message:c}],r)};return a})(!(t||n),!!t,new Map,r)(e),r};var xr="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ur(gr(e,t)):structuredClone(e):(e,t)=>ur(gr(e,t));function vr(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 br(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const yr=function(e){if(null==e)return kr;if("function"==typeof e)return wr(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=yr(e[n]);return wr(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return wr(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return wr(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function wr(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function kr(){return!0}const Er=[],Rr=!0,Sr=!1;function Cr(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const a=yr(o),i=r?-1:1;!function e(o,l,c){const s=o&&"object"==typeof o?o:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let s,u,d,f=Er;if((!t||a(o,l,c[c.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Rr,e];return null==e?Er:[e]}(n(o,c)),f[0]===Sr))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+i,d=c.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(s=e(n,u,d)(),s[0]===Sr)return s;u="number"==typeof s[1]?s[1]:u+i}}return f}}(e,void 0,[])()}function Nr(e,t,n,r){let o,a,i;"function"==typeof t&&"function"!=typeof n?(a=void 0,i=t,o=n):(a=t,i=n,o=r),Cr(e,a,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},o)}const zr={}.hasOwnProperty,Ir={};function _r(e,t){e.position&&(t.position=function(e){const t=Ie(e),n=ze(e);if(t&&n)return{start:t,end:n}}(e))}function Mr(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,xr(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Tr(e,t){const n=t.data||{},r=!("value"in t)||zr.call(n,"hProperties")||zr.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Ar(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Or(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function jr(e,t){const n=function(e,t){const n=t||Ir,r=new Map,o=new Map,a=new Map,i={...lr,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=l.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Or(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Or(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Mr,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=l.handlers[n];if(zr.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=xr(n);return r.children=l.all(e),r}return xr(e)}return(l.options.unknownHandler||Tr)(l,e,t)},options:n,patch:_r,wrap:Ar};return Nr(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vr,r=e.options.footnoteBackLabel||br,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[c]);if(!o)continue;const a=e.all(o),i=String(o.identifier).toUpperCase(),s=At(i.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(i);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(c,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=a[a.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else a.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(a,!0)};e.patch(o,h),l.push(h)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...xr(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:"\n"},o),a}function Pr(e,t){return e&&"run"in e?async function(n,r){const o=jr(n,{file:r,...t});await e.run(o,r)}:function(n,r){return jr(n,{file:r,...e||t})}}function Lr(e){if(e)throw e}var Dr=Object.prototype.hasOwnProperty,Fr=Object.prototype.toString,Br=Object.defineProperty,Hr=Object.getOwnPropertyDescriptor,Ur=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Fr.call(e)},qr=function(e){if(!e||"[object Object]"!==Fr.call(e))return!1;var t,n=Dr.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Dr.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Dr.call(e,t)},Vr=function(e,t){Br&&"__proto__"===t.name?Br(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Wr=function(e,t){if("__proto__"===t){if(!Dr.call(e,t))return;if(Hr)return Hr(e,t).value}return e[t]},Yr=function e(){var t,n,r,o,a,i,l=arguments[0],c=1,s=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},c=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});c<s;++c)if(null!=(t=arguments[c]))for(n in t)r=Wr(l,n),l!==(o=Wr(t,n))&&(u&&o&&(qr(o)||(a=Ur(o)))?(a?(a=!1,i=r&&Ur(r)?r:[]):i=r&&qr(r)?r:{},Vr(l,{name:n,newValue:e(u,i,o)})):void 0!==o&&Vr(l,{name:n,newValue:o}));return l},$r=te(Yr);function Qr(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Xr(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(a,...i){const l=e[++n];let c=-1;if(a)r(a);else{for(;++c<t.length;)null!==i[c]&&void 0!==i[c]||(i[c]=t[c]);t=i,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(a,o):i instanceof Error?o(i):a(i))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(l,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Kr={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Zr(e);let n,r=0,o=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,l=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(o=a):(l=-1,o=i));r===o?o=i:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Zr(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Zr(e);let t,n=e.length,r=-1,o=0,a=-1,i=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?a<0?a=n:1!==i&&(i=1):a>-1&&(i=-1);else if(t){o=n+1;break}}if(a<0||r<0||0===i||1===i&&a===r-1&&a===o+1)return"";return e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Zr(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Zr(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",a=0,i=-1,l=0,c=-1;for(;++c<=e.length;){if(c<e.length)n=e.codePointAt(c);else{if(47===n)break;n=47}if(47===n){if(i===c-1||1===l);else if(i!==c-1&&2===l){if(o.length<2||2!==a||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",a=0):(o=o.slice(0,r),a=o.length-1-o.lastIndexOf("/")),i=c,l=0;continue}}else if(o.length>0){o="",a=0,i=c,l=0;continue}t&&(o=o.length>0?o+"/..":"..",a=2)}else o.length>0?o+="/"+e.slice(i+1,c):o=e.slice(i+1,c),a=c-i-1;i=c,l=0}else 46===n&&l>-1?l++:l=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Zr(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gr={cwd:function(){return"/"}};function Jr(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function eo(e){if("string"==typeof e)e=new URL(e);else if(!Jr(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const to=["history","path","basename","stem","extname","dirname"];class no{constructor(e){let t;t=e?Jr(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Gr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<to.length;){const e=to[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)to.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Kr.basename(this.path):void 0}set basename(e){oo(e,"basename"),ro(e,"basename"),this.path=Kr.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Kr.dirname(this.path):void 0}set dirname(e){ao(this.basename,"dirname"),this.path=Kr.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Kr.extname(this.path):void 0}set extname(e){if(ro(e,"extname"),ao(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kr.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Jr(e)&&(e=eo(e)),oo(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Kr.basename(this.path,this.extname):void 0}set stem(e){oo(e,"stem"),ro(e,"stem"),this.path=Kr.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new je(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function ro(e,t){if(e&&e.includes(Kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kr.sep+"`")}function oo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ao(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const io=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},lo={}.hasOwnProperty;class co extends io{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=Xr()}copy(){const e=new co;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data($r(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(po("data",this.frozen),this.namespace[e]=t,this):lo.call(this.namespace,e)&&this.namespace[e]||void 0:e?(po("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=go(e),n=this.parser||this.Parser;return uo("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),uo("process",this.parser||this.Parser),fo("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const a=go(e),i=n.parse(a);function l(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,a,function(e,t,r){if(e||!t||!r)return l(e);const o=t,a=n.stringify(o,r);var i;"string"==typeof(i=a)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=a:r.result=a,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),uo("processSync",this.parser||this.Parser),fo("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Lr(e),t=r}),mo("processSync","process",n),t}run(e,t,n){ho(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,a){const i=go(t);r.run(e,i,function(t,r,i){const l=r||e;t?a(t):o?o(l):n(void 0,l,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Lr(e),n=t,r=!0}),mo("runSync","run",r),n}stringify(e,t){this.freeze();const n=go(t),r=this.compiler||this.Compiler;return fo("stringify",r),ho(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(po("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):a(e)}return this;function o(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(t,n)}else a(e)}}function a(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=$r(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function l(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...a]=t;const i=n[o][1];Qr(i)&&Qr(r)&&(r=$r(!0,i,r)),n[o]=[e,r,...a]}}}}const so=(new co).freeze();function uo(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function fo(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function po(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 ho(e){if(!Qr(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function mo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function go(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new no(e)}const xo=[],vo={allowDangerousHtml:!0},bo=/^(https?|ircs?|mailto|xmpp)$/i,yo=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function wo(e){const t=function(e){const t=e.rehypePlugins||xo,n=e.remarkPlugins||xo,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vo}:vo,o=so().use(nr).use(n).use(Pr,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new no;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,i=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||ko;for(const e of yo)Object.hasOwn(t,e.from)&&p((e.from,e.to&&e.to,e.id));return Nr(e,s),Ue(e,{Fragment:at.Fragment,components:o,ignoreInvalidStyle:!0,jsx:at.jsx,jsxs:at.jsxs,passKeys:!0,passNode:!0});function s(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return i?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ge)if(Object.hasOwn(Ge,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ge[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let i=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&r&&"number"==typeof t&&(i=!r(e,t,o)),i&&o&&"number"==typeof t)return l&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function ko(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||bo.test(e.slice(0,t))?e:""}function Eo(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function Ro(e,t,n){const r=yr((n||{}).ignore||[]),o=function(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 e=n[r];t.push([So(e[0]),Co(e[1])])}return t}(t);let a=-1;for(;++a<o.length;)Cr(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[a][0],i=o[a][1];let l=0;const c=n.children.indexOf(e);let s=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let a=i(...d,o);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(l!==n&&u.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),l=n+d[0].length,s=!0),!r.global)break;d=r.exec(e.value)}s?(l<e.value.length&&u.push({type:"text",value:e.value.slice(l)}),n.children.splice(c,1,...u)):u=[e];return c+u.length}(e,t)}}function So(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Co(e){return"function"==typeof e?e:function(){return e}}const No="phrasing",zo=["autolink","link","image","label"];function Io(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function _o(e){this.config.enter.autolinkProtocol.call(this,e)}function Mo(e){this.config.exit.autolinkProtocol.call(this,e)}function To(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 Ao(e){this.config.exit.autolinkEmail.call(this,e)}function Oo(e){this.exit(e)}function jo(e){Ro(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Po],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Lo]],{ignore:["link","linkReference"]})}function Po(e,t,n,r,o){let a="";if(!Do(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const i=function(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 o=Eo(e,"(");let a=Eo(e,")");for(;-1!==r&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}(n+r);if(!i[0])return!1;const l={type:"link",title:null,url:a+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[l,{type:"text",value:i[1]}]:l}function Lo(e,t,n,r){return!(!Do(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Do(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Mt(n)||_t(n))&&(!t||47!==n)}function Fo(){this.buffer()}function Bo(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ho(){this.buffer()}function Uo(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vo(e){this.exit(e)}function Wo(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Yo(e){this.exit(e)}function $o(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const i=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),i(),a+=o.move("]"),a}function Qo(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const a=r.createTracker(o);let i=a.move("[^");const l=r.enter("footnoteDefinition"),c=r.enter("label");i+=a.move(r.safe(r.associationId(e),{before:i,after:"]"})),c(),i+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),i+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?Ko:Xo)));return l(),i},footnoteReference:$o},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Xo(e,t,n){return 0===t?e:Ko(e,t,n)}function Ko(e,t,n){return(n?"":" ")+e}$o.peek=function(){return"["};const Zo=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Go(e){this.enter({type:"delete",children:[]},e)}function Jo(e){this.exit(e)}function ea(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let i=o.move("~~");return i+=n.containerPhrasing(e,{...o.current(),before:i,after:"~"}),i+=o.move("~~"),a(),i}function ta(e){return e.length}function na(e){return null==e?"":String(e)}function ra(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function oa(e,t,n){return">"+(n?"":" ")+e}function aa(e,t){return ia(e,t.inConstruct,!0)&&!ia(e,t.notInConstruct,!1)}function ia(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function la(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&aa(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function ca(e,t,n){return(n?"":" ")+e}function sa(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 ua(e){return"&#x"+e.toString(16).toUpperCase()+";"}function da(e,t,n){const r=Dt(e),o=Dt(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function fa(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),a=n.enter("emphasis"),i=n.createTracker(r),l=i.move(o);let c=i.move(n.containerPhrasing(e,{after:o,before:l,...i.current()}));const s=c.charCodeAt(0),u=da(r.before.charCodeAt(r.before.length-1),s,o);u.inside&&(c=ua(s)+c.slice(1));const d=c.charCodeAt(c.length-1),f=da(r.after.charCodeAt(0),d,o);f.inside&&(c=c.slice(0,-1)+ua(d));const p=i.move(o);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+c+p}function pa(e){return e.value||""}function ha(e,t,n,r){const o=sa(n),a='"'===o?"Quote":"Apostrophe",i=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let s=c.move("![");return s+=c.move(n.safe(e.alt,{before:s,after:"]",...c.current()})),s+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),s+=c.move("<"),s+=c.move(n.safe(e.url,{before:s,after:">",...c.current()})),s+=c.move(">")):(l=n.enter("destinationRaw"),s+=c.move(n.safe(e.url,{before:s,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),s+=c.move(" "+o),s+=c.move(n.safe(e.title,{before:s,after:o,...c.current()})),s+=c.move(o),l()),s+=c.move(")"),i(),s}function ma(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const s=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(s+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return i(),n.stack=u,a(),"full"!==o&&s&&s===d?"shortcut"===o?c=c.slice(0,-1):c+=l.move("]"):c+=l.move(d+"]"),c}function ga(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const e=n.unsafe[a],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function xa(e,t){const n=lt(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function va(e,t,n,r){const o=sa(n),a='"'===o?"Quote":"Apostrophe",i=n.createTracker(r);let l,c;if(xa(e,n)){const t=n.stack;n.stack=[],l=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),l(),n.stack=t,r}l=n.enter("link"),c=n.enter("label");let s=i.move("[");return s+=i.move(n.containerPhrasing(e,{before:s,after:"](",...i.current()})),s+=i.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),s+=i.move("<"),s+=i.move(n.safe(e.url,{before:s,after:">",...i.current()})),s+=i.move(">")):(c=n.enter("destinationRaw"),s+=i.move(n.safe(e.url,{before:s,after:e.title?" ":")",...i.current()}))),c(),e.title&&(c=n.enter(`title${a}`),s+=i.move(" "+o),s+=i.move(n.safe(e.title,{before:s,after:o,...i.current()})),s+=i.move(o),c()),s+=i.move(")"),l(),s}function ba(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const s=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(s+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return i(),n.stack=u,a(),"full"!==o&&s&&s===d?"shortcut"===o?c=c.slice(0,-1):c+=l.move("]"):c+=l.move(d+"]"),c}function ya(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 wa(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}ea.peek=function(){return"~"},fa.peek=function(e,t,n){return n.options.emphasis||"*"},pa.peek=function(){return"<"},ha.peek=function(){return"!"},ma.peek=function(){return"!"},ga.peek=function(){return"`"},va.peek=function(e,t,n){return xa(e,n)?"<":"["},ba.peek=function(){return"["};const ka=yr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ea(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),a=n.enter("strong"),i=n.createTracker(r),l=i.move(o+o);let c=i.move(n.containerPhrasing(e,{after:o,before:l,...i.current()}));const s=c.charCodeAt(0),u=da(r.before.charCodeAt(r.before.length-1),s,o);u.inside&&(c=ua(s)+c.slice(1));const d=c.charCodeAt(c.length-1),f=da(r.after.charCodeAt(0),d,o);f.inside&&(c=c.slice(0,-1)+ua(d));const p=i.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+c+p}Ea.peek=function(e,t,n){return n.options.strong||"*"};const Ra={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const i=n.indentLines(n.containerFlow(e,a.current()),oa);return o(),i},break:la,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),a=e.value||"",i="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(a,ca);return e(),t}const l=n.createTracker(r),c=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++a>i&&(i=a):a=1,o=r+t.length,r=n.indexOf(t,o);return i}(a,o)+1,3)),s=n.enter("codeFenced");let u=l.move(c);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...l.current()})),t()}return u+=l.move("\n"),a&&(u+=l.move(a+"\n")),u+=l.move(c),s(),u},definition:function(e,t,n,r){const o=sa(n),a='"'===o?"Quote":"Apostrophe",i=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let s=c.move("[");return s+=c.move(n.safe(n.associationId(e),{before:s,after:"]",...c.current()})),s+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),s+=c.move("<"),s+=c.move(n.safe(e.url,{before:s,after:">",...c.current()})),s+=c.move(">")):(l=n.enter("destinationRaw"),s+=c.move(n.safe(e.url,{before:s,after:e.title?" ":"\n",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),s+=c.move(" "+o),s+=c.move(n.safe(e.title,{before:s,after:o,...c.current()})),s+=c.move(o),l()),i(),s},emphasis:fa,hardBreak:la,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(function(e,t){let n=!1;return Nr(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Sr}),Boolean((!e.depth||e.depth<3)&&lt(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...a.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===o?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(o),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(i+" ");let s=n.containerPhrasing(e,{before:"# ",after:"\n",...a.current()});return/^[\t ]/.test(s)&&(s=ua(s.charCodeAt(0))+s.slice(1)),s=s?i+" "+s:i,n.options.closeAtx&&(s+=" "+i),c(),l(),s},html:pa,image:ha,imageReference:ma,inlineCode:ga,link:va,linkReference:ba,list:function(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):ya(n);const l=e.ordered?"."===i?")":".":function(e){const t=ya(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}(n);let c=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(c=!0),wa(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){c=!0;break}}}}c&&(i=l),n.bulletCurrent=i;const s=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=a,o(),s},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let a=n.bulletCurrent||ya(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let i=a.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const l=n.createTracker(r);l.move(a+" ".repeat(i-a.length)),l.shift(i);const c=n.enter("listItem"),s=n.indentLines(n.containerFlow(e,l.current()),function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?a:a+" ".repeat(i-a.length))+e});return c(),s},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,r);return a(),o(),i},root:function(e,t,n,r){return(e.children.some(function(e){return ka(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Ea,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(wa(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Sa(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Ca(e){this.exit(e),this.data.inTable=void 0}function Na(e){this.enter({type:"tableRow",children:[]},e)}function za(e){this.exit(e)}function Ia(e){this.enter({type:"tableCell",children:[]},e)}function _a(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ma));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ma(e,t){return"|"===t?t:e}function Ta(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ra.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return l(function(e,t,n){const r=e.children;let o=-1;const a=[],i=t.enter("table");for(;++o<r.length;)a[o]=c(r[o],t,n);return i(),a}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const o=c(e,n,r),a=l([o]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const o=n.enter("tableCell"),i=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:a,after:a});return i(),o(),l}function l(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||ta,a=[],i=[],l=[],c=[];let s=0,u=-1;for(;++u<e.length;){const t=[],r=[];let a=-1;for(e[u].length>s&&(s=e[u].length);++a<e[u].length;){const i=na(e[u][a]);if(!1!==n.alignDelimiters){const e=o(i);r[a]=e,(void 0===c[a]||e>c[a])&&(c[a]=e)}t.push(i)}i[u]=t,l[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<s;)a[d]=ra(r[d]);else{const e=ra(r);for(;++d<s;)a[d]=e}d=-1;const f=[],p=[];for(;++d<s;){const e=a[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,c[d]-t.length-r.length);const i=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>c[d]&&(c[d]=o),p[d]=o),f[d]=i}i.splice(1,0,f),l.splice(1,0,p),u=-1;const h=[];for(;++u<i.length;){const e=i[u],t=l[u];d=-1;const r=[];for(;++d<s;){const o=e[d]||"";let i="",l="";if(!1!==n.alignDelimiters){const e=c[d]-(t[d]||0),n=a[d];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),l=i):l=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(o),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===s-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function c(e,t,n){const r=e.children;let o=-1;const a=[],l=t.enter("tableRow");for(;++o<r.length;)a[o]=i(r[o],0,t,n);return l(),a}}function Aa(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Oa(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,a=-1;for(;++a<r.length;){const e=r[a];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ja(e,t,n,r){const o=e.children[0],a="boolean"==typeof e.checked&&o&&"paragraph"===o.type,i="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(i);let c=Ra.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+i})),c}const Pa={tokenize:function(e,t,n){let r=0;return function t(a){if((87===a||119===a)&&r<3)return r++,e.consume(a),t;if(46===a&&3===r)return e.consume(a),o;return n(a)};function o(e){return null===e?n(e):t(e)}},partial:!0},La={tokenize:function(e,t,n){let r,o,a;return i;function i(t){return 46===t||95===t?e.check(Fa,c,l)(t):null===t||zt(t)||Mt(t)||45!==t&&_t(t)?c(t):(a=!0,e.consume(t),i)}function l(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),i}function c(e){return o||r||!a?n(e):t(e)}},partial:!0},Da={tokenize:function(e,t){let n=0,r=0;return o;function o(i){return 40===i?(n++,e.consume(i),o):41===i&&r<n?a(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(Fa,t,a)(i):null===i||zt(i)||Mt(i)?t(i):(e.consume(i),o)}function a(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Fa={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),a):93===i?(e.consume(i),o):60===i||null===i||zt(i)||Mt(i)?t(i):n(i)}function o(e){return null===e||40===e||91===e||zt(e)||Mt(e)?t(e):r(e)}function a(e){return yt(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):yt(t)?(e.consume(t),i):n(t)}},partial:!0},Ba={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return wt(e)?n(e):t(e)}},partial:!0},Ha={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!Ya.call(r,r.previous)||Ka(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Pa,e.attempt(La,e.attempt(Da,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Ya},Ua={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",a=!1;return function(t){if((72===t||104===t)&&$a.call(r,r.previous)&&!Ka(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(yt(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),a?c:(a=!0,l)):n(t)}function c(t){return null===t||Et(t)||zt(t)||Mt(t)||_t(t)?n(t):e.attempt(La,e.attempt(Da,s),n)(t)}function s(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:$a},qa={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,a;return function(t){if(!Xa(t)||!Qa.call(r,r.previous)||Ka(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return Xa(t)?(e.consume(t),i):64===t?(e.consume(t),l):n(t)}function l(t){return 46===t?e.check(Ba,s,c)(t):45===t||95===t||wt(t)?(a=!0,e.consume(t),l):s(t)}function c(t){return e.consume(t),o=!0,l}function s(i){return a&&o&&yt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:Qa},Va={};let Wa=48;for(;Wa<123;)Va[Wa]=qa,Wa++,58===Wa?Wa=65:91===Wa&&(Wa=97);function Ya(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||zt(e)}function $a(e){return!yt(e)}function Qa(e){return!(47===e||Xa(e))}function Xa(e){return 43===e||45===e||46===e||95===e||wt(e)}function Ka(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Va[43]=qa,Va[45]=qa,Va[46]=qa,Va[95]=qa,Va[72]=[qa,Ua],Va[104]=[qa,Ua],Va[87]=[qa,Ha],Va[119]=[qa,Ha];const Za={tokenize:function(e,t,n){const r=this;return Ot(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Ga(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!i||!i._balanced)return n(o);const l=bt(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==l.codePointAt(0)||!a.includes(l.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function Ja(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function ei(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(l){if(i>999||93===l&&!a||null===l||91===l||zt(l))return n(l);if(93===l){e.exit("chunkString");const a=e.exit("gfmFootnoteCallString");return o.includes(bt(r.sliceSerialize(a)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return zt(l)||(a=!0),i++,e.consume(l),92===l?s:c}function s(t){return 91===t||92===t||93===t?(e.consume(t),i++,c):c(t)}}function ti(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,i,l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",s):n(t)}function s(t){if(l>999||93===t&&!i||null===t||91===t||zt(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return a=bt(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return zt(t)||(i=!0),l++,e.consume(t),92===t?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),l++,s):s(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(a)||o.push(a),Ot(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function ni(e,t,n){return e.check(qt,t,e.attempt(Za,t,n))}function ri(e){e.exit("gfmFootnoteDefinition")}function oi(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,a=this.events;let i=0;return function(t){if(126===o&&"characterEscape"!==a[a.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),l(t)};function l(a){const c=Dt(o);if(126===a)return i>1?r(a):(e.consume(a),i++,l);if(i<2&&!t)return r(a);const s=e.exit("strikethroughSequenceTemporary"),u=Dt(a);return s._open=!u||2===u&&Boolean(c),s._close=!c||2===c&&Boolean(u),n(a)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],l=t.parser.constructs.insideSpan.null;l&&ft(i,i.length,0,Ft(l,e.slice(r+1,n),t)),ft(i,i.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),ft(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class ai{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function ii(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function li(e,t,n){const r=this;let o,a=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,a="tableHead"===o||"tableRow"===o?y:l;if(a===y&&r.parser.lazy[r.now().line])return n(e);return a(e)};function l(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return c(e);return o=!0,i+=1,c(e)}(t)}function c(t){return null===t?n(t):Nt(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):It(t)?Ot(e,c,"whitespace")(t):(i+=1,o&&(o=!1,a+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),s(t)))}function s(t){return null===t||124===t||zt(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?u:s)}function u(t){return 92===t||124===t?(e.consume(t),s):s(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,It(t)?Ot(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return It(t)?Ot(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||Nt(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(t))}function x(t){return It(t)?Ot(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||Nt(n))&&o&&a===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function y(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||Nt(n)?(e.exit("tableRow"),t(n)):It(n)?Ot(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||zt(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?E:k)}function E(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function ci(e,t){let n,r,o,a=-1,i=!0,l=0,c=[0,0,0,0],s=[0,0,0,0],u=!1,d=0;const f=new ai;for(;++a<e.length;){const p=e[a],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(ui(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(a,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,o=void 0,c=[0,0,0,0],s=[0,a+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(a,0,[["enter",r,t]])),l="tableDelimiterRow"===h.type?2:r?3:1):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==c[1]&&(s[0]=s[1],o=si(f,t,c,l,void 0,o)),c=s,s=[c[1],a,0,0])):(i=!1,0===s[2]&&(0!==c[1]&&(s[0]=s[1],o=si(f,t,c,l,void 0,o),c=[0,0,0,0]),s[2]=a)):"tableHead"===h.type?(u=!0,d=a):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=a,0!==c[1]?(s[0]=s[1],o=si(f,t,c,l,a,o)):0!==s[1]&&(o=si(f,t,s,l,a,o)),l=0):!l||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(s[3]=a)}for(0!==d&&ui(f,t,d,n,r),f.consume(t.events),a=-1;++a<t.events.length;){const e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=ii(t.events,a))}return e}function si(e,t,n,r,o,a){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(a.end=Object.assign({},di(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=di(t.events,n[1]);if(a={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){const o=di(t.events,n[2]),a=di(t.events,n[3]),i={type:"tableContent",start:Object.assign({},o),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==o&&(a.end=Object.assign({},di(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function ui(e,t,n,r,o){const a=[],i=di(t.events,n);o&&(o.end=Object.assign({},i),a.push(["exit",o,t])),r.end=Object.assign({},i),a.push(["exit",r,t]),e.add(n+1,0,a)}function di(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const fi={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return zt(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return Nt(r)?t(r):It(r)?e.check({tokenize:pi},t,n)(r):n(r)}}};function pi(e,t,n){return Ot(e,function(e){return null===e?n(e):t(e)},"whitespace")}const hi={};function mi(e){const t=e||hi,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return mt([{text:Va},{document:{91:{name:"gfmFootnoteDefinition",tokenize:ti,continuation:{tokenize:ni},exit:ri}},text:{91:{name:"gfmFootnoteCall",tokenize:ei},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ga,resolveTo:Ja}}},oi(e),{flow:{null:{name:"table",tokenize:li,resolveAll:ci}}},{text:{91:fi}}])}(t)),o.push([{transforms:[jo],enter:{literalAutolink:Io,literalAutolinkEmail:_o,literalAutolinkHttp:_o,literalAutolinkWww:_o},exit:{literalAutolink:Oo,literalAutolinkEmail:Ao,literalAutolinkHttp:Mo,literalAutolinkWww:To}},{enter:{gfmFootnoteCallString:Fo,gfmFootnoteCall:Bo,gfmFootnoteDefinitionLabelString:Ho,gfmFootnoteDefinition:Uo},exit:{gfmFootnoteCallString:qo,gfmFootnoteCall:Vo,gfmFootnoteDefinitionLabelString:Wo,gfmFootnoteDefinition:Yo}},{canContainEols:["delete"],enter:{strikethrough:Go},exit:{strikethrough:Jo}},{enter:{table:Sa,tableData:Ia,tableHeader:Ia,tableRow:Na},exit:{codeText:_a,table:Ca,tableData:za,tableHeader:za,tableRow:za}},{exit:{taskListCheckValueChecked:Aa,taskListCheckValueUnchecked:Aa,paragraph:Oa}}]),a.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:No,notInConstruct:zo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:No,notInConstruct:zo},{character:":",before:"[ps]",after:"\\/",inConstruct:No,notInConstruct:zo}]},Qo(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Zo}],handlers:{delete:ea}},Ta(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ja}}]}}(t))}
13
13
  /**
14
14
  * @license lucide-react v0.562.0 - ISC
15
15
  *
16
16
  * This source code is licensed under the ISC license.
17
17
  * See the LICENSE file in the root directory of this source tree.
18
- */const ko=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eo=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ro=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),No=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
18
+ */const gi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xi=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},vi=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),bi=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
19
19
  /**
20
20
  * @license lucide-react v0.562.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
24
  */
25
- var So={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
25
+ var yi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
26
26
  /**
27
27
  * @license lucide-react v0.562.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Co=React.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>React.createElement("svg",{ref:c,...So,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Ro("lucide",o),...!a&&!No(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>React.createElement(e,t)),...Array.isArray(a)?a:[a]])),zo=(e,t)=>{const n=React.forwardRef(({className:n,...r},o)=>React.createElement(Co,{ref:o,iconNode:t,className:Ro(`lucide-${ko(Eo(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Eo(e),n},_o=zo("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),Io=zo("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),Mo=zo("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),To=zo("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Oo=zo("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Po=zo("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),jo=zo("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),Ao=zo("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Lo=zo("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Do=zo("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),Fo=zo("layout-list",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]),Bo=zo("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Ho=zo("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),Uo=zo("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),Vo=zo("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),qo=zo("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),Wo=zo("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Yo=zo("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Xo=zo("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Qo=zo("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),Ko=zo("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),Zo=zo("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),$o=zo("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Go=zo("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Jo=zo("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),ea=zo("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),ta=zo("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),na=zo("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),ra=zo("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),oa=zo("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),aa=zo("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),ia=zo("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);
31
+ */const wi=React.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>React.createElement("svg",{ref:c,...yi,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:vi("lucide",o),...!a&&!bi(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,t])=>React.createElement(e,t)),...Array.isArray(a)?a:[a]])),ki=(e,t)=>{const n=React.forwardRef(({className:n,...r},o)=>React.createElement(wi,{ref:o,iconNode:t,className:vi(`lucide-${gi(xi(e))}`,`lucide-${e}`,n),...r}));return n.displayName=xi(e),n},Ei=ki("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),Ri=ki("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),Si=ki("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ci=ki("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ni=ki("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),zi=ki("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Ii=ki("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),_i=ki("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Mi=ki("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Ti=ki("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),Ai=ki("layout-list",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]),Oi=ki("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),ji=ki("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),Pi=ki("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),Li=ki("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),Di=ki("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),Fi=ki("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Bi=ki("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Hi=ki("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Ui=ki("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),qi=ki("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),Vi=ki("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Wi=ki("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Yi=ki("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),$i=ki("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),Qi=ki("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),Xi=ki("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),Ki=ki("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Zi=ki("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),Gi=ki("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ji=ki("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),el=ki("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);
32
32
  /**
33
33
  * @license lucide-react v0.562.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */var la=function(e){e.value;var t=e.onChange,n=e.onClose,r=e.agentTree,o=s(React.useState([]),2),a=o[0],i=o[1],l=r;a.forEach(function(e){l[e]&&(l=l[e])});var c=Array.isArray(l),d=function(e){var r=e.key;c?(t({path:[].concat(u(a),[r])}),n()):i([].concat(u(a),[r]))};return React.createElement("div",{className:"absolute top-full left-0 mt-[8px] bg-white rounded-[8px] shadow-xl border border-slate-200 z-50 animate-in fade-in zoom-in-95 duration-100",style:{width:"256px"}},React.createElement("div",{className:"p-[8px] bg-slate-50 border-b border-slate-200 flex items-center justify-between"},a.length>0?React.createElement("button",{onClick:function(){i(a.slice(0,-1))},className:"text-[12px] font-medium text-blue-500 hover:text-blue-600 flex items-center"},"← Back"):React.createElement("span",{className:"text-[12px] font-semibold text-slate-500 uppercase tracking-wider"},"Select Source"),React.createElement("button",{onClick:n,className:"text-slate-400 hover:text-red-500"},React.createElement(oa,{size:14}))),React.createElement("div",{className:"max-h-[240px] overflow-y-auto p-[4px] bg-white text-slate-900"},c?l.map(function(e){return React.createElement("button",{key:e,onClick:function(){return d({key:e})},className:"w-full text-left px-[12px] py-[8px] text-[14px] text-slate-700 hover:bg-blue-50 rounded flex items-center gap-[8px]"},React.createElement("div",{className:"w-[8px] h-[8px] rounded-full bg-green-500"}),e)}):Object.keys(l).map(function(e){return React.createElement("button",{key:e,onClick:function(){return d({key:e})},className:"w-full text-left px-[12px] py-[8px] text-[14px] text-slate-700 hover:bg-slate-100 rounded flex items-center justify-between group"},React.createElement("div",{className:"flex items-center gap-[8px]"},0===a.length?"Shared"===e?"🌍":"🔒":"📁",React.createElement("span",null,e)),React.createElement(Oo,{size:14,className:"text-slate-400 group-hover:text-slate-600"}))}),!c&&0===Object.keys(l).length&&React.createElement("div",{className:"p-2 text-slate-400 text-xs text-center italic"},"No items found")))},ca=function(e){var t=e.node,n=e.isActive,r=e.isRootNode,o=e.isEditing,a=e.agentName,l=e.breadcrumbs,c=e.agentTree,s=e.openSelectorId,u=e.setOpenSelectorId,d=e.updateAgent,p=e.handleView,f=e.handleEdit,h=e.deleteNode,m=e.onNodeDragStart,g=e.nodeRef,x=e.style,v=e.isAbsolute,b=void 0===v||v,y=e.colour,w=e.children;return React.createElement("div",{ref:g,"data-node":"true",onMouseDown:function(e){return m?m({event:e,node:t}):null},style:i({width:"256px",height:"fit-content",boxSizing:"border-box",fontSize:"14px",lineHeight:"1.5",fontFamily:"sans-serif"},x),className:"".concat(b?"absolute":"relative"," bg-white rounded-[12px] shadow-lg border-2 transition-shadow duration-200 group flex flex-col ").concat(s===t.id?"z-50":"z-10","\n ").concat(n?"border-green-500 shadow-green-500/30 ring-1 ring-green-500":"border-blue-500 hover:border-blue-600","\n ")},React.createElement("div",{className:"rounded-t-[12px] w-full ".concat(n?"bg-green-500":"bg-slate-100"),style:{height:"8px"}}),React.createElement("div",{className:"flex flex-col",style:{padding:"16px",gap:"12px"}},React.createElement("div",{className:"flex items-start justify-between"},React.createElement("div",{className:"flex flex-col"},l&&React.createElement("span",{className:"text-slate-400 truncate max-w-[150px]",title:l,style:{fontSize:"10px"}},l)),React.createElement("div",{className:"flex gap-[4px]"},p&&t.data.agentPath.length>0&&React.createElement("button",{onClick:function(){return p({agentPath:t.data.agentPath.join("/")})},className:"p-[6px] rounded-[6px] text-slate-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",title:"View Agent"},React.createElement(Lo,{size:16})),o&&f&&t.data.agentPath.length>0&&React.createElement("button",{onClick:function(){return f({agentPath:t.data.agentPath.join("/")})},className:"p-[6px] rounded-[6px] text-slate-400 hover:text-amber-600 hover:bg-amber-50 transition-colors",title:"Edit Agent"},React.createElement(ea,{size:16})),r&&React.createElement("div",{className:"p-[6px] rounded-[6px] transition-all text-indigo-600 bg-indigo-50",title:"Root Node"},React.createElement(Do,{size:18})),n&&React.createElement("div",{className:"p-[6px] rounded-[6px] transition-all text-green-600 bg-green-50",title:"Active Node"},React.createElement(Go,{size:18,className:"animate-spin"})),o&&h&&React.createElement("button",{onClick:function(){return h({id:t.id})},className:"p-[6px] rounded-[6px] text-slate-300 hover:text-red-600 hover:bg-red-50 transition-colors"},React.createElement(ta,{size:16})))),React.createElement("div",{className:"relative nodrag"},React.createElement("button",{onClick:function(){return u(s===t.id?null:t.id)},className:"w-full flex items-center justify-between px-[12px] py-[8px] bg-slate-50 border border-slate-200 rounded-[6px] text-[14px] text-slate-600 hover:bg-slate-100 transition-colors"},React.createElement("div",{className:"flex items-center gap-[8px] overflow-hidden"},y&&React.createElement("div",{className:"w-[10px] h-[10px] rounded-full shrink-0",style:{backgroundColor:y}}),React.createElement("span",{className:"truncate"},a)),React.createElement(To,{size:14,className:"shrink-0"})),s===t.id&&o&&React.createElement(la,{value:t.data.agentPath,onChange:function(e){var n=e.path;return d({nodeId:t.id,path:n})},onClose:function(){return u(null)},agentTree:c}))),w)};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-50:oklch(98.2% .018 155.826);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-600:oklch(59.6% .145 163.225);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-700:oklch(50% .134 242.749);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-600:oklch(54.1% .281 293.009);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:var(--default-font-feature-settings,normal);-webkit-tap-highlight-color:transparent;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:var(--default-mono-font-feature-settings,normal);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{font-feature-settings:inherit;background-color:#0000;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{font-feature-settings:inherit;background-color:#0000;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{border-width:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.\\!top-auto{top:auto!important}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.right-8{right:calc(var(--spacing)*8)}.right-14{right:calc(var(--spacing)*14)}.right-24{right:calc(var(--spacing)*24)}.\\!bottom-auto{bottom:auto!important}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-8{bottom:calc(var(--spacing)*8)}.\\!left-auto{left:auto!important}.left-0{left:calc(var(--spacing)*0)}.left-1{left:calc(var(--spacing)*1)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing)*4)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-\\[6px\\]{margin-top:6px}.mt-\\[8px\\]{margin-top:8px}.mt-\\[18px\\]{margin-top:18px}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.table-row{display:table-row}.\\!h-fit{height:-moz-fit-content!important;height:fit-content!important}.h-1{height:calc(var(--spacing)*1)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-\\[8px\\]{height:8px}.h-\\[10px\\]{height:10px}.h-\\[12px\\]{height:12px}.h-\\[18px\\]{height:18px}.h-\\[36px\\]{height:36px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\\[240px\\]{max-height:240px}.min-h-\\[40px\\]{min-height:40px}.min-h-\\[44px\\]{min-height:44px}.min-h-\\[500px\\]{min-height:500px}.\\!w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-16{width:calc(var(--spacing)*16)}.w-64{width:calc(var(--spacing)*64)}.w-96{width:calc(var(--spacing)*96)}.w-\\[8px\\]{width:8px}.w-\\[10px\\]{width:10px}.w-\\[12px\\]{width:12px}.w-\\[18px\\]{width:18px}.w-\\[36px\\]{width:36px}.w-\\[92\\%\\]{width:92%}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[150px\\]{max-width:150px}.max-w-\\[420px\\]{max-width:420px}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1{--tw-translate-x:calc(var(--spacing)*-1)}.-translate-x-1,.-translate-x-1\\/2{translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x:-50%}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%}.scale-100,.scale-110{scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-crosshair{cursor:crosshair}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[4px\\]{gap:4px}.gap-\\[6px\\]{gap:6px}.gap-\\[8px\\]{gap:8px}.gap-\\[12px\\]{gap:12px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*1*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*1*var(--tw-space-y-reverse))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}.gap-x-4{-moz-column-gap:calc(var(--spacing)*4);column-gap:calc(var(--spacing)*4)}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*2*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*2*var(--tw-space-x-reverse))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*3*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*3*var(--tw-space-x-reverse))}.gap-y-2{row-gap:calc(var(--spacing)*2)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[8px\\]{border-radius:8px}.rounded-\\[12px\\]{border-radius:12px}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-\\[12px\\]{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-green-500{border-color:var(--color-green-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-zinc-100{border-color:var(--color-zinc-100)}.border-zinc-200{border-color:var(--color-zinc-200)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/50{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/50{background-color:color-mix(in oklab,var(--color-slate-100)50%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\\/95{background-color:#1d293df2}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\\/95{background-color:color-mix(in oklab,var(--color-slate-800)95%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\\/40{background-color:#0f172b66}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\\/40{background-color:color-mix(in oklab,var(--color-slate-900)40%,transparent)}}.bg-slate-900\\/50{background-color:#0f172b80}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\\/50{background-color:color-mix(in oklab,var(--color-slate-900)50%,transparent)}}.bg-slate-900\\/90{background-color:#0f172be6}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\\/90{background-color:color-mix(in oklab,var(--color-slate-900)90%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-grid-slate-200{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'40\' height=\'40\'%3E%3Cpath d=\'M0 0h40v40H0z\' fill=\'none\'/%3E%3Cpath d=\'M40 0H0v40\' fill=\'none\' stroke=\'%23E2E8F0\'/%3E%3C/svg%3E")}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.p-\\[4px\\]{padding:4px}.p-\\[6px\\]{padding:6px}.p-\\[8px\\]{padding:8px}.p-\\[20px\\]{padding:20px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-\\[12px\\]{padding-inline:12px}.px-\\[14px\\]{padding-inline:14px}.px-\\[16px\\]{padding-inline:16px}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-\\[6px\\]{padding-block:6px}.py-\\[8px\\]{padding-block:8px}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-20{padding-top:calc(var(--spacing)*20)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.text-\\[18px\\]{font-size:18px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-600{color:var(--color-emerald-600)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-600{color:var(--color-indigo-600)}.text-purple-600{color:var(--color-purple-600)}.text-red-600{color:var(--color-red-600)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.text-zinc-900{color:var(--color-zinc-900)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.placeholder-slate-400::-moz-placeholder{color:var(--color-slate-400)}.placeholder-slate-400::placeholder{color:var(--color-slate-400)}.placeholder-slate-500::-moz-placeholder{color:var(--color-slate-500)}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-lg{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-green-500{--tw-shadow-color:oklch(72.3% .219 149.579)}@supports (color:color-mix(in lab,red,red)){.shadow-green-500{--tw-shadow-color:color-mix(in oklab,var(--color-green-500)var(--tw-shadow-alpha),transparent)}}.shadow-green-500\\/30{--tw-shadow-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.shadow-green-500\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-green-500)30%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-violet-200{--tw-shadow-color:oklch(89.4% .057 293.283)}@supports (color:color-mix(in lab,red,red)){.shadow-violet-200{--tw-shadow-color:color-mix(in oklab,var(--color-violet-200)var(--tw-shadow-alpha),transparent)}}.shadow-zinc-200{--tw-shadow-color:oklch(92% .004 286.32)}@supports (color:color-mix(in lab,red,red)){.shadow-zinc-200{--tw-shadow-color:color-mix(in oklab,var(--color-zinc-200)var(--tw-shadow-alpha),transparent)}}.shadow-zinc-200\\/50{--tw-shadow-color:#e4e4e780}@supports (color:color-mix(in lab,red,red)){.shadow-zinc-200\\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-zinc-200)50%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-green-500{--tw-ring-color:var(--color-green-500)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md))}.backdrop-blur-md,.backdrop-blur-sm{backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm))}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-shadow{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:rotate-90:is(:where(.group):hover *){rotate:90deg}.group-hover\\:bg-zinc-200:is(:where(.group):hover *){background-color:var(--color-zinc-200)}.group-hover\\:stroke-red-500:is(:where(.group):hover *){stroke:var(--color-red-500)}.group-hover\\:text-slate-600:is(:where(.group):hover *){color:var(--color-slate-600)}.group-hover\\:text-zinc-500:is(:where(.group):hover *){color:var(--color-zinc-500)}.group-hover\\:text-zinc-900:is(:where(.group):hover *){color:var(--color-zinc-900)}}.placeholder\\:text-slate-400::-moz-placeholder{color:var(--color-slate-400)}.placeholder\\:text-slate-400::placeholder{color:var(--color-slate-400)}.first\\:mt-0:first-child{margin-top:calc(var(--spacing)*0)}.last\\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\\:border-blue-600:hover{border-color:var(--color-blue-600)}.hover\\:border-indigo-500:hover{border-color:var(--color-indigo-500)}.hover\\:border-purple-300:hover{border-color:var(--color-purple-300)}.hover\\:border-zinc-200:hover{border-color:var(--color-zinc-200)}.hover\\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:bg-indigo-50:hover{background-color:var(--color-indigo-50)}.hover\\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\\:bg-slate-700\\/50:hover{background-color:#31415880}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-700\\/50:hover{background-color:color-mix(in oklab,var(--color-slate-700)50%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.hover\\:text-amber-600:hover{color:var(--color-amber-600)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-900:hover{color:var(--color-zinc-900)}.hover\\:shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]:hover{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.sm\\:block{display:block}}@media (min-width:48rem){.md\\:block{display:block}.md\\:w-80{width:calc(var(--spacing)*80)}.md\\:flex-row{flex-direction:row}.md\\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}.\\[\\&_code\\]\\:rounded code{border-radius:.25rem}.\\[\\&_code\\]\\:bg-slate-100 code{background-color:var(--color-slate-100)}.\\[\\&_code\\]\\:bg-slate-900 code{background-color:var(--color-slate-900)}.\\[\\&_code\\]\\:px-1 code{padding-inline:calc(var(--spacing)*1)}.\\[\\&_code\\]\\:py-0\\.5 code{padding-block:calc(var(--spacing)*.5)}.\\[\\&_code\\]\\:text-sky-300 code{color:var(--color-sky-300)}.\\[\\&_code\\]\\:text-sky-700 code{color:var(--color-sky-700)}.\\[\\&_h1\\]\\:mt-0 h1{margin-top:calc(var(--spacing)*0)}.\\[\\&_h1\\]\\:text-lg h1{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\\[\\&_h1\\]\\:text-slate-900 h1{color:var(--color-slate-900)}.\\[\\&_h1\\]\\:text-white h1{color:var(--color-white)}.\\[\\&_h2\\]\\:text-base h2{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\\[\\&_h2\\]\\:text-slate-200 h2{color:var(--color-slate-200)}.\\[\\&_h2\\]\\:text-slate-800 h2{color:var(--color-slate-800)}.\\[\\&_h3\\]\\:text-sm h3{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\[\\&_h3\\]\\:text-slate-300 h3{color:var(--color-slate-300)}.\\[\\&_h3\\]\\:text-slate-700 h3{color:var(--color-slate-700)}.\\[\\&_hr\\]\\:border-slate-200 hr{border-color:var(--color-slate-200)}.\\[\\&_hr\\]\\:border-slate-700 hr{border-color:var(--color-slate-700)}.\\[\\&_pre\\]\\:rounded-lg pre{border-radius:var(--radius-lg)}.\\[\\&_pre\\]\\:border pre{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_pre\\]\\:border-slate-200 pre{border-color:var(--color-slate-200)}.\\[\\&_pre\\]\\:border-slate-700 pre{border-color:var(--color-slate-700)}.\\[\\&_pre\\]\\:bg-slate-100 pre{background-color:var(--color-slate-100)}.\\[\\&_pre\\]\\:bg-slate-900 pre{background-color:var(--color-slate-900)}.\\[\\&_table\\]\\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_td\\]\\:text-slate-400 td{color:var(--color-slate-400)}.\\[\\&_td\\]\\:text-slate-500 td{color:var(--color-slate-500)}.\\[\\&_th\\]\\:text-slate-300 th{color:var(--color-slate-300)}.\\[\\&_th\\]\\:text-slate-700 th{color:var(--color-slate-700)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(1turn)}}');var sa={Shared:{"Content Creation":["Blog Writer","Tweet Generator","SEO Optimizer"],"Data Analysis":["Market Trends","Sentiment Analyzer","Chart Builder"],Utility:["Translator","Summarizer"]},Users:{user_jdoe:["My Calendar","Email Sorter"],user_alice:["Code Reviewer","Bug Hunter"],team_alpha:["Sprint Planner","Jira Sync"]}},ua={h1:function(e){var t=e.children;return React.createElement("h1",{className:"text-xl font-bold mb-2 mt-4 first:mt-0"},t)},h2:function(e){var t=e.children;return React.createElement("h2",{className:"text-lg font-semibold mb-2 mt-3 first:mt-0"},t)},h3:function(e){var t=e.children;return React.createElement("h3",{className:"text-base font-semibold mb-1 mt-2 first:mt-0"},t)},p:function(e){var t=e.children;return React.createElement("p",{className:"mb-2 last:mb-0"},t)},ul:function(e){var t=e.children;return React.createElement("ul",{className:"list-disc list-inside my-2 space-y-1"},t)},ol:function(e){var t=e.children;return React.createElement("ol",{className:"list-decimal list-inside my-2 space-y-1"},t)},li:function(e){var t=e.children;return React.createElement("li",{className:"ml-2"},t)},code:function(e){var t=e.inline,n=e.children;return t?React.createElement("code",{className:"bg-slate-200 text-slate-800 px-1 py-0.5 rounded text-xs font-mono"},n):React.createElement("code",null,n)},pre:function(e){var t=e.children;return React.createElement("pre",{className:"bg-slate-800 text-slate-100 p-3 rounded text-xs overflow-x-auto my-2"},t)},strong:function(e){var t=e.children;return React.createElement("strong",null,t)},em:function(e){var t=e.children;return React.createElement("em",null,t)}},da=function(e,t,n,r){var o=Math.abs(n-e),a=Math.max(.5*o,50);return"M ".concat(e," ").concat(t," C ").concat(e+a," ").concat(t,", ").concat(n-a," ").concat(r,", ").concat(n," ").concat(r)},pa=function(e,t){if(0===e.length)return!0;if(1===e.length)return!0;var n={};e.forEach(function(e){n[e.id]=[]}),t.forEach(function(e){n[e.source].push(e.target),n[e.target].push(e.source)});var r=new Set,o=[e[0].id];for(r.add(e[0].id);o.length>0;){var a=o.shift();n[a].forEach(function(e){r.has(e)||(r.add(e),o.push(e))})}return r.size===e.length},fa=function(e,t){var n=new Set;return t.forEach(function(e){n.add(e.target)}),e.filter(function(e){return!n.has(e.id)})},ha=function(e,t){if(0===e.length)return!0;var n=pa(e,t),r=fa(e,t);return n&&1===r.length},ma=function(e){var t=e.activeNode,n=e.nodes,r=e.nodeHeights,o=e.currentMessage;e.pan,e.containerRef;var a=s(React.useState("hidden"),2),l=a[0],c=a[1],u=s(React.useState(null),2),d=u[0],p=u[1],f=React.useRef(null),h=React.useRef(null),m="string"==typeof o?{node:t,message:o}:o,g=null==m?void 0:m.node,x=null==m?void 0:m.message,v=n.find(function(e){return g===e.data.agentPath.join("/")});if(React.useEffect(function(){var e=f.current,t=!!x,n=!!e;t||n?!t&&n?(c("disappearing"),requestAnimationFrame(function(){h.current&&h.current.offsetHeight}),setTimeout(function(){c("hidden"),p(null)},300)):t&&!n?(p(m),c("appearing"),setTimeout(function(){c("visible")},400)):t&&n&&e!==x?(p(m),c("visible")):t&&n&&e===x&&(p(m),"hidden"===l&&c("visible")):(c("hidden"),p(null)),f.current=x},[m,g,x]),!g||null==d||!d.message||"hidden"===l)return null;if(!v)return null;var b=r[v.id]||88,y=v.x,w=v.y+b+20,k=v.x+128,E=v.y+b/2,R=(k-y)/640*100,N=(E-w)/280*100,S={},C="translate(".concat(y,"px, ").concat(w,"px)");return"appearing"===l?S={animation:"popOut-".concat(y,"-").concat(w," 0.4s ease-out forwards")}:"disappearing"===l&&(S={animation:"shrinkIn-".concat(y,"-").concat(w,"-").concat(k,"-").concat(E," 0.3s ease-in forwards")}),React.createElement(React.Fragment,null,React.createElement("style",null,"\n @keyframes popOut-".concat(y,"-").concat(w," {\n 0% {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(0.3);\n opacity: 0;\n }\n 80% {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(1.05);\n opacity: 1;\n }\n 100% {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(1);\n opacity: 1;\n }\n }\n @keyframes shrinkIn-").concat(y,"-").concat(w,"-").concat(k,"-").concat(E," {\n from {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(1);\n opacity: 1;\n }\n to {\n transform: translate(").concat(k,"px, ").concat(E,"px) scale(0);\n opacity: 0;\n }\n }\n ")),React.createElement("div",{ref:h,className:"absolute pointer-events-none z-20",style:i(i({},"visible"!==l||S.animation?{}:{transform:C}),{},{transformOrigin:"".concat(R,"% ").concat(N,"%"),width:"".concat(640,"px"),maxHeight:"".concat(280,"px")},S)},React.createElement("div",{className:"absolute z-10 pointer-events-auto",style:{left:"".concat(128,"px"),transform:"translateX(-50%)",top:"-12px",width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderBottom:"12px solid ".concat(t?"rgba(255, 255, 255, 0.95)":"#ffffff"),filter:"drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1))"}}),React.createElement("div",{className:"bg-white rounded-2xl shadow-xl border-slate-300 overflow-hidden pointer-events-auto",style:{backgroundColor:t?"rgba(255, 255, 255, 0.95)":"#ffffff",borderWidth:"3px",maskImage:t?"linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3))":"none",WebkitMaskImage:t?"linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3))":"none"}},React.createElement("div",{className:"p-4 overflow-y-auto text-slate-800 text-sm leading-relaxed",style:{maxHeight:"".concat(280,"px")}},React.createElement(yo,{components:ua},d.message)))))};function ga(e){var t=e.agentTree,r=void 0===t?sa:t,o=e.activeNode,a=e.initialNodes,c=void 0===a?[]:a,d=e.initialEdges,p=void 0===d?[]:d,f=e.handleSave,h=e.handleView,m=e.handleEdit,g=e.initialEditable,x=void 0!==g&&g,v=e.currentMessage,b=e.handlePrompt,y=e.isFollowingActive,w=e.showPrompt,k=void 0===w?!o:w,E=e.handleCreateAgent,R=e.handleCancel,N=s(React.useState(c),2),S=N[0],C=N[1],z=s(React.useState(p),2),_=z[0],I=z[1],M=s(React.useState(""),2),T=M[0],O=M[1],P=s(React.useState(null),2),j=P[0],A=P[1];React.useEffect(function(){A(null)},[v]);var L,D="string"==typeof(L=v)?L:null==L?void 0:L.message,F=D===j?null:v,B=function(){T.trim()&&(b&&b({prompt:T}),O(""))},H=s(React.useState(x),2),U=H[0],V=H[1],q=s(React.useState({nodes:c,edges:p}),2),W=q[0],Y=q[1],X=s(React.useState(!1),2),Q=X[0],K=X[1],Z=s(React.useState(!0),2),$=Z[0],G=Z[1];React.useEffect(function(){y&&G(!0)},[y]);var J=s(React.useState(null),2),ee=J[0],te=J[1],ne=s(React.useState(null),2),re=ne[0],oe=ne[1],ae=s(React.useState({x:0,y:0}),2),ie=ae[0],le=ae[1],ce=s(React.useState(function(){try{var e=sessionStorage.getItem("teambuilder-pan");return e?JSON.parse(e):{x:0,y:0}}catch(e){return{x:0,y:0}}}),2),se=ce[0],ue=ce[1],de=s(React.useState(!1),2),pe=de[0],fe=de[1],he=s(React.useState({x:0,y:0}),2),me=he[0],ge=he[1],xe=s(React.useState(null),2),ve=xe[0],be=xe[1],ye=s(React.useState({}),2),we=ye[0],ke=ye[1],Ee=React.useRef(null),Re=React.useRef({}),Ne=React.useRef(null),Se=React.useRef(se),Ce=React.useRef(!1),ze=React.useRef(!1);React.useEffect(function(){Se.current=se},[se]);var _e=React.useCallback(function(){if(Ee.current){var e=i({},Se.current),t=performance.now();Ce.current=!0;var n=function(r){var o=r-t,a=Math.min(o/500,1),i=1-Math.pow(1-a,3),l={x:e.x*(1-i),y:e.y*(1-i)};ue(l),a<1?Ne.current=requestAnimationFrame(n):Ce.current=!1};Ne.current&&cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(n)}},[]),Ie=React.useCallback(function(){if(o&&Ee.current){var e=S.find(function(e){return o===e.data.agentPath.join("/")});if(e){var t=we[e.id]||88,n=Ee.current.clientWidth,r=.3*Ee.current.clientHeight,a=n/2-(e.x+128),l=r-(e.y+t/2),c=i({},Se.current),s=performance.now();Ce.current=!0;var u=function(e){var t=e-s,n=Math.min(t/600,1),r=1-Math.pow(1-n,3),o={x:c.x+(a-c.x)*r,y:c.y+(l-c.y)*r};ue(o),n<1?Ne.current=requestAnimationFrame(u):Ce.current=!1};Ne.current&&cancelAnimationFrame(Ne.current),Ne.current=requestAnimationFrame(u)}}},[o,S,we]);React.useEffect(function(){return function(){Ne.current&&cancelAnimationFrame(Ne.current)}},[]),React.useEffect(function(){$&&o&&Ie()},[o,$,Ie]),React.useEffect(function(){var e=Object.keys(we).length>0;$&&o&&e&&!ze.current&&(ze.current=!0,Ie())},[we,$,o,Ie]),React.useEffect(function(){},[o]),React.useEffect(function(){U&&G(!1)},[U]);var Me=React.useCallback(n(l().m(function e(){var t,n;return l().w(function(e){for(;;)switch(e.n){case 0:if(!f){e.n=1;break}return t=fa(S,_),n=1===t.length?t[0].id:null,e.n=1,f({nodes:S,edges:_,rootNodeId:n});case 1:Y({nodes:u(S),edges:u(_)}),V(!1);case 2:return e.a(2)}},e)})),[_,f,S]);React.useEffect(function(){if(Q){var e=function(e){"Escape"===e.key&&K(!1)};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}},[Q]),React.useEffect(function(){try{sessionStorage.setItem("teambuilder-pan",JSON.stringify(se))}catch(e){}},[se]),React.useEffect(function(){var e={};S.forEach(function(t){var n=Re.current[t.id];n&&(e[t.id]=n.offsetHeight)}),ke(e)},[S]);var Te=function(){te(null),oe(null),fe(!1)},Oe=function(e){var t=e.event,n=e.node;U&&(t.stopPropagation(),t.target.closest("button")||t.target.closest(".nodrag")||te({id:n.id,offsetX:ie.x-n.x,offsetY:ie.y-n.y}))},Pe=function(e){var t=e.id;C(S.filter(function(e){return e.id!==t})),I(_.filter(function(e){return e.source!==t&&e.target!==t})),delete Re.current[t]},je=function(e){var t=e.nodeId,n=e.path;C(S.map(function(e){return e.id===t?i(i({},e),{},{data:i(i({},e.data),{},{agentPath:n})}):e}))};return React.createElement("div",{className:"flex flex-col h-full min-h-[500px] w-full bg-slate-100 text-slate-900 font-sans overflow-hidden relative"},React.createElement("div",{className:"border-b border-slate-200 bg-white flex items-center px-[16px] justify-between z-10 shadow-sm",style:{height:"56px"}},React.createElement("div",{className:"flex items-center gap-[8px]"},React.createElement("div",{className:"p-[8px] bg-indigo-600 rounded text-white"},React.createElement(ra,{size:18})),React.createElement("h1",{className:"font-bold text-[18px] hidden sm:block"},"Team Builder")),React.createElement("div",{className:"flex items-center gap-[12px]"},!U&&(o?React.createElement("button",{onClick:function(){return G(!$)},className:"flex items-center gap-[8px] px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm ".concat($?"bg-green-500 hover:bg-green-600 text-white":"bg-blue-500 hover:bg-blue-600 text-white")},$?React.createElement(Mo,{size:16}):React.createElement(qo,{size:16}),"Follow Active Agent"):F?React.createElement("button",{onClick:function(){return A(D)},className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(Xo,{size:16})," Restart"):React.createElement("div",{className:"text-[12px] text-slate-500 hidden md:block"},"View Only Mode")),E&&!U&&React.createElement("button",{onClick:function(){return E()},className:"flex items-center gap-[8px] bg-indigo-600 hover:bg-indigo-700 text-white px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm",style:{color:"#fff"}},React.createElement(Wo,{size:16})," Create Agent"),U?React.createElement(React.Fragment,null,React.createElement("button",{onClick:function(){JSON.stringify(S)!==JSON.stringify(W.nodes)||JSON.stringify(_)!==JSON.stringify(W.edges)?K(!0):V(!1)},className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(oa,{size:16})," Cancel"),React.createElement("button",{onClick:Me,className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(Ko,{size:16})," Save"),React.createElement("button",{onClick:function(){var e,t,n=Math.random().toString(36).substr(2,9),r=-se.x+((null===(e=Ee.current)||void 0===e?void 0:e.clientWidth)||800)/2-100,o=-se.y+((null===(t=Ee.current)||void 0===t?void 0:t.clientHeight)||600)/2-50;C([].concat(u(S),[{id:n,x:r,y:o,data:{label:"New Node",agentPath:[]}}]))},className:"flex items-center gap-[8px] bg-indigo-600 hover:bg-indigo-700 text-white px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm",style:{color:"#fff"}},React.createElement(Wo,{size:16})," Add Node")):React.createElement("button",{onClick:function(){Y({nodes:u(S),edges:u(_)}),V(!0)},className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(Vo,{size:16})," Edit"))),React.createElement("div",{ref:Ee,className:"flex-1 relative overflow-hidden bg-grid-slate-200",style:{cursor:pe?"grabbing":"grab",backgroundSize:"40px 40px"},onMouseDown:function(e){0===e.button&&(e.target.closest("[data-node]")||(fe(!0),ge({x:e.clientX-se.x,y:e.clientY-se.y})))},onMouseMove:function(e){var t=Ee.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,o=n-se.x,a=r-se.y;if(le({x:o,y:a}),pe)return ue({x:e.clientX-me.x,y:e.clientY-me.y}),void($&&!Ce.current&&G(!1));ee&&C(function(e){return e.map(function(e){return e.id===ee.id?i(i({},e),{},{x:o-ee.offsetX,y:a-ee.offsetY}):e})})},onMouseUp:Te,onMouseLeave:Te},React.createElement("div",{className:"flex items-center gap-[8px] pointer-events-auto",style:{position:"absolute",top:"12px",right:"12px",zIndex:20}},R&&o&&React.createElement("button",{onClick:function(){return R()},className:"flex items-center gap-[6px] bg-red-600 hover:bg-red-700 text-white px-[12px] py-[6px] rounded-[8px] text-[12px] font-medium transition-colors shadow-sm",style:{color:"white"},title:"Cancel the current conversation"},React.createElement(oa,{size:14}),"Cancel Converse"),React.createElement("button",{onClick:_e,className:"flex items-center gap-[6px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-600 hover:text-slate-900 px-[12px] py-[6px] rounded-[8px] text-[12px] font-medium transition-colors shadow-sm",title:"Recenter grid"},React.createElement(Do,{size:14}),"Recenter")),React.createElement("div",{style:{transform:"translate(".concat(se.x,"px, ").concat(se.y,"px)"),width:"100%",height:"100%",position:"absolute",top:0,left:0,pointerEvents:"none"}},React.createElement("svg",{className:"absolute top-0 left-0 overflow-visible w-full h-full pointer-events-none z-0"},React.createElement("defs",null,React.createElement("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto"},React.createElement("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#64748b"})),React.createElement("marker",{id:"arrowhead-active",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto"},React.createElement("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#6366f1"}))),_.map(function(e){var t=S.find(function(t){return t.id===e.source}),n=S.find(function(t){return t.id===e.target});if(!t||!n)return null;var r=we[e.source]||88,o=we[e.target]||88,a=t.x+256,i=t.y+r/2,l=n.x,c=n.y+o/2,s=da(a,i,l,c);return React.createElement("g",{key:e.id,className:"pointer-events-auto group"},React.createElement("path",{d:s,strokeWidth:"15",stroke:"transparent",fill:"none",className:U?"cursor-pointer":"",onClick:function(){return t={id:e.id},n=t.id,void(U&&I(_.filter(function(e){return e.id!==n})));var t,n}}),React.createElement("path",{d:s,stroke:"#64748b",strokeWidth:"2",fill:"none",markerEnd:"url(#arrowhead)",className:"group-hover:stroke-red-500 transition-colors"}))}),re&&React.createElement("path",{d:da(re.x,re.y,ie.x,ie.y),stroke:"#6366f1",strokeWidth:"2",fill:"none",strokeDasharray:"5,5"})),React.createElement(ma,{activeNode:o,nodes:S,nodeHeights:we,currentMessage:F,pan:se,containerRef:Ee}),React.createElement("div",{className:"pointer-events-auto w-full h-full"},S.map(function(e){var t=o===e.data.agentPath.join("/"),n=e.data.agentPath.length>0?e.data.agentPath[e.data.agentPath.length-1]:"Select Agent...",a=e.data.agentPath.slice(0,-1).join(" > "),i=fa(S,_),l=ha(S,_)&&1===i.length&&i[0].id===e.id;return React.createElement(ca,{key:e.id,node:e,isActive:t,isRootNode:l,isEditing:U,agentName:n,breadcrumbs:a,agentTree:r,openSelectorId:ve,setOpenSelectorId:be,updateAgent:je,handleView:h,handleEdit:m,deleteNode:Pe,onNodeDragStart:Oe,nodeRef:function(t){return Re.current[e.id]=t},style:{transform:"translate(".concat(e.x,"px, ").concat(e.y,"px)")}},U&&React.createElement("div",{className:"absolute group-hover:scale-110 transition-transform pointer-events-none",style:{position:"absolute",left:"-12px",right:"auto",top:"50%",transform:"translateY(-50%)",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}},React.createElement("div",{className:"w-[12px] h-[12px] bg-white border-2 border-slate-400 rounded-full hover:border-indigo-500 hover:bg-indigo-50 cursor-crosshair pointer-events-auto",onMouseUp:function(t){return function(e){var t=e.event,n=e.nodeId,r=e.type;if(t.stopPropagation(),re&&"target"===r&&re.nodeId!==n){var o={id:"e".concat(re.nodeId,"-").concat(n,"-").concat(Date.now()),source:re.nodeId,target:n},a=_.find(function(e){return e.source===o.source&&e.target===o.target});a||I([].concat(u(_),[o]))}oe(null)}({event:t,nodeId:e.id,type:"target"})}})),U&&React.createElement("div",{className:"absolute group-hover:scale-110 transition-transform pointer-events-none",style:{position:"absolute",left:"auto",right:"-12px",top:"50%",transform:"translateY(-50%)",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}},React.createElement("div",{className:"w-[12px] h-[12px] bg-white border-2 border-slate-400 rounded-full hover:border-indigo-500 hover:bg-indigo-50 cursor-crosshair pointer-events-auto",onMouseDown:function(t){return function(e){var t=e.event,n=e.nodeId,r=e.type;if(U&&(t.stopPropagation(),"source"===r)){var o=S.find(function(e){return e.id===n}),a=we[n]||88;oe({nodeId:n,x:o.x+256,y:o.y+a/2})}}({event:t,nodeId:e.id,type:"source"})}})))})),!U&&b&&k&&!o&&React.createElement("div",{className:"absolute w-full max-w-2xl px-4 z-30 pointer-events-none",style:{bottom:"24px",left:"50%",transform:"translateX(-50%)"}},React.createElement("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 p-2 flex items-end gap-2 pointer-events-auto"},React.createElement("textarea",{value:T,onChange:function(e){return O(e.target.value)},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),B())},placeholder:"Message Team Builder...",className:"w-full max-h-32 min-h-[44px] py-3 px-4 bg-transparent border-0 focus:ring-0 resize-none text-slate-800 placeholder:text-slate-400 text-sm focus:outline-none",rows:1}),React.createElement("button",{onClick:B,disabled:!T.trim(),className:"p-2 rounded-xl mb-1 transition-colors ".concat(T.trim()?"bg-slate-900 text-white hover:bg-slate-700":"bg-slate-100 text-slate-300"),style:T.trim()?{color:"white"}:{}},React.createElement($o,{size:18})))))),React.createElement("div",{className:"h-8 bg-white border-t border-slate-200 flex items-center px-4 text-xs text-slate-400 justify-between"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("span",null,"Team: ",S.length," Agents, ",_.length," Connections"),S.length>0&&!ha(S,_)&&React.createElement("div",{className:"flex items-center gap-1 text-amber-600"},React.createElement(na,{size:14}),React.createElement("span",null,pa(S,_)?1!==fa(S,_).length?"Warning: Graph must have exactly 1 root node (found ".concat(fa(S,_).length,")"):"Warning: Invalid graph structure":"Warning: Not all nodes are connected"))),React.createElement("div",null,"Active: ",o||"None")),Q&&React.createElement("div",{className:"fixed inset-0 z-50 flex items-center justify-center"},React.createElement("div",{className:"absolute inset-0 bg-slate-900/40 backdrop-blur-sm",onClick:function(){return K(!1)}}),React.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"reset-dialog-title",className:"relative w-[92%] max-w-[420px] rounded-[12px] bg-white shadow-2xl border border-slate-200 p-[20px] animate-in fade-in zoom-in-95 duration-150"},React.createElement("div",{className:"flex items-start gap-[12px]"},React.createElement("div",{className:"flex h-[36px] w-[36px] items-center justify-center rounded-full bg-red-50 text-red-600"},React.createElement(ta,{size:18})),React.createElement("div",{className:"flex-1"},React.createElement("h2",{id:"reset-dialog-title",className:"text-[16px] font-semibold text-slate-900"},"Discard unsaved changes?"),React.createElement("p",{className:"mt-[6px] text-[13px] text-slate-600"},"This will reset the canvas back to your last saved state."))),React.createElement("div",{className:"mt-[18px] flex items-center justify-end gap-[8px]"},React.createElement("button",{onClick:function(){return K(!1)},className:"px-[12px] py-[8px] text-[13px] font-medium text-slate-700 hover:text-slate-900"},"Keep Editing"),React.createElement("button",{onClick:function(){C(W.nodes),I(W.edges),V(!1),K(!1)},className:"px-[14px] py-[8px] rounded-[6px] bg-red-600 text-white text-[13px] font-medium hover:bg-red-700 transition-colors"},"Reset Changes")))))}var xa=function(e){var t=e.data,n=e.title,o=void 0===n?"Wikipedia LLM Explorer":n,a=e.categoryColors,l=s(React.useState(null==t?void 0:t.id),2),c=l[0],u=l[1],d=s(React.useState(new Set([null==t?void 0:t.id])),2),p=d[0],f=d[1],h=s(React.useState(1),2),m=h[0],g=h[1],x=s(React.useState({x:0,y:0}),2),v=x[0],b=x[1],y=s(React.useState(!1),2),w=y[0],k=y[1],E=s(React.useState(!0),2),R=E[0],N=E[1],S=!!(a&&Object.keys(a).length>0),C=function(e){return S?null==a?void 0:a[e]:void 0},z=React.useRef(null),_=React.useRef({x:0,y:0}),I=React.useMemo(function(){var e=[],n=function(t,r,o,a,l,c){var s=p.has(t.id);if(e.push(i(i({},t),{},{x:r,y:o,isExpanded:s,depth:c})),s&&t.children){var u=t.children.length,d=(l-a)/u,f=240-15*c;t.children.forEach(function(e,t){var i=a+d*t+d/2,l=r+Math.cos(i)*f,s=o+Math.sin(i)*f;n(e,l,s,i-d/2,i+d/2,c+1)})}};return t&&n(t,0,0,0,2*Math.PI,0),e},[p]),M=React.useMemo(function(){var e=function(t){if(t.id===c)return t;if(t.children){var n,o=r(t.children);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=e(a);if(i)return i}}catch(e){o.e(e)}finally{o.f()}}return null};return e(t)},[c]);React.useEffect(function(){var e=I.find(function(e){return e.id===c});e&&(N(!0),b({x:-e.x,y:-e.y}))},[c]);var T=function(e){u(e),f(function(t){var n=new Set(t);return n.has(e)||n.add(e),n})},O=function(){k(!1)},P=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(n.children){if(n.children.some(function(t){return t.id===e}))return n;var o,a=r(n.children);try{for(a.s();!(o=a.n()).done;){var i=o.value,l=P(e,i);if(l)return l}}catch(e){a.e(e)}finally{a.f()}}return null};return React.createElement("div",{className:"flex h-full w-full bg-zinc-50 text-zinc-900 font-sans overflow-hidden transition-colors duration-500",onMouseMove:function(e){if(w){var t=(e.clientX-_.current.x)/m,n=(e.clientY-_.current.y)/m;b(function(e){return{x:e.x+t,y:e.y+n}}),_.current={x:e.clientX,y:e.clientY}}},onMouseUp:O,onMouseLeave:O},React.createElement("div",{className:"w-96 bg-white border-r border-zinc-200 flex flex-col z-20 shadow-xl overflow-hidden"},React.createElement("div",{className:"p-6 border-b border-zinc-100 flex items-center justify-between bg-white/80 backdrop-blur-md sticky top-0"},React.createElement("div",{className:"flex items-center gap-3"},React.createElement("div",{className:"p-2 bg-violet-600 rounded-lg shadow-lg shadow-violet-200"},React.createElement(Uo,{size:20,className:"text-white w-5 h-5"})),React.createElement("div",null,React.createElement("h1",{className:"text-lg font-bold tracking-tight text-zinc-900"},"Concept Map"),React.createElement("p",{className:"text-[10px] text-zinc-400 uppercase font-bold tracking-wider"},o)))),React.createElement("div",{className:"flex-1 overflow-y-auto custom-scrollbar bg-white"},M?React.createElement("div",{className:"p-8 animate-in fade-in slide-in-from-left-4 duration-500"},React.createElement("div",{className:"flex items-center gap-2 mb-4"},React.createElement("span",{className:"px-2.5 py-0.5 rounded-full text-[10px] uppercase font-bold tracking-widest border",style:{backgroundColor:C(M.category)?"".concat(C(M.category),"10"):"transparent",color:C(M.category)||"#18181b",borderColor:C(M.category)?"".concat(C(M.category),"20"):"#d4d4d8"}},M.category),P(M.id)&&React.createElement("span",{className:"text-zinc-400 text-xs flex items-center gap-1"},React.createElement(Oo,{size:12,className:"w-3 h-3"}),P(M.id).label)),React.createElement("h2",{className:"text-3xl font-extrabold mb-6 leading-tight tracking-tight text-zinc-900"},M.label),React.createElement("div",{className:"prose prose-zinc max-w-none"},React.createElement(yo,{className:"text-zinc-600 leading-relaxed text-lg mb-8"},M.content)),M.children&&React.createElement("div",{className:"mt-10"},React.createElement("h3",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-[0.2em] mb-4 flex items-center gap-2"},"Sub-Dimensions ",React.createElement("div",{className:"h-px flex-1 bg-zinc-100"})),React.createElement("div",{className:"grid gap-2"},M.children.map(function(e){return React.createElement("button",{key:e.id,onClick:function(){return T(e.id)},className:"group flex items-center justify-between p-4 rounded-xl bg-zinc-50 hover:bg-zinc-100 border border-zinc-100 hover:border-zinc-200 transition-all duration-300"},React.createElement("div",{className:"flex items-center gap-3"},React.createElement("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:C(e.category)||"#18181b"}}),React.createElement("span",{className:"text-sm font-semibold text-zinc-700 group-hover:text-zinc-900 transition-colors"},e.label)),React.createElement(Wo,{size:14,className:"text-zinc-300 group-hover:text-zinc-500 transition-transform group-hover:rotate-90 w-3.5 h-3.5"}))})))):React.createElement("div",{className:"h-full flex flex-col items-center justify-center p-12 text-center"},React.createElement("div",{className:"w-16 h-16 rounded-full bg-zinc-100 flex items-center justify-center mb-6"},React.createElement(_o,{size:32,className:"text-zinc-300 w-8 h-8"})),React.createElement("h3",{className:"text-xl font-bold text-zinc-900 mb-2"},"Select a Topic"),React.createElement("p",{className:"text-zinc-400 text-sm"},"Pick a node on the map to explore its underlying principles and history.")))),React.createElement("div",{ref:z,onMouseDown:function(e){(e.target===z.current||e.target.closest(".pan-area"))&&(k(!0),N(!1),_.current={x:e.clientX,y:e.clientY})},className:"flex-1 relative bg-zinc-50 overflow-hidden select-none cursor-grab ".concat(w?"cursor-grabbing":"")},React.createElement("div",{className:"absolute inset-0 pointer-events-none pan-area"},React.createElement("div",{className:"h-full w-full opacity-40",style:{backgroundImage:"radial-gradient(#e4e4e7 1px, transparent 1px)",backgroundSize:"32px 32px"}})),React.createElement("div",{className:"absolute inset-0 pointer-events-none ".concat(R?"transition-transform duration-700 ease-in-out":""),style:{transform:"scale(".concat(m,") translate(calc(50% + ").concat(v.x,"px), calc(50% + ").concat(v.y,"px))"),transformOrigin:"0 0"}},React.createElement("svg",{className:"absolute inset-0 overflow-visible pointer-events-none"},I.map(function(e){var t=I.find(function(t){var n;return null===(n=t.children)||void 0===n?void 0:n.some(function(t){return t.id===e.id})});return t?React.createElement("line",{key:"line-".concat(e.id),x1:t.x,y1:t.y,x2:e.x,y2:e.y,stroke:C(e.category)||"#d4d4d8",strokeWidth:"2.5",strokeOpacity:"0.15",strokeDasharray:"4 4"}):null})),I.map(function(e){return React.createElement("div",{key:e.id,onClick:function(t){t.stopPropagation(),T(e.id)},className:"\n absolute cursor-pointer transition-all duration-300 ease-out\n flex items-center justify-center rounded-full border-2 \n group hover:shadow-[0_8px_24px_rgba(0,0,0,0.08)]\n pointer-events-auto\n ".concat(c===e.id?"z-20 scale-110 shadow-xl":"scale-100 z-10","\n "),style:{width:Math.max(90,140-20*e.depth),height:Math.max(90,140-20*e.depth),left:e.x,top:e.y,transform:"translate(-50%, -50%)",backgroundColor:c===e.id&&C(e.category)?C(e.category):"white",borderColor:c===e.id?C(e.category)?"transparent":"#111827":C(e.category)?"".concat(C(e.category),"40"):"#d4d4d8"}},React.createElement("div",{className:"flex flex-col items-center p-3 text-center"},React.createElement("span",{className:"\n text-[11px] md:text-xs font-bold leading-tight\n ".concat(c===e.id&&C(e.category)?"text-white":"text-zinc-700 group-hover:text-zinc-900","\n ")},e.label),e.children&&React.createElement("div",{className:"\n mt-1.5 px-2 py-0.5 rounded-full text-[8px] font-black uppercase tracking-tighter\n ".concat(c===e.id&&C(e.category)?"bg-white/20 text-white":"bg-zinc-100 text-zinc-400 group-hover:bg-zinc-200","\n ")},p.has(e.id)?"Collapse":"+".concat(e.children.length))))})),React.createElement("div",{className:"absolute bottom-8 right-8 !left-auto !top-auto !w-fit !h-fit flex flex-col gap-3"},React.createElement("div",{className:"flex bg-white/90 backdrop-blur-md border border-zinc-200 rounded-2xl p-1 shadow-lg shadow-zinc-200/50"},React.createElement("button",{onClick:function(){N(!0),g(function(e){return Math.min(e+.2,2)})},className:"p-3 hover:bg-zinc-100 rounded-xl transition-colors text-zinc-400 hover:text-zinc-900",title:"Zoom In"},React.createElement(Wo,{size:18,className:"w-[18px] h-[18px]"})),React.createElement("div",{className:"w-px h-6 bg-zinc-200 self-center"}),React.createElement("button",{onClick:function(){N(!0),g(function(e){return Math.max(e-.2,.5)})},className:"p-3 hover:bg-zinc-100 rounded-xl transition-colors text-zinc-400 hover:text-zinc-900",title:"Zoom Out"},React.createElement(Bo,{size:18,className:"w-[18px] h-[18px]"})),React.createElement("div",{className:"w-px h-6 bg-zinc-200 self-center"}),React.createElement("button",{onClick:function(){N(!0),b({x:0,y:0})},className:"p-3 hover:bg-zinc-100 rounded-xl transition-colors text-zinc-400 hover:text-zinc-900",title:"Reset View"},React.createElement(Ho,{size:18,className:"w-[18px] h-[18px]"}))),S&&React.createElement("div",{className:"bg-white/90 backdrop-blur-md border border-zinc-200 rounded-2xl p-4 shadow-lg shadow-zinc-200/50"},React.createElement("h4",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-widest mb-3"},"Key"),React.createElement("div",{className:"space-y-2"},Object.entries(a).map(function(e){var t=s(e,2),n=t[0],r=t[1];return React.createElement("div",{key:n,className:"flex items-center gap-3"},React.createElement("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:r}}),React.createElement("span",{className:"text-[11px] font-bold text-zinc-500 capitalize"},n))})))),React.createElement("div",{className:"absolute top-8 right-8 !left-auto !bottom-auto !w-fit !h-fit bg-zinc-900 text-white px-4 py-2 rounded-full text-xs font-bold shadow-xl flex items-center gap-2"},React.createElement(Ho,{size:14,className:"text-zinc-400 w-3.5 h-3.5"}),React.createElement("span",{className:"whitespace-nowrap"},"Drag background to pan"))),React.createElement("style",null,"\n .custom-scrollbar::-webkit-scrollbar {\n width: 5px;\n }\n .custom-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: #e4e4e7;\n border-radius: 10px;\n }\n .custom-scrollbar::-webkit-scrollbar-thumb:hover {\n background: #d4d4d8;\n }\n .cursor-grab { cursor: grab; }\n .cursor-grabbing { cursor: grabbing; }\n "))},va=function(e){var t=e.anim,n=s(React.useState({x:t.startX,y:t.startY}),2),r=n[0],o=n[1];return React.useEffect(function(){var e,n;return e=requestAnimationFrame(function(){n=requestAnimationFrame(function(){o({x:t.endX,y:t.endY})})}),function(){cancelAnimationFrame(e),n&&cancelAnimationFrame(n)}},[t]),React.createElement("div",{className:"pointer-events-none",style:{position:"absolute",left:0,top:0,transform:"translate(".concat(r.x,"px, ").concat(r.y,"px)"),width:"12px",height:"12px",marginLeft:"-6px",marginTop:"-6px",borderRadius:"50%",backgroundColor:t.color,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1)",zIndex:100,boxShadow:"0 0 10px ".concat(t.color)}})};function ba(e){var t=e.teamName,n=void 0===t?"Decentralised Team":t,r=e.agents,o=void 0===r?[]:r,a=e.taskQueue,l=void 0===a?[]:a,c=e.agentTree,d=void 0===c?{}:c,p=e.activeAgentId,f=void 0===p?null:p,h=e.onAgentUpdate,m=void 0===h?function(){}:h,g=e.onAgentView,x=void 0===g?function(){}:g,v=e.onTaskClick,b=void 0===v?function(){}:v,y=s(React.useState(null),2),w=y[0],k=y[1],E=s(React.useState(!1),2),R=E[0],N=E[1],S=s(React.useState({}),2)[1],C=React.useRef({}),z=React.useRef(null),_=React.useRef(0),I=React.useRef(new Set),M=s(React.useState([]),2),T=M[0],O=M[1];React.useEffect(function(){var e=[];l.forEach(function(t){var n=C.current[t.id];n&&("pending"===n.status&&"in-progress"===t.status?e.push({task:t,type:"pickup"}):"in-progress"===n.status&&"completed"===t.status&&(e.push({task:i(i({},t),{},{assigneeId:n.assigneeId||t.assigneeId}),type:"complete"}),I.current.add(t.id),setTimeout(function(){I.current.delete(t.id),S({})},1e3)))}),e.length>0&&requestAnimationFrame(function(){var t,n=null===(t=z.current)||void 0===t?void 0:t.getBoundingClientRect();if(n){var r=e.map(function(e){var t=e.task,r=e.type,a=document.getElementById("task-".concat(t.id)),i=document.getElementById("agent-".concat(t.assigneeId));if(a||"complete"!==r||(a=document.getElementById("task-queue-sidebar")),a&&i){var l,c=a.getBoundingClientRect(),s=i.getBoundingClientRect(),u=c.left+c.width/2-n.left,d=c.top+c.height/2-n.top,p=s.left+s.width/2-n.left,f=s.top+s.height/2-n.top,h=o.find(function(e){return e.id===t.assigneeId}),m=(null==h||null===(l=h.data)||void 0===l?void 0:l.colour)||"#94a3b8";return{id:_.current++,startX:"pickup"===r?u:p,startY:"pickup"===r?d:f,endX:"pickup"===r?p:u,endY:"pickup"===r?f:d,color:m}}return null}).filter(Boolean);r.length>0&&(O(function(e){return[].concat(u(e),u(r))}),setTimeout(function(){O(function(e){return e.filter(function(e){return!r.find(function(t){return t.id===e.id})})})},1e3))}});var t={};l.forEach(function(e){t[e.id]={status:e.status,assigneeId:e.assigneeId}}),C.current=t},[l,o,R]);var P=R?l:l.filter(function(e){if("completed"!==e.status)return!0;var t=C.current[e.id];return!(!t||"in-progress"!==t.status)||!!I.current.has(e.id)});return React.createElement("div",{ref:z,className:"flex flex-col h-full min-h-[500px] w-full bg-slate-50 text-slate-900 font-sans overflow-hidden relative"},T.map(function(e){return React.createElement(va,{key:e.id,anim:e})}),React.createElement("div",{className:"border-b border-slate-200 bg-white flex items-center px-4 justify-between shadow-sm h-14 shrink-0"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("div",{className:"p-2 bg-purple-600 rounded text-white"},React.createElement(ra,{size:18})),React.createElement("h1",{className:"font-bold text-lg hidden sm:block"},n)),React.createElement("div",{className:"flex items-center gap-4 text-sm font-medium text-slate-600"},React.createElement("span",null,o.length," Active Agents"),React.createElement("span",{className:"w-px h-4 bg-slate-300"}),React.createElement("span",null,l.filter(function(e){return"pending"===e.status}).length," Tasks Pending"))),React.createElement("div",{className:"flex flex-1 overflow-hidden flex-col md:flex-row"},React.createElement("div",{id:"task-queue-sidebar",className:"w-full md:w-80 bg-white border-r border-slate-200 flex flex-col shrink-0 overflow-hidden shadow-sm z-10"},React.createElement("div",{className:"p-4 border-b border-slate-100 bg-slate-50 flex items-center justify-between gap-2"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement(Fo,{size:18,className:"text-slate-500"}),React.createElement("h2",{className:"font-semibold text-slate-700"},"Task Queue")),React.createElement("label",{className:"flex items-center gap-2 text-xs text-slate-500 cursor-pointer"},React.createElement("input",{type:"checkbox",checked:R,onChange:function(e){return N(e.target.checked)},className:"rounded border-slate-300 text-purple-600 focus:ring-purple-500"}),"Show Completed")),React.createElement("div",{className:"flex-1 overflow-y-auto p-3 space-y-2"},0===P.length?React.createElement("div",{className:"text-center p-8 text-slate-400 text-sm"},0===l.length?"No tasks in queue. External events will add tasks here.":"No tasks match current filters."):P.map(function(e){return React.createElement("div",{key:e.id,id:"task-".concat(e.id),onClick:function(){return b(e)},className:"p-3 rounded-lg border cursor-pointer transition-all ".concat("completed"===e.status?"bg-slate-50 border-slate-200 opacity-60":"in-progress"===e.status?"bg-blue-50 border-blue-200 shadow-sm":"bg-white border-slate-200 hover:border-purple-300 shadow-sm")},React.createElement("div",{className:"flex items-start justify-between gap-2 mb-2"},React.createElement("h3",{className:"font-medium text-sm text-slate-800 line-clamp-2"},e.title),"completed"===e.status?React.createElement(Po,{size:16,className:"text-green-500 shrink-0"}):"in-progress"===e.status?React.createElement(jo,{size:16,className:"text-blue-500 animate-spin shrink-0"}):React.createElement("div",{className:"w-2 h-2 rounded-full bg-slate-300 mt-1 shrink-0"})),React.createElement("div",{className:"flex items-center justify-end mt-2"},e.assigneeId&&function(t,n){var r=o.find(function(t){return t.id===e.assigneeId}),a=null==r||null===(t=r.data)||void 0===t?void 0:t.colour,i=(null==r||null===(n=r.data)||void 0===n||null===(n=n.agentPath)||void 0===n||null===(n=n.slice(-1))||void 0===n?void 0:n[0])||"Assigned";return React.createElement("div",{className:"flex items-center gap-[6px] text-xs text-slate-500 bg-white px-2 py-0.5 rounded border border-slate-200 max-w-[120px]"},a&&React.createElement("div",{className:"w-[8px] h-[8px] rounded-full shrink-0",style:{backgroundColor:a}}),React.createElement("span",{className:"truncate block"},i))}()))}))),React.createElement("div",{className:"flex-1 overflow-y-auto bg-slate-100/50 p-6"},0===o.length?React.createElement("div",{className:"h-full flex flex-col items-center justify-center text-slate-400"},React.createElement(ra,{size:48,className:"mb-4 opacity-20"}),React.createElement("p",{className:"text-lg font-medium text-slate-500"},"No Active Agents"),React.createElement("p",{className:"text-sm mt-2 max-w-sm text-center"},"Connect external processes to spawn agents dynamically.")):React.createElement("div",{className:"flex flex-wrap gap-6 items-start content-start"},o.map(function(e){var t,n,r=f===e.id||Array.isArray(f)&&f.includes(e.id),o=(null===(t=e.data)||void 0===t?void 0:t.agentPath)||[],a=o.length>0?o[o.length-1]:"Unassigned Agent",i=o.slice(0,-1).join(" > ");return React.createElement("div",{key:e.id,id:"agent-".concat(e.id),className:"transition-all duration-300 animate-in fade-in zoom-in-95"},React.createElement(ca,{node:e,isActive:r,isRootNode:!1,isEditing:!0,agentName:a,breadcrumbs:i,agentTree:d,openSelectorId:w,setOpenSelectorId:k,updateAgent:function(e){var t=e.nodeId,n=e.path;return m(t,n)},handleView:x,isAbsolute:!1,style:{margin:0},colour:null===(n=e.data)||void 0===n?void 0:n.colour}))})))))}var ya=function(e,t){return t[e.split("/")[1]||"Default"]||t.Default||"#a1a1aa"},wa=function(e){var t=e.replace("#",""),n=parseInt(t.substring(0,2),16)/255,r=parseInt(t.substring(2,4),16)/255,o=parseInt(t.substring(4,6),16)/255,a=Math.max(n,r,o),i=Math.min(n,r,o),l=(a+i)/2,c=0,s=0;if(a!==i){var u=a-i;switch(s=l>.5?u/(2-a-i):u/(a+i),a){case n:c=((r-o)/u+(r<o?6:0))/6;break;case r:c=((o-n)/u+2)/6;break;case o:c=((n-r)/u+4)/6}}c=(c+.5)%1,s=Math.min(1,1.2*s);var d=l<.5?Math.min(.85,l+.35):Math.max(.6,l),p=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},f=d<.5?d*(1+s):d+s-d*s,h=2*d-f,m=Math.round(255*p(h,f,c+1/3)),g=Math.round(255*p(h,f,c)),x=Math.round(255*p(h,f,c-1/3));return"#".concat(m.toString(16).padStart(2,"0")).concat(g.toString(16).padStart(2,"0")).concat(x.toString(16).padStart(2,"0"))},ka=function(e){return e.length>16?e.substring(0,16)+"...":e},Ea=function(e,t){var n=t[e.path.split("/")[1]||"Default"];if(n)return n.label;var r=e.path.split("/").filter(function(e){return e}),o=r[r.length-1]||e.name;return ka(o)},Ra=function(e,t){var n=t[e.path.split("/")[1]||"Default"];return n&&void 0!==n.opacity?n.opacity:1},Na=function(e,t){var n=e.toLowerCase(),r=t.toLowerCase(),o=n.replace(/\s+/g,""),a=r.replace(/\s+/g,"");if(a===o)return 1e3;if(a.startsWith(o))return 900+o.length/a.length*50;if(a.includes(o))return 800+o.length/a.length*50;for(var i=0,l=0,c=-1,s=0,u=0;u<r.length&&i<o.length;u++)r[u]===o[i]?((c===u-1||c>=0&&/^[\s\/_\-\.]+$/.test(r.slice(c+1,u)))&&(s+=10),(0===u||/[\s\/_\-\.]/.test(r[u-1]))&&(l+=15),l+=10+s,c=u,i++):s=0;return i!==o.length?-1:(l-=.5*(t.length-e.length),Math.max(0,l))},Sa=function(e){var t=e.data,n=e.onSelect,r=e.allowedTypes,o=s(React.useState(!1),2),a=o[0],i=o[1],l=s(React.useState(""),2),c=l[0],u=l[1],d=s(React.useState(0),2),p=d[0],f=d[1],h=React.useRef(null),m=React.useRef(null),g=React.useMemo(function(){if(!c.trim()||!t)return[];var e=c.trim(),n=[],o=!r||r.includes("object"),a=!r||r.includes("function");return o&&t.objects.forEach(function(t){var r=Na(e,t.name),o=Na(e,t.path),a=Math.max(r,o);a>=0&&n.push({type:"object",item:t,matchField:r>=o?"name":"path",score:a})}),a&&t.functions.forEach(function(t){var r=Na(e,t.name),o=Na(e,t.objectPath),a=Math.max(r,o);a>=0&&n.push({type:"function",item:t,matchField:r>=o?"name":"path",score:a})}),n.sort(function(e,t){return t.score-e.score}).slice(0,20)},[c,t,r]);React.useEffect(function(){f(0)},[c]),React.useEffect(function(){if(m.current&&g.length>0){var e=m.current.children[p];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[p,g.length]);var x=React.useCallback(function(e){i(!1),u(""),f(0),n(e)},[n]),v=React.useCallback(function(){i(!0),setTimeout(function(){var e;return null===(e=h.current)||void 0===e?void 0:e.focus()},0)},[]),b=React.useCallback(function(){i(!1),u(""),f(0)},[]),y=React.useCallback(function(e){"Enter"===e.key&&g.length>0?x(g[p]):"ArrowDown"===e.key?(e.preventDefault(),f(function(e){return e<g.length-1?e+1:e})):"ArrowUp"===e.key&&(e.preventDefault(),f(function(e){return e>0?e-1:0}))},[g,p,x]);return{searchOpen:a,searchQuery:c,setSearchQuery:u,searchResults:g,selectedSearchIndex:p,setSelectedSearchIndex:f,searchInputRef:h,searchResultsRef:m,handleSearchSelect:x,handleSearchKeyDown:y,openSearch:v,closeSearch:b}},Ca=function(e){return"string"==typeof e?e:e.id},za=function(e){var t=e.d3,n=e.svgRef,r=e.graphData,o=e.rootId,a=e.pathColors,l=e.specialLabels,c=e.loading,s=e.setStatusBarText,u=e.clickedFunctionNode,d=e.setClickedFunctionNode,p=e.clickedObject,f=e.setClickedObject,h=React.useRef(null),m=React.useRef(null),g=React.useRef(null),x=React.useRef(null),v=React.useRef(null),b=React.useRef(null),y=React.useRef(!1);React.useEffect(function(){m.current=u},[u]),React.useEffect(function(){g.current=p},[p]);var w=React.useCallback(function(){t&&n.current&&t.select(n.current).transition().call(t.zoom().scaleBy,1.2)},[t,n]),k=React.useCallback(function(){t&&n.current&&t.select(n.current).transition().call(t.zoom().scaleBy,.8)},[t,n]),E=React.useCallback(function(e,r){if(t&&n.current&&x.current){var o=t.select(n.current),a=n.current.clientWidth,i=n.current.clientHeight,l=(v.current||t.zoomIdentity).k,c=t.zoomIdentity.translate(a/2,i/2).scale(l).translate(-e,-r);o.transition().duration(500).ease(t.easeCubicInOut).call(x.current.transform,c)}},[t,n]);return React.useEffect(function(){return window.__panToNode=E,function(){delete window.__panToNode}},[E]),React.useEffect(function(){if(t&&n.current&&0!==r.nodes.length){y.current=!1;var e=n.current.clientWidth,c=n.current.clientHeight;h.current&&h.current.stop();var u=r.nodes.map(function(e){return i({},e)}),p=r.links.map(function(e){return i({},e)}),w=t.forceSimulation(u).force("center",t.forceCenter(e/2,c/2)).force("link",t.forceLink(p).id(function(e){return e.id}).distance(function(e){return"structure"===e.type?35:80}).strength(function(e){return"structure"===e.type?1:.1})).force("charge",t.forceManyBody().strength(function(e){return"object_anchor"===e.type?-400:-20})).force("collide",t.forceCollide(function(e){return"object_anchor"===e.type?45:8})).force("category",function(e){for(var t=u.filter(function(e){return"object_anchor"===e.type}),n=0;n<t.length;n++)for(var r=n+1;r<t.length;r++){var o=t[n],a=t[r];if(o.root===a.root){var i=a.x-o.x,l=a.y-o.y,c=Math.sqrt(i*i+l*l)||1,s=.05*e*c,d=i/c*s,p=l/c*s;o.vx+=d,o.vy+=p,a.vx-=d,a.vy-=p}}}),k=t.select(n.current),R=k.select(".hulls"),N=k.select(".links"),S=k.select(".path-links"),C=k.select(".nodes"),z=k.select(".labels"),_=p.filter(function(e){return"structure"!==e.type}),I=N.selectAll("line").data(_).join("line").attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}).attr("marker-end","url(#arrow-default)"),M=u.filter(function(e){return"function"===e.type}),T=C.selectAll("g").data(M).join("g").call(t.drag().on("start",function(e,t){e.active||w.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y}).on("drag",function(e,t){t.fx=e.x,t.fy=e.y}).on("end",function(e,t){e.active||w.alphaTarget(0),t.fx=null,t.fy=null}));T.selectAll("*").remove(),T.append("circle").attr("r",function(e){return e.r}).attr("fill",function(e){return ya(e.root||e.path,a)}).attr("stroke","#475569").attr("stroke-width",1.5).attr("cursor","pointer"),T.filter(function(e){return e.isRoot}).append("path").attr("d","M-5 1 L0 -4 L5 1 V6 H2 V2 H-2 V6 H-5 Z").attr("fill","none").attr("stroke","#475569").attr("stroke-width",1.5).attr("stroke-linejoin","round").attr("pointer-events","none");var O=function(e){var t=e.d3,n=e.pathColors,r=e.setStatusBarText,o=e.setClickedFunctionNode,a=e.setClickedObject,i=e.clickedFunctionNodeRef,l=e.link,c=e.node;return{handleMouseOver:function(e,o){var a,l;if((null===(a=i.current)||void 0===a?void 0:a.id)!==o.id){var c=t.select(e.currentTarget),s=ya(o.root||o.path,n),u="".concat(o.objectPath,"/").concat(o.name,"()");r(u),c.select("circle").transition().duration(200).attr("r",12).attr("fill",(null===(l=t.color(s))||void 0===l||null===(l=l.brighter(.8))||void 0===l?void 0:l.toString())||"#fff").attr("stroke","#475569").attr("stroke-width",3),c.append("text").text(o.name).attr("x",15).attr("y",5).attr("class","node-label").attr("fill","#0f172a").attr("font-size","16px").attr("font-weight","bold").style("text-shadow","0px 2px 4px rgba(255,255,255,0.8)").style("pointer-events","none").style("opacity",0).transition().duration(200).style("opacity",1)}},handleMouseOut:function(e,o){var a;r("");var l=t.select(e.currentTarget);if((null===(a=i.current)||void 0===a?void 0:a.id)!==o.id)l.select("circle").transition().duration(200).attr("r",6).attr("fill",ya(o.root||o.path,n)).attr("stroke","#475569").attr("stroke-width",1.5),l.select(".node-label").remove();else{var c=ya(o.root||o.path,n),s=wa(c),u="0 0 8px ".concat(c,", 0 0 16px ").concat(c,", 0 0 24px ").concat(c,", 0 0 32px ").concat(c);l.select(".node-label").attr("fill",s).attr("font-size","24px").style("text-shadow",u)}},handleClick:function(e,r,s){var u;if(e.stopPropagation(),(null===(u=i.current)||void 0===u?void 0:u.id)!==r.id){i.current&&i.current.id!==r.id&&window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick(),o(r),i.current=r,a(null),window.__panToNode&&void 0!==r.x&&void 0!==r.y&&window.__panToNode(r.x,r.y);var d=t.select(e.currentTarget);d.select("circle").transition().duration(200).attr("r",12).attr("stroke","#475569").attr("stroke-width",3).attr("filter","brightness(1.5)");var p=ya(r.root||r.path,n),f=wa(p),h="0 0 8px ".concat(p,", 0 0 16px ").concat(p,", 0 0 24px ").concat(p,", 0 0 32px ").concat(p);d.select(".node-label").empty()?d.append("text").text(r.name).attr("x",15).attr("y",5).attr("class","node-label").attr("fill",f).attr("font-size","24px").attr("font-weight","bold").style("text-shadow",h).style("pointer-events","none"):d.select(".node-label").transition().duration(200).attr("font-size","24px").attr("fill",f).style("text-shadow",h);var m=new Set,g=new Set;l.each(function(e){var n=e.target.id===r.id,o=e.source.id===r.id;(n||o)&&(t.select(this).transition().duration(200).attr("stroke",n?"#4ade80":"#f472b6").attr("stroke-opacity",1).attr("stroke-width",3).attr("marker-end",n?"url(#arrow-input)":"url(#arrow-output)"),n&&m.add(e.source.id),o&&g.add(e.target.id))}),c.each(function(e){if(e.id!==r.id&&(m.has(e.id)||g.has(e.id))){var n=m.has(e.id)?"#4ade80":"#f472b6",o=t.select(this);o.style("opacity",1).select("circle").transition().duration(200).attr("fill",n).attr("r",8).attr("stroke","#475569").attr("stroke-width",2),o.append("text").text(e.name).attr("x",15).attr("y",5).attr("class","neighbor-label").attr("fill",n).attr("font-size","14px").attr("font-weight","bold").style("text-shadow","0px 2px 4px rgba(255,255,255,0.8)").style("pointer-events","none").style("opacity",0).transition().duration(200).style("opacity",1)}});var x=function(){o(null),i.current=null,d.select("circle").transition().duration(200).attr("r",6).attr("fill",ya(r.root||r.path,n)).attr("stroke","#475569").attr("stroke-width",1.5).attr("filter",null),d.select(".node-label").remove(),l.transition().duration(200).attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}).attr("marker-end","url(#arrow-default)"),c.each(function(){t.select(this).select(".neighbor-label").remove()}),c.transition().duration(200).style("opacity",1).select("circle").attr("fill",function(e){return ya(e.root||e.path,n)}).attr("r",6).attr("stroke","#475569").attr("stroke-width",1.5),s.on("click.function-reset",null)};window.__resetFunctionNodeClick=x,setTimeout(function(){s.on("click.function-reset",function(e){e.target.closest("g")&&e.target.closest("g").__data__&&e.target.closest("g").__data__.id===r.id||x()})},100)}else window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick()}}}({d3:t,pathColors:a,setStatusBarText:s,setClickedFunctionNode:d,setClickedObject:f,clickedFunctionNodeRef:m,link:I,node:T});if(T.on("mouseover",O.handleMouseOver).on("mouseout",O.handleMouseOut).on("click",function(e,t){return O.handleClick(e,t,k)}),o){var P=T.filter(function(e){return e.id===o});P.empty()||m.current||setTimeout(function(){if(!m.current){var e=P.node();if(e){var t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}}},0)}var j=u.filter(function(e){return"object_anchor"===e.type}),A=z.selectAll("text").data(j).join("text").text(function(e){return Ea(e,l)}).attr("font-size","24px").attr("font-weight","bold").attr("fill","#334155").attr("fill-opacity",function(e){return Ra(e,l)}).attr("text-anchor","middle").attr("dominant-baseline","middle").style("pointer-events","auto").style("cursor","pointer").style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)"),L=r.groups.map(function(e){var t=u.filter(function(t){return t.objectId===e.id&&"function"===t.type});return i(i({},e),{},{leaves:t})}).filter(function(e){return e.leaves.length>0}),D=R.selectAll("path").data(L).join("path").attr("fill",function(e){return ya(e.path,a)}).attr("fill-opacity",.3).attr("stroke","none").style("cursor","pointer").style("pointer-events","all"),F=function(e){var t=e.d3,n=e.pathColors,r=e.specialLabels,o=e.setStatusBarText,a=e.setClickedObject,l=e.clickedFunctionNodeRef,c=e.clickedObjectRef,s=e.nodes,u=e.node,d=e.hulls,p=e.link,f=e.labelGroup;return{handleMouseOver:function(e,n){l.current||(o(n.path),t.select(e.currentTarget).transition().duration(200).attr("font-size","54px").attr("fill","#0f172a").attr("fill-opacity",1).style("text-shadow","0px 2px 4px rgba(255,255,255,1)").text(Ea(n,r)))},handleMouseOut:function(e,n){var a;o(""),(null===(a=c.current)||void 0===a?void 0:a.id)!==n.id&&t.select(e.currentTarget).transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",Ra(n,r)).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(Ea(n,r))},handleClick:function(e,o,h){e.stopPropagation(),l.current&&window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick();var m=s.filter(function(e){return e.objectId===o.id&&"function"===e.type}),g=new Set(m.map(function(e){return e.id})),x=i(i({},o),{},{functions:m});a(x),c.current=x,window.__panToNode&&void 0!==o.x&&void 0!==o.y&&window.__panToNode(o.x,o.y);var v=ya(o.path,n),b=wa(v),y="0 0 10px ".concat(v,", 0 0 20px ").concat(v,", 0 0 30px ").concat(v,", 0 0 40px ").concat(v);t.select(e.currentTarget).transition().duration(200).attr("font-size","42px").attr("fill",b).style("text-shadow",y),u.each(function(e){g.has(e.id)&&t.select(this).select("circle").transition().duration(200).attr("r",10).attr("stroke","#475569").attr("stroke-width",3).attr("filter","brightness(1.5)")}),d.each(function(e){e.id===o.id&&t.select(this).transition().duration(200).attr("fill-opacity",.6)});var w=function(){a(null),c.current=null,f.selectAll("text").transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",function(e){return Ra(e,r)}).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(function(e){return Ea(e,r)}),u.transition().duration(200).style("opacity",1).select("circle").attr("fill",function(e){return ya(e.root||e.path,n)}).attr("r",6).attr("stroke","#475569").attr("stroke-width",1.5).attr("filter",null),d.transition().duration(200).attr("fill-opacity",.3),p.transition().duration(200).attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}),h.on("click.label-reset",null)};window.__resetObjectClick=w,setTimeout(function(){h.on("click.label-reset",function(e){"text"===e.target.tagName&&e.target.__data__&&e.target.__data__.id===o.id||w()})},100)}}}({d3:t,pathColors:a,specialLabels:l,setStatusBarText:s,setClickedObject:f,clickedFunctionNodeRef:m,clickedObjectRef:g,nodes:u,node:T,hulls:D,link:I,labelGroup:z});A.on("mouseover",F.handleMouseOver).on("mouseout",F.handleMouseOut).on("click",function(e,t){return F.handleClick(e,t,k)});var B=function(e){var t=e.d3,n=e.pathColors,r=e.specialLabels,o=e.setStatusBarText,a=e.setClickedObject,l=e.clickedFunctionNodeRef,c=e.clickedObjectRef,s=e.nodes,u=e.node,d=e.hulls,p=e.link,f=e.labelGroup;return{handleMouseOver:function(e,t){l.current||(o(t.path),f.selectAll("text").filter(function(e){return e.id===t.id}).transition().duration(200).attr("font-size","54px").attr("fill","#0f172a").attr("fill-opacity",1).style("text-shadow","0px 2px 4px rgba(255,255,255,1)").text(Ea(t,r)))},handleMouseOut:function(e,t){var n;o(""),(null===(n=c.current)||void 0===n?void 0:n.id)!==t.id&&f.selectAll("text").filter(function(e){return e.id===t.id}).transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",function(e){return Ra(e,r)}).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(function(e){return Ea(e,r)})},handleClick:function(e,o,h){e.stopPropagation(),l.current&&window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick();var m=s.find(function(e){return e.id===o.id&&"object_anchor"===e.type});if(m){var g=s.filter(function(e){return e.objectId===o.id&&"function"===e.type}),x=new Set(g.map(function(e){return e.id})),v=i(i({},m),{},{functions:g});a(v),c.current=v,window.__panToNode&&void 0!==m.x&&void 0!==m.y&&window.__panToNode(m.x,m.y);var b=ya(o.path,n),y=wa(b),w="0 0 10px ".concat(b,", 0 0 20px ").concat(b,", 0 0 30px ").concat(b,", 0 0 40px ").concat(b);f.selectAll("text").filter(function(e){return e.id===o.id}).transition().duration(200).attr("font-size","42px").attr("fill",y).style("text-shadow",w),u.each(function(e){x.has(e.id)&&t.select(this).select("circle").transition().duration(200).attr("r",10).attr("stroke","#475569").attr("stroke-width",3).attr("filter","brightness(1.5)")}),t.select(e.currentTarget).transition().duration(200).attr("fill-opacity",.6);var k=function(){a(null),c.current=null,f.selectAll("text").transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",function(e){return Ra(e,r)}).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(function(e){return Ea(e,r)}),u.transition().duration(200).style("opacity",1).select("circle").attr("fill",function(e){return ya(e.root||e.path,n)}).attr("r",6).attr("stroke","#475569").attr("stroke-width",1.5).attr("filter",null),d.transition().duration(200).attr("fill-opacity",.3),p.transition().duration(200).attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}),h.on("click.hull-reset",null)};window.__resetObjectClick=k,setTimeout(function(){h.on("click.hull-reset",function(e){var t,n,r="path"===e.target.tagName&&(null===(t=e.target.__data__)||void 0===t?void 0:t.id)===o.id,a="text"===e.target.tagName&&(null===(n=e.target.__data__)||void 0===n?void 0:n.id)===o.id;r||a||k()})},100)}}}}({d3:t,pathColors:a,specialLabels:l,setStatusBarText:s,setClickedObject:f,clickedFunctionNodeRef:m,clickedObjectRef:g,nodes:u,node:T,hulls:D,link:I,labelGroup:z});D.on("mouseover",B.handleMouseOver).on("mouseout",B.handleMouseOut).on("click",function(e,t){return B.handleClick(e,t,k)});var H=function(){b.current=null,S.selectAll("line").remove(),T.selectAll("circle.path-highlight-ring").remove(),I.each(function(){var e=t.select(this),n=e.attr("data-path-prev-stroke");if(null!==n){var r=e.attr("data-path-prev-opacity"),o=e.attr("data-path-prev-width"),a=e.attr("data-path-prev-marker-end");e.attr("stroke",n).attr("stroke-opacity",r).attr("stroke-width",o),a?e.attr("marker-end",a):e.attr("marker-end",null),e.attr("data-path-prev-stroke",null).attr("data-path-prev-opacity",null).attr("data-path-prev-width",null).attr("data-path-prev-marker-end",null)}})};window.__panToNodeById=function(e){var t=u.find(function(t){return t.id===e});return!(!t||void 0===t.x||void 0===t.y)&&(E(t.x,t.y),!0)},window.__clickNodeById=function(e){var t=!1;return T.each(function(n){if(n.id===e){var r=new MouseEvent("click",{bubbles:!0});this.dispatchEvent(r),t=!0}}),t},window.__highlightPathBetweenNodes=function(e,n){if(H(),e===n)b.current={nodes:new Set([e]),links:[]};else{var r=p.filter(function(e){return"call"===e.type}),o=new Map;r.forEach(function(e){var t=Ca(e.source),n=Ca(e.target);o.has(t)||o.set(t,[]),o.get(t).push({nextId:n,link:e})});for(var a=[e],i=new Set([e]),l=new Map,c=function(){var e=a.shift();if(e===n)return 1;(o.get(e)||[]).forEach(function(t){var n=t.nextId,r=t.link;i.has(n)||(i.add(n),l.set(n,{prevId:e,link:r}),a.push(n))})};a.length>0&&!c(););if(!l.has(n))return!1;for(var s=[],u=new Set([e,n]),d=n;d!==e;){var f=l.get(d);if(!f)break;s.push(f.link),u.add(f.prevId),d=f.prevId}s.reverse(),b.current={nodes:u,links:s}}if(!b.current)return!1;var h=b.current.links,m=new Set(h.map(function(e){return"".concat(Ca(e.source),"::").concat(Ca(e.target))}));I.each(function(e){var n="".concat(Ca(e.source),"::").concat(Ca(e.target));if(m.has(n)){var r=t.select(this);null===r.attr("data-path-prev-stroke")&&r.attr("data-path-prev-stroke",r.attr("stroke")||"").attr("data-path-prev-opacity",r.attr("stroke-opacity")||"").attr("data-path-prev-width",r.attr("stroke-width")||"").attr("data-path-prev-marker-end",r.attr("marker-end")||""),r.attr("stroke","#facc15").attr("stroke-opacity",1).attr("stroke-width",4).attr("marker-end","url(#arrow-path)")}}),S.selectAll("line").data(h,function(e){return"".concat(Ca(e.source),"-").concat(Ca(e.target))}).join("line").attr("stroke","#facc15").attr("stroke-opacity",1).attr("stroke-width",4).attr("marker-end","url(#arrow-path)").style("pointer-events","none");var g=b.current.nodes;return T.each(function(e){if(g.has(e.id)){var n=t.select(this);n.select("circle.path-highlight-ring").empty()&&n.append("circle").attr("class","path-highlight-ring").attr("r",14).attr("fill","none").attr("stroke","#facc15").attr("stroke-width",2).attr("opacity",.9).style("pointer-events","none")}}),!0},window.__clearPathHighlight=H,w.on("tick",function(){T.attr("transform",function(e){return"translate(".concat(e.x,",").concat(e.y,")")}),A.attr("x",function(e){return e.x}).attr("y",function(e){return e.y}),I.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y}),S.selectAll("line").attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y}),D.attr("d",function(e){return function(e,t){if(0===e.length)return"";var n=e.map(function(e){var t,n;return[null!==(t=e.x)&&void 0!==t?t:0,null!==(n=e.y)&&void 0!==n?n:0]});if(1===e.length){var r=n[0];return"M ".concat(r[0],",").concat(r[1]," L ").concat(r[0],",").concat(r[1])}if(2===e.length)return"M ".concat(n[0][0],",").concat(n[0][1]," L ").concat(n[1][0],",").concat(n[1][1]);var o=t.polygonHull(n);return o?"M"+o.map(function(e){return e.join(",")}).join("L")+"Z":""}(e.leaves,t)})}),w.on("end",function(){if(o&&!y.current){var e=u.find(function(e){return e.id===o});e&&void 0!==e.x&&void 0!==e.y&&(y.current=!0,E(e.x,e.y))}}),h.current=w;var U=t.zoom().scaleExtent([.1,4]).on("zoom",function(e){N.attr("transform",e.transform),S.attr("transform",e.transform),C.attr("transform",e.transform),R.attr("transform",e.transform),z.attr("transform",e.transform),v.current=e.transform});return k.call(U),x.current=U,v.current=t.zoomIdentity,function(){w.stop(),H(),delete window.__panToNodeById,delete window.__clickNodeById,delete window.__highlightPathBetweenNodes,delete window.__clearPathHighlight}}},[r,o,c,t,n,a,l,s,d,f]),{simulationRef:h,clickedFunctionNodeRef:m,handleZoomIn:w,handleZoomOut:k}},_a=function(e){var t=e.data,n=e.onRefresh;return React.createElement("div",{className:"flex items-center justify-between px-6 py-4 bg-slate-50 border-b border-slate-200 shadow-sm z-10"},React.createElement("div",{className:"flex items-center space-x-3"},React.createElement("div",{className:"bg-blue-600 p-2 rounded-lg"},React.createElement(Jo,{className:"w-5 h-5 text-white"})),React.createElement("div",null,React.createElement("h1",{className:"text-lg font-bold text-slate-900 leading-tight"},"Dependency Graph"),React.createElement("p",{className:"text-xs text-slate-500"},t?"".concat(t.objects.length," Objects • ").concat(t.functions.length," Functions"):"Initializing..."))),n&&React.createElement("button",{onClick:n,className:"p-2 text-slate-500 hover:text-slate-900 hover:bg-slate-200 rounded-full transition-colors",title:"Regenerate Graph"},React.createElement(Yo,{className:"w-5 h-5"})))},Ia=function(e){var t=e.text;return React.createElement("div",{className:"px-6 py-2 bg-slate-100 border-b border-slate-200 z-10 min-h-[40px] flex items-center"},React.createElement("span",{className:"text-sm font-mono text-slate-600"},t||" "))},Ma=function(e){var t=e.pathColors,n=s(React.useState(!0),2),r=n[0],o=n[1];return React.createElement("div",{className:"absolute top-4 left-4 bg-white/90 backdrop-blur-sm rounded-xl border border-slate-200 shadow-xl max-w-xs"},React.createElement("button",{onClick:function(){return o(!r)},className:"flex items-center justify-between w-full p-4 cursor-pointer text-left"},React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider"},"Object Categories"),React.createElement("svg",{className:"w-3.5 h-3.5 text-slate-500 transition-transform duration-200 ".concat(r?"":"-rotate-90"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2},React.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))),r&&React.createElement("div",{className:"grid grid-cols-2 gap-y-2 gap-x-4 px-4 pb-4"},Object.keys(t).map(function(e){return React.createElement("div",{key:e,className:"flex items-center space-x-2"},React.createElement("span",{className:"w-3 h-3 rounded-full shadow-sm",style:{backgroundColor:t[e]}}),React.createElement("span",{className:"text-xs text-slate-700 font-medium"},e))})))},Ta=function(e){var t,n,r=e.node,o=e.pathColors,a=ya(r.root||r.path,o);return React.createElement("div",{className:"absolute z-50 pointer-events-none bg-white/95 backdrop-blur-md p-4 rounded-lg border border-slate-200 shadow-2xl transition-opacity duration-200",style:{left:20,bottom:20,maxWidth:"300px"}},React.createElement("div",{className:"flex items-start justify-between mb-2"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:a}},r.root||(null===(t=r.path)||void 0===t?void 0:t.split("/")[1])),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},null===(n=r.type)||void 0===n?void 0:n.replace("_"," "))),React.createElement("div",{className:"mb-2"},React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words"},r.name),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},r.path||r.objectPath)))},Oa=function(e){var t=e.object,n=e.pathColors,r=ya(t.root||t.path,n);return React.createElement("div",{className:"absolute z-50 pointer-events-none bg-white/95 backdrop-blur-md p-4 rounded-lg border border-slate-200 shadow-2xl transition-opacity duration-200",style:{left:20,bottom:20,maxWidth:"400px",maxHeight:"500px",overflowY:"auto"}},React.createElement("div",{className:"flex items-start justify-between mb-2"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:r}},t.root||t.path.split("/")[1]),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},"Object")),React.createElement("div",{className:"mb-3"},React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words"},ka(t.name)),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},t.path)),React.createElement("div",{className:"border-t border-slate-200 pt-3"},React.createElement("h3",{className:"text-sm font-semibold text-slate-700 mb-2"},"Functions (",t.functions.length,")"),React.createElement("div",{className:"space-y-1 max-h-80 overflow-y-auto"},t.functions.map(function(e){return React.createElement("div",{key:e.id,className:"text-xs text-slate-700 bg-slate-100 px-2 py-1 rounded font-mono"},e.name)}))))},Pa=function(){return React.createElement("div",{className:"flex items-center justify-center py-6"},React.createElement("div",{className:"w-6 h-6 rounded-full",style:{borderWidth:"3px",borderStyle:"solid",borderTopColor:"#0284c7",borderRightColor:"#cbd5e1",borderBottomColor:"#cbd5e1",borderLeftColor:"#cbd5e1",animation:"spin 0.8s linear infinite"}}))},ja=function(e){var t=e.nodes,n=e.pathColors,r=e.onClickNode;return React.createElement("div",{className:"space-y-1"},t.map(function(e){return React.createElement("div",{key:e.id,className:"flex items-center gap-2 text-xs bg-slate-100 px-2 py-1 rounded font-mono".concat(r?" cursor-pointer hover:bg-slate-200 transition-colors":""),onClick:r?function(){return r(e.id)}:void 0},React.createElement("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:ya(e.root||e.objectPath,n)}}),React.createElement("span",{className:"text-slate-700 truncate"},e.name))}))},Aa=function(e){var t,n=e.object,r=e.pathColors,o=e.onClickNode,a=ya(n.root||n.path,r),i=n.functions||[];return React.createElement("div",{className:"absolute z-50 bg-white/95 backdrop-blur-md rounded-lg border border-slate-200 shadow-2xl overflow-hidden flex flex-col",style:{right:20,top:20,bottom:20,width:"360px"}},React.createElement("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-200"},React.createElement("span",{className:"text-sm font-semibold text-slate-800"},"Details")),React.createElement("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4"},React.createElement("div",null,React.createElement("div",{className:"flex items-start justify-between mb-1"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:a}},n.root||(null===(t=n.path)||void 0===t?void 0:t.split("/")[1])),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},"Object")),React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words mt-2"},ka(n.name)),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},n.path)),React.createElement("div",null,React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1"},"Functions (",i.length,")"),React.createElement(ja,{nodes:i,pathColors:r,onClickNode:o})),0===i.length&&React.createElement("div",{className:"text-xs text-slate-400 italic"},"No functions")))},La=function(e){var t,n,o=e.node,a=e.data,i=e.loading,l=e.content,c=e.pathColors,s=ya(o.root||o.path,c),d=React.useMemo(function(){var e,t=new Map,n=r(a.functions);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.set(i.id,i)}}catch(e){n.e(e)}finally{n.f()}var l,c=new Set,s=new Set,d=r(a.calls);try{for(d.s();!(l=d.n()).done;){var p=l.value;p.target===o.id&&p.source!==o.id&&c.add(p.source),p.source===o.id&&p.target!==o.id&&s.add(p.target)}}catch(e){d.e(e)}finally{d.f()}return{parents:u(c).map(function(e){return t.get(e)}).filter(Boolean),children:u(s).map(function(e){return t.get(e)}).filter(Boolean)}},[o.id,a]),p=d.parents,f=d.children;return React.createElement("div",{className:"absolute z-50 bg-white/95 backdrop-blur-md rounded-lg border border-slate-200 shadow-2xl overflow-hidden flex flex-col",style:{right:20,top:20,bottom:20,width:"360px"}},React.createElement("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-200"},React.createElement("span",{className:"text-sm font-semibold text-slate-800"},"Details")),React.createElement("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4"},React.createElement("div",null,React.createElement("div",{className:"flex items-start justify-between mb-1"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:s}},o.root||(null===(t=o.path)||void 0===t?void 0:t.split("/")[1])),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},null===(n=o.type)||void 0===n?void 0:n.replace("_"," "))),React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words mt-2"},o.name),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},o.objectPath||o.path)),p.length>0&&React.createElement("div",null,React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1"},"Called by (",p.length,")"),React.createElement(ja,{nodes:p,pathColors:c})),f.length>0&&React.createElement("div",null,React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1"},"Calls (",f.length,")"),React.createElement(ja,{nodes:f,pathColors:c})),0===p.length&&0===f.length&&React.createElement("div",{className:"text-xs text-slate-400 italic"},"No connections"),React.createElement("div",{className:"border-t border-slate-200 pt-3"},i?React.createElement(Pa,null):l?React.createElement("div",{className:"prose prose-sm max-w-none text-slate-700 [&_h1]:text-lg [&_h1]:text-slate-900 [&_h1]:mt-0 [&_h2]:text-base [&_h2]:text-slate-800 [&_h3]:text-sm [&_h3]:text-slate-700 [&_code]:bg-slate-100 [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sky-700 [&_pre]:bg-slate-100 [&_pre]:border [&_pre]:border-slate-200 [&_pre]:rounded-lg [&_table]:text-xs [&_th]:text-slate-700 [&_td]:text-slate-500 [&_hr]:border-slate-200"},React.createElement(yo,null,l)):null)))},Da=function(e){var t=e.onZoomIn,n=e.onZoomOut;return React.createElement("div",{className:"absolute bottom-6 right-6 flex flex-col space-y-2"},React.createElement("div",{className:"bg-white border border-slate-200 rounded-lg shadow-lg p-1 flex flex-col"},React.createElement("button",{className:"p-2 hover:bg-slate-100 text-slate-500 hover:text-slate-900 rounded",title:"Zoom In",onClick:t},React.createElement(aa,{className:"w-5 h-5"})),React.createElement("button",{className:"p-2 hover:bg-slate-100 text-slate-500 hover:text-slate-900 rounded",title:"Zoom Out",onClick:n},React.createElement(ia,{className:"w-5 h-5"}))))},Fa=function(e){var t=e.onClick;return React.createElement("button",{onClick:t,className:"absolute top-4 right-4 bg-white/90 backdrop-blur-sm p-2 rounded-lg border border-slate-200 shadow-xl hover:bg-slate-100 transition-colors",title:"Search (Press /)"},React.createElement(Zo,{className:"w-5 h-5 text-slate-500"}))},Ba=function(e){var t=e.onClick;return React.createElement("button",{onClick:t,className:"absolute top-4 right-24 bg-white/90 backdrop-blur-sm p-2 rounded-lg border border-slate-200 shadow-xl hover:bg-slate-100 transition-colors",title:"Go to root node"},React.createElement(Do,{className:"w-5 h-5 text-emerald-600"}))},Ha=function(e){var t=e.onClick;return React.createElement("button",{onClick:t,className:"absolute top-4 right-14 bg-white/90 backdrop-blur-sm p-2 rounded-lg border border-slate-200 shadow-xl hover:bg-slate-100 transition-colors",title:"Find path from selected node or root"},React.createElement(Qo,{className:"w-5 h-5 text-amber-500"}))},Ua=function(e){var t=e.searchOpen,n=e.searchQuery,r=e.setSearchQuery,o=e.searchResults,a=e.selectedSearchIndex,i=e.setSelectedSearchIndex,l=e.searchInputRef,c=e.searchResultsRef,s=e.handleSearchSelect,u=e.handleSearchKeyDown,d=e.closeSearch,p=e.pathColors,f=e.placeholder,h=void 0===f?"Search objects or functions...":f,m=e.emptyHint,g=void 0===m?"Type to search for objects or functions in the graph":m;return t?React.createElement("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm flex items-start justify-center pt-20 z-50",onClick:function(e){e.target===e.currentTarget&&d()}},React.createElement("div",{className:"bg-white border border-slate-300 rounded-xl shadow-2xl w-full max-w-lg overflow-hidden"},React.createElement("div",{className:"flex items-center px-4 py-3 border-b border-slate-200"},React.createElement(Zo,{className:"w-5 h-5 text-slate-400 mr-3"}),React.createElement("input",{ref:l,type:"text",value:n,onChange:function(e){return r(e.target.value)},placeholder:h,className:"flex-1 bg-transparent text-slate-900 placeholder-slate-400 outline-none text-sm",onKeyDown:u}),React.createElement("span",{className:"text-xs text-slate-400 ml-2"},"ESC to close")),React.createElement("div",{className:"max-h-80 overflow-y-auto",ref:c},n.trim()&&0===o.length&&React.createElement("div",{className:"px-4 py-8 text-center text-slate-400 text-sm"},'No results found for "',n,'"'),o.map(function(e,t){return React.createElement("button",{key:"".concat(e.type,"-").concat(e.item.id),onClick:function(){return s(e)},onMouseEnter:function(){return i(t)},className:"w-full px-4 py-3 flex items-center gap-3 hover:bg-slate-100 transition-colors text-left ".concat(t===a?"bg-slate-100":"")},React.createElement("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center ".concat("function"===e.type?"bg-blue-100 text-blue-600":"bg-amber-100 text-amber-600")},"function"===e.type?React.createElement(Ao,{className:"w-4 h-4"}):React.createElement(Io,{className:"w-4 h-4"})),React.createElement("div",{className:"flex-1 min-w-0"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("span",{className:"text-slate-900 font-medium truncate"},e.item.name),React.createElement("span",{className:"text-xs px-1.5 py-0.5 rounded ".concat("function"===e.type?"bg-blue-100 text-blue-600":"bg-amber-100 text-amber-600")},e.type)),React.createElement("div",{className:"text-xs text-slate-400 truncate mt-0.5"},"function"===e.type?e.item.objectPath:e.item.path)),React.createElement("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{backgroundColor:ya(e.item.root||e.item.path,p)}}))})),!n.trim()&&React.createElement("div",{className:"px-4 py-3 border-t border-slate-200 text-xs text-slate-400"},g))):null},Va={v1:{TeamBuilder:function(e){return(0,e.withBindings)(ga)},KnowledgeGraph:function(e){return(0,e.withBindings)(xa)},DecentralisedTeam:function(e){var t=e.withBindings;return t?t(ba):ba},NodeBrowser:function(e){var t=e.data,n=e.pathColors,r=e.onRefresh,o=e.onNodeClick,a=e.specialLabels,l=void 0===a?{}:a,c=function(){var e=s(React.useState(!0),2),t=e[0],n=e[1],r=React.useRef(null);return React.useEffect(function(){if(window.d3)return r.current=window.d3,void n(!1);var e=document.createElement("script");e.src="https://d3js.org/d3.v7.min.js",e.onload=function(){r.current=window.d3,n(!1)},document.body.appendChild(e)},[]),{d3:r.current,d3Ref:r,loading:t}}(),d=c.d3,p=c.d3Ref,f=c.loading,h=function(e){return React.useMemo(function(){if(!e)return{nodes:[],links:[],groups:[]};var t=e.root,n=e.functions.map(function(e){return i(i({},e),{},{path:e.objectPath,type:"function",r:6,isRoot:t===e.id})}),r=e.objects.map(function(e){return i(i({},e),{},{type:"object_anchor",r:1})}),o=e.calls.map(function(e){return{source:e.source,target:e.target,type:"call"}}),a=n.map(function(e){return{source:e.id,target:e.objectId,type:"structure"}});return{nodes:[].concat(u(n),u(r)),links:[].concat(u(o),u(a)),groups:e.objects.map(function(e){return{id:e.id,root:e.root,path:e.path,name:e.name,leaves:[]}})}},[e])}(t),m=s(React.useState(""),2),g=m[0],x=m[1],v=s(React.useState(null),2),b=v[0],y=v[1],w=s(React.useState(null),2),k=w[0],E=w[1],R=s(React.useState(!1),2),N=R[0],S=R[1],C=s(React.useState(!1),2),z=C[0],_=C[1],I=s(React.useState(null),2),M=I[0],T=I[1],O=React.useRef(o);O.current=o;var P=React.useRef(0);React.useEffect(function(){if(!b||!O.current)return _(!1),void T(null);var e=++P.current;_(!0),T(null),Promise.resolve(O.current(b)).then(function(t){P.current===e&&(T(t),_(!1))},function(){P.current===e&&(T("*Failed to load details.*"),_(!1))})},[b]);var j=React.useCallback(function(e){window.__resetObjectClick&&window.__resetObjectClick(),window.__clickNodeById&&window.__clickNodeById(e)},[]),A=React.useRef(null),L=React.useCallback(function(e){var t=p.current;t&&A.current&&(window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick(),"function"===e.type?t.select(A.current).select(".nodes").selectAll("g").each(function(t){if(t.id===e.item.id){var n=new MouseEvent("click",{bubbles:!0});this.dispatchEvent(n)}}):t.select(A.current).select(".labels").selectAll("text").each(function(t){if(t.id===e.item.id){var n=new MouseEvent("click",{bubbles:!0});this.dispatchEvent(n)}}))},[p]),D=React.useCallback(function(e){var n=(null==b?void 0:b.id)||t.root;if(n&&"function"===e.type&&window.__highlightPathBetweenNodes){var r=window.__highlightPathBetweenNodes(n,e.item.id);S(Boolean(r)),x(r?"Path highlighted to ".concat(e.item.name):"No path found to ".concat(e.item.name))}},[b,t.root]),F=Sa({data:t,onSelect:L}),B=Sa({data:t,onSelect:D,allowedTypes:["function"]}),H=React.useCallback(function(){B.closeSearch(),F.openSearch()},[B,F]),U=React.useCallback(function(){if(N&&window.__clearPathHighlight)return window.__clearPathHighlight(),void S(!1);F.closeSearch(),B.openSearch()},[N,B,F]),V=React.useCallback(function(){t.root&&window.__clickNodeById&&window.__clickNodeById(t.root)},[t.root]),q=za({d3:d,svgRef:A,graphData:h,rootId:t.root,pathColors:n,specialLabels:l,loading:f,setStatusBarText:x,clickedFunctionNode:b,setClickedFunctionNode:y,clickedObject:k,setClickedObject:E}),W=q.handleZoomIn,Y=q.handleZoomOut;return function(e){var t=e.onSlash,n=e.onEscape,r=e.searchOpen,o=e.onSearchEscape;React.useEffect(function(){var e=function(e){e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||"/"===e.key&&(e.preventDefault(),t())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[t]),React.useEffect(function(){var e=function(e){"Escape"===e.key&&r&&o()};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[r,o]),React.useEffect(function(){var e=function(e){"Escape"!==e.key||r||n()};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[n,r])}({onSlash:H,onEscape:function(){window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick(),window.__clearPathHighlight&&(window.__clearPathHighlight(),S(!1))},searchOpen:F.searchOpen||B.searchOpen,onSearchEscape:function(){F.closeSearch(),B.closeSearch()}}),f?React.createElement("div",{className:"flex items-center justify-center h-screen bg-slate-50 text-slate-900"},"Loading Physics Engine..."):React.createElement("div",{className:"flex flex-col h-screen bg-white text-slate-800 font-sans overflow-hidden"},React.createElement(_a,{data:t,onRefresh:r}),React.createElement(Ia,{text:g}),React.createElement("div",{className:"relative flex-1 bg-white overflow-hidden cursor-move"},React.createElement("svg",{ref:A,className:"w-full h-full block"},React.createElement("defs",null,React.createElement("marker",{id:"arrow-default",viewBox:"0 -5 10 10",refX:"16",refY:"0",markerWidth:"6",markerHeight:"6",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#cbd5e1",fillOpacity:"0.5"})),React.createElement("marker",{id:"arrow-input",viewBox:"0 -5 10 10",refX:"24",refY:"0",markerWidth:"8",markerHeight:"8",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#4ade80"})),React.createElement("marker",{id:"arrow-output",viewBox:"0 -5 10 10",refX:"18",refY:"0",markerWidth:"8",markerHeight:"8",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#f472b6"})),React.createElement("marker",{id:"arrow-path",viewBox:"0 -5 10 10",refX:"18",refY:"0",markerWidth:"8",markerHeight:"8",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#facc15"}))),React.createElement("g",{className:"hulls"}),React.createElement("g",{className:"links"}),React.createElement("g",{className:"path-links"}),React.createElement("g",{className:"nodes"}),React.createElement("g",{className:"labels"})),React.createElement(Ma,{pathColors:n}),b&&React.createElement(Ta,{node:b,pathColors:n}),k&&b&&React.createElement(Oa,{object:k,pathColors:n}),o&&b&&React.createElement(La,{node:b,data:t,loading:z,content:M,pathColors:n}),k&&React.createElement(Aa,{object:k,pathColors:n,onClickNode:j}),React.createElement(Da,{onZoomIn:W,onZoomOut:Y}),t.root&&React.createElement(Ba,{onClick:V}),(b||t.root)&&React.createElement(Ha,{onClick:U}),React.createElement(Fa,{onClick:H}),React.createElement(Ua,{searchOpen:F.searchOpen,searchQuery:F.searchQuery,setSearchQuery:F.setSearchQuery,searchResults:F.searchResults,selectedSearchIndex:F.selectedSearchIndex,setSelectedSearchIndex:F.setSelectedSearchIndex,searchInputRef:F.searchInputRef,searchResultsRef:F.searchResultsRef,handleSearchSelect:F.handleSearchSelect,handleSearchKeyDown:F.handleSearchKeyDown,closeSearch:F.closeSearch,pathColors:n}),React.createElement(Ua,{searchOpen:B.searchOpen,searchQuery:B.searchQuery,setSearchQuery:B.setSearchQuery,searchResults:B.searchResults,selectedSearchIndex:B.selectedSearchIndex,setSelectedSearchIndex:B.setSelectedSearchIndex,searchInputRef:B.searchInputRef,searchResultsRef:B.searchResultsRef,handleSearchSelect:B.handleSearchSelect,handleSearchKeyDown:B.handleSearchKeyDown,closeSearch:B.closeSearch,pathColors:n,placeholder:"Search for a destination function...",emptyHint:"Type to search for a destination function"})))}}};export{Va as default};
37
+ */var tl=function(e){e.value;var t=e.onChange,n=e.onClose,r=e.agentTree,o=s(React.useState([]),2),a=o[0],i=o[1],l=r;a.forEach(function(e){l[e]&&(l=l[e])});var c=Array.isArray(l),d=function(e){var r=e.key;c?(t({path:[].concat(u(a),[r])}),n()):i([].concat(u(a),[r]))};return React.createElement("div",{className:"absolute top-full left-0 mt-[8px] bg-white rounded-[8px] shadow-xl border border-slate-200 z-50 animate-in fade-in zoom-in-95 duration-100",style:{width:"256px"}},React.createElement("div",{className:"p-[8px] bg-slate-50 border-b border-slate-200 flex items-center justify-between"},a.length>0?React.createElement("button",{onClick:function(){i(a.slice(0,-1))},className:"text-[12px] font-medium text-blue-500 hover:text-blue-600 flex items-center"},"← Back"):React.createElement("span",{className:"text-[12px] font-semibold text-slate-500 uppercase tracking-wider"},"Select Source"),React.createElement("button",{onClick:n,className:"text-slate-400 hover:text-red-500"},React.createElement(Gi,{size:14}))),React.createElement("div",{className:"max-h-[240px] overflow-y-auto p-[4px] bg-white text-slate-900"},c?l.map(function(e){return React.createElement("button",{key:e,onClick:function(){return d({key:e})},className:"w-full text-left px-[12px] py-[8px] text-[14px] text-slate-700 hover:bg-blue-50 rounded flex items-center gap-[8px]"},React.createElement("div",{className:"w-[8px] h-[8px] rounded-full bg-green-500"}),e)}):Object.keys(l).map(function(e){return React.createElement("button",{key:e,onClick:function(){return d({key:e})},className:"w-full text-left px-[12px] py-[8px] text-[14px] text-slate-700 hover:bg-slate-100 rounded flex items-center justify-between group"},React.createElement("div",{className:"flex items-center gap-[8px]"},0===a.length?"Shared"===e?"🌍":"🔒":"📁",React.createElement("span",null,e)),React.createElement(Ni,{size:14,className:"text-slate-400 group-hover:text-slate-600"}))}),!c&&0===Object.keys(l).length&&React.createElement("div",{className:"p-2 text-slate-400 text-xs text-center italic"},"No items found")))},nl=function(e){var t=e.node,n=e.isActive,r=e.isRootNode,o=e.isEditing,a=e.agentName,l=e.breadcrumbs,c=e.agentTree,s=e.openSelectorId,u=e.setOpenSelectorId,d=e.updateAgent,f=e.handleView,p=e.handleEdit,h=e.deleteNode,m=e.onNodeDragStart,g=e.nodeRef,x=e.style,v=e.isAbsolute,b=void 0===v||v,y=e.colour,w=e.children;return React.createElement("div",{ref:g,"data-node":"true",onMouseDown:function(e){return m?m({event:e,node:t}):null},style:i({width:"256px",height:"fit-content",boxSizing:"border-box",fontSize:"14px",lineHeight:"1.5",fontFamily:"sans-serif"},x),className:"".concat(b?"absolute":"relative"," bg-white rounded-[12px] shadow-lg border-2 transition-shadow duration-200 group flex flex-col ").concat(s===t.id?"z-50":"z-10","\n ").concat(n?"border-green-500 shadow-green-500/30 ring-1 ring-green-500":"border-blue-500 hover:border-blue-600","\n ")},React.createElement("div",{className:"rounded-t-[12px] w-full ".concat(n?"bg-green-500":"bg-slate-100"),style:{height:"8px"}}),React.createElement("div",{className:"flex flex-col",style:{padding:"16px",gap:"12px"}},React.createElement("div",{className:"flex items-start justify-between"},React.createElement("div",{className:"flex flex-col"},l&&React.createElement("span",{className:"text-slate-400 truncate max-w-[150px]",title:l,style:{fontSize:"10px"}},l)),React.createElement("div",{className:"flex gap-[4px]"},f&&t.data.agentPath.length>0&&React.createElement("button",{onClick:function(){return f({agentPath:t.data.agentPath.join("/")})},className:"p-[6px] rounded-[6px] text-slate-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",title:"View Agent"},React.createElement(Mi,{size:16})),o&&p&&t.data.agentPath.length>0&&React.createElement("button",{onClick:function(){return p({agentPath:t.data.agentPath.join("/")})},className:"p-[6px] rounded-[6px] text-slate-400 hover:text-amber-600 hover:bg-amber-50 transition-colors",title:"Edit Agent"},React.createElement(Qi,{size:16})),r&&React.createElement("div",{className:"p-[6px] rounded-[6px] transition-all text-indigo-600 bg-indigo-50",title:"Root Node"},React.createElement(Ti,{size:18})),n&&React.createElement("div",{className:"p-[6px] rounded-[6px] transition-all text-green-600 bg-green-50",title:"Active Node"},React.createElement(Yi,{size:18,className:"animate-spin"})),o&&h&&React.createElement("button",{onClick:function(){return h({id:t.id})},className:"p-[6px] rounded-[6px] text-slate-300 hover:text-red-600 hover:bg-red-50 transition-colors"},React.createElement(Xi,{size:16})))),React.createElement("div",{className:"relative nodrag"},React.createElement("button",{onClick:function(){return u(s===t.id?null:t.id)},className:"w-full flex items-center justify-between px-[12px] py-[8px] bg-slate-50 border border-slate-200 rounded-[6px] text-[14px] text-slate-600 hover:bg-slate-100 transition-colors"},React.createElement("div",{className:"flex items-center gap-[8px] overflow-hidden"},y&&React.createElement("div",{className:"w-[10px] h-[10px] rounded-full shrink-0",style:{backgroundColor:y}}),React.createElement("span",{className:"truncate"},a)),React.createElement(Ci,{size:14,className:"shrink-0"})),s===t.id&&o&&React.createElement(tl,{value:t.data.agentPath,onChange:function(e){var n=e.path;return d({nodeId:t.id,path:n})},onClose:function(){return u(null)},agentTree:c}))),w)};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-50:oklch(98.2% .018 155.826);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-600:oklch(59.6% .145 163.225);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-700:oklch(50% .134 242.749);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-600:oklch(54.1% .281 293.009);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--text-lg:1.125rem;--text-lg--line-height:1.55556;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:var(--default-font-feature-settings,normal);-webkit-tap-highlight-color:transparent;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:var(--default-mono-font-feature-settings,normal);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{font-feature-settings:inherit;background-color:#0000;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{font-feature-settings:inherit;background-color:#0000;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{border-width:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.\\!top-auto{top:auto!important}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.right-8{right:calc(var(--spacing)*8)}.right-14{right:calc(var(--spacing)*14)}.right-24{right:calc(var(--spacing)*24)}.\\!bottom-auto{bottom:auto!important}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-8{bottom:calc(var(--spacing)*8)}.\\!left-auto{left:auto!important}.left-0{left:calc(var(--spacing)*0)}.left-1{left:calc(var(--spacing)*1)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing)*4)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-\\[6px\\]{margin-top:6px}.mt-\\[8px\\]{margin-top:8px}.mt-\\[18px\\]{margin-top:18px}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.table-row{display:table-row}.\\!h-fit{height:-moz-fit-content!important;height:fit-content!important}.h-1{height:calc(var(--spacing)*1)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-\\[8px\\]{height:8px}.h-\\[10px\\]{height:10px}.h-\\[12px\\]{height:12px}.h-\\[18px\\]{height:18px}.h-\\[36px\\]{height:36px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\\[240px\\]{max-height:240px}.min-h-\\[40px\\]{min-height:40px}.min-h-\\[44px\\]{min-height:44px}.min-h-\\[500px\\]{min-height:500px}.\\!w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-16{width:calc(var(--spacing)*16)}.w-64{width:calc(var(--spacing)*64)}.w-96{width:calc(var(--spacing)*96)}.w-\\[8px\\]{width:8px}.w-\\[10px\\]{width:10px}.w-\\[12px\\]{width:12px}.w-\\[18px\\]{width:18px}.w-\\[36px\\]{width:36px}.w-\\[92\\%\\]{width:92%}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[120px\\]{max-width:120px}.max-w-\\[150px\\]{max-width:150px}.max-w-\\[420px\\]{max-width:420px}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1{--tw-translate-x:calc(var(--spacing)*-1)}.-translate-x-1,.-translate-x-1\\/2{translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x:-50%}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%}.scale-100,.scale-110{scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%}.-rotate-90{rotate:-90deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-crosshair{cursor:crosshair}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[4px\\]{gap:4px}.gap-\\[6px\\]{gap:6px}.gap-\\[8px\\]{gap:8px}.gap-\\[12px\\]{gap:12px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*1*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*1*var(--tw-space-y-reverse))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}.gap-x-4{-moz-column-gap:calc(var(--spacing)*4);column-gap:calc(var(--spacing)*4)}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*2*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*2*var(--tw-space-x-reverse))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*3*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*3*var(--tw-space-x-reverse))}.gap-y-2{row-gap:calc(var(--spacing)*2)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[8px\\]{border-radius:8px}.rounded-\\[12px\\]{border-radius:12px}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-\\[12px\\]{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-green-500{border-color:var(--color-green-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-zinc-100{border-color:var(--color-zinc-100)}.border-zinc-200{border-color:var(--color-zinc-200)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/50{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/50{background-color:color-mix(in oklab,var(--color-slate-100)50%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\\/95{background-color:#1d293df2}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\\/95{background-color:color-mix(in oklab,var(--color-slate-800)95%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\\/40{background-color:#0f172b66}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\\/40{background-color:color-mix(in oklab,var(--color-slate-900)40%,transparent)}}.bg-slate-900\\/50{background-color:#0f172b80}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\\/50{background-color:color-mix(in oklab,var(--color-slate-900)50%,transparent)}}.bg-slate-900\\/90{background-color:#0f172be6}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\\/90{background-color:color-mix(in oklab,var(--color-slate-900)90%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.bg-zinc-50{background-color:var(--color-zinc-50)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-grid-slate-200{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'40\' height=\'40\'%3E%3Cpath d=\'M0 0h40v40H0z\' fill=\'none\'/%3E%3Cpath d=\'M40 0H0v40\' fill=\'none\' stroke=\'%23E2E8F0\'/%3E%3C/svg%3E")}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.p-\\[4px\\]{padding:4px}.p-\\[6px\\]{padding:6px}.p-\\[8px\\]{padding:8px}.p-\\[20px\\]{padding:20px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-\\[12px\\]{padding-inline:12px}.px-\\[14px\\]{padding-inline:14px}.px-\\[16px\\]{padding-inline:16px}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-\\[6px\\]{padding-block:6px}.py-\\[8px\\]{padding-block:8px}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-20{padding-top:calc(var(--spacing)*20)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-3{padding-left:calc(var(--spacing)*3)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.text-\\[18px\\]{font-size:18px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-600{color:var(--color-emerald-600)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-600{color:var(--color-indigo-600)}.text-purple-600{color:var(--color-purple-600)}.text-red-600{color:var(--color-red-600)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.text-zinc-900{color:var(--color-zinc-900)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.placeholder-slate-400::-moz-placeholder{color:var(--color-slate-400)}.placeholder-slate-400::placeholder{color:var(--color-slate-400)}.placeholder-slate-500::-moz-placeholder{color:var(--color-slate-500)}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040)}.shadow-2xl,.shadow-lg{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-green-500{--tw-shadow-color:oklch(72.3% .219 149.579)}@supports (color:color-mix(in lab,red,red)){.shadow-green-500{--tw-shadow-color:color-mix(in oklab,var(--color-green-500)var(--tw-shadow-alpha),transparent)}}.shadow-green-500\\/30{--tw-shadow-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.shadow-green-500\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-green-500)30%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-violet-200{--tw-shadow-color:oklch(89.4% .057 293.283)}@supports (color:color-mix(in lab,red,red)){.shadow-violet-200{--tw-shadow-color:color-mix(in oklab,var(--color-violet-200)var(--tw-shadow-alpha),transparent)}}.shadow-zinc-200{--tw-shadow-color:oklch(92% .004 286.32)}@supports (color:color-mix(in lab,red,red)){.shadow-zinc-200{--tw-shadow-color:color-mix(in oklab,var(--color-zinc-200)var(--tw-shadow-alpha),transparent)}}.shadow-zinc-200\\/50{--tw-shadow-color:#e4e4e780}@supports (color:color-mix(in lab,red,red)){.shadow-zinc-200\\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-zinc-200)50%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-green-500{--tw-ring-color:var(--color-green-500)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md))}.backdrop-blur-md,.backdrop-blur-sm{backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm))}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-shadow{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:rotate-90:is(:where(.group):hover *){rotate:90deg}.group-hover\\:bg-zinc-200:is(:where(.group):hover *){background-color:var(--color-zinc-200)}.group-hover\\:stroke-red-500:is(:where(.group):hover *){stroke:var(--color-red-500)}.group-hover\\:text-slate-600:is(:where(.group):hover *){color:var(--color-slate-600)}.group-hover\\:text-zinc-500:is(:where(.group):hover *){color:var(--color-zinc-500)}.group-hover\\:text-zinc-900:is(:where(.group):hover *){color:var(--color-zinc-900)}}.placeholder\\:text-slate-400::-moz-placeholder{color:var(--color-slate-400)}.placeholder\\:text-slate-400::placeholder{color:var(--color-slate-400)}.first\\:mt-0:first-child{margin-top:calc(var(--spacing)*0)}.last\\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\\:border-blue-600:hover{border-color:var(--color-blue-600)}.hover\\:border-indigo-500:hover{border-color:var(--color-indigo-500)}.hover\\:border-purple-300:hover{border-color:var(--color-purple-300)}.hover\\:border-zinc-200:hover{border-color:var(--color-zinc-200)}.hover\\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:bg-indigo-50:hover{background-color:var(--color-indigo-50)}.hover\\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\\:bg-slate-700\\/50:hover{background-color:#31415880}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-700\\/50:hover{background-color:color-mix(in oklab,var(--color-slate-700)50%,transparent)}}.hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.hover\\:text-amber-600:hover{color:var(--color-amber-600)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-900:hover{color:var(--color-zinc-900)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]:hover{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.sm\\:block{display:block}}@media (min-width:48rem){.md\\:block{display:block}.md\\:w-80{width:calc(var(--spacing)*80)}.md\\:flex-row{flex-direction:row}.md\\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}.\\[\\&_code\\]\\:rounded code{border-radius:.25rem}.\\[\\&_code\\]\\:bg-slate-100 code{background-color:var(--color-slate-100)}.\\[\\&_code\\]\\:bg-slate-900 code{background-color:var(--color-slate-900)}.\\[\\&_code\\]\\:px-1 code{padding-inline:calc(var(--spacing)*1)}.\\[\\&_code\\]\\:py-0\\.5 code{padding-block:calc(var(--spacing)*.5)}.\\[\\&_code\\]\\:text-sky-300 code{color:var(--color-sky-300)}.\\[\\&_code\\]\\:text-sky-700 code{color:var(--color-sky-700)}.\\[\\&_h1\\]\\:mt-0 h1{margin-top:calc(var(--spacing)*0)}.\\[\\&_h1\\]\\:text-lg h1{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\\[\\&_h1\\]\\:text-slate-900 h1{color:var(--color-slate-900)}.\\[\\&_h1\\]\\:text-white h1{color:var(--color-white)}.\\[\\&_h2\\]\\:text-base h2{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\\[\\&_h2\\]\\:text-slate-200 h2{color:var(--color-slate-200)}.\\[\\&_h2\\]\\:text-slate-800 h2{color:var(--color-slate-800)}.\\[\\&_h3\\]\\:text-sm h3{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\[\\&_h3\\]\\:text-slate-300 h3{color:var(--color-slate-300)}.\\[\\&_h3\\]\\:text-slate-700 h3{color:var(--color-slate-700)}.\\[\\&_hr\\]\\:border-slate-200 hr{border-color:var(--color-slate-200)}.\\[\\&_hr\\]\\:border-slate-700 hr{border-color:var(--color-slate-700)}.\\[\\&_pre\\]\\:rounded-lg pre{border-radius:var(--radius-lg)}.\\[\\&_pre\\]\\:border pre{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_pre\\]\\:border-slate-200 pre{border-color:var(--color-slate-200)}.\\[\\&_pre\\]\\:border-slate-700 pre{border-color:var(--color-slate-700)}.\\[\\&_pre\\]\\:bg-slate-100 pre{background-color:var(--color-slate-100)}.\\[\\&_pre\\]\\:bg-slate-900 pre{background-color:var(--color-slate-900)}.\\[\\&_table\\]\\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_td\\]\\:text-slate-400 td{color:var(--color-slate-400)}.\\[\\&_td\\]\\:text-slate-500 td{color:var(--color-slate-500)}.\\[\\&_th\\]\\:text-slate-300 th{color:var(--color-slate-300)}.\\[\\&_th\\]\\:text-slate-700 th{color:var(--color-slate-700)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(1turn)}}');var rl={Shared:{"Content Creation":["Blog Writer","Tweet Generator","SEO Optimizer"],"Data Analysis":["Market Trends","Sentiment Analyzer","Chart Builder"],Utility:["Translator","Summarizer"]},Users:{user_jdoe:["My Calendar","Email Sorter"],user_alice:["Code Reviewer","Bug Hunter"],team_alpha:["Sprint Planner","Jira Sync"]}},ol={h1:function(e){var t=e.children;return React.createElement("h1",{className:"text-xl font-bold mb-2 mt-4 first:mt-0"},t)},h2:function(e){var t=e.children;return React.createElement("h2",{className:"text-lg font-semibold mb-2 mt-3 first:mt-0"},t)},h3:function(e){var t=e.children;return React.createElement("h3",{className:"text-base font-semibold mb-1 mt-2 first:mt-0"},t)},p:function(e){var t=e.children;return React.createElement("p",{className:"mb-2 last:mb-0"},t)},ul:function(e){var t=e.children;return React.createElement("ul",{className:"list-disc list-inside my-2 space-y-1"},t)},ol:function(e){var t=e.children;return React.createElement("ol",{className:"list-decimal list-inside my-2 space-y-1"},t)},li:function(e){var t=e.children;return React.createElement("li",{className:"ml-2"},t)},code:function(e){var t=e.inline,n=e.children;return t?React.createElement("code",{className:"bg-slate-200 text-slate-800 px-1 py-0.5 rounded text-xs font-mono"},n):React.createElement("code",null,n)},pre:function(e){var t=e.children;return React.createElement("pre",{className:"bg-slate-800 text-slate-100 p-3 rounded text-xs overflow-x-auto my-2"},t)},strong:function(e){var t=e.children;return React.createElement("strong",null,t)},em:function(e){var t=e.children;return React.createElement("em",null,t)},table:function(e){var t=e.children;return React.createElement("div",{className:"my-2 overflow-x-auto"},React.createElement("table",{className:"min-w-full border-collapse border border-slate-300 text-xs"},t))},thead:function(e){var t=e.children;return React.createElement("thead",{className:"bg-slate-100"},t)},tbody:function(e){var t=e.children;return React.createElement("tbody",null,t)},tr:function(e){var t=e.children;return React.createElement("tr",{className:"border-b border-slate-200"},t)},th:function(e){var t=e.children;return React.createElement("th",{className:"border border-slate-300 px-2 py-1 text-left font-semibold text-slate-700"},t)},td:function(e){var t=e.children;return React.createElement("td",{className:"border border-slate-300 px-2 py-1 align-top text-slate-800"},t)},hr:function(){return React.createElement("hr",{className:"my-3 border-slate-200"})},blockquote:function(e){var t=e.children;return React.createElement("blockquote",{className:"border-l-4 border-slate-300 pl-3 my-2 text-slate-600 italic"},t)},a:function(e){var t=e.href,n=e.children;return React.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-600 hover:underline"},n)}},al=function(e,t,n,r){var o=Math.abs(n-e),a=Math.max(.5*o,50);return"M ".concat(e," ").concat(t," C ").concat(e+a," ").concat(t,", ").concat(n-a," ").concat(r,", ").concat(n," ").concat(r)},il=function(e,t){if(0===e.length)return!0;if(1===e.length)return!0;var n={};e.forEach(function(e){n[e.id]=[]}),t.forEach(function(e){n[e.source].push(e.target),n[e.target].push(e.source)});var r=new Set,o=[e[0].id];for(r.add(e[0].id);o.length>0;){var a=o.shift();n[a].forEach(function(e){r.has(e)||(r.add(e),o.push(e))})}return r.size===e.length},ll=function(e,t){var n=new Set;return t.forEach(function(e){n.add(e.target)}),e.filter(function(e){return!n.has(e.id)})},cl=function(e,t){if(0===e.length)return!0;var n=il(e,t),r=ll(e,t);return n&&1===r.length},sl=function(e){var t=e.activeNode,n=e.nodes,r=e.nodeHeights,o=e.currentMessage;e.pan,e.containerRef;var a=s(React.useState("hidden"),2),l=a[0],c=a[1],u=s(React.useState(null),2),d=u[0],f=u[1],p=React.useRef(null),h=React.useRef(null),m="string"==typeof o?{node:t,message:o}:o,g=null==m?void 0:m.node,x=null==m?void 0:m.message,v=n.find(function(e){return g===e.data.agentPath.join("/")});if(React.useEffect(function(){var e=p.current,t=!!x,n=!!e;t||n?!t&&n?(c("disappearing"),requestAnimationFrame(function(){h.current&&h.current.offsetHeight}),setTimeout(function(){c("hidden"),f(null)},300)):t&&!n?(f(m),c("appearing"),setTimeout(function(){c("visible")},400)):t&&n&&e!==x?(f(m),c("visible")):t&&n&&e===x&&(f(m),"hidden"===l&&c("visible")):(c("hidden"),f(null)),p.current=x},[m,g,x]),!g||null==d||!d.message||"hidden"===l)return null;if(!v)return null;var b=r[v.id]||88,y=v.x,w=v.y+b+20,k=v.x+128,E=v.y+b/2,R=(k-y)/640*100,S=(E-w)/280*100,C={},N="translate(".concat(y,"px, ").concat(w,"px)");return"appearing"===l?C={animation:"popOut-".concat(y,"-").concat(w," 0.4s ease-out forwards")}:"disappearing"===l&&(C={animation:"shrinkIn-".concat(y,"-").concat(w,"-").concat(k,"-").concat(E," 0.3s ease-in forwards")}),React.createElement(React.Fragment,null,React.createElement("style",null,"\n @keyframes popOut-".concat(y,"-").concat(w," {\n 0% {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(0.3);\n opacity: 0;\n }\n 80% {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(1.05);\n opacity: 1;\n }\n 100% {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(1);\n opacity: 1;\n }\n }\n @keyframes shrinkIn-").concat(y,"-").concat(w,"-").concat(k,"-").concat(E," {\n from {\n transform: translate(").concat(y,"px, ").concat(w,"px) scale(1);\n opacity: 1;\n }\n to {\n transform: translate(").concat(k,"px, ").concat(E,"px) scale(0);\n opacity: 0;\n }\n }\n ")),React.createElement("div",{ref:h,className:"absolute pointer-events-none z-20",style:i(i({},"visible"!==l||C.animation?{}:{transform:N}),{},{transformOrigin:"".concat(R,"% ").concat(S,"%"),width:"".concat(640,"px"),maxHeight:"".concat(280,"px")},C)},React.createElement("div",{className:"absolute z-10 pointer-events-auto",style:{left:"".concat(128,"px"),transform:"translateX(-50%)",top:"-12px",width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderBottom:"12px solid ".concat(t?"rgba(255, 255, 255, 0.95)":"#ffffff"),filter:"drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1))"}}),React.createElement("div",{className:"bg-white rounded-2xl shadow-xl border-slate-300 overflow-hidden pointer-events-auto",style:{backgroundColor:t?"rgba(255, 255, 255, 0.95)":"#ffffff",borderWidth:"3px",maskImage:t?"linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3))":"none",WebkitMaskImage:t?"linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3))":"none"}},React.createElement("div",{className:"p-4 overflow-y-auto text-slate-800 text-sm leading-relaxed",style:{maxHeight:"".concat(280,"px")}},React.createElement(wo,{remarkPlugins:[mi],components:ol},d.message)))))};function ul(e){var t=e.agentTree,r=void 0===t?rl:t,o=e.activeNode,a=e.initialNodes,c=void 0===a?[]:a,d=e.initialEdges,f=void 0===d?[]:d,p=e.handleSave,h=e.handleView,m=e.handleEdit,g=e.initialEditable,x=void 0!==g&&g,v=e.currentMessage,b=e.handlePrompt,y=e.isFollowingActive,w=e.showPrompt,k=void 0===w?!o:w,E=e.handleCreateAgent,R=e.handleCancel,S=s(React.useState(c),2),C=S[0],N=S[1],z=s(React.useState(f),2),I=z[0],_=z[1],M=s(React.useState(""),2),T=M[0],A=M[1],O=s(React.useState(null),2),j=O[0],P=O[1];React.useEffect(function(){P(null)},[v]);var L,D="string"==typeof(L=v)?L:null==L?void 0:L.message,F=D===j?null:v,B=function(){T.trim()&&(b&&b({prompt:T}),A(""))},H=s(React.useState(x),2),U=H[0],q=H[1],V=s(React.useState({nodes:c,edges:f}),2),W=V[0],Y=V[1],$=s(React.useState(!1),2),Q=$[0],X=$[1],K=s(React.useState(!0),2),Z=K[0],G=K[1];React.useEffect(function(){y&&G(!0)},[y]);var J=s(React.useState(null),2),ee=J[0],te=J[1],ne=s(React.useState(null),2),re=ne[0],oe=ne[1],ae=s(React.useState({x:0,y:0}),2),ie=ae[0],le=ae[1],ce=s(React.useState(function(){try{var e=sessionStorage.getItem("teambuilder-pan");return e?JSON.parse(e):{x:0,y:0}}catch(e){return{x:0,y:0}}}),2),se=ce[0],ue=ce[1],de=s(React.useState(!1),2),fe=de[0],pe=de[1],he=s(React.useState({x:0,y:0}),2),me=he[0],ge=he[1],xe=s(React.useState(null),2),ve=xe[0],be=xe[1],ye=s(React.useState({}),2),we=ye[0],ke=ye[1],Ee=React.useRef(null),Re=React.useRef({}),Se=React.useRef(null),Ce=React.useRef(se),Ne=React.useRef(!1),ze=React.useRef(!1);React.useEffect(function(){Ce.current=se},[se]);var Ie=React.useCallback(function(){if(Ee.current){var e=i({},Ce.current),t=performance.now();Ne.current=!0;var n=function(r){var o=r-t,a=Math.min(o/500,1),i=1-Math.pow(1-a,3),l={x:e.x*(1-i),y:e.y*(1-i)};ue(l),a<1?Se.current=requestAnimationFrame(n):Ne.current=!1};Se.current&&cancelAnimationFrame(Se.current),Se.current=requestAnimationFrame(n)}},[]),_e=React.useCallback(function(){if(o&&Ee.current){var e=C.find(function(e){return o===e.data.agentPath.join("/")});if(e){var t=we[e.id]||88,n=Ee.current.clientWidth,r=.3*Ee.current.clientHeight,a=n/2-(e.x+128),l=r-(e.y+t/2),c=i({},Ce.current),s=performance.now();Ne.current=!0;var u=function(e){var t=e-s,n=Math.min(t/600,1),r=1-Math.pow(1-n,3),o={x:c.x+(a-c.x)*r,y:c.y+(l-c.y)*r};ue(o),n<1?Se.current=requestAnimationFrame(u):Ne.current=!1};Se.current&&cancelAnimationFrame(Se.current),Se.current=requestAnimationFrame(u)}}},[o,C,we]);React.useEffect(function(){return function(){Se.current&&cancelAnimationFrame(Se.current)}},[]),React.useEffect(function(){Z&&o&&_e()},[o,Z,_e]),React.useEffect(function(){var e=Object.keys(we).length>0;Z&&o&&e&&!ze.current&&(ze.current=!0,_e())},[we,Z,o,_e]),React.useEffect(function(){},[o]),React.useEffect(function(){U&&G(!1)},[U]);var Me=React.useCallback(n(l().m(function e(){var t,n;return l().w(function(e){for(;;)switch(e.n){case 0:if(!p){e.n=1;break}return t=ll(C,I),n=1===t.length?t[0].id:null,e.n=1,p({nodes:C,edges:I,rootNodeId:n});case 1:Y({nodes:u(C),edges:u(I)}),q(!1);case 2:return e.a(2)}},e)})),[I,p,C]);React.useEffect(function(){if(Q){var e=function(e){"Escape"===e.key&&X(!1)};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}}},[Q]),React.useEffect(function(){try{sessionStorage.setItem("teambuilder-pan",JSON.stringify(se))}catch(e){}},[se]),React.useEffect(function(){var e={};C.forEach(function(t){var n=Re.current[t.id];n&&(e[t.id]=n.offsetHeight)}),ke(e)},[C]);var Te=function(){te(null),oe(null),pe(!1)},Ae=function(e){var t=e.event,n=e.node;U&&(t.stopPropagation(),t.target.closest("button")||t.target.closest(".nodrag")||te({id:n.id,offsetX:ie.x-n.x,offsetY:ie.y-n.y}))},Oe=function(e){var t=e.id;N(C.filter(function(e){return e.id!==t})),_(I.filter(function(e){return e.source!==t&&e.target!==t})),delete Re.current[t]},je=function(e){var t=e.nodeId,n=e.path;N(C.map(function(e){return e.id===t?i(i({},e),{},{data:i(i({},e.data),{},{agentPath:n})}):e}))};return React.createElement("div",{className:"flex flex-col h-full min-h-[500px] w-full bg-slate-100 text-slate-900 font-sans overflow-hidden relative"},React.createElement("div",{className:"border-b border-slate-200 bg-white flex items-center px-[16px] justify-between z-10 shadow-sm",style:{height:"56px"}},React.createElement("div",{className:"flex items-center gap-[8px]"},React.createElement("div",{className:"p-[8px] bg-indigo-600 rounded text-white"},React.createElement(Zi,{size:18})),React.createElement("h1",{className:"font-bold text-[18px] hidden sm:block"},"Team Builder")),React.createElement("div",{className:"flex items-center gap-[12px]"},!U&&(o?React.createElement("button",{onClick:function(){return G(!Z)},className:"flex items-center gap-[8px] px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm ".concat(Z?"bg-green-500 hover:bg-green-600 text-white":"bg-blue-500 hover:bg-blue-600 text-white")},Z?React.createElement(Si,{size:16}):React.createElement(Di,{size:16}),"Follow Active Agent"):F?React.createElement("button",{onClick:function(){return P(D)},className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(Hi,{size:16})," Restart"):React.createElement("div",{className:"text-[12px] text-slate-500 hidden md:block"},"View Only Mode")),E&&!U&&React.createElement("button",{onClick:function(){return E()},className:"flex items-center gap-[8px] bg-indigo-600 hover:bg-indigo-700 text-white px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm",style:{color:"#fff"}},React.createElement(Fi,{size:16})," Create Agent"),U?React.createElement(React.Fragment,null,React.createElement("button",{onClick:function(){JSON.stringify(C)!==JSON.stringify(W.nodes)||JSON.stringify(I)!==JSON.stringify(W.edges)?X(!0):q(!1)},className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(Gi,{size:16})," Cancel"),React.createElement("button",{onClick:Me,className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(qi,{size:16})," Save"),React.createElement("button",{onClick:function(){var e,t,n=Math.random().toString(36).substr(2,9),r=-se.x+((null===(e=Ee.current)||void 0===e?void 0:e.clientWidth)||800)/2-100,o=-se.y+((null===(t=Ee.current)||void 0===t?void 0:t.clientHeight)||600)/2-50;N([].concat(u(C),[{id:n,x:r,y:o,data:{label:"New Node",agentPath:[]}}]))},className:"flex items-center gap-[8px] bg-indigo-600 hover:bg-indigo-700 text-white px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm",style:{color:"#fff"}},React.createElement(Fi,{size:16})," Add Node")):React.createElement("button",{onClick:function(){Y({nodes:u(C),edges:u(I)}),q(!0)},className:"flex items-center gap-[8px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-700 px-[16px] py-[8px] rounded-[6px] text-[14px] font-medium transition-colors shadow-sm"},React.createElement(Li,{size:16})," Edit"))),React.createElement("div",{ref:Ee,className:"flex-1 relative overflow-hidden bg-grid-slate-200",style:{cursor:fe?"grabbing":"grab",backgroundSize:"40px 40px"},onMouseDown:function(e){0===e.button&&(e.target.closest("[data-node]")||(pe(!0),ge({x:e.clientX-se.x,y:e.clientY-se.y})))},onMouseMove:function(e){var t=Ee.current.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,o=n-se.x,a=r-se.y;if(le({x:o,y:a}),fe)return ue({x:e.clientX-me.x,y:e.clientY-me.y}),void(Z&&!Ne.current&&G(!1));ee&&N(function(e){return e.map(function(e){return e.id===ee.id?i(i({},e),{},{x:o-ee.offsetX,y:a-ee.offsetY}):e})})},onMouseUp:Te,onMouseLeave:Te},React.createElement("div",{className:"flex items-center gap-[8px] pointer-events-auto",style:{position:"absolute",top:"12px",right:"12px",zIndex:20}},R&&o&&React.createElement("button",{onClick:function(){return R()},className:"flex items-center gap-[6px] bg-red-600 hover:bg-red-700 text-white px-[12px] py-[6px] rounded-[8px] text-[12px] font-medium transition-colors shadow-sm",style:{color:"white"},title:"Cancel the current conversation"},React.createElement(Gi,{size:14}),"Cancel Converse"),React.createElement("button",{onClick:Ie,className:"flex items-center gap-[6px] bg-white border border-slate-200 hover:bg-slate-50 text-slate-600 hover:text-slate-900 px-[12px] py-[6px] rounded-[8px] text-[12px] font-medium transition-colors shadow-sm",title:"Recenter grid"},React.createElement(Ti,{size:14}),"Recenter")),React.createElement("div",{style:{transform:"translate(".concat(se.x,"px, ").concat(se.y,"px)"),width:"100%",height:"100%",position:"absolute",top:0,left:0,pointerEvents:"none"}},React.createElement("svg",{className:"absolute top-0 left-0 overflow-visible w-full h-full pointer-events-none z-0"},React.createElement("defs",null,React.createElement("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto"},React.createElement("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#64748b"})),React.createElement("marker",{id:"arrowhead-active",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto"},React.createElement("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#6366f1"}))),I.map(function(e){var t=C.find(function(t){return t.id===e.source}),n=C.find(function(t){return t.id===e.target});if(!t||!n)return null;var r=we[e.source]||88,o=we[e.target]||88,a=t.x+256,i=t.y+r/2,l=n.x,c=n.y+o/2,s=al(a,i,l,c);return React.createElement("g",{key:e.id,className:"pointer-events-auto group"},React.createElement("path",{d:s,strokeWidth:"15",stroke:"transparent",fill:"none",className:U?"cursor-pointer":"",onClick:function(){return t={id:e.id},n=t.id,void(U&&_(I.filter(function(e){return e.id!==n})));var t,n}}),React.createElement("path",{d:s,stroke:"#64748b",strokeWidth:"2",fill:"none",markerEnd:"url(#arrowhead)",className:"group-hover:stroke-red-500 transition-colors"}))}),re&&React.createElement("path",{d:al(re.x,re.y,ie.x,ie.y),stroke:"#6366f1",strokeWidth:"2",fill:"none",strokeDasharray:"5,5"})),React.createElement(sl,{activeNode:o,nodes:C,nodeHeights:we,currentMessage:F,pan:se,containerRef:Ee}),React.createElement("div",{className:"pointer-events-auto w-full h-full"},C.map(function(e){var t=o===e.data.agentPath.join("/"),n=e.data.agentPath.length>0?e.data.agentPath[e.data.agentPath.length-1]:"Select Agent...",a=e.data.agentPath.slice(0,-1).join(" > "),i=ll(C,I),l=cl(C,I)&&1===i.length&&i[0].id===e.id;return React.createElement(nl,{key:e.id,node:e,isActive:t,isRootNode:l,isEditing:U,agentName:n,breadcrumbs:a,agentTree:r,openSelectorId:ve,setOpenSelectorId:be,updateAgent:je,handleView:h,handleEdit:m,deleteNode:Oe,onNodeDragStart:Ae,nodeRef:function(t){return Re.current[e.id]=t},style:{transform:"translate(".concat(e.x,"px, ").concat(e.y,"px)")}},U&&React.createElement("div",{className:"absolute group-hover:scale-110 transition-transform pointer-events-none",style:{position:"absolute",left:"-12px",right:"auto",top:"50%",transform:"translateY(-50%)",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}},React.createElement("div",{className:"w-[12px] h-[12px] bg-white border-2 border-slate-400 rounded-full hover:border-indigo-500 hover:bg-indigo-50 cursor-crosshair pointer-events-auto",onMouseUp:function(t){return function(e){var t=e.event,n=e.nodeId,r=e.type;if(t.stopPropagation(),re&&"target"===r&&re.nodeId!==n){var o={id:"e".concat(re.nodeId,"-").concat(n,"-").concat(Date.now()),source:re.nodeId,target:n},a=I.find(function(e){return e.source===o.source&&e.target===o.target});a||_([].concat(u(I),[o]))}oe(null)}({event:t,nodeId:e.id,type:"target"})}})),U&&React.createElement("div",{className:"absolute group-hover:scale-110 transition-transform pointer-events-none",style:{position:"absolute",left:"auto",right:"-12px",top:"50%",transform:"translateY(-50%)",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}},React.createElement("div",{className:"w-[12px] h-[12px] bg-white border-2 border-slate-400 rounded-full hover:border-indigo-500 hover:bg-indigo-50 cursor-crosshair pointer-events-auto",onMouseDown:function(t){return function(e){var t=e.event,n=e.nodeId,r=e.type;if(U&&(t.stopPropagation(),"source"===r)){var o=C.find(function(e){return e.id===n}),a=we[n]||88;oe({nodeId:n,x:o.x+256,y:o.y+a/2})}}({event:t,nodeId:e.id,type:"source"})}})))})),!U&&b&&k&&!o&&React.createElement("div",{className:"absolute w-full max-w-2xl px-4 z-30 pointer-events-none",style:{bottom:"24px",left:"50%",transform:"translateX(-50%)"}},React.createElement("div",{className:"bg-white rounded-2xl shadow-xl border border-slate-200 p-2 flex items-end gap-2 pointer-events-auto"},React.createElement("textarea",{value:T,onChange:function(e){return A(e.target.value)},onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),B())},placeholder:"Message Team Builder...",className:"w-full max-h-32 min-h-[44px] py-3 px-4 bg-transparent border-0 focus:ring-0 resize-none text-slate-800 placeholder:text-slate-400 text-sm focus:outline-none",rows:1}),React.createElement("button",{onClick:B,disabled:!T.trim(),className:"p-2 rounded-xl mb-1 transition-colors ".concat(T.trim()?"bg-slate-900 text-white hover:bg-slate-700":"bg-slate-100 text-slate-300"),style:T.trim()?{color:"white"}:{}},React.createElement(Wi,{size:18})))))),React.createElement("div",{className:"h-8 bg-white border-t border-slate-200 flex items-center px-4 text-xs text-slate-400 justify-between"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("span",null,"Team: ",C.length," Agents, ",I.length," Connections"),C.length>0&&!cl(C,I)&&React.createElement("div",{className:"flex items-center gap-1 text-amber-600"},React.createElement(Ki,{size:14}),React.createElement("span",null,il(C,I)?1!==ll(C,I).length?"Warning: Graph must have exactly 1 root node (found ".concat(ll(C,I).length,")"):"Warning: Invalid graph structure":"Warning: Not all nodes are connected"))),React.createElement("div",null,"Active: ",o||"None")),Q&&React.createElement("div",{className:"fixed inset-0 z-50 flex items-center justify-center"},React.createElement("div",{className:"absolute inset-0 bg-slate-900/40 backdrop-blur-sm",onClick:function(){return X(!1)}}),React.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"reset-dialog-title",className:"relative w-[92%] max-w-[420px] rounded-[12px] bg-white shadow-2xl border border-slate-200 p-[20px] animate-in fade-in zoom-in-95 duration-150"},React.createElement("div",{className:"flex items-start gap-[12px]"},React.createElement("div",{className:"flex h-[36px] w-[36px] items-center justify-center rounded-full bg-red-50 text-red-600"},React.createElement(Xi,{size:18})),React.createElement("div",{className:"flex-1"},React.createElement("h2",{id:"reset-dialog-title",className:"text-[16px] font-semibold text-slate-900"},"Discard unsaved changes?"),React.createElement("p",{className:"mt-[6px] text-[13px] text-slate-600"},"This will reset the canvas back to your last saved state."))),React.createElement("div",{className:"mt-[18px] flex items-center justify-end gap-[8px]"},React.createElement("button",{onClick:function(){return X(!1)},className:"px-[12px] py-[8px] text-[13px] font-medium text-slate-700 hover:text-slate-900"},"Keep Editing"),React.createElement("button",{onClick:function(){N(W.nodes),_(W.edges),q(!1),X(!1)},className:"px-[14px] py-[8px] rounded-[6px] bg-red-600 text-white text-[13px] font-medium hover:bg-red-700 transition-colors"},"Reset Changes")))))}var dl=function(e){var t=e.data,n=e.title,o=void 0===n?"Wikipedia LLM Explorer":n,a=e.categoryColors,l=s(React.useState(null==t?void 0:t.id),2),c=l[0],u=l[1],d=s(React.useState(new Set([null==t?void 0:t.id])),2),f=d[0],p=d[1],h=s(React.useState(1),2),m=h[0],g=h[1],x=s(React.useState({x:0,y:0}),2),v=x[0],b=x[1],y=s(React.useState(!1),2),w=y[0],k=y[1],E=s(React.useState(!0),2),R=E[0],S=E[1],C=!!(a&&Object.keys(a).length>0),N=function(e){return C?null==a?void 0:a[e]:void 0},z=React.useRef(null),I=React.useRef({x:0,y:0}),_=React.useMemo(function(){var e=[],n=function(t,r,o,a,l,c){var s=f.has(t.id);if(e.push(i(i({},t),{},{x:r,y:o,isExpanded:s,depth:c})),s&&t.children){var u=t.children.length,d=(l-a)/u,p=240-15*c;t.children.forEach(function(e,t){var i=a+d*t+d/2,l=r+Math.cos(i)*p,s=o+Math.sin(i)*p;n(e,l,s,i-d/2,i+d/2,c+1)})}};return t&&n(t,0,0,0,2*Math.PI,0),e},[f]),M=React.useMemo(function(){var e=function(t){if(t.id===c)return t;if(t.children){var n,o=r(t.children);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=e(a);if(i)return i}}catch(e){o.e(e)}finally{o.f()}}return null};return e(t)},[c]);React.useEffect(function(){var e=_.find(function(e){return e.id===c});e&&(S(!0),b({x:-e.x,y:-e.y}))},[c]);var T=function(e){u(e),p(function(t){var n=new Set(t);return n.has(e)||n.add(e),n})},A=function(){k(!1)},O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(n.children){if(n.children.some(function(t){return t.id===e}))return n;var o,a=r(n.children);try{for(a.s();!(o=a.n()).done;){var i=o.value,l=O(e,i);if(l)return l}}catch(e){a.e(e)}finally{a.f()}}return null};return React.createElement("div",{className:"flex h-full w-full bg-zinc-50 text-zinc-900 font-sans overflow-hidden transition-colors duration-500",onMouseMove:function(e){if(w){var t=(e.clientX-I.current.x)/m,n=(e.clientY-I.current.y)/m;b(function(e){return{x:e.x+t,y:e.y+n}}),I.current={x:e.clientX,y:e.clientY}}},onMouseUp:A,onMouseLeave:A},React.createElement("div",{className:"w-96 bg-white border-r border-zinc-200 flex flex-col z-20 shadow-xl overflow-hidden"},React.createElement("div",{className:"p-6 border-b border-zinc-100 flex items-center justify-between bg-white/80 backdrop-blur-md sticky top-0"},React.createElement("div",{className:"flex items-center gap-3"},React.createElement("div",{className:"p-2 bg-violet-600 rounded-lg shadow-lg shadow-violet-200"},React.createElement(Pi,{size:20,className:"text-white w-5 h-5"})),React.createElement("div",null,React.createElement("h1",{className:"text-lg font-bold tracking-tight text-zinc-900"},"Concept Map"),React.createElement("p",{className:"text-[10px] text-zinc-400 uppercase font-bold tracking-wider"},o)))),React.createElement("div",{className:"flex-1 overflow-y-auto custom-scrollbar bg-white"},M?React.createElement("div",{className:"p-8 animate-in fade-in slide-in-from-left-4 duration-500"},React.createElement("div",{className:"flex items-center gap-2 mb-4"},React.createElement("span",{className:"px-2.5 py-0.5 rounded-full text-[10px] uppercase font-bold tracking-widest border",style:{backgroundColor:N(M.category)?"".concat(N(M.category),"10"):"transparent",color:N(M.category)||"#18181b",borderColor:N(M.category)?"".concat(N(M.category),"20"):"#d4d4d8"}},M.category),O(M.id)&&React.createElement("span",{className:"text-zinc-400 text-xs flex items-center gap-1"},React.createElement(Ni,{size:12,className:"w-3 h-3"}),O(M.id).label)),React.createElement("h2",{className:"text-3xl font-extrabold mb-6 leading-tight tracking-tight text-zinc-900"},M.label),React.createElement("div",{className:"prose prose-zinc max-w-none"},React.createElement(wo,{className:"text-zinc-600 leading-relaxed text-lg mb-8"},M.content)),M.children&&React.createElement("div",{className:"mt-10"},React.createElement("h3",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-[0.2em] mb-4 flex items-center gap-2"},"Sub-Dimensions ",React.createElement("div",{className:"h-px flex-1 bg-zinc-100"})),React.createElement("div",{className:"grid gap-2"},M.children.map(function(e){return React.createElement("button",{key:e.id,onClick:function(){return T(e.id)},className:"group flex items-center justify-between p-4 rounded-xl bg-zinc-50 hover:bg-zinc-100 border border-zinc-100 hover:border-zinc-200 transition-all duration-300"},React.createElement("div",{className:"flex items-center gap-3"},React.createElement("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:N(e.category)||"#18181b"}}),React.createElement("span",{className:"text-sm font-semibold text-zinc-700 group-hover:text-zinc-900 transition-colors"},e.label)),React.createElement(Fi,{size:14,className:"text-zinc-300 group-hover:text-zinc-500 transition-transform group-hover:rotate-90 w-3.5 h-3.5"}))})))):React.createElement("div",{className:"h-full flex flex-col items-center justify-center p-12 text-center"},React.createElement("div",{className:"w-16 h-16 rounded-full bg-zinc-100 flex items-center justify-center mb-6"},React.createElement(Ei,{size:32,className:"text-zinc-300 w-8 h-8"})),React.createElement("h3",{className:"text-xl font-bold text-zinc-900 mb-2"},"Select a Topic"),React.createElement("p",{className:"text-zinc-400 text-sm"},"Pick a node on the map to explore its underlying principles and history.")))),React.createElement("div",{ref:z,onMouseDown:function(e){(e.target===z.current||e.target.closest(".pan-area"))&&(k(!0),S(!1),I.current={x:e.clientX,y:e.clientY})},className:"flex-1 relative bg-zinc-50 overflow-hidden select-none cursor-grab ".concat(w?"cursor-grabbing":"")},React.createElement("div",{className:"absolute inset-0 pointer-events-none pan-area"},React.createElement("div",{className:"h-full w-full opacity-40",style:{backgroundImage:"radial-gradient(#e4e4e7 1px, transparent 1px)",backgroundSize:"32px 32px"}})),React.createElement("div",{className:"absolute inset-0 pointer-events-none ".concat(R?"transition-transform duration-700 ease-in-out":""),style:{transform:"scale(".concat(m,") translate(calc(50% + ").concat(v.x,"px), calc(50% + ").concat(v.y,"px))"),transformOrigin:"0 0"}},React.createElement("svg",{className:"absolute inset-0 overflow-visible pointer-events-none"},_.map(function(e){var t=_.find(function(t){var n;return null===(n=t.children)||void 0===n?void 0:n.some(function(t){return t.id===e.id})});return t?React.createElement("line",{key:"line-".concat(e.id),x1:t.x,y1:t.y,x2:e.x,y2:e.y,stroke:N(e.category)||"#d4d4d8",strokeWidth:"2.5",strokeOpacity:"0.15",strokeDasharray:"4 4"}):null})),_.map(function(e){return React.createElement("div",{key:e.id,onClick:function(t){t.stopPropagation(),T(e.id)},className:"\n absolute cursor-pointer transition-all duration-300 ease-out\n flex items-center justify-center rounded-full border-2 \n group hover:shadow-[0_8px_24px_rgba(0,0,0,0.08)]\n pointer-events-auto\n ".concat(c===e.id?"z-20 scale-110 shadow-xl":"scale-100 z-10","\n "),style:{width:Math.max(90,140-20*e.depth),height:Math.max(90,140-20*e.depth),left:e.x,top:e.y,transform:"translate(-50%, -50%)",backgroundColor:c===e.id&&N(e.category)?N(e.category):"white",borderColor:c===e.id?N(e.category)?"transparent":"#111827":N(e.category)?"".concat(N(e.category),"40"):"#d4d4d8"}},React.createElement("div",{className:"flex flex-col items-center p-3 text-center"},React.createElement("span",{className:"\n text-[11px] md:text-xs font-bold leading-tight\n ".concat(c===e.id&&N(e.category)?"text-white":"text-zinc-700 group-hover:text-zinc-900","\n ")},e.label),e.children&&React.createElement("div",{className:"\n mt-1.5 px-2 py-0.5 rounded-full text-[8px] font-black uppercase tracking-tighter\n ".concat(c===e.id&&N(e.category)?"bg-white/20 text-white":"bg-zinc-100 text-zinc-400 group-hover:bg-zinc-200","\n ")},f.has(e.id)?"Collapse":"+".concat(e.children.length))))})),React.createElement("div",{className:"absolute bottom-8 right-8 !left-auto !top-auto !w-fit !h-fit flex flex-col gap-3"},React.createElement("div",{className:"flex bg-white/90 backdrop-blur-md border border-zinc-200 rounded-2xl p-1 shadow-lg shadow-zinc-200/50"},React.createElement("button",{onClick:function(){S(!0),g(function(e){return Math.min(e+.2,2)})},className:"p-3 hover:bg-zinc-100 rounded-xl transition-colors text-zinc-400 hover:text-zinc-900",title:"Zoom In"},React.createElement(Fi,{size:18,className:"w-[18px] h-[18px]"})),React.createElement("div",{className:"w-px h-6 bg-zinc-200 self-center"}),React.createElement("button",{onClick:function(){S(!0),g(function(e){return Math.max(e-.2,.5)})},className:"p-3 hover:bg-zinc-100 rounded-xl transition-colors text-zinc-400 hover:text-zinc-900",title:"Zoom Out"},React.createElement(Oi,{size:18,className:"w-[18px] h-[18px]"})),React.createElement("div",{className:"w-px h-6 bg-zinc-200 self-center"}),React.createElement("button",{onClick:function(){S(!0),b({x:0,y:0})},className:"p-3 hover:bg-zinc-100 rounded-xl transition-colors text-zinc-400 hover:text-zinc-900",title:"Reset View"},React.createElement(ji,{size:18,className:"w-[18px] h-[18px]"}))),C&&React.createElement("div",{className:"bg-white/90 backdrop-blur-md border border-zinc-200 rounded-2xl p-4 shadow-lg shadow-zinc-200/50"},React.createElement("h4",{className:"text-[10px] font-bold text-zinc-400 uppercase tracking-widest mb-3"},"Key"),React.createElement("div",{className:"space-y-2"},Object.entries(a).map(function(e){var t=s(e,2),n=t[0],r=t[1];return React.createElement("div",{key:n,className:"flex items-center gap-3"},React.createElement("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:r}}),React.createElement("span",{className:"text-[11px] font-bold text-zinc-500 capitalize"},n))})))),React.createElement("div",{className:"absolute top-8 right-8 !left-auto !bottom-auto !w-fit !h-fit bg-zinc-900 text-white px-4 py-2 rounded-full text-xs font-bold shadow-xl flex items-center gap-2"},React.createElement(ji,{size:14,className:"text-zinc-400 w-3.5 h-3.5"}),React.createElement("span",{className:"whitespace-nowrap"},"Drag background to pan"))),React.createElement("style",null,"\n .custom-scrollbar::-webkit-scrollbar {\n width: 5px;\n }\n .custom-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: #e4e4e7;\n border-radius: 10px;\n }\n .custom-scrollbar::-webkit-scrollbar-thumb:hover {\n background: #d4d4d8;\n }\n .cursor-grab { cursor: grab; }\n .cursor-grabbing { cursor: grabbing; }\n "))},fl=function(e){var t=e.anim,n=s(React.useState({x:t.startX,y:t.startY}),2),r=n[0],o=n[1];return React.useEffect(function(){var e,n;return e=requestAnimationFrame(function(){n=requestAnimationFrame(function(){o({x:t.endX,y:t.endY})})}),function(){cancelAnimationFrame(e),n&&cancelAnimationFrame(n)}},[t]),React.createElement("div",{className:"pointer-events-none",style:{position:"absolute",left:0,top:0,transform:"translate(".concat(r.x,"px, ").concat(r.y,"px)"),width:"12px",height:"12px",marginLeft:"-6px",marginTop:"-6px",borderRadius:"50%",backgroundColor:t.color,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1)",zIndex:100,boxShadow:"0 0 10px ".concat(t.color)}})};function pl(e){var t=e.teamName,n=void 0===t?"Decentralised Team":t,r=e.agents,o=void 0===r?[]:r,a=e.taskQueue,l=void 0===a?[]:a,c=e.agentTree,d=void 0===c?{}:c,f=e.activeAgentId,p=void 0===f?null:f,h=e.onAgentUpdate,m=void 0===h?function(){}:h,g=e.onAgentView,x=void 0===g?function(){}:g,v=e.onTaskClick,b=void 0===v?function(){}:v,y=s(React.useState(null),2),w=y[0],k=y[1],E=s(React.useState(!1),2),R=E[0],S=E[1],C=s(React.useState({}),2)[1],N=React.useRef({}),z=React.useRef(null),I=React.useRef(0),_=React.useRef(new Set),M=s(React.useState([]),2),T=M[0],A=M[1];React.useEffect(function(){var e=[];l.forEach(function(t){var n=N.current[t.id];n&&("pending"===n.status&&"in-progress"===t.status?e.push({task:t,type:"pickup"}):"in-progress"===n.status&&"completed"===t.status&&(e.push({task:i(i({},t),{},{assigneeId:n.assigneeId||t.assigneeId}),type:"complete"}),_.current.add(t.id),setTimeout(function(){_.current.delete(t.id),C({})},1e3)))}),e.length>0&&requestAnimationFrame(function(){var t,n=null===(t=z.current)||void 0===t?void 0:t.getBoundingClientRect();if(n){var r=e.map(function(e){var t=e.task,r=e.type,a=document.getElementById("task-".concat(t.id)),i=document.getElementById("agent-".concat(t.assigneeId));if(a||"complete"!==r||(a=document.getElementById("task-queue-sidebar")),a&&i){var l,c=a.getBoundingClientRect(),s=i.getBoundingClientRect(),u=c.left+c.width/2-n.left,d=c.top+c.height/2-n.top,f=s.left+s.width/2-n.left,p=s.top+s.height/2-n.top,h=o.find(function(e){return e.id===t.assigneeId}),m=(null==h||null===(l=h.data)||void 0===l?void 0:l.colour)||"#94a3b8";return{id:I.current++,startX:"pickup"===r?u:f,startY:"pickup"===r?d:p,endX:"pickup"===r?f:u,endY:"pickup"===r?p:d,color:m}}return null}).filter(Boolean);r.length>0&&(A(function(e){return[].concat(u(e),u(r))}),setTimeout(function(){A(function(e){return e.filter(function(e){return!r.find(function(t){return t.id===e.id})})})},1e3))}});var t={};l.forEach(function(e){t[e.id]={status:e.status,assigneeId:e.assigneeId}}),N.current=t},[l,o,R]);var O=R?l:l.filter(function(e){if("completed"!==e.status)return!0;var t=N.current[e.id];return!(!t||"in-progress"!==t.status)||!!_.current.has(e.id)});return React.createElement("div",{ref:z,className:"flex flex-col h-full min-h-[500px] w-full bg-slate-50 text-slate-900 font-sans overflow-hidden relative"},T.map(function(e){return React.createElement(fl,{key:e.id,anim:e})}),React.createElement("div",{className:"border-b border-slate-200 bg-white flex items-center px-4 justify-between shadow-sm h-14 shrink-0"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("div",{className:"p-2 bg-purple-600 rounded text-white"},React.createElement(Zi,{size:18})),React.createElement("h1",{className:"font-bold text-lg hidden sm:block"},n)),React.createElement("div",{className:"flex items-center gap-4 text-sm font-medium text-slate-600"},React.createElement("span",null,o.length," Active Agents"),React.createElement("span",{className:"w-px h-4 bg-slate-300"}),React.createElement("span",null,l.filter(function(e){return"pending"===e.status}).length," Tasks Pending"))),React.createElement("div",{className:"flex flex-1 overflow-hidden flex-col md:flex-row"},React.createElement("div",{id:"task-queue-sidebar",className:"w-full md:w-80 bg-white border-r border-slate-200 flex flex-col shrink-0 overflow-hidden shadow-sm z-10"},React.createElement("div",{className:"p-4 border-b border-slate-100 bg-slate-50 flex items-center justify-between gap-2"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement(Ai,{size:18,className:"text-slate-500"}),React.createElement("h2",{className:"font-semibold text-slate-700"},"Task Queue")),React.createElement("label",{className:"flex items-center gap-2 text-xs text-slate-500 cursor-pointer"},React.createElement("input",{type:"checkbox",checked:R,onChange:function(e){return S(e.target.checked)},className:"rounded border-slate-300 text-purple-600 focus:ring-purple-500"}),"Show Completed")),React.createElement("div",{className:"flex-1 overflow-y-auto p-3 space-y-2"},0===O.length?React.createElement("div",{className:"text-center p-8 text-slate-400 text-sm"},0===l.length?"No tasks in queue. External events will add tasks here.":"No tasks match current filters."):O.map(function(e){return React.createElement("div",{key:e.id,id:"task-".concat(e.id),onClick:function(){return b(e)},className:"p-3 rounded-lg border cursor-pointer transition-all ".concat("completed"===e.status?"bg-slate-50 border-slate-200 opacity-60":"in-progress"===e.status?"bg-blue-50 border-blue-200 shadow-sm":"bg-white border-slate-200 hover:border-purple-300 shadow-sm")},React.createElement("div",{className:"flex items-start justify-between gap-2 mb-2"},React.createElement("h3",{className:"font-medium text-sm text-slate-800 line-clamp-2"},e.title),"completed"===e.status?React.createElement(zi,{size:16,className:"text-green-500 shrink-0"}):"in-progress"===e.status?React.createElement(Ii,{size:16,className:"text-blue-500 animate-spin shrink-0"}):React.createElement("div",{className:"w-2 h-2 rounded-full bg-slate-300 mt-1 shrink-0"})),React.createElement("div",{className:"flex items-center justify-end mt-2"},e.assigneeId&&function(t,n){var r=o.find(function(t){return t.id===e.assigneeId}),a=null==r||null===(t=r.data)||void 0===t?void 0:t.colour,i=(null==r||null===(n=r.data)||void 0===n||null===(n=n.agentPath)||void 0===n||null===(n=n.slice(-1))||void 0===n?void 0:n[0])||"Assigned";return React.createElement("div",{className:"flex items-center gap-[6px] text-xs text-slate-500 bg-white px-2 py-0.5 rounded border border-slate-200 max-w-[120px]"},a&&React.createElement("div",{className:"w-[8px] h-[8px] rounded-full shrink-0",style:{backgroundColor:a}}),React.createElement("span",{className:"truncate block"},i))}()))}))),React.createElement("div",{className:"flex-1 overflow-y-auto bg-slate-100/50 p-6"},0===o.length?React.createElement("div",{className:"h-full flex flex-col items-center justify-center text-slate-400"},React.createElement(Zi,{size:48,className:"mb-4 opacity-20"}),React.createElement("p",{className:"text-lg font-medium text-slate-500"},"No Active Agents"),React.createElement("p",{className:"text-sm mt-2 max-w-sm text-center"},"Connect external processes to spawn agents dynamically.")):React.createElement("div",{className:"flex flex-wrap gap-6 items-start content-start"},o.map(function(e){var t,n,r=p===e.id||Array.isArray(p)&&p.includes(e.id),o=(null===(t=e.data)||void 0===t?void 0:t.agentPath)||[],a=o.length>0?o[o.length-1]:"Unassigned Agent",i=o.slice(0,-1).join(" > ");return React.createElement("div",{key:e.id,id:"agent-".concat(e.id),className:"transition-all duration-300 animate-in fade-in zoom-in-95"},React.createElement(nl,{node:e,isActive:r,isRootNode:!1,isEditing:!0,agentName:a,breadcrumbs:i,agentTree:d,openSelectorId:w,setOpenSelectorId:k,updateAgent:function(e){var t=e.nodeId,n=e.path;return m(t,n)},handleView:x,isAbsolute:!1,style:{margin:0},colour:null===(n=e.data)||void 0===n?void 0:n.colour}))})))))}var hl=function(e,t){return t[e.split("/")[1]||"Default"]||t.Default||"#a1a1aa"},ml=function(e){var t=e.replace("#",""),n=parseInt(t.substring(0,2),16)/255,r=parseInt(t.substring(2,4),16)/255,o=parseInt(t.substring(4,6),16)/255,a=Math.max(n,r,o),i=Math.min(n,r,o),l=(a+i)/2,c=0,s=0;if(a!==i){var u=a-i;switch(s=l>.5?u/(2-a-i):u/(a+i),a){case n:c=((r-o)/u+(r<o?6:0))/6;break;case r:c=((o-n)/u+2)/6;break;case o:c=((n-r)/u+4)/6}}c=(c+.5)%1,s=Math.min(1,1.2*s);var d=l<.5?Math.min(.85,l+.35):Math.max(.6,l),f=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},p=d<.5?d*(1+s):d+s-d*s,h=2*d-p,m=Math.round(255*f(h,p,c+1/3)),g=Math.round(255*f(h,p,c)),x=Math.round(255*f(h,p,c-1/3));return"#".concat(m.toString(16).padStart(2,"0")).concat(g.toString(16).padStart(2,"0")).concat(x.toString(16).padStart(2,"0"))},gl=function(e){return e.length>16?e.substring(0,16)+"...":e},xl=function(e,t){var n=t[e.path.split("/")[1]||"Default"];if(n)return n.label;var r=e.path.split("/").filter(function(e){return e}),o=r[r.length-1]||e.name;return gl(o)},vl=function(e,t){var n=t[e.path.split("/")[1]||"Default"];return n&&void 0!==n.opacity?n.opacity:1},bl=function(e,t){var n=e.toLowerCase(),r=t.toLowerCase(),o=n.replace(/\s+/g,""),a=r.replace(/\s+/g,"");if(a===o)return 1e3;if(a.startsWith(o))return 900+o.length/a.length*50;if(a.includes(o))return 800+o.length/a.length*50;for(var i=0,l=0,c=-1,s=0,u=0;u<r.length&&i<o.length;u++)r[u]===o[i]?((c===u-1||c>=0&&/^[\s\/_\-\.]+$/.test(r.slice(c+1,u)))&&(s+=10),(0===u||/[\s\/_\-\.]/.test(r[u-1]))&&(l+=15),l+=10+s,c=u,i++):s=0;return i!==o.length?-1:(l-=.5*(t.length-e.length),Math.max(0,l))},yl=function(e){var t=e.data,n=e.onSelect,r=e.allowedTypes,o=s(React.useState(!1),2),a=o[0],i=o[1],l=s(React.useState(""),2),c=l[0],u=l[1],d=s(React.useState(0),2),f=d[0],p=d[1],h=React.useRef(null),m=React.useRef(null),g=React.useMemo(function(){if(!c.trim()||!t)return[];var e=c.trim(),n=[],o=!r||r.includes("object"),a=!r||r.includes("function");return o&&t.objects.forEach(function(t){var r=bl(e,t.name),o=bl(e,t.path),a=Math.max(r,o);a>=0&&n.push({type:"object",item:t,matchField:r>=o?"name":"path",score:a})}),a&&t.functions.forEach(function(t){var r=bl(e,t.name),o=bl(e,t.objectPath),a=Math.max(r,o);a>=0&&n.push({type:"function",item:t,matchField:r>=o?"name":"path",score:a})}),n.sort(function(e,t){return t.score-e.score}).slice(0,20)},[c,t,r]);React.useEffect(function(){p(0)},[c]),React.useEffect(function(){if(m.current&&g.length>0){var e=m.current.children[f];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[f,g.length]);var x=React.useCallback(function(e){i(!1),u(""),p(0),n(e)},[n]),v=React.useCallback(function(){i(!0),setTimeout(function(){var e;return null===(e=h.current)||void 0===e?void 0:e.focus()},0)},[]),b=React.useCallback(function(){i(!1),u(""),p(0)},[]),y=React.useCallback(function(e){"Enter"===e.key&&g.length>0?x(g[f]):"ArrowDown"===e.key?(e.preventDefault(),p(function(e){return e<g.length-1?e+1:e})):"ArrowUp"===e.key&&(e.preventDefault(),p(function(e){return e>0?e-1:0}))},[g,f,x]);return{searchOpen:a,searchQuery:c,setSearchQuery:u,searchResults:g,selectedSearchIndex:f,setSelectedSearchIndex:p,searchInputRef:h,searchResultsRef:m,handleSearchSelect:x,handleSearchKeyDown:y,openSearch:v,closeSearch:b}},wl=function(e){return"string"==typeof e?e:e.id},kl=function(e){var t=e.d3,n=e.svgRef,r=e.graphData,o=e.rootId,a=e.pathColors,l=e.specialLabels,c=e.loading,s=e.setStatusBarText,u=e.clickedFunctionNode,d=e.setClickedFunctionNode,f=e.clickedObject,p=e.setClickedObject,h=React.useRef(null),m=React.useRef(null),g=React.useRef(null),x=React.useRef(null),v=React.useRef(null),b=React.useRef(null),y=React.useRef(!1);React.useEffect(function(){m.current=u},[u]),React.useEffect(function(){g.current=f},[f]);var w=React.useCallback(function(){t&&n.current&&t.select(n.current).transition().call(t.zoom().scaleBy,1.2)},[t,n]),k=React.useCallback(function(){t&&n.current&&t.select(n.current).transition().call(t.zoom().scaleBy,.8)},[t,n]),E=React.useCallback(function(e,r){if(t&&n.current&&x.current){var o=t.select(n.current),a=n.current.clientWidth,i=n.current.clientHeight,l=(v.current||t.zoomIdentity).k,c=t.zoomIdentity.translate(a/2,i/2).scale(l).translate(-e,-r);o.transition().duration(500).ease(t.easeCubicInOut).call(x.current.transform,c)}},[t,n]);return React.useEffect(function(){return window.__panToNode=E,function(){delete window.__panToNode}},[E]),React.useEffect(function(){if(t&&n.current&&0!==r.nodes.length){y.current=!1;var e=n.current.clientWidth,c=n.current.clientHeight;h.current&&h.current.stop();var u=r.nodes.map(function(e){return i({},e)}),f=r.links.map(function(e){return i({},e)}),w=t.forceSimulation(u).force("center",t.forceCenter(e/2,c/2)).force("link",t.forceLink(f).id(function(e){return e.id}).distance(function(e){return"structure"===e.type?35:80}).strength(function(e){return"structure"===e.type?1:.1})).force("charge",t.forceManyBody().strength(function(e){return"object_anchor"===e.type?-400:-20})).force("collide",t.forceCollide(function(e){return"object_anchor"===e.type?45:8})).force("category",function(e){for(var t=u.filter(function(e){return"object_anchor"===e.type}),n=0;n<t.length;n++)for(var r=n+1;r<t.length;r++){var o=t[n],a=t[r];if(o.root===a.root){var i=a.x-o.x,l=a.y-o.y,c=Math.sqrt(i*i+l*l)||1,s=.05*e*c,d=i/c*s,f=l/c*s;o.vx+=d,o.vy+=f,a.vx-=d,a.vy-=f}}}),k=t.select(n.current),R=k.select(".hulls"),S=k.select(".links"),C=k.select(".path-links"),N=k.select(".nodes"),z=k.select(".labels"),I=f.filter(function(e){return"structure"!==e.type}),_=S.selectAll("line").data(I).join("line").attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}).attr("marker-end","url(#arrow-default)"),M=u.filter(function(e){return"function"===e.type}),T=N.selectAll("g").data(M).join("g").call(t.drag().on("start",function(e,t){e.active||w.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y}).on("drag",function(e,t){t.fx=e.x,t.fy=e.y}).on("end",function(e,t){e.active||w.alphaTarget(0),t.fx=null,t.fy=null}));T.selectAll("*").remove(),T.append("circle").attr("r",function(e){return e.r}).attr("fill",function(e){return hl(e.root||e.path,a)}).attr("stroke","#475569").attr("stroke-width",1.5).attr("cursor","pointer"),T.filter(function(e){return e.isRoot}).append("path").attr("d","M-5 1 L0 -4 L5 1 V6 H2 V2 H-2 V6 H-5 Z").attr("fill","none").attr("stroke","#475569").attr("stroke-width",1.5).attr("stroke-linejoin","round").attr("pointer-events","none");var A=function(e){var t=e.d3,n=e.pathColors,r=e.setStatusBarText,o=e.setClickedFunctionNode,a=e.setClickedObject,i=e.clickedFunctionNodeRef,l=e.link,c=e.node;return{handleMouseOver:function(e,o){var a,l;if((null===(a=i.current)||void 0===a?void 0:a.id)!==o.id){var c=t.select(e.currentTarget),s=hl(o.root||o.path,n),u="".concat(o.objectPath,"/").concat(o.name,"()");r(u),c.select("circle").transition().duration(200).attr("r",12).attr("fill",(null===(l=t.color(s))||void 0===l||null===(l=l.brighter(.8))||void 0===l?void 0:l.toString())||"#fff").attr("stroke","#475569").attr("stroke-width",3),c.append("text").text(o.name).attr("x",15).attr("y",5).attr("class","node-label").attr("fill","#0f172a").attr("font-size","16px").attr("font-weight","bold").style("text-shadow","0px 2px 4px rgba(255,255,255,0.8)").style("pointer-events","none").style("opacity",0).transition().duration(200).style("opacity",1)}},handleMouseOut:function(e,o){var a;r("");var l=t.select(e.currentTarget);if((null===(a=i.current)||void 0===a?void 0:a.id)!==o.id)l.select("circle").transition().duration(200).attr("r",6).attr("fill",hl(o.root||o.path,n)).attr("stroke","#475569").attr("stroke-width",1.5),l.select(".node-label").remove();else{var c=hl(o.root||o.path,n),s=ml(c),u="0 0 8px ".concat(c,", 0 0 16px ").concat(c,", 0 0 24px ").concat(c,", 0 0 32px ").concat(c);l.select(".node-label").attr("fill",s).attr("font-size","24px").style("text-shadow",u)}},handleClick:function(e,r,s){var u;if(e.stopPropagation(),(null===(u=i.current)||void 0===u?void 0:u.id)!==r.id){i.current&&i.current.id!==r.id&&window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick(),o(r),i.current=r,a(null),window.__panToNode&&void 0!==r.x&&void 0!==r.y&&window.__panToNode(r.x,r.y);var d=t.select(e.currentTarget);d.select("circle").transition().duration(200).attr("r",12).attr("stroke","#475569").attr("stroke-width",3).attr("filter","brightness(1.5)");var f=hl(r.root||r.path,n),p=ml(f),h="0 0 8px ".concat(f,", 0 0 16px ").concat(f,", 0 0 24px ").concat(f,", 0 0 32px ").concat(f);d.select(".node-label").empty()?d.append("text").text(r.name).attr("x",15).attr("y",5).attr("class","node-label").attr("fill",p).attr("font-size","24px").attr("font-weight","bold").style("text-shadow",h).style("pointer-events","none"):d.select(".node-label").transition().duration(200).attr("font-size","24px").attr("fill",p).style("text-shadow",h);var m=new Set,g=new Set;l.each(function(e){var n=e.target.id===r.id,o=e.source.id===r.id;(n||o)&&(t.select(this).transition().duration(200).attr("stroke",n?"#4ade80":"#f472b6").attr("stroke-opacity",1).attr("stroke-width",3).attr("marker-end",n?"url(#arrow-input)":"url(#arrow-output)"),n&&m.add(e.source.id),o&&g.add(e.target.id))}),c.each(function(e){if(e.id!==r.id&&(m.has(e.id)||g.has(e.id))){var n=m.has(e.id)?"#4ade80":"#f472b6",o=t.select(this);o.style("opacity",1).select("circle").transition().duration(200).attr("fill",n).attr("r",8).attr("stroke","#475569").attr("stroke-width",2),o.append("text").text(e.name).attr("x",15).attr("y",5).attr("class","neighbor-label").attr("fill",n).attr("font-size","14px").attr("font-weight","bold").style("text-shadow","0px 2px 4px rgba(255,255,255,0.8)").style("pointer-events","none").style("opacity",0).transition().duration(200).style("opacity",1)}});var x=function(){o(null),i.current=null,d.select("circle").transition().duration(200).attr("r",6).attr("fill",hl(r.root||r.path,n)).attr("stroke","#475569").attr("stroke-width",1.5).attr("filter",null),d.select(".node-label").remove(),l.transition().duration(200).attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}).attr("marker-end","url(#arrow-default)"),c.each(function(){t.select(this).select(".neighbor-label").remove()}),c.transition().duration(200).style("opacity",1).select("circle").attr("fill",function(e){return hl(e.root||e.path,n)}).attr("r",6).attr("stroke","#475569").attr("stroke-width",1.5),s.on("click.function-reset",null)};window.__resetFunctionNodeClick=x,setTimeout(function(){s.on("click.function-reset",function(e){e.target.closest("g")&&e.target.closest("g").__data__&&e.target.closest("g").__data__.id===r.id||x()})},100)}else window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick()}}}({d3:t,pathColors:a,setStatusBarText:s,setClickedFunctionNode:d,setClickedObject:p,clickedFunctionNodeRef:m,link:_,node:T});if(T.on("mouseover",A.handleMouseOver).on("mouseout",A.handleMouseOut).on("click",function(e,t){return A.handleClick(e,t,k)}),o){var O=T.filter(function(e){return e.id===o});O.empty()||m.current||setTimeout(function(){if(!m.current){var e=O.node();if(e){var t=new MouseEvent("click",{bubbles:!0});e.dispatchEvent(t)}}},0)}var j=u.filter(function(e){return"object_anchor"===e.type}),P=z.selectAll("text").data(j).join("text").text(function(e){return xl(e,l)}).attr("font-size","24px").attr("font-weight","bold").attr("fill","#334155").attr("fill-opacity",function(e){return vl(e,l)}).attr("text-anchor","middle").attr("dominant-baseline","middle").style("pointer-events","auto").style("cursor","pointer").style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)"),L=r.groups.map(function(e){var t=u.filter(function(t){return t.objectId===e.id&&"function"===t.type});return i(i({},e),{},{leaves:t})}).filter(function(e){return e.leaves.length>0}),D=R.selectAll("path").data(L).join("path").attr("fill",function(e){return hl(e.path,a)}).attr("fill-opacity",.3).attr("stroke","none").style("cursor","pointer").style("pointer-events","all"),F=function(e){var t=e.d3,n=e.pathColors,r=e.specialLabels,o=e.setStatusBarText,a=e.setClickedObject,l=e.clickedFunctionNodeRef,c=e.clickedObjectRef,s=e.nodes,u=e.node,d=e.hulls,f=e.link,p=e.labelGroup;return{handleMouseOver:function(e,n){l.current||(o(n.path),t.select(e.currentTarget).transition().duration(200).attr("font-size","54px").attr("fill","#0f172a").attr("fill-opacity",1).style("text-shadow","0px 2px 4px rgba(255,255,255,1)").text(xl(n,r)))},handleMouseOut:function(e,n){var a;o(""),(null===(a=c.current)||void 0===a?void 0:a.id)!==n.id&&t.select(e.currentTarget).transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",vl(n,r)).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(xl(n,r))},handleClick:function(e,o,h){e.stopPropagation(),l.current&&window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick();var m=s.filter(function(e){return e.objectId===o.id&&"function"===e.type}),g=new Set(m.map(function(e){return e.id})),x=i(i({},o),{},{functions:m});a(x),c.current=x,window.__panToNode&&void 0!==o.x&&void 0!==o.y&&window.__panToNode(o.x,o.y);var v=hl(o.path,n),b=ml(v),y="0 0 10px ".concat(v,", 0 0 20px ").concat(v,", 0 0 30px ").concat(v,", 0 0 40px ").concat(v);t.select(e.currentTarget).transition().duration(200).attr("font-size","42px").attr("fill",b).style("text-shadow",y),u.each(function(e){g.has(e.id)&&t.select(this).select("circle").transition().duration(200).attr("r",10).attr("stroke","#475569").attr("stroke-width",3).attr("filter","brightness(1.5)")}),d.each(function(e){e.id===o.id&&t.select(this).transition().duration(200).attr("fill-opacity",.6)});var w=function(){a(null),c.current=null,p.selectAll("text").transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",function(e){return vl(e,r)}).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(function(e){return xl(e,r)}),u.transition().duration(200).style("opacity",1).select("circle").attr("fill",function(e){return hl(e.root||e.path,n)}).attr("r",6).attr("stroke","#475569").attr("stroke-width",1.5).attr("filter",null),d.transition().duration(200).attr("fill-opacity",.3),f.transition().duration(200).attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}),h.on("click.label-reset",null)};window.__resetObjectClick=w,setTimeout(function(){h.on("click.label-reset",function(e){"text"===e.target.tagName&&e.target.__data__&&e.target.__data__.id===o.id||w()})},100)}}}({d3:t,pathColors:a,specialLabels:l,setStatusBarText:s,setClickedObject:p,clickedFunctionNodeRef:m,clickedObjectRef:g,nodes:u,node:T,hulls:D,link:_,labelGroup:z});P.on("mouseover",F.handleMouseOver).on("mouseout",F.handleMouseOut).on("click",function(e,t){return F.handleClick(e,t,k)});var B=function(e){var t=e.d3,n=e.pathColors,r=e.specialLabels,o=e.setStatusBarText,a=e.setClickedObject,l=e.clickedFunctionNodeRef,c=e.clickedObjectRef,s=e.nodes,u=e.node,d=e.hulls,f=e.link,p=e.labelGroup;return{handleMouseOver:function(e,t){l.current||(o(t.path),p.selectAll("text").filter(function(e){return e.id===t.id}).transition().duration(200).attr("font-size","54px").attr("fill","#0f172a").attr("fill-opacity",1).style("text-shadow","0px 2px 4px rgba(255,255,255,1)").text(xl(t,r)))},handleMouseOut:function(e,t){var n;o(""),(null===(n=c.current)||void 0===n?void 0:n.id)!==t.id&&p.selectAll("text").filter(function(e){return e.id===t.id}).transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",function(e){return vl(e,r)}).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(function(e){return xl(e,r)})},handleClick:function(e,o,h){e.stopPropagation(),l.current&&window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick();var m=s.find(function(e){return e.id===o.id&&"object_anchor"===e.type});if(m){var g=s.filter(function(e){return e.objectId===o.id&&"function"===e.type}),x=new Set(g.map(function(e){return e.id})),v=i(i({},m),{},{functions:g});a(v),c.current=v,window.__panToNode&&void 0!==m.x&&void 0!==m.y&&window.__panToNode(m.x,m.y);var b=hl(o.path,n),y=ml(b),w="0 0 10px ".concat(b,", 0 0 20px ").concat(b,", 0 0 30px ").concat(b,", 0 0 40px ").concat(b);p.selectAll("text").filter(function(e){return e.id===o.id}).transition().duration(200).attr("font-size","42px").attr("fill",y).style("text-shadow",w),u.each(function(e){x.has(e.id)&&t.select(this).select("circle").transition().duration(200).attr("r",10).attr("stroke","#475569").attr("stroke-width",3).attr("filter","brightness(1.5)")}),t.select(e.currentTarget).transition().duration(200).attr("fill-opacity",.6);var k=function(){a(null),c.current=null,p.selectAll("text").transition().duration(200).attr("font-size","24px").attr("fill","#334155").attr("fill-opacity",function(e){return vl(e,r)}).style("text-shadow","0px 1px 2px rgba(255,255,255,0.8)").text(function(e){return xl(e,r)}),u.transition().duration(200).style("opacity",1).select("circle").attr("fill",function(e){return hl(e.root||e.path,n)}).attr("r",6).attr("stroke","#475569").attr("stroke-width",1.5).attr("filter",null),d.transition().duration(200).attr("fill-opacity",.3),f.transition().duration(200).attr("stroke","#cbd5e1").attr("stroke-opacity",.6).attr("stroke-width",function(e){return 2*Math.sqrt(e.count||1)}),h.on("click.hull-reset",null)};window.__resetObjectClick=k,setTimeout(function(){h.on("click.hull-reset",function(e){var t,n,r="path"===e.target.tagName&&(null===(t=e.target.__data__)||void 0===t?void 0:t.id)===o.id,a="text"===e.target.tagName&&(null===(n=e.target.__data__)||void 0===n?void 0:n.id)===o.id;r||a||k()})},100)}}}}({d3:t,pathColors:a,specialLabels:l,setStatusBarText:s,setClickedObject:p,clickedFunctionNodeRef:m,clickedObjectRef:g,nodes:u,node:T,hulls:D,link:_,labelGroup:z});D.on("mouseover",B.handleMouseOver).on("mouseout",B.handleMouseOut).on("click",function(e,t){return B.handleClick(e,t,k)});var H=function(){b.current=null,C.selectAll("line").remove(),T.selectAll("circle.path-highlight-ring").remove(),_.each(function(){var e=t.select(this),n=e.attr("data-path-prev-stroke");if(null!==n){var r=e.attr("data-path-prev-opacity"),o=e.attr("data-path-prev-width"),a=e.attr("data-path-prev-marker-end");e.attr("stroke",n).attr("stroke-opacity",r).attr("stroke-width",o),a?e.attr("marker-end",a):e.attr("marker-end",null),e.attr("data-path-prev-stroke",null).attr("data-path-prev-opacity",null).attr("data-path-prev-width",null).attr("data-path-prev-marker-end",null)}})};window.__panToNodeById=function(e){var t=u.find(function(t){return t.id===e});return!(!t||void 0===t.x||void 0===t.y)&&(E(t.x,t.y),!0)},window.__clickNodeById=function(e){var t=!1;return T.each(function(n){if(n.id===e){var r=new MouseEvent("click",{bubbles:!0});this.dispatchEvent(r),t=!0}}),t},window.__highlightPathBetweenNodes=function(e,n){if(H(),e===n)b.current={nodes:new Set([e]),links:[]};else{var r=f.filter(function(e){return"call"===e.type}),o=new Map;r.forEach(function(e){var t=wl(e.source),n=wl(e.target);o.has(t)||o.set(t,[]),o.get(t).push({nextId:n,link:e})});for(var a=[e],i=new Set([e]),l=new Map,c=function(){var e=a.shift();if(e===n)return 1;(o.get(e)||[]).forEach(function(t){var n=t.nextId,r=t.link;i.has(n)||(i.add(n),l.set(n,{prevId:e,link:r}),a.push(n))})};a.length>0&&!c(););if(!l.has(n))return!1;for(var s=[],u=new Set([e,n]),d=n;d!==e;){var p=l.get(d);if(!p)break;s.push(p.link),u.add(p.prevId),d=p.prevId}s.reverse(),b.current={nodes:u,links:s}}if(!b.current)return!1;var h=b.current.links,m=new Set(h.map(function(e){return"".concat(wl(e.source),"::").concat(wl(e.target))}));_.each(function(e){var n="".concat(wl(e.source),"::").concat(wl(e.target));if(m.has(n)){var r=t.select(this);null===r.attr("data-path-prev-stroke")&&r.attr("data-path-prev-stroke",r.attr("stroke")||"").attr("data-path-prev-opacity",r.attr("stroke-opacity")||"").attr("data-path-prev-width",r.attr("stroke-width")||"").attr("data-path-prev-marker-end",r.attr("marker-end")||""),r.attr("stroke","#facc15").attr("stroke-opacity",1).attr("stroke-width",4).attr("marker-end","url(#arrow-path)")}}),C.selectAll("line").data(h,function(e){return"".concat(wl(e.source),"-").concat(wl(e.target))}).join("line").attr("stroke","#facc15").attr("stroke-opacity",1).attr("stroke-width",4).attr("marker-end","url(#arrow-path)").style("pointer-events","none");var g=b.current.nodes;return T.each(function(e){if(g.has(e.id)){var n=t.select(this);n.select("circle.path-highlight-ring").empty()&&n.append("circle").attr("class","path-highlight-ring").attr("r",14).attr("fill","none").attr("stroke","#facc15").attr("stroke-width",2).attr("opacity",.9).style("pointer-events","none")}}),!0},window.__clearPathHighlight=H,w.on("tick",function(){T.attr("transform",function(e){return"translate(".concat(e.x,",").concat(e.y,")")}),P.attr("x",function(e){return e.x}).attr("y",function(e){return e.y}),_.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y}),C.selectAll("line").attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y}),D.attr("d",function(e){return function(e,t){if(0===e.length)return"";var n=e.map(function(e){var t,n;return[null!==(t=e.x)&&void 0!==t?t:0,null!==(n=e.y)&&void 0!==n?n:0]});if(1===e.length){var r=n[0];return"M ".concat(r[0],",").concat(r[1]," L ").concat(r[0],",").concat(r[1])}if(2===e.length)return"M ".concat(n[0][0],",").concat(n[0][1]," L ").concat(n[1][0],",").concat(n[1][1]);var o=t.polygonHull(n);return o?"M"+o.map(function(e){return e.join(",")}).join("L")+"Z":""}(e.leaves,t)})}),w.on("end",function(){if(o&&!y.current){var e=u.find(function(e){return e.id===o});e&&void 0!==e.x&&void 0!==e.y&&(y.current=!0,E(e.x,e.y))}}),h.current=w;var U=t.zoom().scaleExtent([.1,4]).on("zoom",function(e){S.attr("transform",e.transform),C.attr("transform",e.transform),N.attr("transform",e.transform),R.attr("transform",e.transform),z.attr("transform",e.transform),v.current=e.transform});return k.call(U),x.current=U,v.current=t.zoomIdentity,function(){w.stop(),H(),delete window.__panToNodeById,delete window.__clickNodeById,delete window.__highlightPathBetweenNodes,delete window.__clearPathHighlight}}},[r,o,c,t,n,a,l,s,d,p]),{simulationRef:h,clickedFunctionNodeRef:m,handleZoomIn:w,handleZoomOut:k}},El=function(e){var t=e.data,n=e.onRefresh;return React.createElement("div",{className:"flex items-center justify-between px-6 py-4 bg-slate-50 border-b border-slate-200 shadow-sm z-10"},React.createElement("div",{className:"flex items-center space-x-3"},React.createElement("div",{className:"bg-blue-600 p-2 rounded-lg"},React.createElement($i,{className:"w-5 h-5 text-white"})),React.createElement("div",null,React.createElement("h1",{className:"text-lg font-bold text-slate-900 leading-tight"},"Dependency Graph"),React.createElement("p",{className:"text-xs text-slate-500"},t?"".concat(t.objects.length," Objects • ").concat(t.functions.length," Functions"):"Initializing..."))),n&&React.createElement("button",{onClick:n,className:"p-2 text-slate-500 hover:text-slate-900 hover:bg-slate-200 rounded-full transition-colors",title:"Regenerate Graph"},React.createElement(Bi,{className:"w-5 h-5"})))},Rl=function(e){var t=e.text;return React.createElement("div",{className:"px-6 py-2 bg-slate-100 border-b border-slate-200 z-10 min-h-[40px] flex items-center"},React.createElement("span",{className:"text-sm font-mono text-slate-600"},t||" "))},Sl=function(e){var t=e.pathColors,n=s(React.useState(!0),2),r=n[0],o=n[1];return React.createElement("div",{className:"absolute top-4 left-4 bg-white/90 backdrop-blur-sm rounded-xl border border-slate-200 shadow-xl max-w-xs"},React.createElement("button",{onClick:function(){return o(!r)},className:"flex items-center justify-between w-full p-4 cursor-pointer text-left"},React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider"},"Object Categories"),React.createElement("svg",{className:"w-3.5 h-3.5 text-slate-500 transition-transform duration-200 ".concat(r?"":"-rotate-90"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2},React.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))),r&&React.createElement("div",{className:"grid grid-cols-2 gap-y-2 gap-x-4 px-4 pb-4"},Object.keys(t).map(function(e){return React.createElement("div",{key:e,className:"flex items-center space-x-2"},React.createElement("span",{className:"w-3 h-3 rounded-full shadow-sm",style:{backgroundColor:t[e]}}),React.createElement("span",{className:"text-xs text-slate-700 font-medium"},e))})))},Cl=function(e){var t,n,r=e.node,o=e.pathColors,a=hl(r.root||r.path,o);return React.createElement("div",{className:"absolute z-50 pointer-events-none bg-white/95 backdrop-blur-md p-4 rounded-lg border border-slate-200 shadow-2xl transition-opacity duration-200",style:{left:20,bottom:20,maxWidth:"300px"}},React.createElement("div",{className:"flex items-start justify-between mb-2"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:a}},r.root||(null===(t=r.path)||void 0===t?void 0:t.split("/")[1])),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},null===(n=r.type)||void 0===n?void 0:n.replace("_"," "))),React.createElement("div",{className:"mb-2"},React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words"},r.name),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},r.path||r.objectPath)))},Nl=function(e){var t=e.object,n=e.pathColors,r=hl(t.root||t.path,n);return React.createElement("div",{className:"absolute z-50 pointer-events-none bg-white/95 backdrop-blur-md p-4 rounded-lg border border-slate-200 shadow-2xl transition-opacity duration-200",style:{left:20,bottom:20,maxWidth:"400px",maxHeight:"500px",overflowY:"auto"}},React.createElement("div",{className:"flex items-start justify-between mb-2"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:r}},t.root||t.path.split("/")[1]),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},"Object")),React.createElement("div",{className:"mb-3"},React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words"},gl(t.name)),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},t.path)),React.createElement("div",{className:"border-t border-slate-200 pt-3"},React.createElement("h3",{className:"text-sm font-semibold text-slate-700 mb-2"},"Functions (",t.functions.length,")"),React.createElement("div",{className:"space-y-1 max-h-80 overflow-y-auto"},t.functions.map(function(e){return React.createElement("div",{key:e.id,className:"text-xs text-slate-700 bg-slate-100 px-2 py-1 rounded font-mono"},e.name)}))))},zl=function(){return React.createElement("div",{className:"flex items-center justify-center py-6"},React.createElement("div",{className:"w-6 h-6 rounded-full",style:{borderWidth:"3px",borderStyle:"solid",borderTopColor:"#0284c7",borderRightColor:"#cbd5e1",borderBottomColor:"#cbd5e1",borderLeftColor:"#cbd5e1",animation:"spin 0.8s linear infinite"}}))},Il=function(e){var t=e.nodes,n=e.pathColors,r=e.onClickNode;return React.createElement("div",{className:"space-y-1"},t.map(function(e){return React.createElement("div",{key:e.id,className:"flex items-center gap-2 text-xs bg-slate-100 px-2 py-1 rounded font-mono".concat(r?" cursor-pointer hover:bg-slate-200 transition-colors":""),onClick:r?function(){return r(e.id)}:void 0},React.createElement("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:hl(e.root||e.objectPath,n)}}),React.createElement("span",{className:"text-slate-700 truncate"},e.name))}))},_l=function(e){var t,n=e.object,r=e.pathColors,o=e.onClickNode,a=hl(n.root||n.path,r),i=n.functions||[];return React.createElement("div",{className:"absolute z-50 bg-white/95 backdrop-blur-md rounded-lg border border-slate-200 shadow-2xl overflow-hidden flex flex-col",style:{right:20,top:20,bottom:20,width:"360px"}},React.createElement("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-200"},React.createElement("span",{className:"text-sm font-semibold text-slate-800"},"Details")),React.createElement("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4"},React.createElement("div",null,React.createElement("div",{className:"flex items-start justify-between mb-1"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:a}},n.root||(null===(t=n.path)||void 0===t?void 0:t.split("/")[1])),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},"Object")),React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words mt-2"},gl(n.name)),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},n.path)),React.createElement("div",null,React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1"},"Functions (",i.length,")"),React.createElement(Il,{nodes:i,pathColors:r,onClickNode:o})),0===i.length&&React.createElement("div",{className:"text-xs text-slate-400 italic"},"No functions")))},Ml=function(e){var t,n,o=e.node,a=e.data,i=e.loading,l=e.content,c=e.pathColors,s=hl(o.root||o.path,c),d=React.useMemo(function(){var e,t=new Map,n=r(a.functions);try{for(n.s();!(e=n.n()).done;){var i=e.value;t.set(i.id,i)}}catch(e){n.e(e)}finally{n.f()}var l,c=new Set,s=new Set,d=r(a.calls);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.target===o.id&&f.source!==o.id&&c.add(f.source),f.source===o.id&&f.target!==o.id&&s.add(f.target)}}catch(e){d.e(e)}finally{d.f()}return{parents:u(c).map(function(e){return t.get(e)}).filter(Boolean),children:u(s).map(function(e){return t.get(e)}).filter(Boolean)}},[o.id,a]),f=d.parents,p=d.children;return React.createElement("div",{className:"absolute z-50 bg-white/95 backdrop-blur-md rounded-lg border border-slate-200 shadow-2xl overflow-hidden flex flex-col",style:{right:20,top:20,bottom:20,width:"360px"}},React.createElement("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-200"},React.createElement("span",{className:"text-sm font-semibold text-slate-800"},"Details")),React.createElement("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4"},React.createElement("div",null,React.createElement("div",{className:"flex items-start justify-between mb-1"},React.createElement("span",{className:"text-xs font-bold px-2 py-0.5 rounded text-white",style:{backgroundColor:s}},o.root||(null===(t=o.path)||void 0===t?void 0:t.split("/")[1])),React.createElement("span",{className:"text-xs text-slate-500 capitalize"},null===(n=o.type)||void 0===n?void 0:n.replace("_"," "))),React.createElement("h2",{className:"text-lg font-bold text-slate-900 break-words mt-2"},o.name),React.createElement("div",{className:"text-xs text-slate-500 font-mono break-all mt-1"},o.objectPath||o.path)),f.length>0&&React.createElement("div",null,React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1"},"Called by (",f.length,")"),React.createElement(Il,{nodes:f,pathColors:c})),p.length>0&&React.createElement("div",null,React.createElement("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-1"},"Calls (",p.length,")"),React.createElement(Il,{nodes:p,pathColors:c})),0===f.length&&0===p.length&&React.createElement("div",{className:"text-xs text-slate-400 italic"},"No connections"),React.createElement("div",{className:"border-t border-slate-200 pt-3"},i?React.createElement(zl,null):l?React.createElement("div",{className:"prose prose-sm max-w-none text-slate-700 [&_h1]:text-lg [&_h1]:text-slate-900 [&_h1]:mt-0 [&_h2]:text-base [&_h2]:text-slate-800 [&_h3]:text-sm [&_h3]:text-slate-700 [&_code]:bg-slate-100 [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sky-700 [&_pre]:bg-slate-100 [&_pre]:border [&_pre]:border-slate-200 [&_pre]:rounded-lg [&_table]:text-xs [&_th]:text-slate-700 [&_td]:text-slate-500 [&_hr]:border-slate-200"},React.createElement(wo,null,l)):null)))},Tl=function(e){var t=e.onZoomIn,n=e.onZoomOut;return React.createElement("div",{className:"absolute bottom-6 right-6 flex flex-col space-y-2"},React.createElement("div",{className:"bg-white border border-slate-200 rounded-lg shadow-lg p-1 flex flex-col"},React.createElement("button",{className:"p-2 hover:bg-slate-100 text-slate-500 hover:text-slate-900 rounded",title:"Zoom In",onClick:t},React.createElement(Ji,{className:"w-5 h-5"})),React.createElement("button",{className:"p-2 hover:bg-slate-100 text-slate-500 hover:text-slate-900 rounded",title:"Zoom Out",onClick:n},React.createElement(el,{className:"w-5 h-5"}))))},Al=function(e){var t=e.onClick;return React.createElement("button",{onClick:t,className:"absolute top-4 right-4 bg-white/90 backdrop-blur-sm p-2 rounded-lg border border-slate-200 shadow-xl hover:bg-slate-100 transition-colors",title:"Search (Press /)"},React.createElement(Vi,{className:"w-5 h-5 text-slate-500"}))},Ol=function(e){var t=e.onClick;return React.createElement("button",{onClick:t,className:"absolute top-4 right-24 bg-white/90 backdrop-blur-sm p-2 rounded-lg border border-slate-200 shadow-xl hover:bg-slate-100 transition-colors",title:"Go to root node"},React.createElement(Ti,{className:"w-5 h-5 text-emerald-600"}))},jl=function(e){var t=e.onClick;return React.createElement("button",{onClick:t,className:"absolute top-4 right-14 bg-white/90 backdrop-blur-sm p-2 rounded-lg border border-slate-200 shadow-xl hover:bg-slate-100 transition-colors",title:"Find path from selected node or root"},React.createElement(Ui,{className:"w-5 h-5 text-amber-500"}))},Pl=function(e){var t=e.searchOpen,n=e.searchQuery,r=e.setSearchQuery,o=e.searchResults,a=e.selectedSearchIndex,i=e.setSelectedSearchIndex,l=e.searchInputRef,c=e.searchResultsRef,s=e.handleSearchSelect,u=e.handleSearchKeyDown,d=e.closeSearch,f=e.pathColors,p=e.placeholder,h=void 0===p?"Search objects or functions...":p,m=e.emptyHint,g=void 0===m?"Type to search for objects or functions in the graph":m;return t?React.createElement("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm flex items-start justify-center pt-20 z-50",onClick:function(e){e.target===e.currentTarget&&d()}},React.createElement("div",{className:"bg-white border border-slate-300 rounded-xl shadow-2xl w-full max-w-lg overflow-hidden"},React.createElement("div",{className:"flex items-center px-4 py-3 border-b border-slate-200"},React.createElement(Vi,{className:"w-5 h-5 text-slate-400 mr-3"}),React.createElement("input",{ref:l,type:"text",value:n,onChange:function(e){return r(e.target.value)},placeholder:h,className:"flex-1 bg-transparent text-slate-900 placeholder-slate-400 outline-none text-sm",onKeyDown:u}),React.createElement("span",{className:"text-xs text-slate-400 ml-2"},"ESC to close")),React.createElement("div",{className:"max-h-80 overflow-y-auto",ref:c},n.trim()&&0===o.length&&React.createElement("div",{className:"px-4 py-8 text-center text-slate-400 text-sm"},'No results found for "',n,'"'),o.map(function(e,t){return React.createElement("button",{key:"".concat(e.type,"-").concat(e.item.id),onClick:function(){return s(e)},onMouseEnter:function(){return i(t)},className:"w-full px-4 py-3 flex items-center gap-3 hover:bg-slate-100 transition-colors text-left ".concat(t===a?"bg-slate-100":"")},React.createElement("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center ".concat("function"===e.type?"bg-blue-100 text-blue-600":"bg-amber-100 text-amber-600")},"function"===e.type?React.createElement(_i,{className:"w-4 h-4"}):React.createElement(Ri,{className:"w-4 h-4"})),React.createElement("div",{className:"flex-1 min-w-0"},React.createElement("div",{className:"flex items-center gap-2"},React.createElement("span",{className:"text-slate-900 font-medium truncate"},e.item.name),React.createElement("span",{className:"text-xs px-1.5 py-0.5 rounded ".concat("function"===e.type?"bg-blue-100 text-blue-600":"bg-amber-100 text-amber-600")},e.type)),React.createElement("div",{className:"text-xs text-slate-400 truncate mt-0.5"},"function"===e.type?e.item.objectPath:e.item.path)),React.createElement("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{backgroundColor:hl(e.item.root||e.item.path,f)}}))})),!n.trim()&&React.createElement("div",{className:"px-4 py-3 border-t border-slate-200 text-xs text-slate-400"},g))):null},Ll={v1:{TeamBuilder:function(e){return(0,e.withBindings)(ul)},KnowledgeGraph:function(e){return(0,e.withBindings)(dl)},DecentralisedTeam:function(e){var t=e.withBindings;return t?t(pl):pl},NodeBrowser:function(e){var t=e.data,n=e.pathColors,r=e.onRefresh,o=e.onNodeClick,a=e.specialLabels,l=void 0===a?{}:a,c=function(){var e=s(React.useState(!0),2),t=e[0],n=e[1],r=React.useRef(null);return React.useEffect(function(){if(window.d3)return r.current=window.d3,void n(!1);var e=document.createElement("script");e.src="https://d3js.org/d3.v7.min.js",e.onload=function(){r.current=window.d3,n(!1)},document.body.appendChild(e)},[]),{d3:r.current,d3Ref:r,loading:t}}(),d=c.d3,f=c.d3Ref,p=c.loading,h=function(e){return React.useMemo(function(){if(!e)return{nodes:[],links:[],groups:[]};var t=e.root,n=e.functions.map(function(e){return i(i({},e),{},{path:e.objectPath,type:"function",r:6,isRoot:t===e.id})}),r=e.objects.map(function(e){return i(i({},e),{},{type:"object_anchor",r:1})}),o=e.calls.map(function(e){return{source:e.source,target:e.target,type:"call"}}),a=n.map(function(e){return{source:e.id,target:e.objectId,type:"structure"}});return{nodes:[].concat(u(n),u(r)),links:[].concat(u(o),u(a)),groups:e.objects.map(function(e){return{id:e.id,root:e.root,path:e.path,name:e.name,leaves:[]}})}},[e])}(t),m=s(React.useState(""),2),g=m[0],x=m[1],v=s(React.useState(null),2),b=v[0],y=v[1],w=s(React.useState(null),2),k=w[0],E=w[1],R=s(React.useState(!1),2),S=R[0],C=R[1],N=s(React.useState(!1),2),z=N[0],I=N[1],_=s(React.useState(null),2),M=_[0],T=_[1],A=React.useRef(o);A.current=o;var O=React.useRef(0);React.useEffect(function(){if(!b||!A.current)return I(!1),void T(null);var e=++O.current;I(!0),T(null),Promise.resolve(A.current(b)).then(function(t){O.current===e&&(T(t),I(!1))},function(){O.current===e&&(T("*Failed to load details.*"),I(!1))})},[b]);var j=React.useCallback(function(e){window.__resetObjectClick&&window.__resetObjectClick(),window.__clickNodeById&&window.__clickNodeById(e)},[]),P=React.useRef(null),L=React.useCallback(function(e){var t=f.current;t&&P.current&&(window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick(),"function"===e.type?t.select(P.current).select(".nodes").selectAll("g").each(function(t){if(t.id===e.item.id){var n=new MouseEvent("click",{bubbles:!0});this.dispatchEvent(n)}}):t.select(P.current).select(".labels").selectAll("text").each(function(t){if(t.id===e.item.id){var n=new MouseEvent("click",{bubbles:!0});this.dispatchEvent(n)}}))},[f]),D=React.useCallback(function(e){var n=(null==b?void 0:b.id)||t.root;if(n&&"function"===e.type&&window.__highlightPathBetweenNodes){var r=window.__highlightPathBetweenNodes(n,e.item.id);C(Boolean(r)),x(r?"Path highlighted to ".concat(e.item.name):"No path found to ".concat(e.item.name))}},[b,t.root]),F=yl({data:t,onSelect:L}),B=yl({data:t,onSelect:D,allowedTypes:["function"]}),H=React.useCallback(function(){B.closeSearch(),F.openSearch()},[B,F]),U=React.useCallback(function(){if(S&&window.__clearPathHighlight)return window.__clearPathHighlight(),void C(!1);F.closeSearch(),B.openSearch()},[S,B,F]),q=React.useCallback(function(){t.root&&window.__clickNodeById&&window.__clickNodeById(t.root)},[t.root]),V=kl({d3:d,svgRef:P,graphData:h,rootId:t.root,pathColors:n,specialLabels:l,loading:p,setStatusBarText:x,clickedFunctionNode:b,setClickedFunctionNode:y,clickedObject:k,setClickedObject:E}),W=V.handleZoomIn,Y=V.handleZoomOut;return function(e){var t=e.onSlash,n=e.onEscape,r=e.searchOpen,o=e.onSearchEscape;React.useEffect(function(){var e=function(e){e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||"/"===e.key&&(e.preventDefault(),t())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[t]),React.useEffect(function(){var e=function(e){"Escape"===e.key&&r&&o()};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[r,o]),React.useEffect(function(){var e=function(e){"Escape"!==e.key||r||n()};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[n,r])}({onSlash:H,onEscape:function(){window.__resetFunctionNodeClick&&window.__resetFunctionNodeClick(),window.__resetObjectClick&&window.__resetObjectClick(),window.__clearPathHighlight&&(window.__clearPathHighlight(),C(!1))},searchOpen:F.searchOpen||B.searchOpen,onSearchEscape:function(){F.closeSearch(),B.closeSearch()}}),p?React.createElement("div",{className:"flex items-center justify-center h-screen bg-slate-50 text-slate-900"},"Loading Physics Engine..."):React.createElement("div",{className:"flex flex-col h-screen bg-white text-slate-800 font-sans overflow-hidden"},React.createElement(El,{data:t,onRefresh:r}),React.createElement(Rl,{text:g}),React.createElement("div",{className:"relative flex-1 bg-white overflow-hidden cursor-move"},React.createElement("svg",{ref:P,className:"w-full h-full block"},React.createElement("defs",null,React.createElement("marker",{id:"arrow-default",viewBox:"0 -5 10 10",refX:"16",refY:"0",markerWidth:"6",markerHeight:"6",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#cbd5e1",fillOpacity:"0.5"})),React.createElement("marker",{id:"arrow-input",viewBox:"0 -5 10 10",refX:"24",refY:"0",markerWidth:"8",markerHeight:"8",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#4ade80"})),React.createElement("marker",{id:"arrow-output",viewBox:"0 -5 10 10",refX:"18",refY:"0",markerWidth:"8",markerHeight:"8",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#f472b6"})),React.createElement("marker",{id:"arrow-path",viewBox:"0 -5 10 10",refX:"18",refY:"0",markerWidth:"8",markerHeight:"8",orient:"auto"},React.createElement("path",{d:"M0,-5L10,0L0,5",fill:"#facc15"}))),React.createElement("g",{className:"hulls"}),React.createElement("g",{className:"links"}),React.createElement("g",{className:"path-links"}),React.createElement("g",{className:"nodes"}),React.createElement("g",{className:"labels"})),React.createElement(Sl,{pathColors:n}),b&&React.createElement(Cl,{node:b,pathColors:n}),k&&b&&React.createElement(Nl,{object:k,pathColors:n}),o&&b&&React.createElement(Ml,{node:b,data:t,loading:z,content:M,pathColors:n}),k&&React.createElement(_l,{object:k,pathColors:n,onClickNode:j}),React.createElement(Tl,{onZoomIn:W,onZoomOut:Y}),t.root&&React.createElement(Ol,{onClick:q}),(b||t.root)&&React.createElement(jl,{onClick:U}),React.createElement(Al,{onClick:H}),React.createElement(Pl,{searchOpen:F.searchOpen,searchQuery:F.searchQuery,setSearchQuery:F.setSearchQuery,searchResults:F.searchResults,selectedSearchIndex:F.selectedSearchIndex,setSelectedSearchIndex:F.setSelectedSearchIndex,searchInputRef:F.searchInputRef,searchResultsRef:F.searchResultsRef,handleSearchSelect:F.handleSearchSelect,handleSearchKeyDown:F.handleSearchKeyDown,closeSearch:F.closeSearch,pathColors:n}),React.createElement(Pl,{searchOpen:B.searchOpen,searchQuery:B.searchQuery,setSearchQuery:B.setSearchQuery,searchResults:B.searchResults,selectedSearchIndex:B.selectedSearchIndex,setSelectedSearchIndex:B.setSelectedSearchIndex,searchInputRef:B.searchInputRef,searchResultsRef:B.searchResultsRef,handleSearchSelect:B.handleSearchSelect,handleSearchKeyDown:B.handleSearchKeyDown,closeSearch:B.closeSearch,pathColors:n,placeholder:"Search for a destination function...",emptyHint:"Type to search for a destination function"})))}}};export{Ll as default};