PageSourceSearch

https://app.pillar.codes/_next/static/chunks/0h~.kb5~ehx0..js?dpl=dpl_E5GWfdvqVgYjGap8XcCYs6cV9z7P

js pillar.codes collected 2026-10-05 08:45:59 UTC 266,309 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,959208,e=>{"use strict";let t=(0,e.i(475254).default)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,t],959208)},110597,e=>{"use strict";let t=(0,e.i(475254).default)("alarm-clock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);e.s(["AlarmClock",0,t],110597)},126568,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g;function d(e){return e?e.replace(c,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,c=1;function h(e){var t=e.match(i);t&&(n+=t.length);var r=e.lastIndexOf("\n");c=~r?e.length-r:c+e.length}function p(){var e={line:n,column:c};return function(t){return t.position=new f(e),g(a),t}}function f(e){this.start=e,this.end={line:n,column:c},this.source=t.source}function m(r){var i=Error(t.source+":"+n+":"+c+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=c,i.source=e,t.silent);else throw i}function g(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function y(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return c+=2,h(r),e=e.slice(n),c+=2,t({type:"comment",comment:r})}}f.prototype.content=e,g(a);var v,b=[];for(y(b);v=function(){var e=p(),t=g(o);if(t){if(x(),!g(l))return m("property missing ':'");var n=g(s),i=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(u),i}}();)!1!==v&&(b.push(v),y(b));return b}},270454,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),a="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;a?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(e.r(126568))},965185,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},u=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||a.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(l,u):e.replace(o,u)).replace(i,s))}},515511,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(270454)),i=e.r(965185);function a(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a},104100,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!a)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,o,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(t=arguments[h],null!=t)for(n in t)r=c(d,n),d!==(i=c(t,n))&&(f&&i&&(s(i)||(a=l(i)))?(a?(a=!1,o=r&&l(r)?r:[]):o=r&&s(r)?r:{},u(d,{name:n,newValue:e(f,o,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d}},918789,742531,e=>{"use strict";function t(){}function n(){}let r=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,i=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a={};function o(e,t){return((t||a).jsx?i:r).test(e)}let l=/[ \t\n\f\r]/g;function s(e){return""===e.replace(l,"")}class u{constructor(e,t){this.attribute=t,this.property=e}}u.prototype.attribute="",u.prototype.booleanish=!1,u.prototype.boolean=!1,u.prototype.commaOrSpaceSeparated=!1,u.prototype.commaSeparated=!1,u.prototype.defined=!1,u.prototype.mustUseProperty=!1,u.prototype.number=!1,u.prototype.overloadedBoolean=!1,u.prototype.property="",u.prototype.spaceSeparated=!1,u.prototype.space=void 0;let c=0,d=x(),h=x(),p=x(),f=x(),m=x(),g=x(),y=x();function x(){return 2**++c}e.s(["boolean",0,d,"booleanish",0,h,"commaOrSpaceSeparated",0,y,"commaSeparated",0,g,"number",0,f,"overloadedBoolean",0,p,"spaceSeparated",0,m],400744);var v=e.i(400744);let b=Object.keys(v);class k extends u{constructor(e,t,n,r){let i=-1;
1if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<b.length;){const e=b[i];!function(e,t,n){n&&(e[t]=n)}(this,b[i],(n&v[e])===v[e])}}}function w(e){return e.toLowerCase()}k.prototype.defined=!0;let C=/[A-Z]/g,S=/-[a-z]/g,D=/^data[-\w.:]+$/i;function T(e){return"-"+e.toLowerCase()}function j(e){return e.charAt(1).toUpperCase()}let N={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"};class O{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function E(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new O(n,r,t)}function _(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new k(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[w(r)]=r,n[w(a.attribute)]=r}return new O(t,n,e.space)}O.prototype.normal={},O.prototype.property={},O.prototype.space=void 0;let A=_({properties:{ariaActiveDescendant:null,ariaAtomic:h,ariaAutoComplete:null,ariaBusy:h,ariaChecked:h,ariaColCount:f,ariaColIndex:f,ariaColSpan:f,ariaControls:m,ariaCurrent:null,ariaDescribedBy:m,ariaDetails:null,ariaDisabled:h,ariaDropEffect:m,ariaErrorMessage:null,ariaExpanded:h,ariaFlowTo:m,ariaGrabbed:h,ariaHasPopup:null,ariaHidden:h,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:m,ariaLevel:f,ariaLive:null,ariaModal:h,ariaMultiLine:h,ariaMultiSelectable:h,ariaOrientation:null,ariaOwns:m,ariaPlaceholder:null,ariaPosInSet:f,ariaPressed:h,ariaReadOnly:h,ariaRelevant:null,ariaRequired:h,ariaRoleDescription:m,ariaRowCount:f,ariaRowIndex:f,ariaRowSpan:f,ariaSelected:h,ariaSetSize:f,ariaSort:null,ariaValueMax:f,ariaValueMin:f,ariaValueNow:f,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function P(e,t){return t in e?e[t]:t}function M(e,t){return P(e,t.toLowerCase())}let z=_({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:g,acceptCharset:m,accessKey:m,action:null,allow:null,allowFullScreen:d,allowPaymentRequest:d,allowUserMedia:d,alt:null,as:null,async:d,autoCapitalize:null,autoComplete:m,autoFocus:d,autoPlay:d,blocking:m,capture:null,charSet:null,checked:d,cite:null,className:m,cols:f,colSpan:null,content:null,contentEditable:h,controls:d,controlsList:m,coords:f|g,crossOrigin:null,data:null,dateTime:null,decoding:null,default:d,defer:d,dir:null,dirName:null,disabled:d,download:p,draggable:h,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:d,formTarget:null,headers:m,height:f,hidden:p,high:f,href:null,hrefLang:null,htmlFor:m,httpEquiv:m,id:null,imageSizes:null,imageSrcSet:null,inert:d,inputMode:null,integrity:null,is:null,isMap:d,itemId:null,itemProp:m,itemRef:m,itemScope:d,itemType:m,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:d,low:f,manifest:null,max:null,maxLength:f,media:null,method:null,min:null,minLength:f,multiple:d,muted:d,name:null,nonce:null,noModule:d,noValidate:d,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:d,optimum:f,pattern:null,ping:m,placeholder:null,playsInl
1ine:d,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:d,referrerPolicy:null,rel:m,required:d,reversed:d,rows:f,rowSpan:f,sandbox:m,scope:null,scoped:d,seamless:d,selected:d,shadowRootClonable:d,shadowRootDelegatesFocus:d,shadowRootMode:null,shape:null,size:f,sizes:null,slot:null,span:f,spellCheck:h,src:null,srcDoc:null,srcLang:null,srcSet:null,start:f,step:null,style:null,tabIndex:f,target:null,title:null,translate:null,type:null,typeMustMatch:d,useMap:null,value:h,width:f,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:m,axis:null,background:null,bgColor:null,border:f,borderColor:null,bottomMargin:f,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:d,declare:d,event:null,face:null,frame:null,frameBorder:null,hSpace:f,leftMargin:f,link:null,longDesc:null,lowSrc:null,marginHeight:f,marginWidth:f,noResize:d,noHref:d,noShade:d,noWrap:d,object:null,profile:null,prompt:null,rev:null,rightMargin:f,rules:null,scheme:null,scrolling:h,standby:null,summary:null,text:null,topMargin:f,valueType:null,version:null,vAlign:null,vLink:null,vSpace:f,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:d,disableRemotePlayback:d,prefix:null,property:null,results:f,security:null,unselectable:null},space:"html",transform:M}),I=_({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
1-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:y,accentHeight:f,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:f,amplitude:f,arabicForm:null,ascent:f,attributeName:null,attributeType:null,azimuth:f,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:f,by:null,calcMode:null,capHeight:f,className:m,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:f,diffuseConstant:f,direction:null,display:null,dur:null,divisor:f,dominantBaseline:null,download:d,dx:null,dy:null,edgeMode:null,editable:null,elevation:f,enableBackground:null,end:null,event:null,exponent:f,externalResourcesRequired:null,fill:null,fillOpacity:f,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:g,g2:g,glyphName:g,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:f,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:f,horizOriginX:f,horizOriginY:f,id:null,ideographic:f,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:f,k:f,k1:f,k2:f,k3:f,k4:f,kernelMatrix:y,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:f,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:f,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,on
1Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:f,overlineThickness:f,paintOrder:null,panose1:null,path:null,pathLength:f,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:m,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:f,pointsAtY:f,pointsAtZ:f,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:y,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:y,rev:y,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:y,requiredFeatures:y,requiredFonts:y,requiredFormats:y,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:f,specularExponent:f,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:f,strikethroughThickness:f,string:null,stroke:null,strokeDashArray:y,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:f,strokeOpacity:f,strokeWidth:null,style:null,surfaceScale:f,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:y,tabIndex:f,tableValues:null,target:null,targetX:f,targetY:f,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:y,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:f,underlineThickness:f,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:f,values:null,vAlphabetic:f,vMathematical:f,vectorEffect:null,vHanging:f,vIdeographic:f,version:null,vertAdvY:f,vertOriginX:f,vertOriginY:f,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:f,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:P}),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()}),R=_({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:M}),F=_({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),U=E([A,z,L,R,F],"html"),W=E([A,I,L,R,F],"svg");var H=e.i(515511);let B=X("end"),$=X("start");function X(e){return function(t){let 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 q(e){return e&&"object"==typeof e?"position"in e||"type"in e?K(e.position):"start"in e||"end"in e?K(e):"line"in e||"column"in e?V(e):"":""}function V(e){return Y(e&&e.line)+":"+Y(e&&e.column)}function K(e){return V(e&&e.start)+"-"+V(e&&e.end)}function Y(e){return e&&"number"==typeof e?e:1}
1class Z extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="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:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=o?o.line:void 0,this.name=q(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Z.prototype.file="",Z.prototype.name="",Z.prototype.reason="",Z.prototype.message="",Z.prototype.stack="",Z.prototype.column=void 0,Z.prototype.line=void 0,Z.prototype.ancestors=void 0,Z.prototype.cause=void 0,Z.prototype.fatal=void 0,Z.prototype.place=void 0,Z.prototype.ruleId=void 0,Z.prototype.source=void 0;let J={}.hasOwnProperty,Q=new Map,G=/[A-Z]/g,ee=new Set(["table","tbody","thead","tfoot","tr"]),et=new Set(["td","th"]),en="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function er(e,n,r){var i,a,o,l,c,d,h,p,f;let m,g,y,x,v,b,O,E,_,A,P;return"element"===n.type?(i=e,a=n,o=r,g=m=i.schema,"svg"===a.tagName.toLowerCase()&&"html"===m.space&&(i.schema=W),i.ancestors.push(a),y=el(i,a.tagName,!1),x=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&J.call(t.properties,r)){let a=function(e,t,n){let r=function(e,t){let n=w(t),r=t,i=u;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&D.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(S,j);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!S.test(e)){let n=e.replace(C,T);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=k}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,H.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new Z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=en+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)J.call(e,t)&&(n[function(e){let t=e.replace(G,eu);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?N[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(a){let[r,o]=a;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof o&&et.has(t.tagName)?n=o:i[r]=o}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(i,a),v=eo(i,a),ee.has(a.tagName)&&(v=v.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&s(e.value):s(e))})),ei(i,x,y,a),ea(x,v),i.ancestors.pop(),i.schema=m,i.create(a,y,x,o)):"mdxFlowExpression"===n.type||"mdxTextExpression"===n.type?function(e,n){if(n.data&&n.data.estree&&e.evaluater){let r=n.data.estree.body[0];return t("ExpressionStatement"===r.type),e.evaluater.evaluateExpression(r.expression)}es(e,n.position)}(e,n):"mdxJsxFlowElement"===n.type||"mdxJsxTextElement"===n.type?(l=e,c=n,d=r,O=b=l.schema,"svg"===c.name&&"html"===b.space&&(l.schema=W),l.ancestors.push(c),E=null===c.name?l.Fragment:el(l,c.name,!0),_=function(e,n){let r={};for(let i of n.attributes)if("mdxJsxExpressionAttribute"===i.type)if(i.data&&i.data.estree&&e.evaluater){let n=i.data.estree.body[0];t("ExpressionStatement"===n.type);let a=n.expression;t("ObjectExpression"===a.type);let o=a.properties[0];t("SpreadElement"===o.type),Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else es(e,n.position);else{let a,o=i.name;if(i.value&&"object"==typeof i.value)if(i.value.data&&i.value.data.estree&&e.evaluater){let n=i.value.data.estree.body[0];t("ExpressionStatement"===n.type),a=e.evaluater.evaluateExpression(n.expression)}else es(e,n.position);else a=null===i.value||i.value;r[o]=a}return r}(l,c),A=eo(l,c),ei(l,_,E,c),ea(_,A),l.ancestors.pop(),l.schema=b,l.create(c,E,_,d)):"mdxjsEsm"===n.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);es(e,t.position)}(e,n):"root"===n.type?(h=e,p=n,f=r,ea(P={},eo(h,p)),h.create(p,h.Fragment,P,f)):"text"===n.type?n.value:void 0}function ei(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ea(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eo(e,t){let n=[],r=-1,i=e.passKeys?new Map:Q;for(;++r<t.children.length;){let a,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=i.get(e)||0;a=e+"-"+t,i.set(e,t+1)}}let l=er(e,o,a);void 0!==l&&n.push(l)}return n}function el(e,n,r){let i;if(r)if(n.includes(".")){let e,r=n.split("."),a=-1;for(;++a<r.length;){let t=o(r[a])?{type:"Identifier",name:r[a]}:{type:"Literal",value:r[a]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(a&&"Literal"===t.type),optional:!1}:t}t(e,"always a result"),i=e}
1else i=o(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};else i={type:"Literal",value:n};if("Literal"===i.type){let t=i.value;return J.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(i);es(e)}function es(e,t){let n=new Z("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=en+"#cannot-handle-mdx-estrees-without-createevaluater",n}function eu(e){return"-"+e.toLowerCase()}let ec={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 ed=e.i(843476);e.i(271645);let eh={};function ep(e,t){let n=t||eh;return ef(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ef(e,t,n){var r;if((r=e)&&"object"==typeof r){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 em(e.children,t,n)}return Array.isArray(e)?em(e,t,n):""}function em(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ef(e[i],t,n);return r.join("")}function eg(e,t,n,r){let i,a=e.length,o=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function ey(e,t){return e.length>0?(eg(e,e.length,0,t),e):t}let ex={}.hasOwnProperty;function ev(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(ex.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];if(a)for(r in a){ex.call(i,r)||(i[r]=[]);let e=a[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);eg(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let eb=eA(/[A-Za-z]/),ek=eA(/[\dA-Za-z]/),ew=eA(/[#-'*+\--9=?A-Z^-~]/);function eC(e){return null!==e&&(e<32||127===e)}let eS=eA(/\d/),eD=eA(/[\dA-Fa-f]/),eT=eA(/[!-/:-@[-`{-~]/);function ej(e){return null!==e&&e<-2}function eN(e){return null!==e&&(e<0||32===e)}function eO(e){return -2===e||-1===e||32===e}let eE=eA(/\p{P}|\p{S}/u),e_=eA(/\s/);function eA(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function eP(e,t,n,r){let i=r?r-1:1/0,a=0;return function(r){return eO(r)?(e.enter(n),function r(o){return eO(o)&&a++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let eM={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eP(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return ej(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},ez={tokenize:function(e){let t,n,r,i=this,a=[],o=0;return l;function l(t){if(o<a.length){let n=a[o];return i.containerState=n[1],e.attempt(n[0].continuation,s,u)(t)}return u(t)}function s(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&y();let r=i.events.length,a=r;for(;a--;)if("exit"===i.events[a][0]&&"chunkFlow"===i.events[a][1].type){n=i.events[a][1].end;break}g(o);let l=r;
1for(;l<i.events.length;)i.events[l][1].end={...n},l++;return eg(i.events,a+1,0,i.events.slice(r)),i.events.length=l,u(e)}return l(e)}function u(n){if(o===a.length){if(!t)return h(n);if(t.currentConstruct&&t.currentConstruct.concrete)return f(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(eI,c,d)(n)}function c(e){return t&&y(),g(o),h(e)}function d(e){return i.parser.lazy[i.now().line]=o!==a.length,r=i.now().offset,f(e)}function h(t){return i.containerState={},e.attempt(eI,p,f)(t)}function p(e){return o++,a.push([i.currentConstruct,i.containerState]),h(e)}function f(r){if(null===r){t&&y(),g(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return ej(n)?(e.consume(n),m(e.exit("chunkFlow")),o=0,i.interrupt=void 0,l):(e.consume(n),t)}(r)}function m(e,a){let l=i.sliceStream(e);if(a&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),i.parser.lazy[e.start.line]){let e,n,a=t.events.length;for(;a--;)if(t.events[a][1].start.offset<r&&(!t.events[a][1].end||t.events[a][1].end.offset>r))return;let l=i.events.length,s=l;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(g(o),a=l;a<i.events.length;)i.events[a][1].end={...n},a++;eg(i.events,s+1,0,i.events.slice(l)),i.events.length=a}}function g(t){let n=a.length;for(;n-- >t;){let t=a[n];i.containerState=t[1],t[0].exit.call(i,e)}a.length=t}function y(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},eI={tokenize:function(e,t,n){return eP(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},eL={partial:!0,tokenize:function(e,t,n){return function(t){return eO(t)?eP(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ej(e)?t(e):n(e)}}};class eR{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw 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){let n=null==t?1/0: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){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&eF(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),eF(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),eF(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){let t=this.left.splice(e,1/0);eF(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);eF(this.left,t.reverse())}}}function eF(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 eU(e){let t,n,r,i,a,o,l,s={},u=-1,c=new eR(e);for(;++u<c.length;){for(;u in s;)u=s[u];if(t=c.get(u),u&&"chunkFlow"===t[1].type&&"listItemPrefix"===c.get(u-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],a=e.get(t)[2],o=t-1,l=[],s=i._tokenizer;!s&&(s=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._c
1ontentTypeTextTrailing=!0));let u=s.events,c=[],d={},h=-1,p=i,f=0,m=0,g=[0];for(;p;){for(;e.get(++o)[1]!==p;);l.push(o),!p._tokenizer&&(n=a.sliceStream(p),p.next||n.push(null),r&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++h<u.length;)"exit"===u[h][0]&&"enter"===u[h-1][0]&&u[h][1].type===u[h-1][1].type&&u[h][1].start.line!==u[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){let t=u.slice(g[h],g[h+1]),n=l.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),h=-1;++h<c.length;)d[f+c[h][0]]=f+c[h][1],f+=c[h][1]-c[h][0]-1;return d}(c,u)),u=s[u],l=!0);else if(t[1]._container){for(r=u,n=void 0;r--;)if("lineEnding"===(i=c.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...c.get(n)[1].start},(a=c.slice(n,u)).unshift(t),c.splice(n,u-n+1,a))}}return eg(e,0,1/0,c.slice(0)),!l}let eW={resolve:function(e){return eU(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?i(t):ej(t)?e.check(eH,a,i)(t):(e.consume(t),r)}function i(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}}},eH={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eP(e,i,"linePrefix")};function i(i){if(null===i||ej(i))return n(i);let 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(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},eB={tokenize:function(e){let t=this,n=e.attempt(eL,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,eP(e,e.attempt(this.parser.constructs.flow,r,e.attempt(eW,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},e$={resolveAll:eK()},eX=eV("string"),eq=eV("text");function eV(e){return{resolveAll:eK("text"===e?eY:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return s(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),l)}function l(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),l)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function eK(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function eY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],a=t.sliceStream(i),o=a.length,l=-1,s=0;for(;o--;){let e=a[o];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let a={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:i.start._bufferIndex+l,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}function eZ(e){return null===e||eN(e)||e_(e)?1:eE(e)?2:void 0}function eJ(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}let eQ={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,l,s,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
1n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let d={...e[n][1].end},h={...e[c][1].start};eG(d,-l),eG(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[c][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=ey(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=ey(s,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),s=ey(s,eJ(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=ey(s,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,s=ey(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,eg(e,n-1,c-n+3,s),c=n+s.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,a=eZ(i);return function(o){return n=o,e.enter("attentionSequence"),function o(l){if(l===n)return e.consume(l),o;let s=e.exit("attentionSequence"),u=eZ(l),c=!u||2===u&&a||r.includes(l),d=!a||2===a&&u||r.includes(i);return s._open=!!(42===n?c:c&&(a||!d)),s._close=!!(42===n?d:d&&(u||!c)),t(l)}(o)}}};function eG(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let e0={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return eO(t)?eP(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(e0,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let 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"),i}return n(t)};function i(n){return eO(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},e1={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 eT(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},e2=document.createElement("i");function e3(e){let t="&"+e+";";e2.innerHTML=t;let n=e2.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let e8={name:"characterReference",tokenize:function(e,t,n){let r,i,a=this,o=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"),s):(e.enter("characterReferenceValue"),r=31,i=ek,u(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=eD,u):(e.enter("characterReferenceValue"),r=7,i=eS,u(t))}function u(l){if(59===l&&o){let r=e.exit("characterReferenceValue");return i!==ek||e3(a.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&o++<r?(e.consume(l),u):n(l)}}},e4={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},e5={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};
vendor: 11,033 bytes, line 1
1function o(t){return e.enter("codeFencedFence"),eO(t)?eP(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a>=l?(e.exit("codeFencedFenceSequence"),eO(i)?eP(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||ej(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,l=0;return function(t){var a;let u;return a=t,o=(u=i.events[i.events.length-1])&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=a,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l<3?n(i):(e.exit("codeFencedFenceSequence"),eO(i)?eP(e,s,"whitespace")(i):s(i))}(a)};function s(a){return null===a||ej(a)?(e.exit("codeFencedFence"),i.interrupt?t(a):e.check(e4,c,f)(a)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||ej(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):eO(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),eP(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(a))}function u(t){return null===t||ej(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||ej(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(a,f,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return o>0&&eO(t)?eP(e,p,"linePrefix",o+1)(t):p(t)}function p(t){return null===t||ej(t)?e.check(e4,c,f)(t):(e.enter("codeFlowValue"),function t(n){return null===n||ej(n)?(e.exit("codeFlowValue"),p(n)):(e.consume(n),t)}(t))}function f(n){return e.exit("codeFenced"),t(n)}}},e6={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),eP(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?a(n):ej(n)?e.attempt(e9,t,a)(n):(e.enter("codeFlowValue"),function n(r){return null===r||ej(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function a(n){return e.exit("codeIndented"),t(n)}}},e9={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):ej(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):eP(e,a,"linePrefix",5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):ej(e)?i(e):n(e)}}};function e7(e,t,n,r,i,a,o,l,s){let u=s||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),d):null===t||32===t||41===t||eC(t)?n(t):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),f(t))};function d(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(l),d(t)):null===t||60===t||ej(t)?n(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function f(i){return!c&&(null===i||41===i||eN(i))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,f):41===i?(e.consume(i),c--,f):null===i||32===i||40===i||eC(i)?n(i):(e.consume(i),92===i?m:f)}function m(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function te(e,t,n,r,i,a){let o,l=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u};function u(d){return s>999||null===d||91===d||93===d&&!o||94===d&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(d):93===d?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ej(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(t){return null===t||91===t||93===t||ej(t)||s++>999?(e.exit("chunkString"),u(t)):(e.consume(t),o||(o=!eO(t)),92===t?d:c)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function tt(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,l):n(t)};function l(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),s(n))}function s(t){return t===o?(e.exit(a),l(o)):null===t?n(t):ej(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),eP(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||ej(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return t===o||92===t?(e.consume(t),u):u(t)}}function tn(e,t){let n;return function r(i){return ej(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):eO(i)?eP(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function tr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let ti={partial:!0,tokenize:function(e,t,n){return function(t){return eN(t)?tn(e,r)(t):n(t)};function r(t){return tt(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return eO(t)?eP(e,a,"whitespace")(t):a(t)}function a(e){return null===e||ej(e)?t(e):n(e)}}},ta=["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"],to=["pre","script","style","textarea"],tl={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(eL,t,n)}}},ts={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return ej(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},tu={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&eg(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a,o=e.length,l=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(i=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[i-2][1].start}};return a=ey(a=[["enter",s,t],["enter",u,t]],e.slice(r+1,r+l+3)),a=ey(a,[["enter",c,t]]),a=ey(a,eJ(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),a=ey(a,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),a=ey(a,e.slice(i+1)),a=ey(a,[["exit",s,t]]),eg(e,r,e.length,a),e},tokenize:function(e,t,n){let r,i,a=this,o=a.events.length;for(;o--;)if(("labelImage"===a.events[o][1].type||"labelLink"===a.events[o][1].type)&&!a.events[o][1]._balanced){r=a.events[o][1];break}return function(t){return r?r._inactive?c(t):(i=a.parser.defined.includes(tr(a.sliceSerialize({start:r.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(tc,u,i?u:c)(t):91===t?e.attempt(td,u,i?s:c)(t):i?u(t):c(t)}function s(t){return e.attempt(th,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},tc={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 eN(t)?tn(e,i)(t):i(t)}function i(t){return 41===t?u(t):e7(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return eN(t)?tn(e,l)(t):u(t)}function o(e){return n(e)}function l(t){return 34===t||39===t||40===t?tt(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function s(t){return eN(t)?tn(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},td={tokenize:function(e,t,n){let r=this;return function(t){return te.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(tr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},th={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)}}},tp={name:"labelStartImage",resolveAll:tu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(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)}}},tf={name:"labelStartLink",resolveAll:tu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},tm={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),eP(e,t,"linePrefix")}}},tg={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(a){var o;return e.enter("thematicBreak"),r=o=a,function a(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),eO(n)?eP(e,a,"whitespace")(n):a(n))}(o)):i>=3&&(null===o||ej(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},ty={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(eL,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,eP(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!eO(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
1=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tv,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,eP(e,e.attempt(ty,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:eS(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(tg,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return eS(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),l(i)):n(i)}(t)}return n(t)};function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(eL,r.interrupt?n:s,e.attempt(tx,c,u))}
1function s(e){return r.containerState.initialBlankLine=!0,a++,c(e)}function u(t){return eO(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},tx={partial:!0,tokenize:function(e,t,n){let r=this;return eP(e,function(e){let i=r.events[r.events.length-1];return!eO(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},tv={partial:!0,tokenize:function(e,t,n){let r=this;return eP(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},tb={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,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),i||"definition"!==e[a][1].type||(i=a);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let l,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){l="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||l)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),eO(n)?eP(e,a,"lineSuffix")(n):a(n))}(o)):n(t)};function a(r){return null===r||ej(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,te.call(i,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function a(t){return(r=tr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return eN(t)?tn(e,l)(t):l(t)}function l(t){return e7(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(ti,u,u)(t)}function u(t){return eO(t)?eP(e,c,"whitespace")(t):c(t)}function c(a){return null===a||ej(a)?(e.exit("definition"),i.parser.defined.push(r),t(a)):n(a)}}}},"disable",0,{null:[]},"document",0,{42:ty,43:ty,45:ty,48:ty,49:ty,50:ty,51:ty,52:ty,53:ty,54:ty,55:ty,56:ty,57:ty,62:e0},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;return"whitespace"===e[3][1].type&&(a+=2),i-2>a&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4),i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},eg(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var a;return e.enter("atxHeading"),a=i,e.enter("atxHeadingSequence"),function i(a){return 35===a&&r++<6?(e.consume(a),i):null===a||eN(a)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||ej(r)?(e.exit("atxHeading"),t(r)):eO(r)?eP(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||eN(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(a)):n(a)}(a)}}},42:tg,45:[tb,tg],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 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)),e},tokenize:function(e,t,n){let r,i,a,o,l,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(o){return 33===o?(e.consume(o),c):47===o?(e.consume(o),i=!0,p):63===o?(e.consume(o),r=3,s.interrupt?t:A):eb(o)?(e.consume(o),a=String.fromCharCode(o),f):n(o)}function c(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,o=0,h):eb(i)?(e.consume(i),r=4,s.interrupt?t:A):n(i)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:A):n(r)}function h(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?s.interrupt?t:S:h:n(r)}function p(t){return eb(t)?(e.consume(t),a=String.fromCharCode(t),f):n(t)}function f(o){if(null===o||47===o||62===o||eN(o)){let l=47===o,u=a.toLowerCase();return!l&&!i&&to.includes(u)?(r=1,s.interrupt?t(o):S(o)):ta.includes(a.toLowerCase())?(r=6,l)?(e.consume(o),m):s.interrupt?t(o):S(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):i?function t(n){return eO(n)?(e.consume(n),t):w(n)}(o):g(o))}return 45===o||ek(o)?(e.consume(o),a+=String.fromCharCode(o),f):n(o)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:S):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||eb(t)?(e.consume(t),y):eO(t)?(e.consume(t),g):w(t)}function y(t){return 45===t||46===t||58===t||95===t||ek(t)?(e.consume(t),y):x(t)}function x(t){return 61===t?(e.consume(t),v):eO(t)?(e.consume(t),x):g(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,b):eO(t)?(e.consume(t),v):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||eN(n)?x(n):(e.consume(n),t)}(t)}function b(t){return t===l?(e.consume(t),l=null,k):null===t||ej(t)?n(t):(e.consume(t),b)}function k(e){return 47===e||62===e||eO(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||ej(t)?S(t):eO(t)?(e.consume(t),C):n(t)}function S(t){return 45===t&&2===r?(e.consume(t),N):60===t&&1===r?(e.consume(t),O):62===t&&4===r?(e.consume(t),P):63===t&&3===r?(e.consume(t),A):93===t&&5===r?(e.consume(t),_):ej(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(tl,M,D)(t)):null===t||ej(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),S)}function D(t){return e.check(ts,T,M)(t)}function T(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),j}function j(t){return null===t||ej(t)?D(t):(e.enter("htmlFlowData"),S(t))}function N(t){return 45===t?(e.consume(t),A):S(t)}function O(t){return 47===t?(e.consume(t),a="",E):S(t)}function E(t){if(62===t){let n=a.toLowerCase();return to.includes(n)?(e.consume(t),P):S(t)}return eb(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),E):S(t)}function _(t){return 93===t?(e.consume(t),A):S(t)}function A(t){return 62===t?(e.consume(t),P):45===t&&2===r?(e.consume(t),A):S(t)}function P(t){return null===t||ej(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),P)}function M(n){return e.exit("htmlFlow"),t(n)}}},61:tb,95:tg,96:e5,126:e5},"flowInitial",0,{[-2]:e6,[-1]:e6,32:e6},"insideSpan",0,{null:[eQ,e$]},"string",0,{38:e8,92:e1},"text",0,{[-5]:tm,[-4]:tm,[-3]:tm,33:tp,38:e8,42:eQ,60:[{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"),i};function i(t){return eb(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(t){return 43===t||45===t||46===t||ek(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||ek(n))&&r++<32?(e.consume(n),t):(r=0,l(n))}(t)):l(t)}function o(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||eC(r)?n(r):(e.consume(r),o)}function l(t){return 64===t?(e.consume(t),s):ew(t)?(e.consume(t),l):n(t)}function s(i){return ek(i)?function i(a){return 46===a?(e.consume(a),r=0,s):62===a?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(a),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(a){if((45===a||ek(a))&&r++<63){let n=45===a?t:i;return e.consume(a),n}return n(a)}(a)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,a,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),x):eb(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,p):eb(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),h):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),d):ej(t)?(a=c,E(t)):(e.consume(t),c)}function d(t){return 45===t?(e.consume(t),h):c(t)}function h(e){return 62===e?O(e):45===e?d(e):c(e)}function p(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),m):ej(t)?(a=f,E(t)):(e.consume(t),f)}function m(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):f(t)}function y(t){return null===t||62===t?O(t):ej(t)?(a=y,E(t)):(e.consume(t),y)}function x(t){return null===t?n(t):63===t?(e.consume(t),v):ej(t)?(a=x,E(t)):(e.consume(t),x)}function v(e){return 62===e?O(e):x(e)}function b(t){return eb(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||ek(t)?(e.consume(t),k):function t(n){return ej(n)?(a=t,E(n)):eO(n)?(e.consume(n),t):O(n)}(t)}function w(t){return 45===t||ek(t)?(e.consume(t),w):47===t||62===t||eN(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),O):58===t||95===t||eb(t)?(e.consume(t),S):ej(t)?(a=C,E(t)):eO(t)?(e.consume(t),C):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ek(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),D):ej(n)?(a=t,E(n)):eO(n)?(e.consume(n),t):C(n)}(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,T):ej(t)?(a=D,E(t)):eO(t)?(e.consume(t),D):(e.consume(t),j)}function T(t){return t===r?(e.consume(t),r=void 0,N):null===t?n(t):ej(t)?(a=T,E(t)):(e.consume(t),T)}function j(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||eN(t)?C(t):(e.consume(t),j)}function N(e){return 47===e||62===e||eN(e)?C(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function E(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return eO(t)?eP(e,A,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return e.enter("htmlTextData"),a(t)}}}],91:tf,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ej(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},e1],93:tu,95:eQ,96:{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,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++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,i,a=0;
1return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),a++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",l(o))}(s)):ej(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(s))}function l(t){return null===t||32===t||96===t||ej(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),l)}}}}],304127);var tk=e.i(304127);let tw=/[\0\t\n\r]/g;function tC(e,t){let 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)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let tS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tD(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return tC(n.slice(t?2:1),t?16:10)}return e3(n)||e}let tT={}.hasOwnProperty;function tj(e){return{line:e.line,column:e.column,offset:e.offset}}function tN(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+q({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+q({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+q({start:t.start,end:t.end})+") is still open")}function tO(e){let t=this;t.parser=function(n){var r,i;let a,o,l,s;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(y),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(f),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(p),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(p,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:u,htmlText:r(g,i),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(y),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(x,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(x),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(f),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){c.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){c.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:c,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=tC(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=e3(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=tj(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:c,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:c,data:c,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tr(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:c,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:c,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let 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}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(tS,tD),n.identifier=tr(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=tj(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
1ype)&&(u.call(this,e),c.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let 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}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tr(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(tT.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:a,exit:l,buffer:i,resume:s,data:n},u=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?u.push(c):c=function(e,t,n){let r,i,a,o,l=t-1,s=-1,u=!1;for(;++l<=n;){let t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||a||(a=l),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=l;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(l,0,["enter",i,t[2]]),l++,n++,a=void 0,o=!0}}}return e[t][1]._spread=u,n}(e,u.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];tT.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},o),e[c][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||tN).call(o,void 0,e[0])}for(r.position={start:tj(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tj(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){a.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(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:tj(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tN).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+q({start:e.start,end:e.end})+"): it’s not open");n.position.end=tj(e.end)}function s(){return ep(this.stack.pop())}function u(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:tj(e.start),end:void 0},t.push(n)),this.stack.push(n)}function c(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=tj(e.end)}function d(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function p(){return{type:"code",lang:null,meta:null,value:""}}function f(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function x(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!eU(e););return e}((function(e){let t={constructs:ev([tk,...(e||{}).extensions||[]]),content:n(eM),defined:[],document:n(ez),flow:n(eB),lazy:{},string:n(eX),text:n(eq)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
1olumn:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],l=[],s={attempt:f(function(e,t){m(e,t.from)}),check:f(p),consume:function(e){ej(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=h(),u.events.push(["enter",n,u]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=h(),u.events.push(["exit",t,u]),t},interrupt:f(p,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:h,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let a,o=e[r];if("string"==typeof o)a=o;else switch(o){case -5:a="\r";break;case -4:a="\n";break;case -3:a="\r\n";break;case -2:a=t?" ":"	";break;case -1:if(!t&&n)continue;a=" ";break;default:a=String.fromCharCode(o)}n=-2===o,i.push(a)}return i.join("")}(d(e),t)},sliceStream:d,write:function(e){return(o=ey(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),c=c(t)}else c=c(n)}}(),null!==o[o.length-1])?[]:(m(t,0),u.events=eJ(a,u.events,u),u.events)}},c=t.tokenize.call(u,s);return t.resolveAll&&a.push(t),u;function d(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;if(r===a)n=[e[r].slice(i,o)];else{if(n=e.slice(r,a),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[a].slice(0,o))}return n}(o,e)}function h(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function p(e,t){t.restore()}function f(e,t){return function(n,i,a){var o;let c,d,p,f;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(c=e,d=0,0===e.length)?a:y(e[d])}function y(e){return function(n){let i,a,o,c,d;return(i=h(),a=u.previous,o=u.currentConstruct,c=u.events.length,d=Array.from(l),f={from:c,restore:function(){r=i,u.previous=a,u.currentConstruct=o,u.events.length=c,l=d,g()}},p=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?v(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,s,x,v)(n)}}function x(t){return e(p,f),i}function v(e){return(f.restore(),++d<c.length)?y(c[d]):a}}}function m(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&eg(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((o=1,l="",s=!0,function(e,t,n){let r,i,u,c,d,h=[];for(e=l+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),u=0,l="",s&&(65279===e.charCodeAt(0)&&u++,s=void 0);u<e.length;){if(tw.lastIndex=u,c=(r=tw.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(c),!r){l=e.slice(u);break}if(10===d&&u===c&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),u<c&&(h.push(e.slice(u,c)),o+=c-u),d){case 0:h.push(65533),o++;break;case 9:for(i=4*Math.ceil(o/4),h.push(-2);o++<i;)h.push(-1);break;case 10:h.push(-4),o=1;break;default:a=!0,o=1}u=c+1}return n&&(a&&h.push(-5),l&&h.push(l),h.push(null)),h})(n,r,!0))))}}let tE="object"==typeof self?self:globalThis,t_=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[a,o]=e[i];switch(a){case 0:case -1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new tE[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new tE[a](o),i)})(0)},{toString:tA}={},{keys:tP}=Object,tM=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=tA.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},tz=([e,t])=>0===e&&("function"===t||"symbol"===t),tI=(e,{json:t,lossy:n}={})=>{var r,i,a;let o,l,s=[];return(r=!(t||n),i=!!t,a=new Map,o=(e,t)=>{let n=s.push(e)-1;return a.set(t,n),n},l=e=>{if(a.has(e))return a.get(e);let[t,n]=tM(e);switch(t){case 0:{let i=e;switch(n){case"bigint":t=8,i=e.toString();break;case"function":case"symbol":if(r)throw TypeError("unable to serialize "+n);i=null;break;case"undefined":return o([-1],e)}return o([t,i],e)}case 1:{if(n){let t=e;return"DataView"===n?t=new Uint8Array(e.buffer):"ArrayBuffer"===n&&(t=new Uint8Array(e)),o([n,[...t]],e)}let r=[],i=o([t,r],e);for(let t of e)r.push(l(t));return i}case 2:{if(n)switch(n){case"BigInt":return o([n,e.toString()],e);case"Boolean":case"Number":case"String":return o([n,e.valueOf()],e)}if(i&&"toJSON"in e)return l(e.toJSON());let a=[],s=o([t,a],e);for(let t of tP(e))(r||!tz(tM(e[t])))&&a.push([l(t),l(e[t])]);return s}case 3:return o([t,e.toISOString()],e);case 4:{let{source:n,flags:r}=e;return o([t,{source:n,flags:r}],e)}case 5:{let n=[],i=o([t,n],e);for(let[t,i]of e)(r||!(tz(tM(t))||tz(tM(i))))&&n.push([l(t),l(i)]);return i}case 6:{let n=[],i=o([t,n],e);for(let t of e)(r||!tz(tM(t)))&&n.push(l(t));return i}}let{message:s}=e;return o([t,{name:n,message:s}],e)})(e),s}
1,tL="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?t_(tI(e,t)):structuredClone(e):(e,t)=>t_(tI(e,t));function tR(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o="";if(37===a&&ek(e.charCodeAt(n+1))&&ek(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function tF(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function tU(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let tW=function(e){var t,n;if(null==e)return tB;if("function"==typeof e)return tH(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=tW(e[n]);return tH(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,tH(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,tH(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function tH(e){return function(t,n,r){return!!(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 tB(){return!0}let t$=[];function tX(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let a=tW(i),o=r?-1:1;(function e(i,l,s){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,d,h,p=t$;if((!t||a(i,l,s[s.length-1]||void 0))&&!1===(p=Array.isArray(u=n(i,s))?u:"number"==typeof u?[!0,u]:null==u?t$:[u])[0])return p;if("children"in i&&i.children&&i.children&&"skip"!==p[0])for(d=(r?i.children.length:-1)+o,h=s.concat(i);d>-1&&d<i.children.length;){if(!1===(c=e(i.children[d],d,h)())[0])return c;d="number"==typeof c[1]?c[1]:d+o}return p}})(e,void 0,[])()}function tq(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),tX(e,a,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}function tV(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function tK(e){let t=e.spread;return null==t?e.children.length>1:t}function tY(e,t,n){let r=0,i=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(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let tZ={blockquote:function(e,t){let 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){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[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={type:"element",tagName:"pre",properties:{},children:[a=e.applyData(t,a)]},e.patch(t,a),a},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
1,footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=tR(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),l=e.footnoteCounts.get(i);void 0===l?(l=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,l+=1,e.footnoteCounts.set(i,l);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let 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){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tV(e,t);let i={src:tR(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){let n={src:tR(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tV(e,t);let i={href:tR(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){let n={href:tR(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let 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){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=tK(n[r])}return t}(n):tK(t),a={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.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;){let e=r[l];(i||0!==l||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];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}}let 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){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=$(t.children[1]),o=B(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:"element",tagName:"table",properties:{}
1,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length,l=-1,s=[];for(;++l<o;){let n=t.children[l],r={},o=a?a[l]:void 0;o&&(r.align=o);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),s.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tY(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tY(t.slice(i),i>0,!1)),a.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:tJ,yaml:tJ,definition:tJ,footnoteDefinition:tJ};function tJ(){}let tQ={}.hasOwnProperty,tG={};function t0(e,t){e.position&&(t.position=function(e){let t=$(e),n=B(e);if(t&&n)return{start:t,end:n}}(e))}function t1(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,tL(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function t2(e,t){let n=[],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 t3(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function t8(e,n){let r,i,a,o,l=(r=n||tG,i=new Map,a=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=t3(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=t3(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:t1,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...tZ,...r.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(tQ.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=tL(n);return r.children=o.all(e),r}return tL(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(tQ.call(n,"hProperties")||tQ.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(o,e,t)},options:r,patch:t0,wrap:t2},tq(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o),s=l.one(e,void 0),u=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tF,r=e.options.footnoteBackLabel||tU,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),u=tR(o.toLowerCase()),c=0,d=[],h=e.footnoteCounts.get(o);for(;void 0!==h&&++c<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let 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);let f={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(a,!0)};e.patch(i,f),l.push(f)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...tL(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(l),c=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return u&&(t("children"in c),c.children.push({type:"text",value:"\n"},u)),c}function t4(e,t){return e&&"run"in e?async function(n,r){let i=t8(n,{file:r,...t});await e.run(i,r)}:function(n,r){return t8(n,{file:r,...e||t})}}function t5(e){if(e)throw e}var t6=e.i(104100);function t9(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let t7=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');nr(e);let r=0,i=-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 i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,l=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(i=a):(l=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},ne=function(e){let t;if(nr(e),0===e.length)return".";let 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)},nt=function(e){let t;nr(e);let n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){let l=e.codePointAt(n);if(47===l){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===l?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1)}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},nn=function(...e){var t;let n,r,i,a=-1;for(;++a<e.length;)nr(e[a]),e[a]&&(i=void 0===i?e[a]:i+"/"+e[a]);return void 0===i?".":(nr(t=i),n=47===t.codePointAt(0),0!==(r=function(e,t){let n,r,i="",a=0,o=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===l);else if(o!==s-1&&2===l){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",a=0):a=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=s,l=0;continue}}else if(i.length>0){i="",a=0,o=s,l=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),a=s-o-1;o=s,l=0}else 46===n&&l>-1?l++:l=-1}
1return i}(t,!n)).length||n||(r="."),r.length>0&&47===t.codePointAt(t.length-1)&&(r+="/"),n?"/"+r:r)};function nr(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function ni(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let na=["history","path","basename","stem","extname","dirname"];class no{constructor(e){let t,n;t=e?ni(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<na.length;){const e=na[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)na.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?t7(this.path):void 0}set basename(e){ns(e,"basename"),nl(e,"basename"),this.path=nn(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ne(this.path):void 0}set dirname(e){nu(this.basename,"dirname"),this.path=nn(e||"",this.basename)}get extname(){return"string"==typeof this.path?nt(this.path):void 0}set extname(e){if(nl(e,"extname"),nu(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=nn(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ni(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!ni(e)){let t=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){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),ns(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?t7(this.path,this.extname):void 0}set stem(e){ns(e,"stem"),nl(e,"stem"),this.path=nn(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Z(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){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function nl(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function ns(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nu(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let nc=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},nd={}.hasOwnProperty;class nh extends nc{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=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(a,...o){let l=e[++n],s=-1;if(a)return void r(a);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,l?(function(e,t){let n;return function(...t){let a,o=e.length>t.length;o&&t.push(r);try{a=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(a&&a.then&&"function"==typeof a.then?a.then(i,r):a instanceof Error?r(a):i(a))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(l,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new nh,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,t6.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(ng("data",this.frozen),this.namespace[e]=t,this):nd.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ng("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=nv(e),n=this.parser||this.Parser;return nf("parse",n),n(String(t),t)}process(e,n){let r=this;return this.freeze(),nf("process",this.parser||this.Parser),nm("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(i,a){let o=nv(e),l=r.parse(o);function s(e,r){e||!r?a(e):i?i(r):(t(n,"`done` is defined if `resolve` is not"),n(void 0,r))}r.run(l,o,function(e,t,n){var i,a;if(e||!t||!n)return s(e);let o=r.stringify(t,n);"string"==typeof(i=o)||(a=i)&&"object"==typeof a&&"byteLength"in a&&"byteOffset"in a?n.value=o:n.result=o,s(e,n
1)})}}processSync(e){let n,r=!1;return this.freeze(),nf("processSync",this.parser||this.Parser),nm("processSync",this.compiler||this.Compiler),this.process(e,function(e,t){r=!0,t5(e),n=t}),nx("processSync","process",r),t(n,"we either bailed on an error or have a tree"),n}run(e,n,r){ny(e),this.freeze();let i=this.transformers;return r||"function"!=typeof n||(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(a,o){t("function"!=typeof n,"`file` can’t be a `done` anymore, we checked");let l=nv(n);i.run(e,l,function(n,i,l){let s=i||e;n?o(n):a?a(s):(t(r,"`done` is defined if `resolve` is not"),r(void 0,s,l))})}}runSync(e,n){let r,i=!1;return this.run(e,n,function(e,t){t5(e),r=t,i=!0}),nx("runSync","run",i),t(r,"we either bailed on an error or have a tree"),r}stringify(e,t){this.freeze();let n=nv(t),r=this.compiler||this.Compiler;return nm("stringify",r),ny(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(ng("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?a(e):i(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=(0,t6.default)(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)o(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;o(t,n)}else i(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];t9(o)&&t9(r)&&(r=(0,t6.default)(!0,o,r)),n[i]=[e,r,...a]}}}}let np=new nh().freeze();function nf(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function nm(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function ng(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ny(e){if(!t9(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function nx(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nv(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new no(e)}let nb=[],nk={allowDangerousHtml:!0},nw=/^(https?|ircs?|mailto|xmpp)$/i,nC=[{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 nS(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||nw.test(e.slice(0,t))?e:""}function nD(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}e.s(["default",0,function(e){var t;let r,i,a,o,l,s=(r=(t=e).rehypePlugins||nb,i=t.remarkPlugins||nb,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...nk}:nk,np().use(tO).use(i).use(t4,a).use(r)),u=(o=e.children||"",l=new no,"string"==typeof o?l.value=o:n("Unexpected value `"+o+"` for `children` prop, expected `string`"),l);return function(e,t){let r=t.allowedElements,i=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||nS;for(let e of nC)Object.hasOwn(t,e.from)&&n("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return r&&o&&n("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),tq(e,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return l?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in ec)if(Object.hasOwn(ec,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ec[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=u(String(n||""),t,e))}}if("element"===e.type){let a=r?!r.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&i&&"number"==typeof t&&(a=!i(e,t,n)),a&&n&&"number"==typeof t)return s&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){var n,r,i,a;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let l=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=l,r=t.jsxDEV,o=function(e,t,i,a){let o=Array.isArray(i.children),l=$
1(e);return r(t,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:n,lineNumber:l?l.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,a=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?a:i;return r?o(t,n,r):o(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?W:U,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=er(s,e,void 0);return u&&"string"!=typeof u?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}(e,{Fragment:ed.Fragment,components:a,ignoreInvalidStyle:!0,jsx:ed.jsx,jsxs:ed.jsxs,passKeys:!0,passNode:!0})}(s.runSync(s.parse(u),u),e)}],918789);let nT="phrasing",nj=["autolink","link","image","label"];function nN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nO(e){this.config.enter.autolinkProtocol.call(this,e)}function nE(e){this.config.exit.autolinkProtocol.call(this,e)}function n_(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];t("link"===n.type),n.url="http://"+this.sliceSerialize(e)}function nA(e){this.config.exit.autolinkEmail.call(this,e)}function nP(e){this.exit(e)}function nM(e){!function(e,t,n){let r=tW((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),a=-1;for(;++a<i.length;)tX(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],l=0,s=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(l!==n&&c.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(a)?c.push(...a):a&&c.push(a),l=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}return u?(l<e.value.length&&c.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...c)):c=[e],s+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nz],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nI]],{ignore:["link","linkReference"]})}function nz(e,t,n,r,i){let a,o="";if(!nL(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),(a=n.split(".")).length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))return!1;let l=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=nD(e,"("),a=nD(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),a++;return[e,n]}(n+r);if(!l[0])return!1;let s={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function nI(e,t,n,r){return!(!nL(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nL(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||e_(n)||eE(n))&&(!t||47!==n)}function nR(){this.buffer()}function nF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nU(){this.buffer()}function nW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nH(e){let n=this.resume(),r=this.stack[this.stack.length-1];t("footnoteReference"===r.type),r.identifier=tr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function nB(e){this.exit(e)}function n$(e){let n=this.resume(),r=this.stack[this.stack.length-1];t("footnoteDefinition"===r.type),r.identifier=tr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function nX(e){this.exit(e)}function nq(e,t,n,r){let i=n.createTracker(r),a=i.move("[^"),o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]")}function nV(e,t,n){return 0===t?e:nK(e,t,n)}function nK(e,t,n){return(n?"":"    ")+e}nq.peek=function(){return"["};let nY=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function nZ(e){this.enter({type:"delete",children:[]},e)}function nJ(e){this.exit(e)}function nQ(e,t,n,r){let i=n.createTracker(r),a=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function nG(e){return e.length}function n0(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}nQ.peek=function(){return"~"};function n1(e,t,n){let r=e.value||"",i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){let e,t=n.unsafe[a],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}n1.peek=function(){return"`"};tW(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let n2=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),a=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(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 o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?a:a+" ".repeat(o-a.length))+e});return s(),u};function n3(e){let n=e._align;t(n,"expected `_align` on table"),this.enter({type:"table",align:n.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function n8(e){this.exit(e),this.data.inTable=void 0}function n4(e){this.enter({type:"tableRow",children:[]},e)}function n5(e){this.exit(e)}function n6(e){this.enter({type:"tableCell",children:[]},e)}function n9(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,n7));let r=this.stack[this.stack.length-1];t("inlineCode"===r.type),r.value=n,this.exit(e)}function n7(e,t){return"|"===t?t:e}function re(e){let n=this.stack[this.stack.length-2];t("listItem"===n.type),n.checked="taskListCheckValueChecked"===e.type}function rt(e){let n=this.stack[this.stack.length-2];if(n&&"listItem"===n.type&&"boolean"==typeof n.checked){let e=this.stack[this.stack.length-1];t("paragraph"===e.type);let r=e.children[0];if(r&&"text"===r.type){let t,i=n.children,a=-1;for(;++a<i.length;){let e=i[a];if("paragraph"===e.type){t=e;break}}t===e&&(r.value=r.value.slice(1),0===r.value.length?e.children.shift():e.position&&r.position&&"number"==typeof r.position.start.offset&&(r.position.start.column++,r.position.start.offset++,e.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function rn(e,t,n,r){let i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let s=n2(e,t,n,{...r,...l.current()});return a&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),s}let rr={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),i):n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},ri={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check(ro,s,l)(t):null===t||eN(t)||e_(t)||45!==t&&eE(t)?s(t):(a=!0,e.consume(t),o)}function l(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function s(e){return i||r||!a?n(e):t(e)}},partial:!0},ra={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(ro,t,a)(o):null===o||eN(o)||e_(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},ro={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||eN(o)||e_(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||eN(e)||e_(e)?t(e):r(e)}function a(t){return eb(t)?function t(i){return 59===i?(e.consume(i),r):eb(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},rl={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ek(e)?n(e):t(e)}},partial:!0},rs={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!rp.call(r,r.previous)||ry(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rr,e.attempt(ri,e.attempt(ra,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rp},ru={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",a=!1;return function(t){return(72===t||104===t)&&rf.call(r,r.previous)&&!ry(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o):n(t)};function o(t){if(eb(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),a)?s:(a=!0,l):n(t)}function s(t){return null===t||eC(t)||eN(t)||e_(t)||eE(t)?n(t):e.attempt(ri,e.attempt(ra,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:rf},rc={name:"emailAutolink",tokenize:function(e,t,n){let r,i,a=this;return function(t){return!rg(t)||!rm.call(a,a.previous)||ry(a.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return rg(r)?(e.consume(r),t):64===r?(e.consume(r),o):n(r)}(t))};function o(t){return 46===t?e.check(rl,s,l)(t):45===t||95===t||ek(t)?(i=!0,e.consume(t),o):s(t)}function l(t){return e.consume(t),r=!0,o}function s(o){return i&&r&&eb(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:rm},rd={},rh=48;
1for(;rh<123;)rd[rh]=rc,58==++rh?rh=65:91===rh&&(rh=97);function rp(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||eN(e)}function rf(e){return!eb(e)}function rm(e){return!(47===e||rg(e))}function rg(e){return 43===e||45===e||46===e||95===e||ek(e)}function ry(e){let t=e.length,n=!1;for(;t--;){let 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}rd[43]=rc,rd[45]=rc,rd[46]=rc,rd[95]=rc,rd[72]=[rc,ru],rd[104]=[rc,ru],rd[87]=[rc,rs],rd[119]=[rc,rs];let rx={tokenize:function(e,t,n){let r=this;return eP(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function rv(e,t,n){let r,i=this,a=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;a--;){let e=i.events[a][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!r||!r._balanced)return n(a);let l=tr(i.sliceSerialize({start:r.end,end:i.now()}));return 94===l.codePointAt(0)&&o.includes(l.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)):n(a)}}function rb(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";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={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",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,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 rk(e,t,n){let r,i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=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",s)}function s(l){if(o>999||93===l&&!r||null===l||91===l||eN(l))return n(l);if(93===l){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return a.includes(tr(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return eN(l)||(r=!0),o++,e.consume(l),92===l?u:s}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,s):s(t)}}function rw(e,t,n){let r,i,a=this,o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(l>999||93===t&&!i||null===t||91===t||eN(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=tr(a.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return eN(t)||(i=!0),l++,e.consume(t),92===t?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),eP(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}
1function rC(e,t,n){return e.check(eL,t,e.attempt(rx,t,n))}function rS(e){e.exit("gfmFootnoteDefinition")}class rD{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(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,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(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function rT(e,t,n){let r,i=this,a=0,o=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,a="tableHead"===r||"tableRow"===r?x:l;return a===x&&i.parser.lazy[i.now().line]?n(e):a(e)};function l(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),s(n)}function s(t){return null===t?n(t):ej(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):eO(t)?eP(e,s,"whitespace")(t):(o+=1,r&&(r=!1,a+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),u(t))}function u(t){return null===t||124===t||eN(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:u)}function c(t){return 92===t||124===t?(e.consume(t),u):u(t)}function d(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,eO(t))?eP(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t)}function h(t){return 45===t||58===t?f(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):n(t)}function p(t){return eO(t)?eP(e,f,"whitespace")(t):f(t)}function f(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(o+=1,m(t)):null===t||ej(t)?y(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return eO(t)?eP(e,y,"whitespace")(t):y(t)}function y(i){if(124===i)return h(i);if(null===i||ej(i))return r&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function x(t){return e.enter("tableRow"),v(t)}function v(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),v):null===n||ej(n)?(e.exit("tableRow"),t(n)):eO(n)?eP(e,v,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||eN(t)?(e.exit("data"),v(t)):(e.consume(t),92===t?k:b)}function k(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function rj(e,t){let n,r,i,a=-1,o=!0,l=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h=new rD;for(;++a<e.length;){let p=e[a],f=p[1];"enter"===p[0]?"tableHead"===f.type?(c=!1,0!==d&&(rO(h,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(a,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(o=!0,i=void 0,s=[0,0,0,0],u=[0,a+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(a,0,[["enter",r,t]])),l="tableDelimiterRow"===f.type?2:r?3:1):l&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)?(o=!1,0===u[2]&&(0!==s[1]&&(u[0]=u[1],i=rN(h,t,s,l,void 0,i),s=[0,0,0,0]),u[2]=a)):"tableCellDivider"===f.type&&(o?o=!1:(0!==s[1]&&(u[0]=u[1],i=rN(h,t,s,l,void 0,i)),u=[(s=u)[1],a,0,0])):"tableHead"===f.type?(c=!0,d=a):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=a,0!==s[1]?(u[0]=u[1],i=rN(h,t,s,l,a,i)):0!==u[1]&&(i=rN(h,t,u,l,a,i)),l=0):l&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)&&(u[3]=a)}for(0!==d&&rO(h,t,d,n,r),h.consume(t.events),a=-1;++a<t.events.length;){let e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left"
1:"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,a))}return e}function rN(e,t,n,r,i,a){0!==n[0]&&(a.end=Object.assign({},rE(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));let o=rE(t.events,n[1]);if(a={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){let i=rE(t.events,n[2]),a=rE(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},rE(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function rO(e,t,n,r,i){let a=[],o=rE(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function rE(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let r_={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return eN(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"),o):n(t)}function o(r){return ej(r)?t(r):eO(r)?e.check({tokenize:rA},t,n)(r):n(r)}}};function rA(e,t,n){return eP(e,function(e){return null===e?n(e):t(e)},"whitespace")}let rP={};e.s(["default",0,function(e){let t,n,r,i=e||rP,a=this.data(),o=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),s=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);o.push(ev([{text:rd},{document:{91:{name:"gfmFootnoteDefinition",tokenize:rw,continuation:{tokenize:rC},exit:rS}},text:{91:{name:"gfmFootnoteCall",tokenize:rk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rv,resolveTo:rb}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,a=this.events,o=0;return function(l){return 126===i&&"characterEscape"!==a[a.length-1][1].type?r(l):(e.enter("strikethroughSequenceTemporary"),function a(l){let s=eZ(i);if(126===l)return o>1?r(l):(e.consume(l),o++,a);if(o<2&&!t)return r(l);let u=e.exit("strikethroughSequenceTemporary"),c=eZ(l);return u._open=!c||2===c&&!!s,u._close=!s||2===s&&!!c,n(l)}(l))}},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";let i={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)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],l=t.parser.constructs.insideSpan.null;l&&eg(o,o.length,0,eJ(l,e.slice(r+1,n),t)),eg(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),eg(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:rT,resolveAll:rj}}},{text:{91:r_}}])),l.push([{transforms:[nM],enter:{literalAutolink:nN,literalAutolinkEmail:nO,literalAutolinkHttp:nO,literalAutolinkWww:nO},exit:{literalAutolink:nP,literalAutolinkEmail:nA,literalAutolinkHttp:nE,literalAutolinkWww:n_}}
1,{enter:{gfmFootnoteCallString:nR,gfmFootnoteCall:nF,gfmFootnoteDefinitionLabelString:nU,gfmFootnoteDefinition:nW},exit:{gfmFootnoteCallString:nH,gfmFootnoteCall:nB,gfmFootnoteDefinitionLabelString:n$,gfmFootnoteDefinition:nX}},{canContainEols:["delete"],enter:{strikethrough:nZ},exit:{strikethrough:nJ}},{enter:{table:n3,tableData:n6,tableHeader:n6,tableRow:n4},exit:{codeText:n9,table:n8,tableData:n5,tableHeader:n5,tableRow:n5}},{exit:{taskListCheckValueChecked:re,taskListCheckValueUnchecked:re,paragraph:rt}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nT,notInConstruct:nj},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nT,notInConstruct:nj},{character:":",before:"[ps]",after:"\\/",inConstruct:nT,notInConstruct:nj}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let a=n.createTracker(i),o=a.move("[^"),l=n.enter("footnoteDefinition"),s=n.enter("label");return o+=a.move(n.safe(n.associationId(e),{before:o,after:"]"})),s(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,a.current()),r?nK:nV))),l(),o},footnoteReference:nq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nY}],handlers:{delete:nQ}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=n1(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return l(function(e,t,n){let r=e.children,i=-1,a=[],o=t.enter("table");for(;++i<r.length;)a[i]=s(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=l([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),l}function l(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||nG,a=[],o=[],l=[],s=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],a=-1;for(e[c].length>u&&(u=e[c].length);++a<e[c].length;){var d;let o=null==(d=e[c][a])?"":String(d);if(!1!==n.alignDelimiters){let e=i(o);r[a]=e,(void 0===s[a]||e>s[a])&&(s[a]=e)}t.push(o)}o[c]=t,l[c]=r}let h=-1;if("object"==typeof r&&"length"in r)for(;++h<u;)a[h]=n0(r[h]);else{let e=n0(r);for(;++h<u;)a[h]=e}h=-1;let p=[],f=[];for(;++h<u;){let e=a[h],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[h]-t.length-r.length),o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[h]&&(s[h]=i),f[h]=i),p[h]=o}o.splice(1,0,p),l.splice(1,0,f),c=-1;let m=[];for(;++c<o.length;){let e=o[c],t=l[c];h=-1;let r=[];for(;++h<u;){let i=e[h]||"",o="",l="";if(!1!==n.alignDelimiters){let e=s[h]-(t[h]||0),n=a[h];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):l=o=" ".repeat(e/2):l=" ".repeat(e)}!1===n.delimiterStart||h||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||h)&&r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||h!==u-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,a=[],l=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],e,t,n);return l(),a}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rn}}]})}],742531)},663777,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(852008),i=e.i(37727),a=e.i(920755);async function o(e,t,n,r){let i=e.from("files").select("id,name,geometry_type,is_community_layer").eq("status","complete").eq("geospatial",!0).not("pmtiles_path","is",null).or(`is_community_layer.eq.true,is_pillar_layer.eq.true,and(organization_id.eq.${t},hidden.eq.false,expires_at.is.null)`).order("is_community_layer",{ascending:!0}).limit(r);n.trim()&&(i=i.ilike("name",`%${n.trim()}%`));let{data:a,error:o}=await i;if(o)throw o;return a??[]}e.s(["AttachedLayerPills",0,function({layers:e,onRemove:n}){return 0===e.length?null:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:e.map(e=>(0,t.jsxs)("div",{className:"inline-flex max-w-full min-w-0 items-center gap-1.5 rounded-md border border-white/[0.1] bg-white/[0.06] py-0.5 pl-2 pr-1 transition-colors hover:bg-white/[0.09] sm:max-w-[220px]",children:[(0,t.jsx)(r.Layers,{className:"size-3 flex-shrink-0 text-[#a2a8ad]"}),(0,t.jsx)("span",{className:"min-w-0 truncate text-[11px] text-[#e8eaed]",title:e.name,children:e.name}),(0,t.jsx)("span",{className:"flex-shrink-0 text-[10px] uppercase text-[#888d92]",children:e.is_community_layer?"community":"org"}),(0,t.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"flex h-4 w-4 flex-shrink-0 items-center justify-center rounded text-[#888d92] transition-colors hover:bg-white/10 hover:text-[#e8eaed]","aria-label":`Remove ${e.name}`,children:(0,t.jsx)(i.X,{className:"size-3"})})]},e.id))})},"searchMentionableLayers",0,o,"useLayerMentions",0,function({organizationId:e,input:i,setInput:l,inputRef:s,enabled:u=!0}){let c=(0,n.useMemo)(()=>
1(0,a.createClient)(),[]),[d,h]=(0,n.useState)(null),[p,f]=(0,n.useState)([]),[m,g]=(0,n.useState)(0),[y,x]=(0,n.useState)([]),v=(0,n.useRef)(new Map),b=(0,n.useRef)(0);(0,n.useEffect)(()=>{let t=++b.current,n=setTimeout(async()=>{let n=()=>{t===b.current&&(h(null),f([]),g(0))};if(!u||!e)return void n();let r=s.current?.selectionStart??i.length,a=function(e,t){let n=e.slice(0,t),r=n.lastIndexOf("@");if(-1===r||r>0&&!/\s/.test(n[r-1]))return null;let i=n.slice(r+1);return/[\n]/.test(i)||i.length>60?null:{start:r,end:t,query:i}}(i,r);if(!a)return void n();try{let n=await o(c,e,a.query,6);if(t!==b.current)return;h(a),f(n),g(0)}catch{}},180);return()=>clearTimeout(n)},[i,u,e,s,c]);let k=(0,n.useCallback)(e=>{if(!d)return;let t=`@${e.name}`,n=i.slice(0,d.start)+t+" "+i.slice(d.end);for(v.current.set(e.id,e);v.current.size>24;){let e=v.current.keys().next().value;if(void 0===e)break;v.current.delete(e)}l(n),h(null),f([]),requestAnimationFrame(()=>{let e=s.current;if(e){let n=d.start+t.length+1;e.focus(),e.setSelectionRange(n,n)}})},[d,i,l,s]),w=(0,n.useCallback)(e=>!!d&&0!==p.length&&("ArrowDown"===e.key?(e.preventDefault(),g(e=>(e+1)%p.length),!0):"ArrowUp"===e.key?(e.preventDefault(),g(e=>(e-1+p.length)%p.length),!0):"Enter"===e.key||"Tab"===e.key?(e.preventDefault(),k(p[m]??p[0]),!0):"Escape"===e.key&&(e.preventDefault(),h(null),f([]),!0)),[d,p,m,k]),C=(0,n.useCallback)(e=>{x(t=>t.some(t=>t.id===e.id)?t:[...t,e])},[]),S=(0,n.useCallback)(e=>{x(t=>t.filter(t=>t.id!==e))},[]),D=(0,n.useCallback)(()=>{x([])},[]),T=(0,n.useRef)([]);(0,n.useEffect)(()=>{T.current=y},[y]);let j=(0,n.useCallback)(e=>{let t=e.join("\n"),n=new Map;for(let e of T.current)n.set(e.id,e);if(t.includes("@"))for(let e of v.current.values())t.includes(`@${e.name}`)&&n.set(e.id,e);return Array.from(n.values())},[]);return{menu:d&&p.length>0?(0,t.jsxs)("div",{className:"absolute bottom-full left-0 right-0 z-50 mb-2 overflow-hidden rounded-xl border border-white/10 shadow-xl",style:{background:"#202124"},children:[(0,t.jsx)("div",{className:"px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wide text-[#888d92]",children:"Mention a layer"}),p.map((e,n)=>(0,t.jsxs)("button",{type:"button",className:`flex w-full items-center gap-2 px-3 py-2 text-left text-[13px] text-[#e8eaed] transition-colors ${n===m?"bg-white/10":"hover:bg-white/5"}`,onMouseDown:t=>{t.preventDefault(),k(e)},onMouseEnter:()=>g(n),children:[(0,t.jsx)(r.Layers,{className:"size-3.5 shrink-0 text-[#888d92]"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),(0,t.jsxs)("span",{className:"shrink-0 text-[10px] uppercase text-[#888d92]",children:[e.is_community_layer?"community":"org",e.geometry_type?` \xb7 ${e.geometry_type}`:""]})]},e.id))]}):null,onKeyDown:w,getMentionsForTexts:j,attachedLayers:y,attachLayer:C,detachLayer:S,clearAttachedLayers:D}}])},686223,e=>{"use strict";var t=e.i(271645),n=e.i(920755),r=e.i(72207),i=e.i(770623);e.s(["usePlaybooks",0,function(){let[e,a]=(0,t.useState)([]),[o,l]=(0,t.useState)(!0),s=(0,t.useRef)(null),u=(0,t.useCallback)(async(e={})=>{try{let t=await (0,i.fetchJsonSingleFlight)("/api/playbooks",void 0,{cacheMs:i.BOOTSTRAP_JSON_CACHE_MS,force:e.force});a(t.playbooks||[])}catch(e){console.error("[usePlaybooks] error fetching:",e)}finally{l(!1)}},[]);(0,t.useEffect)(()=>{u();let e=(0,n.createClient)(),t=(0,r.createRealtimeRetryState)(),i=()=>{s.current&&(e.removeChannel(s.current),s.current=null),s.current=e.channel("playbooks-changes").on("postgres_changes",{event:"*",schema:"public",table:"playbooks"},()=>{u({force:!0})}).subscribe(e=>{(0,r.handleRealtimeStatus)(e,t,"Playbooks",i,()=>u({force:!0}))})};return i(),()=>{(0,r.clearRealtimeRetry)(t),s.current&&(e.removeChannel(s.current),s.current=null)}},[u]);let c=(0,t.useCallback)(async e=>{try{let t=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)return null;let{playbook:n}=await t.json();return a(e=>[n,...e]),n}catch(e){return console.error("[usePlaybooks] error creating:",e),null}},[]),d=(0,t.useCallback)(async(e,t)=>{a(n=>n.map(n=>n.id===e?{...n,name:t}:n));try{let n=await fetch(`/api/playbooks/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});return n.ok||u({force:!0}),n.ok}catch(e){return console.error("[usePlaybooks] error renaming:",e),u({force:!0}),!1}},[u]);return{playbooks:e,isLoading:o,refresh:()=>u({force:!0}),createPlaybook:c,renamePlaybook:d,archivePlaybook:(0,t.useCallback)(async(e,t)=>{a(n=>n.map(n=>n.id===e?{...n,is_archived:t}:n));try{let n=await fetch(`/api/playbooks/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_archived:t})});return n.ok||u({force:!0}),n.ok}catch(e){return console.error("[usePlaybooks] error archiving:",e),u({force:!0}),!1}},[u]),deletePlaybook:(0,t.useCallback)(async e=>{a(t=>t.filter(t=>t.id!==e));try{let t=await fetch(`/api/playbooks/${e}`,{method:"DELETE"});return t.ok||u({force:!0}),t.ok}catch(e){return console.error("[usePlaybooks] error deleting:",e),u({force:!0}),!1}},[u])}}])},364181,e=>{"use strict";
1var t=e.i(271645),n=e.i(920755),r=e.i(72207);let i={rowsBySession:new Map,channels:new Map,refCounts:new Map,listeners:new Set},a=new Map,o=[];function l(){for(let e of(a=new Map,Array.from(i.listeners)))e()}function s(e){return i.listeners.add(e),()=>{i.listeners.delete(e)}}function u(e,t){let n=i.rowsBySession.get(e);n&&(i.rowsBySession.set(e,n.filter(e=>e.id!==t)),l())}function c(e){let t=(e.mime_type??"").toLowerCase();return t.startsWith("image/")?"image":"application/pdf"===t?"pdf":t.includes("spreadsheet")||"text/csv"===t||t.includes("excel")?"spreadsheet":["geojson","shapefile","kml","kmz","gpkg","parquet"].includes((e.file_type??"").toLowerCase())?"geospatial":"other"}e.s(["buildChatFilesMetadata",0,function(e){let t=new Set,n=[];for(let r of e)!r?.id||t.has(r.id)||(t.add(r.id),n.push({id:r.id,filename:r.original_filename??r.name,mime:r.mime_type??"application/octet-stream",kind:c(r),size_bytes:r.size_bytes,created_at:r.created_at}));return n},"classifyChatFile",0,c,"useChatFileAttachments",0,function(e){let c=(0,t.useMemo)(()=>(0,n.createClient)(),[]),d=(0,t.useSyncExternalStore)(s,()=>(function(e){if(!e)return o;let t=a.get(e);if(t)return t;let n=[...i.rowsBySession.get(e)??[]].sort((e,t)=>e.created_at<t.created_at?-1:+(e.created_at>t.created_at));return a.set(e,n),n})(e),()=>o);return(0,t.useEffect)(()=>{if(!e)return;let t=i.refCounts.get(e)??0;if(i.refCounts.set(e,t+1),t>0)return()=>{let t=(i.refCounts.get(e)??1)-1;if(t<=0){i.refCounts.delete(e);let t=i.channels.get(e);t&&(c.removeChannel(t),i.channels.delete(e))}else i.refCounts.set(e,t)};let n=!1;(async()=>{try{var t;let r=await fetch(`/api/chat-files?session_id=${encodeURIComponent(e)}`,{cache:"no-store"});if(!r.ok)return;let a=await r.json();n||(t=a.files??[],i.rowsBySession.set(e,t),l())}catch{}})();let a=(0,r.createRealtimeRetryState)(),o=c.channel(`chat-files-${e}`).on("postgres_changes",{event:"*",schema:"public",table:"files",filter:`agent_session_id=eq.${e}`},t=>{if("DELETE"===t.eventType&&t.old){let n=t.old.id;n&&u(e,n);return}let n=t.new;if(n&&!0===n.chat_attached){let t,r;r=(t=i.rowsBySession.get(e)??[]).some(e=>e.id===n.id)?t.map(e=>e.id===n.id?n:e):[...t,n],i.rowsBySession.set(e,r),l()}}).on("postgres_changes",{event:"DELETE",schema:"public",table:"files"},t=>{let n=t.old?.id;n&&u(e,n)}).subscribe(t=>{(0,r.handleRealtimeStatus)(t,a,`chat-files:${e.substring(0,8)}`,()=>{}),"SUBSCRIBED"===t&&(0,r.clearRealtimeRetry)(a)});return i.channels.set(e,o),()=>{n=!0;let t=(i.refCounts.get(e)??1)-1;if(t<=0){i.refCounts.delete(e);let t=i.channels.get(e);t&&(c.removeChannel(t),i.channels.delete(e))}else i.refCounts.set(e,t)}},[e,c]),{files:d,isLoading:!1}}])},735501,e=>{"use strict";var t=e.i(803408);e.s(["ImageIcon",()=>t.default])},542879,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(918789),i=e.i(742531),a=e.i(531278),o=e.i(541071),l=e.i(727612),s=e.i(722915),u=e.i(513639),c=e.i(643531),d=e.i(630374),h=e.i(330009),p=e.i(463415),f=e.i(647163);let m=(0,f.cn)("text-[13px] text-[#e8eaed] leading-snug","[&_h1]:text-base [&_h1]:font-semibold [&_h1]:text-[#e8eaed] [&_h1]:mt-3 [&_h1]:mb-2","[&_h2]:text-sm [&_h2]:font-semibold [&_h2]:text-[#e8eaed] [&_h2]:mt-3 [&_h2]:mb-1.5","[&_h3]:text-[13px] [&_h3]:font-semibold [&_h3]:text-[#e8eaed] [&_h3]:mt-2 [&_h3]:mb-1","[&_p]:my-1.5 [&_p]:leading-relaxed","[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:my-1.5","[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:my-1.5","[&_li]:my-0.5","[&_code]:font-mono [&_code]:text-[12px] [&_code]:bg-white/[0.06] [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded","[&_pre]:my-2 [&_pre]:p-2 [&_pre]:bg-white/[0.04] [&_pre]:rounded-md [&_pre]:overflow-x-auto","[&_pre_code]:bg-transparent [&_pre_code]:p-0","[&_a]:text-blue-400 [&_a]:underline-offset-2 hover:[&_a]:underline","[&_blockquote]:my-2 [&_blockquote]:pl-3 [&_blockquote]:border-l-2 [&_blockquote]:border-white/[0.15] [&_blockquote]:italic [&_blockquote]:text-[#a2a8ad]","[&_table]:my-2 [&_table]:border-collapse","[&_th]:border [&_th]:border-white/[0.1] [&_th]:px-2 [&_th]:py-1 [&_th]:text-left","[&_td]:border [&_td]:border-white/[0.1] [&_td]:px-2 [&_td]:py-1","[&_strong]:font-semibold [&_strong]:text-[#e8eaed]","[&_em]:italic");function g({label:e,active:n,onClick:r}){return(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":n,onMouseDown:e=>{e.preventDefault()},onClick:r,className:(0,f.cn)("rounded-md px-2 py-0.5 text-[11px] transition-colors",n?"bg-white/[0.08] text-[#e8eaed]":"text-[#a2a8ad] hover:text-[#e8eaed]"),children:e})}e.s(["PlaybookEditDialog",0,function({playbook:e,onClose:y,onChanged:x}
1){let v=null!==e,[b,k]=(0,n.useState)(""),[w,C]=(0,n.useState)(""),[S,D]=(0,n.useState)(""),[T,j]=(0,n.useState)(!1),[N,O]=(0,n.useState)(null),[E,_]=(0,n.useState)("preview"),[A,P]=(0,n.useState)(!1),[M,z]=(0,n.useState)(null),[I,L]=(0,n.useState)(!1),[R,F]=(0,n.useState)(null),[U,W]=(0,n.useState)(!1),[H,B]=(0,n.useState)(!1),[$,X]=(0,n.useState)(!1),[q,V]=(0,n.useState)(!1),[K,Y]=(0,n.useState)(0),Z=e?.id??null,J=(0,n.useRef)(null),Q=(0,n.useRef)(null),G=(0,n.useRef)(null),ee=(0,n.useRef)(I);(0,n.useEffect)(()=>{ee.current=I},[I]),(0,n.useEffect)(()=>{if(!Z)return;let e=!1,t=new AbortController;return(async()=>{P(!0),z(null);try{let n=await fetch(`/api/playbooks/${Z}`,{signal:t.signal});if(!n.ok)throw Error(`Failed to load (${n.status})`);let r=await n.json();if(e)return;let i=r.playbook,a=i.instructions_md??"";k(i.name??""),C(i.description??""),D(a),j(!!i.is_archived),O({name:i.name??"",description:i.description??"",instructions:a,is_archived:!!i.is_archived}),_(a.trim().length>0?"preview":"edit")}catch(t){if(e||t instanceof DOMException&&"AbortError"===t.name)return;console.error("[PlaybookEditDialog] load failed:",t),z(t instanceof Error?t.message:"Failed to load playbook")}finally{e||P(!1)}})(),()=>{e=!0,t.abort(),k(""),C(""),D(""),j(!1),O(null),_("preview"),P(!1),z(null),F(null),X(!1),V(!1),B(!1)}},[Z,K]);let et=(0,n.useMemo)(()=>!!N&&(b!==N.name||w!==N.description||S!==N.instructions||T!==N.is_archived),[N,b,w,S,T]),en=!A&&!I&&!M&&b.trim().length>0&&et,er=(0,n.useCallback)(async()=>{if(Z&&en){L(!0),F(null);try{let e=await fetch(`/api/playbooks/${Z}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b.trim(),description:w.trim()||null,instructions_md:S,is_archived:T})});if(!e.ok){let t=await e.text().catch(()=>"");throw Error(t||`Save failed (${e.status})`)}let t=(await e.json()).playbook,n=t.instructions_md??"";k(t.name??""),C(t.description??""),D(n),j(!!t.is_archived),O({name:t.name??"",description:t.description??"",instructions:n,is_archived:!!t.is_archived}),x()}catch(e){console.error("[PlaybookEditDialog] save failed:",e),F(e instanceof Error?e.message:"Save failed")}finally{L(!1)}}},[Z,en,b,w,S,T,x]),ei=(0,n.useCallback)(async()=>{if(Z){W(!0);try{let e=await fetch(`/api/playbooks/${Z}`,{method:"DELETE"});if(!e.ok){let t=await e.text().catch(()=>"");throw Error(t||`Delete failed (${e.status})`)}x(),B(!1),y()}catch(e){console.error("[PlaybookEditDialog] delete failed:",e),F(e instanceof Error?e.message:"Delete failed"),B(!1)}finally{W(!1)}}},[Z,x,y]);(0,n.useEffect)(()=>{if(!v)return;let e=e=>{"Escape"!==e.key||I||U||(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[v,I,U,y]);let ea=(0,n.useCallback)(()=>{_("edit"),requestAnimationFrame(()=>{let e=G.current;if(e){e.focus();let t=e.value.length;try{e.setSelectionRange(t,t)}catch{}}})},[]),eo=(0,n.useCallback)(e=>{if(ee.current)return;let t=e.relatedTarget;t&&t.closest("[data-mode-tabs]")||_("preview")},[]),el=(0,n.useCallback)(()=>{X(!0),requestAnimationFrame(()=>{let e=J.current;if(e){e.focus();let t=e.value.length;try{e.setSelectionRange(t,t)}catch{}}})},[]),es=(0,n.useCallback)(()=>{V(!0),requestAnimationFrame(()=>{let e=Q.current;if(e){e.focus();let t=e.value.length;try{e.setSelectionRange(t,t)}catch{}}})},[]),eu=(0,n.useId)(),ec=(0,n.useId)();if(!v)return null;let ed=A||I||U||!!M;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Dialog,{open:v,onOpenChange:e=>{e||I||U||y()},children:(0,t.jsxs)(d.DialogContent,{overlayClassName:"z-[300]",className:(0,f.cn)("bg-[#1f2021] text-[#e8eaed] border border-[#3c4043]","sm:max-w-2xl p-6","shadow-2xl"),children:[(0,t.jsx)(d.DialogHeader,{children:(0,t.jsx)(d.DialogTitle,{className:"text-[13px] font-medium text-[#a2a8ad] uppercase tracking-wider",children:"Edit playbook"})}),A?(0,t.jsxs)("div",{className:"flex items-center justify-center py-16 text-[#a2a8ad] text-sm",children:[(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin mr-2"}),"Loading…"]}):M?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[(0,t.jsx)("div",{className:"text-[13px] text-red-400",children:M}),(0,t.jsx)("button",{type:"button",onClick:()=>Y(e=>e+1),className:"text-[12px] text-[#e8eaed] underline-offset-2 hover:underline",children:"Retry"})]}):(0,t.jsxs)("div",{className:"mt-3 space-y-5",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[$?(0,t.jsx)("input",{ref:J,id:eu,value:b,onChange:e=>k(e.target.value),onBlur:()=>X(!1),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),X(!1)):"Escape"===e.key&&(e.preventDefault(),N&&k(N.name),X(!1))},disabled:ed,placeholder:"Playbook name",className:(0,f.cn)("w-full bg-transparent border-none p-0 m-0","text-lg font-semibold text-[#e8eaed]","placeholder:text-[#888d92]","focus:outline-none focus:ring-0")}):(0,t.jsx)("div",{role:"button",tabIndex:0,"aria-label":"Edit name",onClick:el,onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),el())},className:(0,f.cn)("text-lg font-semibold cursor-text","rounded-sm -mx-1 px-1 hover:bg-white/[0.04] transition-colors",b?"text-[#e8eaed]":"text-[#888d92]"),children:b||"Untitled playbook"}),q?(0,t.jsx)("input",{ref:Q,id:ec,value:w,onChange:e=>C(e.target.value),onBlur:()=>V(!1),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),V(!1)):"Escape"===e.key&&(e.preventDefault(),N&&C(N.description),V(!1))},disabled:ed,placeholder:"Add a one-line description",className:(0,f.cn)("w-full bg-transparent border-none p-0 m-0","text-sm text-[#e8eaed]","placeholder:text-[#888d92]","focus:outline-none focus:ring-0")}):(0,t.jsx)("div",{role:"button",tabIndex:0,"aria-label":"Edit description",onClick:es,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),es())},className:(0,f.cn)("text-sm cursor-text","rounded-sm -mx-1 px-1 hover:bg-white/[0.04] transition-colors",w?"text-[#a2a8ad]":"text-[#888d92]"),children:w||"Add a one-line description"})]}),(0,t.jsxs)("div",{className:"rounded-md border border-white/[0.08] overflow-hidden",children:[(0,t.jsxs)("div",{"data-mode-tabs":!0,role:"tablist","aria-label":"Editor mode",className:"flex items-center gap-1 px-2 py-1 border-b border-white/[0.08] bg-white/[0.02]",children:[(0,t.jsx)(g,{label:"Preview",active:"preview"===E,onClick:()=>_("preview")}),(0,t.jsx)(g,{label:"Markdown",active:"edit"===E,onClick:()=>_("edit")})]}),(0,t.jsx)("div",{role:"tabpanel",className:"h-[420px] overflow-hidden",children:"preview"===E?(0,t.jsx)("div",{onClick:ea,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),ea())},role:"button",tabIndex:0,"aria-label":"Edit instructions",className:"h-full cursor-text overflow-y-auto p-3 outline-none focus:outline-none",children:0===S.trim().length?(0,t.jsx)("div",{className:"text-[13px] text-[#888d92]",children:"No instructions yet. Click here to start writing."}):(0,t.jsx)("div",{className:m,children:(0,t.jsx)(r.default,{remarkPlugins:[i.default],children:S})})}):(0,t.jsx)("textarea",{ref:G,value:S,onChange:e=>D(e.target.value),onBlur:eo,onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&en&&(e.preventDefault(),er())},disabled:ed,placeholder:"Write your playbook in Markdown…",className:(0,f.cn)("h-full w-full resize-none p-3","bg-transparent border-none","font-mono text-[12px] text-[#e8eaed] leading-relaxed","placeholder:text-[#888d92]","focus:outline-none focus:ring-0")})})]}),R&&(0,t.jsx)("div",{className:"text-[12px] text-red-400",children:R}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(p.DropdownMenu,{children:[(0,t.jsx)(p.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",disabled:I||U,"aria-label":"More actions",className:(0,f.cn)("inline-flex items-center justify-center","size-8 rounded-md","text-[#a2a8ad] hover:text-[#e8eaed] hover:bg-white/[0.06]","disabled:opacity-40 disabled:hover:bg-transparent","transition-colors"),children:(0,t.jsx)(o.MoreHorizontal,{className:"size-4"})})}),(0,t.jsxs)(p.DropdownMenuContent,{align:"start",side:"top",className:"z-[310] bg-[#2d2e30] border-[#3c4043] text-[#e8eaed] min-w-[180px]",children:[(0,t.jsxs)(p.DropdownMenuItem,{onSelect:e=>{e.preventDefault(),j(e=>!e)},className:"text-[13px] text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[T?(0,t.jsx)(u.ArchiveRestore,{className:"size-3.5 mr-2"}):(0,t.jsx)(s.Archive,{className:"size-3.5 mr-2"}),(0,t.jsx)("span",{className:"flex-1",children:T?"Unarchive":"Archive"}),T!==(N?.is_archived??!1)&&(0,t.jsx)(c.Check,{className:"size-3.5 ml-2 text-[#a2a8ad]"})]}),(0,t.jsx)(p.DropdownMenuSeparator,{className:"bg-white/[0.08]"}),(0,t.jsxs)(p.DropdownMenuItem,{onSelect:e=>{e.preventDefault(),B(!0)},className:"text-[13px] text-red-400 focus:bg-red-500/[0.08] focus:text-red-300 data-[highlighted]:bg-red-500/[0.08] data-[highlighted]:text-red-300",children:[(0,t.jsx)(l.Trash2,{className:"size-3.5 mr-2"}),"Delete"]})]})]}),et&&!I&&(0,t.jsx)("span",{className:"text-[11px] text-[#888d92]",children:"Unsaved"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{I||U||y()},disabled:I||U,className:(0,f.cn)("inline-flex items-center justify-center","h-8 px-3 rounded-md text-[13px]","text-[#c4c8cc
1] hover:text-[#e8eaed] hover:bg-white/[0.06]","disabled:opacity-40 disabled:hover:bg-transparent","transition-colors"),children:"Cancel"}),(0,t.jsxs)("button",{type:"button",onClick:()=>void er(),disabled:!en,className:(0,f.cn)("inline-flex items-center justify-center gap-1.5","h-8 px-3 rounded-md text-[13px] font-medium","bg-blue-600 text-white hover:bg-blue-500","disabled:bg-blue-600/40 disabled:text-[#a2a8ad] disabled:cursor-not-allowed","transition-colors"),children:[I&&(0,t.jsx)(a.Loader2,{className:"size-3.5 animate-spin"}),"Save"]})]})]})]})]})}),(0,t.jsx)(h.AlertDialog,{open:H,onOpenChange:e=>{e||U||B(!1)},children:(0,t.jsxs)(h.AlertDialogContent,{children:[(0,t.jsxs)(h.AlertDialogHeader,{children:[(0,t.jsx)(h.AlertDialogTitle,{children:"Delete this playbook?"}),(0,t.jsx)(h.AlertDialogDescription,{children:N?.name?(0,t.jsxs)(t.Fragment,{children:["“",N.name,"” will be permanently removed. This can’t be undone."]}):(0,t.jsx)(t.Fragment,{children:"This playbook will be permanently removed. This can’t be undone."})})]}),(0,t.jsxs)(h.AlertDialogFooter,{children:[(0,t.jsx)(h.AlertDialogCancel,{disabled:U,onClick:()=>B(!1),children:"Cancel"}),(0,t.jsxs)(h.AlertDialogAction,{variant:"destructive",disabled:U,onClick:e=>{e.preventDefault(),ei()},children:[U&&(0,t.jsx)(a.Loader2,{className:"size-3.5 animate-spin mr-1.5"}),"Delete"]})]})]})})]})}])},851903,(e,t,n)=>{t.exports=(()=>{"use strict";var e,t,n={949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(515);t.CronParser=function(){function e(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t,n=null!=(e=this.expression)?e:"";if("@reboot"===n)return["@reboot","","","","","",""];if(n.startsWith("@")){var r=this.parseSpecial(this.expression);t=this.extractParts(r)}else t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},e.prototype.parseSpecial=function(e){var t={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"}[e];if(!t)throw Error("Unknown special expression.");return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error("cron expression is empty");for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(",")){var r=t[n].split(",").map(function(e){return e.trim()}).filter(function(e){return""!==e}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return null!==e&&""!==e});0===r.length&&r.push("*"),r.sort(function(e,t){return null!==e&&null!==t?e-t:0}),t[n]=r.map(function(e){return null!==e?e.toString():""}).join(",")}if(t.length<5)throw Error("Expression has only ".concat(t.length," part").concat(1==t.length?"":"s",". At least 5 parts are required."));if(5==t.length)t.unshift(""),t.push("");else if(6==t.length)/\d{4}$/.test(t[5])||"?"==t[4]||"?"==t[2]?t.unshift(""):t.push("");else if(t.length>7)throw Error("Expression has ".concat(t.length," parts; too many!"));return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace("?","*"),e[5]=e[5].replace("?","*"),e[2]=e[2].replace("?","*"),0==e[0].indexOf("0/")&&(e[0]=e[0].replace("0/","*/")),0==e[1].indexOf("0/")&&(e[1]=e[1].replace("0/","*/")),0==e[2].indexOf("0/")&&(e[2]=e[2].replace("0/","*/")),0==e[3].indexOf("1/")&&(e[3]=e[3].replace("1/","*/")),0==e[4].indexOf("1/")&&(e[4]=e[4].replace("1/","*/")),0==e[6].indexOf("1/")&&(e[6]=e[6].replace("1/","*/")),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,""),r=n;return t.dayOfWeekStartIndexZero?"7"==n&&(r="0"):r=(parseInt(n)-1).toString(),e.replace(n,r)}),"L"==e[5]&&(e[5]="6"),"?"==e[3]&&(e[3]="*"),e[3].indexOf("W")>-1&&(e[3].indexOf(",")>-1||e[3].indexOf("-")>-1))throw Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(RegExp(r,"gi"),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,""),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(RegExp(a,"gi"),i[a].toString());"0"==e[0]&&(e[0]=""),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+="-".concat(e[2]));for(var o=0;o<e.length;o++)if(-1!=e[o].indexOf(",")&&(e[o]=e[o].split(",").filter(function(e){return""!==e}).join(",")||"*"),"*/1"==e[o]&&(e[o]="*"),e[o].indexOf("/")>-1&&!/^\*|\-|\,/.test(e[o])){var l=null;switch(o){case 4:l="12";break;case 5:l="6";break;case 6:l="9999";break;default:l=null}if(null!==l){var s=e[o].split("/");e[o]="".concat(s[0],"-").concat(l,"/").concat(s[1])}}},e.prototype.validate=function(e){var t="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp("[^".concat(t,"]+"),"gi"));
1if(n&&n.length)throw Error("Expression contains invalid values: '".concat(n.toString(),"'"))},e}()},333(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var r=n(823),i=n(949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=e.locales[this.options.locale],void 0===n.use24HourTimeFormat&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=void 0===n?{}:n,i=r.throwExceptionOnParseError,a=r.verbose,o=r.dayOfWeekStartIndexZero,l=r.monthStartIndexZero,s=r.use24HourTimeFormat,u=r.trimHoursLeadingZero,c=r.locale,d=r.logicalAndDayFields,h={throwExceptionOnParseError:void 0===i||i,verbose:void 0!==a&&a,dayOfWeekStartIndexZero:void 0===o||o,monthStartIndexZero:void 0!==l&&l,use24HourTimeFormat:s,trimHoursLeadingZero:void 0!==u&&u,locale:void 0===c?null:c,logicalAndDayFields:void 0!==d&&d};return h.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported."),new e(t,h).getFullDescription()},e.initialize=function(t,n){void 0===n&&(n="en"),e.specialCharacters=["/","-",",","*"],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t,n="";try{var r=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=r.parse(),"@reboot"===this.expressionParts[0])return(null==(t=(e=this.i18n).atReboot)?void 0:t.call(e))||"Run once, at startup";var a=this.getTimeOfDayDescription(),o=this.getDayOfMonthDescription(),l=this.getMonthDescription(),s=this.getDayOfWeekDescription(),u=this.getYearDescription();n+=a+o+s+l+u,n=(n=this.transformVerbosity(n,!!this.options.verbose)).charAt(0).toLocaleUpperCase()+n.substr(1)}catch(e){if(this.options.throwExceptionOnParseError)throw"".concat(e);n=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}return n},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a="";if(r.StringUtilities.containsAny(n,e.specialCharacters)||r.StringUtilities.containsAny(i,e.specialCharacters)||r.StringUtilities.containsAny(t,e.specialCharacters))if(!(!t&&n.indexOf("-")>-1)||n.indexOf(",")>-1||n.indexOf("/")>-1||r.StringUtilities.containsAny(i,e.specialCharacters))if(!t&&i.indexOf(",")>-1&&-1==i.indexOf("-")&&-1==i.indexOf("/")&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var o=i.split(",");a+=this.i18n.at();for(var l=0;l<o.length;l++)a+=" ",a+=this.formatTime(o[l],n,""),l<o.length-2&&(a+=","),l==o.length-2&&(a+=this.i18n.spaceAnd())}else{var s=this.getSecondsDescription(),u=this.getMinutesDescription(),c=this.getHoursDescription();if((a+=s)&&u&&(a+=", "),a+=u,u===c)return a;a&&c&&(a+=", "),a+=c}else{var d=n.split("-");a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,d[0],""),this.formatTime(i,d[1],""))}else a+=this.i18n.atSpace()+this.formatTime(i,n,t);return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return"0"==t?"":20>parseInt(t)?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i,a;try{return"0"==r&&-1==n.indexOf("/")&&""==t?e.i18n.everyHour():"0"==r?(null==(a=(i=e.i18n).onTheHour)?void 0:a.call(i))||e.i18n.atX0MinutesPastTheHour(r):20>parseInt(r)?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch(t){return e.i18n.atX0MinutesPastTheHour(r)}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split("/")[0].split(",").forEach(function(e){var t=e.split("-");2===t.length&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;
1return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&"0"!==e.expressionParts[1];return a++,n?e.formatTime(t,"59",""):e.formatTime(t,"0","")},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek();return"*"==this.expressionParts[5]?"":this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf("#")>-1){var l=null,s=n.substring(n.indexOf("#")+1),u=n.substring(0,n.indexOf("#"));switch(s){case"1":l=e.i18n.first(u);break;case"2":l=e.i18n.second(u);break;case"3":l=e.i18n.third(u);break;case"4":l=e.i18n.fourth(u);break;case"5":l=e.i18n.fifth(u)}o=l+" "+o}return o},function(t){return 1==parseInt(t)?"":r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf("-"));return"*"!=e.expressionParts[3]?e.i18n.commaAndX0ThroughX1(n):e.i18n.commaX0ThroughX1(n)},function(t){var n=null;if(t.indexOf("#")>-1){var r=t.substring(t.indexOf("#")+1),i=t.substring(0,t.indexOf("#"));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf("L")>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace("L","")):"*"!=e.expressionParts[3]?e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(t);return n})},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],"",function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return 1==parseInt(t)?"":r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case"L":t=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace("W","")),o=1==a?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o)}else{var l=n.match(/L-(\d{1,2})/);if(l){var s=l[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(s),s)}else{if("*"==n&&"*"!=this.expressionParts[5])return"";t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return"L"==t?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return"1"==t?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)})}}}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],"",function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o){var l=null,s=e.indexOf("/")>-1,u=e.indexOf("-")>-1,c=e.indexOf(",")>-1;if(e)if("*"===e)l=t;else if(s||u||c)if(c){for(var d=e.split(","),h="",p=0;p<d.length;p++)if(p>0&&d.length>2&&(h+=",",p<d.length-1&&(h+=" ")),p>0&&d.length>1&&(p==d.length-1||2==d.length)&&(h+="".concat(this.i18n.spaceAnd()," ")),d[p].indexOf("/")>-1||d[p].indexOf("-")>-1){var f=d[p].indexOf("-")>-1&&-1==d[p].indexOf("/"),m=this.getSegmentDescription(d[p],t,n,i,f?this.i18n.commaX0ThroughX1:a,o);f&&(m=m.replace(", ","")),h+=m}else if(s){var g=this.getSegmentDescription(d[p],t,n,i,a,o);g&&g.startsWith(", ")&&(g=g.substring(2)),h+=g}else h+=n(d[p]);
1l=s?h:r.StringUtilities.format(o(e),h)}else if(s){var d=e.split("/");if(l=r.StringUtilities.format(i(d[1]),d[1]),d[0].indexOf("-")>-1){var y=this.generateRangeSegmentDescription(d[0],a,n);0!=y.indexOf(", ")&&(l+=", "),l+=y}else if(-1==d[0].indexOf("*")){var x=r.StringUtilities.format(o(d[0]),n(d[0]));x=x.replace(", ",""),l+=r.StringUtilities.format(this.i18n.commaStartingX0(),x)}}else u&&(l=this.generateRangeSegmentDescription(e,a,n));else l=r.StringUtilities.format(o(e),n(e));else l="";return l},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i="",a=e.split("-"),o=n(a[0],1),l=n(a[1],2),s=t(e);return i+r.StringUtilities.format(s,o,l)},e.prototype.formatTime=function(e,t,n){var r=parseInt(e)+0,i=parseInt(t)+0;i>=60?(i-=60,r+=1):i<0&&(i+=60,r-=1),r>=24?r-=24:r<0&&(r=24+r);var a="",o=!1;this.options.use24HourTimeFormat||(a=(o=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()))?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),0===r&&(r=12));var l="";n&&(l=":".concat(("00"+n).substring(n.length)));var s=r.toString(),u=("00"+s).substring(s.length),c=i.toString(),d=("00"+c).substring(c.length),h=this.options.trimHoursLeadingZero?s:u;return"".concat(o?a:"").concat(h,":").concat(d).concat(l).concat(o?"":a)},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=(e=(e=(e=e.replace(RegExp(", ".concat(this.i18n.everyMinute()),"g"),"")).replace(RegExp(", ".concat(this.i18n.everyHour()),"g"),"")).replace(RegExp(this.i18n.commaEveryDay(),"g"),"")).replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(RegExp(a,"g"),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},e.locales={},e}()},747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},e.prototype.everyMinute=function(){return"every minute"},e.prototype.everyHour=function(){return"every hour"},e.prototype.atSpace=function(){return"At "},e.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},e.prototype.at=function(){return"At"},e.prototype.spaceAnd=function(){return" and"},e.prototype.everySecond=function(){return"every second"},e.prototype.everyX0Seconds=function(){return"every %s seconds"},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},e.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},e.prototype.everyX0Minutes=function(){return"every %s minutes"},e.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},e.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},e.prototype.everyX0Hours=function(){return"every %s hours"},e.prototype.betweenX0AndX1=function(){return"between %s and %s"},e.prototype.atX0=function(){return"at %s"},e.prototype.commaEveryDay=function(){return", every day"},e.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},e.prototype.commaX0ThroughX1=function(){return", %s through %s"},e.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},e.prototype.first=function(){return"first"},e.prototype.second=function(){return"second"},e.prototype.third=function(){return"third"},e.prototype.fourth=function(){return"fourth"},e.prototype.fifth=function(){return"fifth"},e.prototype.commaOnThe=function(){return", on the "},e.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},e.prototype.lastDay=function(){return"the last day"},e.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},e.prototype.commaOnlyOnX0=function(){return", only on %s"},e.prototype.commaAndOnX0=function(){return", and on %s"},e.prototype.commaEveryX0Months=function(){return", every %s months"},e.prototype.commaOnlyInX0=function(){return", only in %s"},e.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},e.prototype.firstWeekday=function(){return"first weekday"},e.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},e.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},e.prototype.commaEveryX0Days=function(){return", every %s days in a month"},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},e.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},e.prototype.commaEveryHour=function(){return", every hour"},e.prototype.commaEveryX0Years=function(){return", every %s years"},e.prototype.commaStartingX0=function(){return", starting %s"},e.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"]},e.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},e.prototype.atReboot=function(){return"Run once, at startup"},e.prototype.onTheHour=function(){return"on the hour"},e}()},515(e,t){function n(e,t){if(!e)throw Error(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(","),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,"seconds part must be >= 0 and <= 59")}},e.minuteRange=function(e){for(var t=e.split(","),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,"minutes part must be >= 0 and <= 59")}},e.hourRange=function(e){for(var t=e.split(","),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,"hours part must be >= 0 and <= 23")}},e.dayOfMonthRange=function(e){for(var t=e.split(","),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,"DOM part must be >= 1 and <= 31")}},e.monthRange=function(e,t){for(var r=e.split(","),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},e.dayOfWeekRange=function(e,t){for(var r=e.split(","),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},e}()},823(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(/%s/g,function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}var a={};return Object.defineProperty(a,"__esModule",{value:!0}),a.toString=void 0,e=i(333),t=i(747),e.ExpressionDescriptor.initialize(new t.enLocaleLoader),a.default=e.ExpressionDescriptor,a.toString=e.ExpressionDescriptor.toString,a})()},167251,431343,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(110597),i=e.i(878894),a=e.i(959208),o=e.i(664659),l=e.i(463059),s=e.i(531278),u=e.i(686311),c=e.i(475254);let d=(0,c.default)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var h=e.i(788699);let p=(0,c.default)("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"}]]);e.s(["Play",0,p],431343);var f=e.i(727612),m=e.i(39312),g=e.i(846696),y=e.i(630374),x=e.i(330009),v=e.i(728231),b=e.i(602675),k=e.i(643531),w=e.i(327025);function C(e){return Date.UTC(e.y,e.m-1,e.d,e.h,e.i,e.s)}function S(e,t){return e.y===t.y&&e.m===t.m&&e.d===t.d&&e.h===t.h&&e.i===t.i&&e.s===t.s}function D(e,t,n){return T(function(e,t){let n=new Date(Date.parse(e));if(isNaN(n))throw Error("Invalid ISO8601 passed to timezone parser.");let r=e.substring(9);return r.includes("Z")||r.includes("+")||r.includes("-")?N(n.getUTCFullYear(),n.getUTCMonth()+1,n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),"Etc/UTC"):N(n.getFullYear(),n.getMonth()+1,n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),t)}(e,t),n)}function T(e,t){let n=new Date(C(e)),r=j(n,e.tz),i=C(e),a=C(r),o=new Date(n.getTime()+(i-a)),l=j(o,e.tz);if(S(l,e)){let t=new Date(o.getTime()-36e5);return S(j(t,e.tz),e)?t:o}let s=new Date(o.getTime()+C(e)-C(l));if(S(j(s,e.tz),e))return s;if(t)throw Error("Invalid date passed to fromTZ()");return o.getTime()>s.getTime()?o:s}function j(e,t){let n;try{n=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(e)}catch(n){let e=n instanceof Error?n.message:String(n);throw RangeError(`toTZ: Invalid timezone '${t}' or date. Please provide a valid IANA timezone (e.g., 'America/Ne
1w_York', 'Europe/Stockholm'). Original error: ${e}`)}let r={year:0,month:0,day:0,hour:0,minute:0,second:0};for(let e of n)("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type||"minute"===e.type||"second"===e.type)&&(r[e.type]=parseInt(e.value,10));if(isNaN(r.year)||isNaN(r.month)||isNaN(r.day)||isNaN(r.hour)||isNaN(r.minute)||isNaN(r.second))throw Error(`toTZ: Failed to parse all date components from timezone '${t}'. This may indicate an invalid date or timezone configuration. Parsed components: ${JSON.stringify(r)}`);return 24===r.hour&&(r.hour=0),{y:r.year,m:r.month,d:r.day,h:r.hour,i:r.minute,s:r.second,tz:t}}function N(e,t,n,r,i,a,o){return{y:e,m:t,d:n,h:r,i:i,s:a,tz:o}}var O=[1,2,4,8,16],E=class{pattern;timezone;mode;alternativeWeekdays;sloppyRanges;second;minute;hour;day;month;dayOfWeek;year;lastDayOfMonth;lastWeekday;nearestWeekdays;starDOM;starDOW;starYear;useAndLogic;constructor(e,t,n){this.pattern=e,this.timezone=t,this.mode=n?.mode??"auto",this.alternativeWeekdays=n?.alternativeWeekdays??!1,this.sloppyRanges=n?.sloppyRanges??!1,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.year=Array(1e4).fill(0),this.lastDayOfMonth=!1,this.lastWeekday=!1,this.nearestWeekdays=Array(31).fill(0),this.starDOM=!1,this.starDOW=!1,this.starYear=!1,this.useAndLogic=!1,this.parse()}parse(){if(!("string"==typeof this.pattern||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let e=this.pattern.match(/\S+/g)||[""],t=e.length;if(e.length<5||e.length>7)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly f
1ive, six, or seven space separated parts are required.");if("auto"!==this.mode){let e;switch(this.mode){case"5-part":e=5;break;case"6-part":e=6;break;case"7-part":e=7;break;case"5-or-6-parts":e=[5,6];break;case"6-or-7-parts":e=[6,7];break;default:e=0}if(!(Array.isArray(e)?e.includes(t):t===e)){let n=Array.isArray(e)?e.join(" or "):e.toString();throw TypeError(`CronPattern: mode '${this.mode}' requires exactly ${n} parts, but pattern '${this.pattern}' has ${t} parts.`)}}if(5===e.length&&e.unshift("0"),6===e.length&&e.push("*"),"LW"===e[3].toUpperCase()?(this.lastWeekday=!0,e[3]=""):e[3].toUpperCase().indexOf("L")>=0&&(e[3]=e[3].replace(/L/gi,""),this.lastDayOfMonth=!0),"*"==e[3]&&(this.starDOM=!0),"*"==e[6]&&(this.starYear=!0),e[4].length>=3&&(e[4]=this.replaceAlphaMonths(e[4])),e[5].length>=3&&(e[5]=this.alternativeWeekdays?this.replaceAlphaDaysQuartz(e[5]):this.replaceAlphaDays(e[5])),e[5].startsWith("+")&&(this.useAndLogic=!0,e[5]=e[5].substring(1),""===e[5]))throw TypeError("CronPattern: Day-of-week field cannot be empty after '+' modifier.");switch("*"==e[5]&&(this.starDOW=!0),this.pattern.indexOf("?")>=0&&(e[0]=e[0].replace(/\?/g,"*"),e[1]=e[1].replace(/\?/g,"*"),e[2]=e[2].replace(/\?/g,"*"),e[3]=e[3].replace(/\?/g,"*"),e[4]=e[4].replace(/\?/g,"*"),e[5]=e[5].replace(/\?/g,"*"),e[6]&&(e[6]=e[6].replace(/\?/g,"*"))),this.mode){case"5-part":e[0]="0",e[6]="*";break;case"6-part":case"5-or-6-parts":e[6]="*"}this.throwAtIllegalCharacters(e),this.partToArray("second",e[0],0,1),this.partToArray("minute",e[1],0,1),this.partToArray("hour",e[2],0,1),this.partToArray("day",e[3],-1,1),this.partToArray("month",e[4],-1,1);let n=this.alternativeWeekdays?-1:0;this.partToArray("dayOfWeek",e[5],n,63),this.partToArray("year",e[6],0,1),!this.alternativeWeekdays&&this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(e,t,n,r){let i=this[e],a="day"===e&&this.lastDayOfMonth,o="day"===e&&this.lastWeekday;if(""===t&&!a&&!o)throw TypeError("CronPattern: configuration entry "+e+" ("+t+") is empty, check for trailing spaces.");if("*"===t)return i.fill(r);let l=t.split(",");if(l.length>1)for(let t=0;t<l.length;t++)this.partToArray(e,l[t],n,r);else -1!==t.indexOf("-")&&-1!==t.indexOf("/")?this.handleRangeWithStepping(t,e,n,r):-1!==t.indexOf("-")?this.handleRange(t,e,n,r):-1!==t.indexOf("/")?this.handleStepping(t,e,n,r):""!==t&&this.handleNumber(t,e,n,r)}throwAtIllegalCharacters(e){for(let t=0;t<e.length;t++)if((3===t?/[^/*0-9,\-WwLl]+/:5===t?/[^/*0-9,\-#Ll]+/:/[^/*0-9,\-]+/).test(e[t]))throw TypeError("CronPattern: configuration entry "+t+" ("+e[t]+") contains illegal characters.")}handleNumber(e,t,n,r){let i=this.extractNth(e,t),a=e.toUpperCase().includes("W");if("day"!==t&&a)throw TypeError("CronPattern: Nearest weekday modifier (W) only allowed in day-of-month.");a&&(t="nearestWeekdays");let o=parseInt(i[0],10)+n;if(isNaN(o))throw TypeError("CronPattern: "+t+" is not a number: '"+e+"'");this.setPart(t,o,i[1]||r)}setPart(e,t,n){if(!Object.prototype.hasOwnProperty.call(this,e))throw TypeError("CronPattern: Invalid part specified: "+e);if("dayOfWeek"===e){if(7===t&&(t=0),t<0||t>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+t);this.setNthWeekdayOfMonth(t,n);return}if("second"===e||"minute"===e){if(t<0||t>=60)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("hour"===e){if(t<0||t>=24)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("day"===e||"nearestWeekdays"===e){if(t<0||t>=31)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("month"===e){if(t<0||t>=12)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("year"===e&&(t<1||t>=1e4))throw RangeError("CronPattern: Invalid value for "+e+": "+t+" (supported range: 1-9999)");this[e][t]=n}validateNotNaN(e,t){if(isNaN(e))throw TypeError(t)}validateRange(e,t,n,r,i){if(e>t)throw TypeError("CronPattern: From value is larger than to value: '"+i+"'");if(void 0!==n){if(0===n)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(n>this[r].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[r].length+")")}}handleRangeWithStepping(e,t,n,r){if(e.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in ranges with stepping.");let i=this.extractNth(e,t),a=i[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(null===a)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+e+"'");let[,o,l,s]=a,u=parseInt(o,10)+n,c=parseInt(l,10)+n,d=parseInt(s,10);this.validateNotNaN(u,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(c,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateNotNaN(d,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(u,c,d,t,e);for(let e=u;e<=c;e+=d)this.setPart(t,e,i[1]||r)}extractNth(e,t){let n=e,r;if(n.includes("#")){if("dayOfWeek"!==t)throw Error("CronPattern: nth (#) only allowed in day-of-week field");r=n.split("#")[1],n=n.split("#")[0]}else if(n.toUpperCase().endsWith("L")){if("dayOfWeek"!==t)throw Error("CronPattern: L modifier only allowed in day-of-week field (use L alone for day-of-month)");r="L",n=n.slice(0,-1)}return[n,r]}handleRange(e,t,n,r){if(e.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in a range.");let i=this.extractNth(e,t),a=i[0].split("-");if(2!==a.length)throw TypeError("CronPattern: Syntax error, illegal range: '"+e+"'");let o=parseInt(a[0],10)+n,l=parseInt(a[1],10)+n;this.validateNotNaN(o,"CronPattern: Syntax error, illegal lower range (NaN)"),this.validateNotNaN(l,"CronPattern: Syntax error, illegal upper range (NaN)"),this.validateRange(o,l,void 0,t,e);for(let e=o;e<=l;e++)this.setPart(t,e,i[1]||r)}handleStepping(e,t,n,r){if(e.toUpperCase().includes("W"))throw TypeError("CronPattern: Syntax error, W is not allowed in parts with stepping.");let i=this.extractNth(e,t),a=i[0].split("/");if(2!==a.length)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+e+"'");if(this.sloppyRanges)""===a[0]&&(a[0]="*");else{if(""===a[0])throw TypeError("CronPattern: Syntax error, stepping with missing prefix ('"+e+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.");if("*"!==a[0])throw TypeError("CronPattern: Syntax error, stepping with numeric prefix ('"+e+"') is not allowed. Use wildcard (*/step) or range (min-max/step) instead.")}let o=0;"*"!==a[0]&&(o=parseInt(a[0],10)+n);let l=parseInt(a[1],10);this.validateNotNaN(l,"CronPattern: Syntax error, illegal stepping: (NaN)"),this.validateRange(0,this[t].length-1,l,t,e);for(let e=o;e<this[t].length;e+=l)this.setPart(t,e,i[1]||r)}replaceAlphaDays(e){return e.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaDaysQuartz(e){return e.replace(/sun/gi,"1").replace(/mon/gi,"2").replace(/tue/gi,"3").replace(/wed/gi,"4").replace(/thu/gi,"5").replace(/fri/gi,"6").replace(/sat/gi,"7")}replaceAlphaMonths(e){return e.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(e){let t=e.trim().toLowerCase();if("@yearly"===t||"@annually"===t)return"0 0 1 1 *";if("@monthly"===t)return"0 0 1 * *";if("@weekly"===t)return"0 0 * * 0";if("@daily"===t||"@midnight"===t)return"0 0 * * *";if("@hourly"===t)return"0 * * * *";if("@reboot"===t)throw TypeError("CronPattern: @reboot is not supported in this environment. This is an event-based trigger that requires system startup detection.");return e}setNthWeekdayOfMonth(e,t){if("number"!=typeof t&&"L"===t.toUpperCase())this.dayOfWeek[e]=32|this.dayOfWeek[e];else if(63===t)this.dayOfWeek[e]=63;else if(t<6&&t>0)this.dayOfWeek[e]=this.dayOfWeek[e]|O[t-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${t}, Type: ${typeof t}`)}},_=[31,28,31,30,31,30,31,31,30,31,30,31],A=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],P=class e{tz;ms;second;minute;hour;day;month;year;constructor(t,n){if(this.tz=n,t&&t instanceof Date)if(isNaN(t))throw TypeError("CronDate: Invalid date passed to CronDate constructor");else this.fromDate(t);else if(null==t)this.fromDate(new Date);else if(t&&"string"==typeof t)this.fromString(t);else if(t instanceof e)this.fromCronDate(t);else throw TypeError("CronDate: Invalid type ("+typeof t+") passed to CronDate constructor")}getLastDayOfMonth(e,t){return 1!==t?_[t]:new Date(Date.UTC(e,t+1,0)).getUTCDate()}getLastWeekday(e,t){let n=this.getLastDayOfMonth(e,t),r=new Date(Date.UTC(e,t,n
1)).getUTCDay();return 0===r?n-2:6===r?n-1:n}getNearestWeekday(e,t,n){let r=this.getLastDayOfMonth(e,t);if(n>r)return -1;let i=new Date(Date.UTC(e,t,n)).getUTCDay();return 0===i?n===r?n-2:n+1:6===i?1===n?n+2:n-1:n}isNthWeekdayOfMonth(e,t,n,r){let i=new Date(Date.UTC(e,t,n)).getUTCDay(),a=0;for(let r=1;r<=n;r++)new Date(Date.UTC(e,t,r)).getUTCDay()===i&&a++;if(63&r&&O[a-1]&r)return!0;if(32&r){let r=this.getLastDayOfMonth(e,t);for(let a=n+1;a<=r;a++)if(new Date(Date.UTC(e,t,a)).getUTCDay()===i)return!1;return!0}return!1}fromDate(e){if(void 0!==this.tz)if("number"==typeof this.tz)this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else try{let t=j(e,this.tz);this.ms=e.getMilliseconds(),this.second=t.s,this.minute=t.i,this.hour=t.h,this.day=t.d,this.month=t.m-1,this.year=t.y}catch(t){let e=t instanceof Error?t.message:String(t);throw TypeError(`CronDate: Failed to convert date to timezone '${this.tz}'. This may happen with invalid timezone names or dates. Original error: ${e}`)}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}
1apply(){if(!(this.month>11)&&!(this.month<0)&&!(this.day>_[this.month])&&!(this.day<1)&&!(this.hour>59)&&!(this.minute>59)&&!(this.second>59)&&!(this.hour<0)&&!(this.minute<0)&&!(this.second<0))return!1;{let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}}fromString(e){if("number"!=typeof this.tz)return this.fromDate(D(e,this.tz));{let t=D(e);this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply()}}findNext(e,t,n,r){return this._findMatch(e,t,n,r,1)}_findMatch(e,t,n,r,i){let a=this[t],o;n.lastDayOfMonth&&(o=this.getLastDayOfMonth(this.year,this.month));let l=n.starDOW||"day"!=t?void 0:new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),s=this[t]+r,u=1===i?e=>e<n[t].length:e=>e>=0;for(let c=s;u(c);c+=i){let i=n[t][c];if("day"===t&&!i){for(let e=0;e<n.nearestWeekdays.length;e++)if(n.nearestWeekdays[e]){let t=this.getNearestWeekday(this.year,this.month,e-r);if(-1===t)continue;if(t===c-r){i=1;break}}}if("day"===t&&n.lastWeekday&&c-r===this.getLastWeekday(this.year,this.month)&&(i=1),"day"===t&&n.lastDayOfMonth&&c-r==o&&(i=1),"day"===t&&!n.starDOW){let t=n.dayOfWeek[(l+(c-r-1))%7];if(t&&63&t)t=+!!this.isNthWeekdayOfMonth(this.year,this.month,c-r,t);else if(t)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${t}`);i=n.useAndLogic||e.domAndDow||n.starDOM?i&&t:i||t}if(i)return this[t]=c-r,a!==this[t]?2:1}return 3}recurse(e,t,n){if(0===n&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&0===e.year[this.year]){let t=-1;for(let n=this.year+1;n<e.year.length&&n<1e4;n++)if(1===e.year[n]){t=n;break}if(-1===t)return null;this.year=t,this.month=0,this.day=1,this.hour=0,this.minute=0,this.second=0,this.ms=0}if(this.year>=1e4)return null}let r=this.findNext(t,A[n][0],e,A[n][2]);if(r>1){let i=n+1;for(;i<A.length;)this[A[i][0]]=-A[i][2],i++;if(3===r){if(this[A[n][1]]++,this[A[n][0]]=-A[n][2],this.apply(),0===n&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&0===e.year[this.year]&&this.year<1e4;)this.year++;if(this.year>=1e4||this.year>=e.year.length)return null}return this.recurse(e,t,0)}if(this.apply())return this.recurse(e,t,n-1)}return(n+=1)>=A.length?this:(e.starYear?this.year>=3e3:this.year>=1e4)?null:this.recurse(e,t,n)}increment(e,t,n){return this.second+=void 0!==t.interval&&t.interval>1&&n?t.interval:1,this.ms=0,this.apply(),this.recurse(e,t,0)}
1decrement(e,t){return this.second-=void 0!==t.interval&&t.interval>1?t.interval:1,this.ms=0,this.apply(),this.recurseBackward(e,t,0,0)}recurseBackward(e,t,n,r=0){if(r>1e4)return null;if(0===n&&!e.starYear){if(this.year>=0&&this.year<e.year.length&&0===e.year[this.year]){let t=-1;for(let n=this.year-1;n>=0;n--)if(1===e.year[n]){t=n;break}if(-1===t)return null;this.year=t,this.month=11,this.day=31,this.hour=23,this.minute=59,this.second=59,this.ms=0}if(this.year<0)return null}let i=this.findPrevious(t,A[n][0],e,A[n][2]);if(i>1){let a=n+1;for(;a<A.length;){let t=A[a][0],n=A[a][2],r=this.getMaxPatternValue(t,e,n);this[t]=r,a++}if(3===i){if(this[A[n][1]]--,0===n){let e=this.getLastDayOfMonth(this.year,this.month);this.day>e&&(this.day=e)}if(1===n)if(this.day<=0)this.day=1;else{let e=this.year,t=this.month;for(;t<0;)t+=12,e--;for(;t>11;)t-=12,e++;let n=1!==t?_[t]:new Date(Date.UTC(e,t+1,0)).getUTCDate();this.day>n&&(this.day=n)}this.apply();let i=A[n][0],a=A[n][2],o=this.getMaxPatternValue(i,e,a);if("day"===i){let e=this.getLastDayOfMonth(this.year,this.month);this[i]=Math.min(o,e)}else this[i]=o;if(this.apply(),0===n){let t=A[1][2],n=Math.min(this.getMaxPatternValue("day",e,t),this.getLastDayOfMonth(this.year,this.month));n!==this.day&&(this.day=n,this.hour=this.getMaxPatternValue("hour",e,A[2][2]),this.minute=this.getMaxPatternValue("minute",e,A[3][2]),this.second=this.getMaxPatternValue("second",e,A[4][2]))}if(0===n&&!e.starYear){for(;this.year>=0&&this.year<e.year.length&&0===e.year[this.year];)this.year--;if(this.year<0)return null}return this.recurseBackward(e,t,0,r+1)}if(this.apply())return this.recurseBackward(e,t,n-1,r+1)}return(n+=1)>=A.length?this:this.year<0?null:this.recurseBackward(e,t,n,r+1)}getMaxPatternValue(e,t,n){if("day"===e&&t.lastDayOfMonth||"day"===e&&!t.starDOW)return this.getLastDayOfMonth(this.year,this.month);for(let r=t[e].length-1;r>=0;r--)if(t[e][r])return r-n;return t[e].length-1-n}findPrevious(e,t,n,r){return this._findMatch(e,t,n,r,-1)}getDate(e){return e||void 0===this.tz?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):"number"==typeof this.tz?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):T(N(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}match(e,t){if(!e.starYear&&(this.year<0||this.year>=e.year.length||0===e.year[this.year]))return!1;for(let n=0;n<A.length;n++){let r=A[n][0],i=A[n][2],a=this[r];if(a+i<0||a+i>=e[r].length)return!1;let o=e[r][a+i];if("day"===r){if(!o){for(let t=0;t<e.nearestWeekdays.length;t++)if(e.nearestWeekdays[t]){let e=this.getNearestWeekday(this.year,this.month,t-i);if(-1!==e&&e===a){o=1;break}}}if(e.lastWeekday&&a===this.getLastWeekday(this.year,this.month)&&(o=1),e.lastDayOfMonth&&a===this.getLastDayOfMonth(this.year,this.month)&&(o=1),!e.starDOW){let n=new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay(),r=e.dayOfWeek[(n+(a-1))%7];r&&63&r&&(r=+!!this.isNthWeekdayOfMonth(this.year,this.month,a,r)),o=e.useAndLogic||t.domAndDow||e.starDOM?o&&r:o||r}}if(!o)return!1}return!0}};function M(e){return"[object Function]"===Object.prototype.toString.call(e)||"function"==typeof e||e instanceof Function}var z=[],I=class{name;options;_states;fn;getTz(){return this.options.timezone||this.options.utcOffset}applyDayOffset(e){if(void 0!==this.options.dayOffset&&0!==this.options.dayOffset){let t=24*this.options.dayOffset*36e5;return new Date(e.getTime()+t)}return e}constructor(e,t,n){let r,i;if(M(t))i=t;else if("object"==typeof t)r=t;else if(void 0!==t)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(M(n))i=n;else if("object"==typeof n)r=n;else if(void 0!==n)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=r?.name,this.options=function(e){if(void 0===e&&(e={}),delete e.name,void 0!==e.legacyMode&&void 0===e.domAndDow?e.domAndDow=!e.legacyMode:void 0===e.domAndDow&&(e.domAndDow=!1),e.legacyMode=!e.domAndDow,e.paused=void 0!==e.paused&&e.paused,e.maxRuns=void 0===e.maxRuns?1/0:e.maxRuns,e.catch=void 0!==e.catch&&e.catch,e.interval=void 0===e.interval?0:parseInt(e.interval.toString(),10),e.utcOffset=void 0===e.utcOffset?void 0:parseInt(e.utcOffset.toString(),10),e.dayOffset=void 0===e.dayOffset?0:parseInt(e.dayOffset.toString(),10),e.unref=void 0!==e.unref&&e.unref,e.mode=void 0===e.mode?"auto":e.mode,e.alternativeWeekdays=void 0!==e.alternativeWeekdays&&e.alternativeWeekdays,e.sloppyRanges=void 0!==e.sloppyRanges&&e.sloppyRanges,!["auto","5-part","6-part","7-part","5-or-6-parts","6-or-7-parts"].includes(e.mode))throw Error("CronOptions: mode must be one of 'auto', '5-part', '6-part', '7-part', '5-or-6-parts', or '6-or-7-parts'.");if(e.startAt&&(e.startAt=new P(e.startAt,e.timezone)),e.stopAt&&(e.stopAt=new P(e.stopAt,e.timezone)),null!==e.interval){if(isNaN(e.interval))throw Error("CronOptions: Supplied value for interval is not a number");if(e.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if(void 0!==e.utcOffset){if(isNaN(e.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(e.utcOffset<-870||e.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");
1if(void 0!==e.utcOffset&&e.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(!0!==e.unref&&!1!==e.unref)throw Error("CronOptions: Unref should be either true, false or undefined(false).");if(void 0!==e.dayOffset&&0!==e.dayOffset&&isNaN(e.dayOffset))throw Error("CronOptions: Invalid value passed for dayOffset, should be a number representing days to offset.");return e}(r),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:r?r.maxRuns:void 0,paused:!!r&&r.paused,pattern:new E("* * * * *",void 0,{mode:"auto"})},e&&(e instanceof Date||"string"==typeof e&&e.indexOf(":")>0)?this._states.once=new P(e,this.getTz()):this._states.pattern=new E(e,this.options.timezone,{mode:this.options.mode,alternativeWeekdays:this.options.alternativeWeekdays,sloppyRanges:this.options.sloppyRanges}),this.name){if(z.find(e=>e.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");z.push(this)}return void 0!==i&&function(e){return M(e)}(i)&&(this.fn=i,this.schedule()),this}nextRun(e){let t=this._next(e);return t?this.applyDayOffset(t.getDate(!1)):null}nextRuns(e,t){void 0!==this._states.maxRuns&&e>this._states.maxRuns&&(e=this._states.maxRuns);let n=t||this._states.currentRun||void 0;return this._enumerateRuns(e,n,"next")}previousRuns(e,t){return this._enumerateRuns(e,t||void 0,"previous")}_enumerateRuns(e,t,n){let r=[],i=t?new P(t,this.getTz()):null,a="next"===n?this._next:this._previous;for(;e--;){let e=a.call(this,i);if(!e)break;let t=e.getDate(!1);r.push(this.applyDayOffset(t)),i=e}return r}match(e){if(this._states.once){let t=new P(e,this.getTz());t.ms=0;let n=new P(this._states.once,this.getTz());return n.ms=0,t.getTime()===n.getTime()}let t=new P(e,this.getTz());return t.ms=0,t.match(this._states.pattern,this.options)}getPattern(){if(!this._states.once)return this._states.pattern?this._states.pattern.pattern:void 0}getOnce(){return this._states.once?this._states.once.getDate():null}isRunning(){let e=this.nextRun(this._states.currentRun),t=!this._states.paused,n=void 0!==this.fn,r=!this._states.kill;return t&&n&&r&&null!==e}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(e){let t=this._next(e);return t?e instanceof P||e instanceof Date?t.getTime()-e.getTime():t.getTime()-new P(e).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let e=z.indexOf(this);e>=0&&z.splice(e,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(e){var t;if(e&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");e&&(this.fn=e);let n=this.msToNext(),r=this.nextRun(this._states.currentRun);return null==n||isNaN(n)||null===r||(n>3e4&&(n=3e4),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(r),n),this._states.currentTimeout&&this.options.unref&&(t=this._states.currentTimeout,"u">typeof Deno&&"u">typeof Deno.unrefTimer?Deno.unrefTimer(t):t&&"u">typeof t.unref&&t.unref())),this}async _trigger(e){this._states.blocking=!0,this._states.currentRun=new P(void 0,this.getTz());try{if(this.options.catch)try{void 0!==this.fn&&await this.fn(this,this.options.context)}catch(e){if(M(this.options.catch))try{this.options.catch(e,this)}catch{}}else void 0!==this.fn&&await this.fn(this,this.options.context)}finally{this._states.previousRun=new P(e,this.getTz()),this._states.blocking=!1}}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(e){let t=new Date,n=!this._states.paused&&t.getTime()>=e.getTime(),r=this._states.blocking&&this.options.protect;n&&!r?(void 0!==this._states.maxRuns&&this._states.maxRuns--,this._trigger()):n&&r&&M(this.options.protect)&&setTimeout(()=>
1this.options.protect(this),0),this.schedule()}_next(e){let t=!!(e||this._states.currentRun),n=!1;!e&&this.options.startAt&&this.options.interval&&([e,t]=this._calculatePreviousRun(e,t),n=!e),e=new P(e,this.getTz()),this.options.startAt&&e&&e.getTime()<this.options.startAt.getTime()&&(e=this.options.startAt);let r=this._states.once||new P(e,this.getTz());return n||r===this._states.once||(r=r.increment(this._states.pattern,this.options,t)),this._states.once&&this._states.once.getTime()<=e.getTime()||null===r||void 0!==this._states.maxRuns&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&r.getTime()>=this.options.stopAt.getTime()?null:r}_previous(e){let t=new P(e,this.getTz());this.options.stopAt&&t.getTime()>this.options.stopAt.getTime()&&(t=this.options.stopAt);let n=new P(t,this.getTz());return this._states.once?this._states.once.getTime()<t.getTime()?this._states.once:null:null===(n=n.decrement(this._states.pattern,this.options))||this.options.startAt&&n.getTime()<this.options.startAt.getTime()?null:n}_calculatePreviousRun(e,t){let n=new P(void 0,this.getTz()),r=e;if(this.options.startAt.getTime()<=n.getTime()){let e=(r=this.options.startAt).getTime()+1e3*this.options.interval;for(;e<=n.getTime();)e=(r=new P(r,this.getTz()).increment(this._states.pattern,this.options,!0)).getTime()+1e3*this.options.interval;t=!0}return null===r&&(r=void 0),[r,t]}},L=e.i(62870),R=e.i(29196),F=e.i(686223),U=e.i(851903);function W(e){let t=e.cronExpr?.trim()||null;if(t)try{return`${U.default.toString(t)} (${e.timezone})`}catch{return t}if(e.runOnceAt){let t=new Date(e.runOnceAt);return Number.isNaN(t.getTime())?"Once":`Once at ${t.toLocaleString()}`}return"—"}var H=e.i(647163);let B=[{id:"hourly",label:"Hourly"},{id:"daily",label:"Daily"},{id:"weekly",label:"Weekly"},{id:"custom",label:"Custom cron"},{id:"once",label:"Run once"}],$=[{value:"1",label:"Monday"},{value:"2",label:"Tuesday"},{value:"3",label:"Wednesday"},{value:"4",label:"Thursday"},{value:"5",label:"Friday"},{value:"6",label:"Saturday"},{value:"0",label:"Sunday"}],X=[{value:"always",label:"Every run"},{value:"failures",label:"Failures only"},{value:"never",label:"Never"}],q=[7,30,60,90],V=(()=>{try{return Intl.supportedValuesOf("timeZone")}catch{return[]}})();function K({open:e,onOpenChange:r,schedule:i,onSaved:a}
1){let[o,l]=(0,n.useState)(i.name),[u,c]=(0,n.useState)(i.prompt),[d,h]=(0,n.useState)(()=>(function(e){let t={preset:"daily",dailyTime:"09:00",weeklyDay:"1",customCron:"",runOnceAtLocal:"",timezone:e.timezone||function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}()};if(e.run_once_at)return{...t,preset:"once",runOnceAtLocal:function(e){if(!e)return"";let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let n=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}(e.run_once_at)};let n=(e.cron_expr??"").trim();if(/^0 \* \* \* \*$/.test(n))return{...t,preset:"hourly"};let r=n.match(/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(r)return{...t,preset:"daily",dailyTime:`${r[2].padStart(2,"0")}:${r[1].padStart(2,"0")}`};let i=n.match(/^(\d{1,2}) (\d{1,2}) \* \* ([0-6])$/);return i?{...t,preset:"weekly",dailyTime:`${i[2].padStart(2,"0")}:${i[1].padStart(2,"0")}`,weeklyDay:i[3]}:{...t,preset:"custom",customCron:n}})(i)),[p,f]=(0,n.useState)(i.playbook_ids),[m,x]=(0,n.useState)(i.notify_on),[v,b]=(0,n.useState)(i.keep_alive_days??30),[C,S]=(0,n.useState)(!1),[D,T]=(0,n.use
1State)(null),j=(0,n.useMemo)(()=>q.includes(v)?q:[...q,v].sort((e,t)=>e-t),[v]),{folders:N}=(0,R.useFolders)(),{playbooks:O}=(0,F.usePlaybooks)(),E=(0,n.useMemo)(()=>O.filter(e=>!e.is_archived||p.includes(e.id)),[O,p]),_=(0,n.useMemo)(()=>(0,R.findFolderPath)(N,i.folder_id)??[],[N,i.folder_id]),A=(0,n.useMemo)(()=>(function(e){if("once"===e.preset){if(!e.runOnceAtLocal)return{cron_expr:null,run_once_at:null};let t=new Date(e.runOnceAtLocal);return{cron_expr:null,run_once_at:Number.isNaN(t.getTime())?e.runOnceAtLocal:t.toISOString()}}if("hourly"===e.preset)return{cron_expr:"0 * * * *",run_once_at:null};if("custom"===e.preset)return{cron_expr:e.customCron.trim()||null,run_once_at:null};let[t="9",n="0"]=e.dailyTime.split(":"),r=parseInt(n,10)||0,i=parseInt(t,10)||0;return"daily"===e.preset?{cron_expr:`${r} ${i} * * *`,run_once_at:null}:{cron_expr:`${r} ${i} * * ${e.weeklyDay}`,run_once_at:null}})(d),[d]),P=(0,n.useMemo)(()=>(function(e){let t=e.cronExpr?.trim()||null,n=e.runOnceAt?.trim()||null;if(!function(e){if(!e||"string"!=typeof e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e.timezone))return{ok:!1,error:`Invalid timezone: ${e.timezone}`};if(!t&&!n)return{ok:!1,error:"Provide a cron expression or a one-time run date."};if(t&&n)return{ok:!1,error:"Provide either a cron expression or a one-time run date, not both."};if(n){let e=new Date(n);return Number.isNaN(e.getTime())?{ok:!1,error:"One-time run date is not a valid date."}:e.getTime()<=Date.now()?{ok:!1,error:"One-time run date must be in the future."}:{ok:!0}}let r=function(e,t){if("string"!=typeof e||5!==e.trim().split(/\s+/).length)return null;try{return new I(e,{timezone:t})}catch{return null}}(t,e.timezone);if(!r)return{ok:!1,error:"Invalid cron expression (5 fields: minute hour day month weekday)."};let i=r.nextRuns(6);if(0===i.length)return{ok:!1,error:"This cron expression never fires."};for(let e=1;e<i.length;e++)if((i[e].getTime()-i[e-1].getTime())/6e4<15)return{ok:!1,error:"Schedules can run at most every 15 minutes."};return{ok:!0}})({cronExpr:A.cron_expr,timezone:d.timezone,runOnceAt:A.run_once_at}),[A,d.timezone]),M=(0,n.useMemo)(()=>W({cronExpr:A.cron_expr,timezone:d.timezone,runOnceAt:A.run_once_at}),[A,d.timezone]),z=(0,n.useMemo)(()=>{if(!P.ok||!A.cron_expr)return!1;try{let e=new I(A.cron_expr,{timezone:d.timezone}).nextRuns(6);for(let t=1;t<e.length;t++)if(e[t].getTime()-e[t-1].getTime()<864e5)return!0;return!1}catch{return!1}},[P.ok,A.cron_expr,d.timezone]),U=!C&&o.trim().length>0&&u.trim().length>0&&P.ok,Y=(0,n.useCallback)(e=>{f(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=10?(g.toast.error("At most 10 playbooks per schedule."),t):[...t,e])},[]),Z=(0,n.useCallback)(async()=>{if(U){S(!0),T(null);try{let e={name:o.trim(),prompt:u.trim(),playbook_ids:p,notify_on:m,keep_alive_days:v,cron_expr:A.cron_expr,timezone:d.timezone,run_once_at:A.run_once_at};"completed"===i.status&&(e.status="active");let t=await fetch(`/api/agent/schedules/${i.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||`Save failed (${t.status})`);g.toast.success("Schedule updated"),a(),r(!1)}catch(e){console.error("[ScheduleEditDialog] save failed:",e),T(e instanceof Error?e.message:"Save failed")}finally{S(!1)}}},[U,o,u,p,m,v,A,d.timezone,i,a,r]),J="text-[11px] uppercase tracking-wider text-[#888d92]",Q=(0,H.cn)("w-full rounded-md border border-white/[0.08] bg-white/[0.03] px-2.5 py-1.5","text-[13px] text-[#e8eaed] placeholder:text-[#888d92]","focus:outline-none focus:ring-1 focus:ring-white/25");return(0,t.jsx)(y.Dialog,{open:e,onOpenChange:e=>{e||C||r(!1)},children:(0,t.jsxs)(y.DialogContent,{overlayClassName:"z-[320]",className:(0,H.cn)("bg-[#1f2021] text-[#e8eaed] border border-[#3c4043]","sm:max-w-xl p-6 shadow-2xl"),children:[(0,t.jsx)(y.DialogHeader,{children:(0,t.jsx)(y.DialogTitle,{className:"text-[13px] font-medium text-[#a2a8ad] uppercase tracking-wider",children:"Edit schedule"})}),(0,t.jsxs)("div",{className:"mt-3 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:J,children:"Name"}),(0,t.jsx)("input",{value:o,onChange:e=>l(e.target.value),maxLength:120,disabled:C,placeholder:"Weekly market summary",className:Q})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:J,children:"Task"}),(0,t.jsx)("textarea",{value:u,onChange:e=>c(e.target.value),disabled:C,placeholder:"What should the agent do on every run?",rows:4,className:(0,H.cn)(Q,"resize-none leading-relaxed")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:J,children:"Repeats"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:B.map(e=>(0,t.jsx)("button",{type:"button",disabled:C,onClick:()=>h(t=>({...t,preset:e.id}
1)),className:(0,H.cn)("rounded-full px-2.5 py-1 text-[11px] transition-colors",d.preset===e.id?"bg-white/[0.12] text-[#e8eaed]":"bg-white/[0.04] text-[#a2a8ad] hover:bg-white/[0.07] hover:text-[#e8eaed]"),children:e.label},e.id))}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["weekly"===d.preset&&(0,t.jsx)("select",{value:d.weeklyDay,onChange:e=>h(t=>({...t,weeklyDay:e.target.value})),disabled:C,"aria-label":"Day of week",className:(0,H.cn)(Q,"w-auto"),children:$.map(e=>(0,t.jsx)("option",{value:e.value,className:"bg-[#1f2021]",children:e.label},e.value))}),("daily"===d.preset||"weekly"===d.preset)&&(0,t.jsx)("input",{type:"time",value:d.dailyTime,onChange:e=>h(t=>({...t,dailyTime:e.target.value})),disabled:C,"aria-label":"Time of day",className:(0,H.cn)(Q,"w-auto [color-scheme:dark]")}),"custom"===d.preset&&(0,t.jsx)("input",{value:d.customCron,onChange:e=>h(t=>({...t,customCron:e.target.value})),disabled:C,placeholder:"0 9 * * 1-5","aria-label":"Cron expression",className:(0,H.cn)(Q,"w-44 font-mono text-[12px]")}),"once"===d.preset&&(0,t.jsx)("input",{type:"datetime-local",value:d.runOnceAtLocal,onChange:e=>h(t=>({...t,runOnceAtLocal:e.target.value})),disabled:C,"aria-label":"Run date and time",className:(0,H.cn)(Q,"w-auto [color-scheme:dark]")}),"once"!==d.preset&&(0,t.jsx)("input",{value:d.timezone,onChange:e=>h(t=>({...t,timezone:e.target.value})),disabled:C,list:"schedule-timezones",placeholder:"Timezone","aria-label":"Timezone",className:(0,H.cn)(Q,"w-52")}),(0,t.jsx)("datalist",{id:"schedule-timezones",children:V.map(e=>(0,t.jsx)("option",{value:e},e))})]}),P.ok?(0,t.jsx)("div",{className:"text-[12px] text-[#a2a8ad]",children:M}):(0,t.jsx)("div",{className:"text-[12px] text-red-400",children:P.error}),P.ok&&z&&(0,t.jsx)("div",{className:"text-[12px] text-amber-400",children:"Frequent schedules consume significant compute — prefer daily or slower unless the data really changes faster."})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:J,children:"Folder"}),(0,t.jsxs)("div",{title:"The folder can't be changed after creation.",className:(0,H.cn)("flex w-full items-center gap-2 rounded-md border border-white/[0.08] bg-white/[0.03] px-2.5 py-1.5","text-[13px] text-[#e8eaed] opacity-70"),children:[(0,t.jsx)(w.Folder,{className:"size-3.5 flex-shrink-0 text-[#a2a8ad]","aria-hidden":"true"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:_.length>0?_.map(e=>e.name).join(" / "):"Loading folder…"})]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:J,children:"Playbooks"}),0===E.length?(0,t.jsx)("div",{className:"text-[12px] text-[#888d92]",children:"No playbooks in your org yet."}):(0,t.jsx)("div",{className:"max-h-36 overflow-y-auto rounded-md border border-white/[0.08]",children:E.map(e=>{let n=p.includes(e.id);return(0,t.jsxs)("button",{type:"button",disabled:C,onClick:()=>Y(e.id),className:(0,H.cn)("flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-[13px] transition-colors",n?"text-[#e8eaed]":"text-[#a2a8ad]","hover:bg-white/[0.04]"),children:[(0,t.jsx)("span",{className:(0,H.cn)("flex size-3.5 flex-shrink-0 items-center justify-center rounded-sm border",n?"border-blue-500 bg-blue-600 text-white":"border-white/[0.2]"),children:n&&(0,t.jsx)(k.Check,{className:"size-2.5","aria-hidden":"true"})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),e.is_archived&&(0,t.jsx)("span",{className:"flex-shrink-0 text-[10px] text-amber-400",children:"archived — detach to save"})]},e.id)})})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:J,children:"Notify me"}),(0,t.jsxs)(L.Select,{value:m,onValueChange:e=>x(e),disabled:C,children:[(0,t.jsx)(L.SelectTrigger,{size:"sm",className:"w-44 border-white/[0.08] bg-white/[0.03] text-[13px] text-[#e8eaed]",children:(0,t.jsx)(L.SelectValue,{})}),(0,t.jsx)(L.SelectContent,{className:"z-[330] border-[#3c4043] bg-[#2d2e30] text-[#e8eaed]",children:X.map(e=>(0,t.jsx)(L.SelectItem,{value:e.value,className:"text-[13px] focus:bg-[#3c4043] focus:text-[#e8eaed]",children:e.label},e.value))})]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:J,children:"Keep alive"}),(0,t.jsxs)(L.Select,{value:String(v),onValueChange:e=>b(parseInt(e,10)),disabled:C,children:[(0,t.jsx)(L.SelectTrigger,{size:"sm",className:"w-44 border-white/[0.08] bg-white/[0.03] text-[13px] text-[#e8eaed]",children:(0,t.jsx)(L.SelectValue,{})}),(0,t.jsx)(L.SelectContent,{className:"z-[330] border-[#3c4043] bg-[#2d2e30] text-[#e8eaed]",children:j.map(e=>(0,t.jsxs)(L.SelectItem,{value:String(e),className:"text-[13px] focus:bg-[#3c4043] focus:text-[#e8eaed]",children:[e," days"]},e))})]}),(0,t.jsx)("div",{className:"text-[11px] text-[#888d92]",children:"Pauses automatically unless you confirm it before then."})]}),D&&(0,t.jsx)("div",{className:"text-[12px] text-red-400",children:D}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{C||r(!1)},disabled:C,className:(0,H.cn)("inline-flex h-8 items-center justify-center rounded-md px-3 text-[13px]","text-[#c4c8cc
1] hover:bg-white/[0.06] hover:text-[#e8eaed]","disabled:opacity-40 disabled:hover:bg-transparent","transition-colors"),children:"Cancel"}),(0,t.jsxs)("button",{type:"button",onClick:()=>void Z(),disabled:!U,className:(0,H.cn)("inline-flex h-8 items-center justify-center gap-1.5 rounded-md px-3 text-[13px] font-medium","bg-blue-600 text-white hover:bg-blue-500","disabled:cursor-not-allowed disabled:bg-blue-600/40 disabled:text-[#a2a8ad]","transition-colors"),children:[C&&(0,t.jsx)(s.Loader2,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Save"]})]})]})]})})}var Y=e.i(920755),Z=e.i(72207);let J={active:"bg-emerald-500/15 text-emerald-400",paused:"bg-amber-500/15 text-amber-400",completed:"bg-white/[0.08] text-[#a2a8ad]"},Q={failures:"paused after repeated failures",subscription:"paused — subscription inactive",access_lost:"paused — creator lost folder access",folder_missing:"paused — target folder was deleted",playbook_missing:"paused — an attached playbook is gone",overlap:"paused — runs kept overlapping",invalid_cadence:"paused — cadence is invalid",expired:"expired — resume to re-arm"},G={dispatched:{label:"Running",className:"bg-blue-500/15 text-blue-400"},completed:{label:"Completed",className:"bg-emerald-500/15 text-emerald-400"},failed:{label:"Failed",className:"bg-red-500/15 text-red-400"},skipped_overlap:{label:"Skipped — previous run still going",className:"bg-white/[0.08] text-[#a2a8ad]"},skipped_subscription:{label:"Skipped — no subscription",className:"bg-white/[0.08] text-[#a2a8ad]"},skipped_access:{label:"Skipped — folder access lost",className:"bg-white/[0.08] text-[#a2a8ad]"},skipped_playbook:{label:"Skipped — playbook missing",className:"bg-white/[0.08] text-[#a2a8ad]"},dispatch_failed:{label:"Dispatch failed",className:"bg-red-500/15 text-red-400"}};function ee({outcome:e}){let n=G[e]??{label:e,className:"bg-white/[0.08] text-[#a2a8ad]"};return(0,t.jsx)("span",{className:(0,H.cn)("rounded-full px-1.5 py-0.5 text-[10px]",n.className),children:n.label})}function et(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString()}let en=(0,H.cn)("inline-flex size-7 items-center justify-center rounded-md","text-[#888d92] transition-colors hover:bg-white/[0.08] hover:text-[#e8eaed]","disabled:opacity-40 disabled:hover:bg-transparent");function er({label:e,ariaLabel:n,onClick:r,disabled:i,className:a,children:o}){return(0,t.jsxs)(v.Tooltip,{children:[(0,t.jsx)(v.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",disabled:i,onClick:r,"aria-label":n??e,className:a??en,children:o})}),(0,t.jsx)(v.TooltipContent,{className:"z-[310]",children:e})]})}e.s(["SchedulesPanel",0,function({open:e,onOpenChange:c}){let{schedules:v,latestRuns:k,loading:w,error:C,refresh:S}=function(e={}){let t=e.enabled??!0,[r,i]=(0,n.useState)([]),[a,o]=(0,n.useState)({}),[l,s]=(0,n.useState)(!0),[u,c]=(0,n.useState)(null),d=(0,n.useRef)(null),h=(0,n.useRef)(0),p=(0,n.useCallback)(async()=>{let e=++h.current;try{let t=await fetch("/api/agent/schedules"),n=await t.json().catch(()=>({}));if(h.current!==e)return;if(!t.ok){c(n.error||`Failed to load schedules (${t.status})`),i([]),o({});return}let r=n.schedules??[];if(c(null),i(r),0===r.length)return void o({});let a=(0,Y.createClient)(),{data:l}=await a.from("agent_schedule_runs").select("*").in("schedule_id",r.map(e=>e.id)).order("created_at",{ascending:!1}).limit(200);if(h.current!==e)return;let s={};for(let e of l??[])s[e.schedule_id]||(s[e.schedule_id]=e);o(s)}catch(t){if(h.current!==e)return;console.error("[useAgentSchedules] error fetching:",t),c("Failed to load schedules")}finally{h.current===e&&s(!1)}},[]);return(0,n.useEffect)(()=>{if(!t)return;p();let e=(0,Y.createClient)(),n=(0,Z.createRealtimeRetryState)(),r=()=>{d.current&&(e.removeChannel(d.current),d.current=null),d.current=e.channel("agent-schedules-changes").on("postgres_changes",{event:"*",schema:"public",table:"agent_schedules"},()=>{p()}).on("postgres_changes",{event:"*",schema:"public",table:"agent_schedule_runs"},()=>{p()}).subscribe(e=>{(0,Z.handleRealtimeStatus)(e,n,"AgentSchedules",r,()=>p())})};return r(),()=>{(0,Z.clearRealtimeRetry)(n),d.current&&(e.removeChannel(d.current),d.current=null)}},[t,p]),{schedules:r,latestRuns:a,loading:l,error:u,refresh:p}}({enabled:e}),{setActive:D}
1=(0,b.useAIChat)(),[T,j]=(0,n.useState)(null),[N,O]=(0,n.useState)(null),[E,_]=(0,n.useState)(!1),[A,P]=(0,n.useState)(null),[M,z]=(0,n.useState)({}),[I,L]=(0,n.useState)(null),R=(0,n.useCallback)(async e=>{z(t=>({...t,[e]:{loading:!0,runs:t[e]?.runs??[]}}));try{let t=await fetch(`/api/agent/schedules/${e}`),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||`Failed (${t.status})`);z(t=>({...t,[e]:{loading:!1,runs:n.runs??[]}}))}catch(t){console.error("[SchedulesPanel] run history load failed:",t),z(t=>({...t,[e]:{loading:!1,runs:t[e]?.runs??[]}})),g.toast.error("Failed to load run history")}},[]),F=(0,n.useCallback)(e=>{P(t=>t===e.id?null:e.id),A!==e.id&&R(e.id)},[A,R]),U=(0,n.useCallback)(async e=>{let t="active"===e.status?"paused":"active";L(e.id);try{let n=await fetch(`/api/agent/schedules/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:t})}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.error||`Failed (${n.status})`);g.toast.success("paused"===t?"Schedule paused":"Schedule resumed"),await S()}catch(e){g.toast.error(e instanceof Error?e.message:"Failed to update schedule")}finally{L(null)}},[S]),B=(0,n.useCallback)(async e=>{L(e.id);try{let t=await fetch(`/api/agent/schedules/${e.id}/run-now`,{method:"POST"}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||`Failed (${t.status})`);"dispatched"===n.outcome?g.toast.success(n.message||"Run started."):g.toast.warning(n.message||n.outcome||"Run was skipped."),S(),A===e.id&&R(e.id)}catch(e){g.toast.error(e instanceof Error?e.message:"Failed to start the run")}finally{L(null)}},[S,A,R]),$=(0,n.useCallback)(async e=>{L(e.id);try{let t=await fetch(`/api/agent/schedules/${e.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirm_keep:!0})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||`Failed (${t.status})`);let r=n.schedule?.expires_at;g.toast.success(r?`Keep-alive confirmed — runs until ${new Date(r).toLocaleDateString()}`:"Keep-alive confirmed"),await S()}catch(e){g.toast.error(e instanceof Error?e.message:"Failed to confirm the schedule")}finally{L(null)}},[S]),X=(0,n.useCallback)(async()=>{if(N){_(!0);try{let e=await fetch(`/api/agent/schedules/${N.id}`,{method:"DELETE"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(404===e.status?"Schedule not found (deleting requires folder admin access).":t.error||`Delete failed (${e.status})`);g.toast.success("Schedule deleted"),O(null),S()}catch(e){g.toast.error(e instanceof Error?e.message:"Delete failed")}finally{_(!1)}}},[N,S]),q=(0,n.useCallback)(e=>{D(e),c(!1)},[D,c]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Dialog,{open:e,onOpenChange:e=>{e||c(!1)},children:(0,t.jsxs)(y.DialogContent,{overlayClassName:"z-[300]",className:(0,H.cn)("bg-[#1f2021] text-[#e8eaed] border border-[#3c4043]","sm:max-w-2xl p-6 shadow-2xl"),children:[(0,t.jsx)(y.DialogHeader,{children:(0,t.jsx)(y.DialogTitle,{className:"text-[13px] font-medium text-[#a2a8ad] uppercase tracking-wider",children:"Scheduled tasks"})}),(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)("div",{className:"text-[12px] text-[#888d92]",children:["Recurring agent tasks that run on a schedule and report into one chat thread.",v.length>0&&" Ask the agent in chat to create a new schedule."]}),w?(0,t.jsxs)("div",{className:"flex items-center justify-center py-12 text-sm text-[#a2a8ad]",children:[(0,t.jsx)(s.Loader2,{className:"mr-2 size-4 animate-spin","aria-hidden":"true"}),"Loading…"]}):C?(0,t.jsx)("div",{className:"py-10 text-center text-[13px] text-red-400",children:C}):0===v.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,t.jsx)(a.CalendarClock,{className:"size-6 text-[#74797e]","aria-hidden":"true"}),(0,t.jsx)("div",{className:"text-[13px] text-[#a2a8ad]",children:"No schedules yet."}),(0,t.jsx)("div",{className:"max-w-sm text-[12px] text-[#888d92]",children:"The agent creates schedules for you — ask it in this chat (e.g. “Update this dataset every weekday at 9am”). Manage them here once created."})]}):(0,t.jsx)("div",{className:"max-h-[55vh] space-y-1.5 overflow-y-auto pr-1",children:v.map(e=>{let n=A===e.id,a=k[e.id],c="paused"===e.status&&null!==e.paused_reason,g=I===e.id,y=M[e.id],x="active"===e.status?function(e){if(!e)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:Math.ceil((t-Date.now())/864e5)}(e.expires_at):null,v=null!==x&&x<=3,b=null!==x&&!v;return(0,t.jsxs)("div",{className:"rounded-md border border-white/[0.06] bg-white/[0.02]",children:[(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>F(e),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),F(e))},className:"flex w-full cursor-pointer items-start gap-2 px-3 py-2 text-left transition-colors hover:bg-white/[0.03]",children:[(0,t.jsx)("span",{className:"mt-1 flex-shrink-0 text-[#888d92]",children:n?(0,t.jsx)(o.ChevronDown,{className:"size-3.5","aria-hidden":"true"}):(0,t.jsx)(l.ChevronRight,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-[13px] font-medium text-[#e8eaed]",children:e.name}),(0,t.jsx)("span",{className:(0,H.cn)("flex-shrink-0 rounded-full px-1.5 py-0.5 text-[10px]",J[e.status]),children:c?Q[e.paused_reason]??"paused":e.status})]}),(0,t.jsx)("div",{className:"mt-0.5 truncate text-[11px] text-[#888d92]",children:W({cronExpr:e.cron_expr,timezone:e.timezone,runOnceAt:e.run_once_at})}),(0,t.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-3 gap-y-0.5 text-[11px] text-[#888d92]",children:[(0,t.jsxs)("span",{children:["Next: ",et(e.next_run_at)]}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Last: ",et(e.last_run_at),a&&(0,t.jsx)(ee,{outcome:a.outcome})]}),null!==x&&(0,t.jsx)("span",{className:v?"text-amber-400":void 0,children:x<=0?"expires today":`expires in ${x} day${1===x?"":"s"}`})]}),e.consecutive_failures>0&&(0,t.jsxs)("div",{className:"mt-1 inline-flex items-center gap-1 text-[11px] text-amber-400",children:[(0,t.jsx)(i.AlertTriangle,{className:"size-3","aria-hidden":"true"}),e.consecutive_failures," consecutive failure",1===e.consecutive_failures?"":"s"," (pauses at"," ",e.max_consecutive_failures,")"]}),v&&(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsxs)("button",{type:"button",disabled:g,onClick:t=>{t.stopPropagation(),$(e)},onKeyDown:e=>e.stopPropagation(),className:(0,H.cn)("inline-flex items-center gap-1 rounded-md bg-amber-500/15 px-2 py-0.5","text-[11px] font-medium text-amber-400 transition-colors","hover:bg-amber-500/25 disabled:opacity-40"),children:[(0,t.jsx)(r.AlarmClock,{className:"size-3","aria-hidden":"true"}),"Keep running"]})})]}),(0,t.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-0.5",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,t.jsx)(er,{label:"Run now",ariaLabel:`Run ${e.name} now`,disabled:g,onClick:()=>void B(e),children:g?(0,t.jsx)(s.Loader2,{className:"size-3.5 animate-spin","aria-hidden":"true"}):(0,t.jsx)(m.Zap,{className:"size-3.5","aria-hidden":"true"})}),"completed"!==e.status&&(0,t.jsx)(er,{label:"active"===e.status?"Pause":"Resume",ariaLabel:"active"===e.status?`Pause ${e.name}`:`Resume ${e.name}`,disabled:g,onClick:()=>void U(e),children:"active"===e.status?(0,t.jsx)(d,{className:"size-3.5","aria-hidden":"true"}):(0,t.jsx)(p,{className:"size-3.5 text-emerald-400","aria-hidden":"true"})}),(0,t.jsx)(er,{label:"Edit",ariaLabel:`Edit ${e.name}`,disabled:g,onClick:()=>j(e),children:(0,t.jsx)(h.Pencil,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsx)(er,{label:"Delete",ariaLabel:`Delete ${e.name}`,disabled:g,onClick:()=>O(e),className:(0,H.cn)(en,"hover:text-red-400"),children:(0,t.jsx)(f.Trash2,{className:"size-3.5","aria-hidden":"true"})})]})]}),n&&(0,t.jsxs)("div",{className:"border-t border-white/[0.06] px-3 py-2",children:[(e.session_id||b)&&(0,t.jsxs)("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-4 gap-y-1",children:[e.session_id&&(0,t.jsxs)("button",{type:"button",onClick:()=>q(e.session_id),className:"inline-flex items-center gap-1.5 text-[11px] text-blue-400 transition-colors hover:text-blue-300",children:[(0,t.jsx)(u.MessageSquare,{className:"size-3","aria-hidden":"true"}
1),"Open this schedule’s thread"]}),b&&(0,t.jsxs)("button",{type:"button",disabled:g,onClick:()=>void $(e),className:"inline-flex items-center gap-1.5 text-[11px] text-[#888d92] transition-colors hover:text-[#e8eaed] disabled:opacity-40",children:[(0,t.jsx)(r.AlarmClock,{className:"size-3","aria-hidden":"true"}),"Keep running"]})]}),y?.loading&&!y.runs.length?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-2 text-[12px] text-[#888d92]",children:[(0,t.jsx)(s.Loader2,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Loading runs…"]}):y?.runs.length?(0,t.jsx)("div",{className:"space-y-1",children:y.runs.map(e=>(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded px-1 py-1 text-[11px] hover:bg-white/[0.03]",children:[(0,t.jsx)("span",{className:"w-36 flex-shrink-0 text-[#888d92]",children:et(e.scheduled_for)}),(0,t.jsx)("span",{className:"flex-shrink-0",children:(0,t.jsx)(ee,{outcome:e.outcome})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[#888d92]",children:e.error_message??""}),e.session_id&&(0,t.jsx)("button",{type:"button",onClick:()=>q(e.session_id),title:"Open thread",className:"flex-shrink-0 text-blue-400 transition-colors hover:text-blue-300",children:"Open thread"})]},e.id))}):(0,t.jsx)("div",{className:"py-2 text-[12px] text-[#888d92]",children:"No runs yet."})]})]},e.id)})})]})]})}),T&&(0,t.jsx)(K,{open:!0,onOpenChange:e=>{e||j(null)},schedule:T,onSaved:()=>{j(null),S()}}),(0,t.jsx)(x.AlertDialog,{open:null!==N,onOpenChange:e=>{e||E||O(null)},children:(0,t.jsxs)(x.AlertDialogContent,{children:[(0,t.jsxs)(x.AlertDialogHeader,{children:[(0,t.jsx)(x.AlertDialogTitle,{children:"Delete this schedule?"}),(0,t.jsx)(x.AlertDialogDescription,{children:N?.name?(0,t.jsxs)(t.Fragment,{children:["“",N.name,"” will stop running and its run history will be removed. The chat thread it wrote to is kept."]}):(0,t.jsx)(t.Fragment,{children:"The schedule will stop running and its run history will be removed."})})]}),(0,t.jsxs)(x.AlertDialogFooter,{children:[(0,t.jsx)(x.AlertDialogCancel,{disabled:E,onClick:()=>O(null),children:"Cancel"}),(0,t.jsxs)(x.AlertDialogAction,{variant:"destructive",disabled:E,onClick:e=>{e.preventDefault(),X()},children:[E&&(0,t.jsx)(s.Loader2,{className:"mr-1.5 size-3.5 animate-spin","aria-hidden":"true"}),"Delete"]})]})]})})]})}],167251)},819171,e=>{"use strict";var t=e.i(843476),n=e.i(846696),r=e.i(702429),i=e.i(271645),a=e.i(630374),o=e.i(107233),l=e.i(788699),s=e.i(37727),u=e.i(905250),c=e.i(280566),d=e.i(503116),h=e.i(346897),p=e.i(286536),f=e.i(77705),m=e.i(82735),g=e.i(178583),y=e.i(735501),x=e.i(794008),v=e.i(531278),b=e.i(63209),k=e.i(810980),w=e.i(643531),C=e.i(440160),S=e.i(398361),D=e.i(852008),T=e.i(555436),j=e.i(463415),N=e.i(647163),O=e.i(194558),E=e.i(808275),_=e.i(36926),A=e.i(287378),P=e.i(364181),M=e.i(686223),z=e.i(542879),I=e.i(167251),L=e.i(920755),R=e.i(663777);let F=[{id:"measure",label:"Polygon",icon:h.MapPin},{id:"lasso",label:"Lasso",icon:u.Lasso},{id:"radius",label:"Radius",icon:c.CircleDashed},{id:"isochrone",label:"Drive time (15 min)",icon:d.Clock}];function U(e,n){switch(e){case"lasso":return(0,t.jsx)(u.Lasso,{className:n});case"circle":return(0,t.jsx)(c.CircleDashed,{className:n});case"isochrone":return(0,t.jsx)(d.Clock,{className:n});default:return(0,t.jsx)(h.MapPin,{className:n})}}function W(e){if(e.name)return e.name;switch(e.kind){case"lasso":return"Lasso";case"circle":return"Radius";case"isochrone":{let t=e.properties.minutes;return t?`${t}-min drive`:"Drive time"}default:return"Polygon"}}function H(e){if(e.name)return e.name;switch(e.kind){case"lasso":return"Lasso";case"circle":return"Radius";case"isochrone":return e.source.properties?.minutes?`${e.source.properties.minutes}-min drive`:"Drive time";default:return"Polygon"}}function B(e,t){let n=[...t.existingDrafts],r=0;for(let i of e){let e=function(e,t){let n=(0,P.classifyChatFile)({mime_type:e.type,file_type:""});return"image"===n?e.size>5242880?"Image too large (max 5MB)":$("image",t)>=10?"Max 10 images per turn":null:"pdf"===n?e.size>0x2000000?"PDF too large (max 32MB)":$("pdf",t)>=5?"Max 5 PDFs per turn":null:e.size>0x6400000?"File too large (max 100MB)":null}(i,{existingDrafts:n,existingSent:t.existingSent});if(e){t.onRejected?.(i,e);continue}(0,A.uploadChatFile)(i,{organizationId:t.organizationId}),n.push({id:`provisional-${n.length}-${r}`,orgId:t.organizationId,fileId:null,fileName:i.name,mimeType:i.type||"application/octet-stream",sizeBytes:i.size,status:"uploading",progress:0,errorMessage:null,createdAt:new Date().toISOString()}),r+=1}return r}function $(e,t){let n=0;
1for(let r of t.existingDrafts)(0,P.classifyChatFile)({mime_type:r.mimeType,file_type:""})===e&&n++;for(let r of t.existingSent)(0,P.classifyChatFile)(r)===e&&n++;return n}function X({organizationId:e,attachedLayers:n,onAttachLayer:r,onDetachLayer:a}){let o=(0,i.useMemo)(()=>(0,L.createClient)(),[]),[l,s]=(0,i.useState)(""),[u,c]=(0,i.useState)([]),[d,h]=(0,i.useState)(!1),p=(0,i.useRef)(0),f=(0,i.useMemo)(()=>new Set(n.map(e=>e.id)),[n]);return(0,i.useEffect)(()=>{if(!e)return;let t=++p.current,n=setTimeout(async()=>{h(!0);try{let n=await (0,R.searchMentionableLayers)(o,e,l,8);if(t!==p.current)return;c(n)}catch{}finally{t===p.current&&h(!1)}},180);return()=>clearTimeout(n)},[l,e,o]),(0,t.jsxs)("div",{className:"w-[280px]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-white/10 px-3 py-2",children:[(0,t.jsx)(T.Search,{className:"size-3.5 flex-shrink-0 text-[#888d92]"}),(0,t.jsx)("input",{autoFocus:!0,value:l,onChange:e=>s(e.target.value),onKeyDown:e=>e.stopPropagation(),placeholder:"Search layers…",className:"w-full bg-transparent text-[12px] text-[#e8eaed] placeholder:text-[#888d92] outline-none"}),d&&(0,t.jsx)(v.Loader2,{className:"size-3 flex-shrink-0 animate-spin text-[#888d92]"})]}),0!==u.length||d?(0,t.jsx)("div",{className:"max-h-72 overflow-y-auto py-1",children:u.map(e=>{let n=f.has(e.id);return(0,t.jsxs)(j.DropdownMenuItem,{onSelect:t=>{t.preventDefault(),n?a(e.id):r(e)},className:(0,N.cn)("flex items-center gap-2 pl-3 pr-3 py-1.5 text-[12px] text-[#e8eaed]","focus:bg-[#3c4043] focus:text-[#e8eaed]","data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",n&&"bg-white/[0.04]"),children:[(0,t.jsx)(D.Layers,{className:"size-3.5 flex-shrink-0 text-[#888d92]"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),(0,t.jsx)("span",{className:"flex-shrink-0 text-[10px] uppercase text-[#888d92]",children:e.is_community_layer?"community":"org"}),n&&(0,t.jsx)(w.Check,{className:"size-3.5 flex-shrink-0 text-[#a2a8ad]","aria-hidden":"true"})]},e.id)})}):(0,t.jsxs)("div",{className:"px-3 py-2 text-[11px] text-[#888d92]",children:["No layers match",l.trim()?` “${l.trim()}”`:"","."]})]})}function q(e,n){switch(e){case"image":return(0,t.jsx)(y.ImageIcon,{className:n});case"pdf":return(0,t.jsx)(g.FileText,{className:n});default:return(0,t.jsx)(x.File,{className:n})}}function V(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}async function K(e,t){let n=await fetch(`/api/files/${encodeURIComponent(e)}/download${"inline"===t?"?disposition=inline":""}`,{cache:"no-store"});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error||`Could not prepare file (${n.status})`);let r=await n.json();if(!r.signedUrl)throw Error("Download URL missing");return r.signedUrl}function Y(e,t){if(e.stopPropagation(),0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;if(e.preventDefault(),r.IS_NATIVE_APP)return void(0,r.openNativeFile)(t).catch(()=>n.toast.error("Unable to open this file. Please try again."));let i=window.open(t,"_blank");if(i){i.opener=null;return}window.location.assign(t)}e.s(["ChatAttachmentCard",0,function({attachment:e,isVisible:n,onToggleVisibility:r}){let i=()=>{n?(0,_.zoomToMarkupCoordinates)(e.source.coordinates):r()};return(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:i,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),i())},"aria-label":`Zoom to ${H(e)}`,className:"inline-flex max-w-full min-w-0 cursor-pointer items-center gap-2 rounded-md border border-white/[0.1] bg-white/[0.06] py-1 pl-2.5 pr-1.5 transition-colors hover:bg-white/[0.09] sm:max-w-[240px]",children:[U(e.kind,"size-3.5 text-[#a2a8ad] flex-shrink-0"),(0,t.jsx)("span",{className:"text-[13px] text-[#e8eaed] truncate min-w-0",children:H(e)}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),r()},className:(0,N.cn)("flex items-center justify-center w-5 h-5 rounded transition-colors flex-shrink-0",n?"text-[#a2a8ad] hover:text-[#e8eaed] hover:bg-white/10":"text-[#74797e] hover:text-[#c4c8cc
1] hover:bg-white/10"),"aria-label":n?"Hide on map":"Show on map",children:n?(0,t.jsx)(p.Eye,{className:"size-3.5"}):(0,t.jsx)(f.EyeOff,{className:"size-3.5"})})]})})},"ChatAttachmentPills",0,function({organizationId:e}){let{drafts:n,remove:r,setVisibility:i}=(0,E.useChatAttachmentDrafts)(e);return 0===n.length?null:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:n.map(e=>(0,t.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>{e.visible?(0,_.zoomToMarkupCoordinates)(e.coordinates):i(e.id,!0)},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),e.visible?(0,_.zoomToMarkupCoordinates)(e.coordinates):i(e.id,!0))},"aria-label":`Zoom to ${W(e)}`,className:"inline-flex max-w-full min-w-0 cursor-pointer items-center gap-2 rounded-md border border-white/[0.1] bg-white/[0.06] py-1 pl-2.5 pr-1.5 transition-colors hover:bg-white/[0.09] sm:max-w-[240px]",children:[U(e.kind,"size-3.5 text-[#a2a8ad] flex-shrink-0"),(0,t.jsx)("span",{className:"text-[13px] text-[#e8eaed] truncate min-w-0",children:W(e)}),(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),i(e.id,!e.visible)},className:(0,N.cn)("flex items-center justify-center w-5 h-5 rounded transition-colors flex-shrink-0",e.visible?"text-[#a2a8ad] hover:text-[#e8eaed] hover:bg-white/10":"text-[#74797e] hover:text-[#c4c8cc] hover:bg-white/10"),"aria-label":e.visible?"Hide on map":"Show on map",children:e.visible?(0,t.jsx)(p.Eye,{className:"size-3.5"}):(0,t.jsx)(f.EyeOff,{className:"size-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),r(e.id)},className:"flex items-center justify-center w-5 h-5 rounded text-[#888d92] hover:text-[#e8eaed] hover:bg-white/10 transition-colors flex-shrink-0","aria-label":"Remove attachment",children:(0,t.jsx)(s.X,{className:"size-3.5"})})]},e.id))})},"ChatComposerPlus",0,function({sessionId:e,organizationId:n,activePlaybookIds:r,onTogglePlaybook:a,attachedLayers:s,onAttachLayer:u,onDetachLayer:c,light:h=!1}){let p=void 0!==s&&!!u&&!!c,f=r??[],g=(0,i.useRef)(null),{drafts:y}=(0,A.useChatFileDrafts)(n),{files:x}=(0,P.useChatFileAttachments)(e),{playbooks:v,refresh:b}=(0,M.usePlaybooks)(),[C,S]=(0,i.useState)(null),[T,E]=(0,i.useState)(!1),[_,L]=(0,i.useState)(!1),R=(0,i.useMemo)(()=>new Set(f),[f]),U=(0,i.useMemo)(()=>v.filter(e=>!e.is_archived),[v]),W=(0,i.useCallback)(e=>{if(!a)return;let t=R.has(e.id)?"detach":"attach";Promise.resolve(a(e.id,{intent:t,confirmedReset:!1})).catch(()=>{})},[R,a]),H=(0,i.useCallback)(e=>{if(!n)return;let t=(0,O.getAgentFileBridge)();t.openMarkupForChat?.(e,n)},[n]),$=(0,i.useCallback)(()=>{n&&g.current?.click()},[n]),q=(0,i.useCallback)(e=>{let t=Array.from(e.target.files??[]);e.target.value="",0!==t.length&&n&&B(t,{organizationId:n,existingDrafts:y,existingSent:x,onRejected:(e,t)=>{console.warn(`[chat-file] rejected ${e.name}: ${t}`)}})},[n,y,x]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:g,type:"file",multiple:!0,className:"sr-only",onChange:q}),(0,t.jsxs)(j.DropdownMenu,{open:T,onOpenChange:E,children:[(0,t.jsx)(j.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"Add attachment",className:(0,N.cn)("grid size-7 place-items-center rounded-full transition-colors flex-shrink-0",h?"bg-black/[0.05] text-zinc-600 hover:bg-black/[0.09] hover:text-zinc-900":"bg-white/[0.08] text-[#e8eaed] hover:bg-white/15 hover:text-white"),children:(0,t.jsx)(o.Plus,{className:"size-4"})})}),(0,t.jsxs)(j.DropdownMenuContent,{align:"start",side:"top",sideOffset:8,className:"z-[210] bg-[#2d2e30] border-[#3c4043] text-[#e8eaed]",children:[(0,t.jsxs)(j.DropdownMenuItem,{disabled:!n,onSelect:()=>{$()},className:"text-[13px] text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[(0,t.jsx)(m.Paperclip,{className:"size-3.5 mr-2"}),"Upload file"]}),(0,t.jsxs)(j.DropdownMenuSub,{children:[(0,t.jsxs)(j.DropdownMenuSubTrigger,{className:"text-[13px] text-[#e8eaed] hover:text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[state=open]:bg-[#3c4043] data-[state=open]:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[(0,t.jsx)(l.Pencil,{className:"size-3.5 mr-2"}),"Draw"]}),(0,t.jsx)(j.DropdownMenuSubContent,{className:"z-[210] bg-[#2d2e30] border-[#3c4043] text-[#e8eaed]",children:F.map(e=>(0,t.jsxs)(j.DropdownMenuItem,{disabled:!n,onSelect:()=>{H(e.id)},className:"text-[13px] text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[(0,t.jsx)(e.icon,{className:"size-3.5 mr-2"}),e.label]},e.id))})]}),p&&(0,t.jsxs)(j.DropdownMenuSub,{children:[(0,t.jsxs)(j.DropdownMenuSubTrigger,{className:"text-[13px] text-[#e8eaed] hover:text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[state=open]:bg-[#3c4043] data-[state=open]:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[(0,t.jsx)(D.Layers,{className:"size-3.5 mr-2"}),"Layers",(s?.length??0)>0&&(0,t.jsx)("span",{className:"ml-auto pl-2 text-[10px] text-[#888d92]",children:s.length})]}),(0,t.jsx)(j.DropdownMenuSubContent,{className:"z-[210] bg-[#2d2e30] border-[#3c4043] p-0 text-[#e8eaed]",children:(0,t.jsx)(X,{organizationId:n,attachedLayers:s,onAttachLayer:u,onDetachLayer:c})})]}),void 0!==r&&!!a&&(0,t.jsxs)(j.DropdownMenuSub,{children:[(0,t.jsxs)(j.DropdownMenuSubTrigger,{className:"text-[13px] text-[#e8eaed] hover:text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[state=open]:bg-[#3c4043] data-[state=open]:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[(0,t.jsx)(k.BookOpen,{className:"size-3.5 mr-2"}),"Playbooks",f.length>0&&(0,t.jsx)("span",{className:"ml-auto pl-2 text-[10px] text-[#888d92]",children:f.length})]}),(0,t.jsx)(j.DropdownMenuSubContent,{className:"z-[210] min-w-[240px] max-w-[320px] bg-[#2d2e30] border-[#3c4043] p-0 text-[#e8eaed]",children:0===U.length?(0,t.jsx)("div",{className:"px-3 py-2 text-[11px] text-[#888d92]",children:"No playbooks yet. Ask the agent to save one for you."}):(0,t.jsx)("div",{className:"max-h-72 overflow-y-auto py-1",children:U.map(e=>{let n=R.has(e.id);return(0,t.jsxs)("div",{className:"group relative",children:[(0,t.jsx)(j.DropdownMenuItem,{onSelect:t=>{t.preventDefault(),W(e)},className:(0,N.cn)("flex items-center pl-3 pr-14 py-1.5 text-[12px] text-[#e8eaed]","focus:bg-[#3c4043] focus:text-[#e8eaed]","data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",n&&"bg-white/[0.04]"),children:(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name})}),n&&(0,t.jsx)(w.Check,{className:"pointer-events-none absolute right-3 top-1/2 size-3.5 -translate-y-1/2 text-[#a2a8ad]","aria-hidden":"true"}),(0,t.jsx)("button",{type:"button",onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),E(!1),S(e)}
1,className:(0,N.cn)("absolute top-1/2 -translate-y-1/2 rounded p-1 text-[#888d92] opacity-0 transition-opacity hover:bg-white/10 hover:text-[#e8eaed] focus-visible:opacity-100 group-hover:opacity-100",n?"right-8":"right-2"),"aria-label":`Edit ${e.name}`,children:(0,t.jsx)(l.Pencil,{className:"size-3.5"})})]},e.id)})})})]}),(0,t.jsxs)(j.DropdownMenuItem,{onSelect:()=>{E(!1),L(!0)},className:"text-[13px] text-[#e8eaed] focus:bg-[#3c4043] focus:text-[#e8eaed] data-[highlighted]:bg-[#3c4043] data-[highlighted]:text-[#e8eaed]",children:[(0,t.jsx)(d.Clock,{className:"size-3.5 mr-2"}),"Schedules"]})]})]}),(0,t.jsx)(z.PlaybookEditDialog,{playbook:C,onClose:()=>S(null),onChanged:()=>{b()}}),(0,t.jsx)(I.SchedulesPanel,{open:_,onOpenChange:L})]})},"ChatFileCard",0,function({file:e}){var n;let r=(0,P.classifyChatFile)(e),o="image"===r,l=o||"pdf"===r,u=e.original_filename||e.name||"Attachment",c=(n=e.id,`/api/files/${encodeURIComponent(n)}/download?disposition=inline&redirect=1`),[d,h]=(0,i.useState)(null),[f,m]=(0,i.useState)(null),[g,x]=(0,i.useState)(!1),[b,k]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!o)return;let t=!1;return K(e.id,"inline").then(e=>{t||h(e)}).catch(e=>{t||m(e instanceof Error?e.message:"Preview unavailable")}),()=>{t=!0}},[e.id,o]),(0,i.useEffect)(()=>{if(!g)return;let e=e=>{"Escape"===e.key&&x(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);let w=(0,i.useCallback)(async t=>{t?.stopPropagation(),k("download");try{var n;let t;n=await K(e.id,"download"),(t=document.createElement("a")).href=n,t.download=u||"download",t.rel="noopener noreferrer",document.body.appendChild(t),t.click(),t.remove()}catch(e){console.warn("[chat-file] failed to download file",e)}finally{k(null)}},[e.id,u]);return o?(0,t.jsxs)("div",{className:"flex w-full min-w-0 justify-end",children:[(0,t.jsxs)("div",{className:"w-full max-w-[320px] min-w-0 overflow-hidden rounded-lg border border-white/[0.1] bg-white/[0.06] shadow-sm",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>x(!0),className:"group block w-full text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/35","aria-label":`Preview ${u}`,children:[(0,t.jsxs)("div",{className:"relative h-[150px] w-full overflow-hidden bg-black/35",children:[d?(0,t.jsx)("img",{src:d,alt:u,className:"h-full w-full object-contain",loading:"lazy"}):f?(0,t.jsx)("div",{className:"flex h-full items-center justify-center px-4 text-center text-[12px] text-[#888d92]",children:"Preview unavailable"}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)(v.Loader2,{className:"size-4 animate-spin text-[#888d92]","aria-hidden":"true"})}),(0,t.jsx)("div",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-md bg-black/45 text-[#e8eaed] opacity-0 transition-opacity group-hover:opacity-100",children:(0,t.jsx)(S.Maximize2,{className:"size-3.5","aria-hidden":"true"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5",children:[(0,t.jsx)(y.ImageIcon,{className:"size-3.5 flex-shrink-0 text-[#a2a8ad]","aria-hidden":"true"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] text-[#e8eaed]",title:u,children:u}),(0,t.jsx)("span",{className:"flex-shrink-0 text-[10px] text-[#888d92]",children:V(e.size_bytes)})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-1 border-t border-white/[0.08] px-1.5 py-1",children:[(0,t.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:e=>Y(e,c),className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-[#c4c8cc] transition-colors hover:bg-white/10 hover:text-white","aria-label":`Open ${u} in a new tab`,children:[(0,t.jsx)(p.Eye,{className:"size-3","aria-hidden":"true"}),"View"]}),(0,t.jsxs)("button",{type:"button",onClick:w,disabled:null!==b,className:"inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11px] font-medium text-[#c4c8cc] transition-colors hover:bg-white/10 hover:text-white disabled:cursor-wait disabled:opacity-60","aria-label":`Download ${u}
1`,children:["download"===b?(0,t.jsx)(v.Loader2,{className:"size-3 animate-spin","aria-hidden":"true"}):(0,t.jsx)(C.Download,{className:"size-3","aria-hidden":"true"}),"Download"]})]})]}),g&&(0,t.jsx)(a.Dialog,{open:g,onOpenChange:x,children:(0,t.jsxs)(a.DialogContent,{hideCloseButton:!0,className:"max-w-5xl border-0 bg-transparent p-0",backdropClassName:"bg-black/75 backdrop-blur-sm",children:[(0,t.jsxs)(a.DialogTitle,{className:"sr-only",children:["Image preview: ",u]}),(0,t.jsxs)("div",{className:"flex max-h-full w-full max-w-5xl flex-col overflow-hidden rounded-lg border border-white/15 bg-[#131314] shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2",children:[(0,t.jsx)(y.ImageIcon,{className:"size-4 flex-shrink-0 text-[#a2a8ad]","aria-hidden":"true"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium text-[#e8eaed]",title:u,children:u}),(0,t.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:e=>Y(e,c),className:"inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-[12px] font-medium text-[#c4c8cc] transition-colors hover:bg-white/10 hover:text-white",children:[(0,t.jsx)(p.Eye,{className:"size-3.5","aria-hidden":"true"}),"View"]}),(0,t.jsxs)("button",{type:"button",onClick:w,disabled:null!==b,className:"inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-[12px] font-medium text-[#c4c8cc] transition-colors hover:bg-white/10 hover:text-white disabled:cursor-wait disabled:opacity-60",children:[(0,t.jsx)(C.Download,{className:"size-3.5","aria-hidden":"true"}),"Download"]}),(0,t.jsx)("button",{type:"button",onClick:()=>x(!1),className:"flex size-8 items-center justify-center rounded-md text-[#a2a8ad] transition-colors hover:bg-white/10 hover:text-white","aria-label":"Close image preview",children:(0,t.jsx)(s.X,{className:"size-4","aria-hidden":"true"})})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center bg-black/30 p-3",children:d?(0,t.jsx)("img",{src:d,alt:u,className:"max-h-[calc(100vh-120px)] max-w-full object-contain"}):f?(0,t.jsx)("div",{className:"py-16 text-center text-[13px] text-[#a2a8ad]",children:"Preview unavailable"}):(0,t.jsx)(v.Loader2,{className:"size-5 animate-spin text-[#a2a8ad]","aria-hidden":"true"})})]})]})})]}):(0,t.jsx)("div",{className:"flex w-full min-w-0 justify-end",children:(0,t.jsxs)("div",{className:"flex w-full max-w-[320px] min-w-0 items-center gap-1.5 rounded-md border border-white/[0.1] bg-white/[0.06] py-0.5 pl-2 pr-1 transition-colors hover:bg-white/[0.09]",children:[q(r,"size-3 text-[#a2a8ad] flex-shrink-0"),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] text-[#e8eaed]",title:u,children:u}),(0,t.jsx)("span",{className:"text-[10px] text-[#888d92] flex-shrink-0",children:V(e.size_bytes)}),l&&(0,t.jsx)("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:e=>Y(e,c),className:"flex size-5 flex-shrink-0 items-center justify-center rounded text-[#888d92] transition-colors hover:bg-white/10 hover:text-[#e8eaed] disabled:cursor-wait disabled:opacity-60","aria-label":`Open ${u} in a new tab`,title:"View",children:(0,t.jsx)(p.Eye,{className:"size-3","aria-hidden":"true"})}),(0,t.jsx)("button",{type:"button",onClick:w,disabled:null!==b,className:"flex size-5 flex-shrink-0 items-center justify-center rounded text-[#888d92] transition-colors hover:bg-white/10 hover:text-[#e8eaed] disabled:cursor-wait disabled:opacity-60","aria-label":`Download ${u}`,title:"Download",children:"download"===b?(0,t.jsx)(v.Loader2,{className:"size-3 animate-spin","aria-hidden":"true"}):(0,t.jsx)(C.Download,{className:"size-3","aria-hidden":"true"})})]})})},"ChatFilePills",0,function({organizationId:e}){let{drafts:n,remove:r}=(0,A.useChatFileDrafts)(e);return 0===n.length?null:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:n.map(e=>{let n=(0,P.classifyChatFile)({mime_type:e.mimeType,file_type:""}),i="error"===e.status,a="uploading"===e.status||"processing"===e.status,o=i?e.errorMessage||"Upload failed. Remove it and try again.":null;return(0,t.jsxs)("div",{role:i?"alert":void 0,className:(0,N.cn)("inline-flex max-w-full min-w-0 items-center gap-1.5 rounded-md border py-0.5 pl-2 pr-1 transition-colors",i?"border-red-500/30 bg-red-500/[0.08] hover:bg-red-500/[0.12] sm:max-w-[320px]":"border-white/[0.1] bg-white/[0.06] hover:bg-white/[0.09] sm:max-w-[220px]"),children:[i?(0,t.jsx)(b.AlertCircle,{className:"size-3 text-red-400 flex-shrink-0"}
1):a?(0,t.jsx)(v.Loader2,{className:"size-3 text-[#a2a8ad] animate-spin flex-shrink-0"}):q(n,"size-3 text-[#a2a8ad] flex-shrink-0"),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col leading-tight",children:[(0,t.jsx)("span",{className:"text-[11px] text-[#e8eaed] truncate min-w-0",title:e.fileName,children:e.fileName}),o&&(0,t.jsx)("span",{className:"text-[10px] text-red-300 truncate min-w-0",title:o,children:o})]}),"uploading"===e.status&&null!==e.progress&&(0,t.jsxs)("span",{className:"text-[10px] text-[#a2a8ad] flex-shrink-0",children:[Math.round(100*e.progress),"%"]}),"done"===e.status&&(0,t.jsx)("span",{className:"text-[10px] text-[#888d92] flex-shrink-0",children:V(e.sizeBytes)}),(0,t.jsx)("button",{type:"button",onClick:()=>r(e.id),className:"flex items-center justify-center w-4 h-4 rounded text-[#888d92] hover:text-[#e8eaed] hover:bg-white/10 transition-colors flex-shrink-0","aria-label":i?"Remove failed file":"Remove file",children:(0,t.jsx)(s.X,{className:"size-3"})})]},e.id)})})},"attachChatFilesToDrafts",0,B,"fileSizeStr",0,V,"getClipboardImageFiles",0,function(e){if(!e)return[];let t=Array.from(e.items??[]).filter(e=>"file"===e.kind&&e.type.startsWith("image/")).map(e=>e.getAsFile()).filter(e=>!!e);return(t.length>0?t:Array.from(e.files??[]).filter(e=>e.type.startsWith("image/"))).map((e,t)=>(function(e,t){var n;let r,i;if(0!==(r=(e.name??"").trim().toLowerCase()).length&&"image.png"!==r&&"clipboard.png"!==r&&"pasted-image.png"!==r)return e;let a=new Date().toISOString().replace(/[-:]/g,"").replace(/\..+$/,"").replace("T","-"),o=0===t?"":`-${t+1}`,l=(n=e.type||"image/png",(i=n.split("/")[1]?.split("+")[0]?.toLowerCase())?"jpeg"===i?"jpg":i.replace(/[^a-z0-9]/g,"")||"png":"png");return new File([e],`pasted-image-${a}${o}.${l}`,{type:e.type||"image/png",lastModified:Date.now()})})(e,t))}])},392182,e=>{"use strict";let t=[".xlsx",".xls",".csv",".tsv",".parquet",".geojson",".json",".kml",".kmz",".gpkg",".shp",".gpx",".zip"],n=[/\bmap\s*layers?\b/i,/\blayers?\b/i,/\boverlays?\b/i,/\bcustom\s+maps?\b/i,/\bupload\s+(?:it|this|these)?\s*as\s+(?:a\s+)?(?:map\s+)?layer\b/i,/\bas\s+(?:a\s+)?maps?\b/i,/\bto\s+(?:my|the|a)\s+maps?\b/i,/\bput(?:ting)?\s+(?:it|this|these|the\s+file)?\s*on\s+(?:the\s+)?map\b/i,/\badd(?:ing)?\s+(?:it|this|these|the\s+file)?\s*to\s+(?:the\s+)?map\b/i,/\bshow(?:ing)?\s+(?:it|this|these|the\s+file)?\s*on\s+(?:the\s+)?map\b/i,/\bdisplay(?:ing)?\s+(?:it|this|these|the\s+file)?\s*on\s+(?:the\s+)?map\b/i,/\bvisuali[sz]e(?:ing)?\s+(?:it|this|these|the\s+file)?\s*on\s+(?:the\s+)?map\b/i,/\bplot(?:ting)?\s+(?:it|this|these|the\s+file)?\s*on\s+(?:the\s+)?map\b/i],r=[/\bcrm\b/i,/\bdeal\s+pipeline\b/i,/\bproject\s+pipeline\b/i,/\bproject\s+import\b/i,/\bimport\s+(?:(?:this\s+file|this|these|them|the\s+file)\s+)?(?:as\s+)?projects?\b/i,/\bbulk[-\s]?create\s+projects?\b/i,/\b(?:add|create)\s+(?:these|them|this)?\s*(?:as|into)\s+projects?\b/i,/\b(?:add|create)\s+projects?\s+from\b/i,/\bto\s+(?:my|the)\s+(?:crm|projects?\s+(?:folder|list))\b/i];function i(e){if(!e)return!1;let n=e.toLowerCase();return t.some(e=>n.endsWith(e))}e.s(["isImportShapedFile",0,i,"shouldRequestProjectImportIntent",0,function(e,t){if(!e.some(i))return!1;let a=t.join("\n").trim();return!(!a||n.some(e=>e.test(a)))&&r.some(e=>e.test(a))}])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.