@bienui/core 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,31 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),N=require("react"),rs=require("@radix-ui/react-tooltip"),is=require("@radix-ui/react-toast"),ye=require("lucide-react"),os=require("@radix-ui/react-radio-group"),di=require("react-dom");function yn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ve=yn(rs),Fe=yn(is),Pt=yn(os),ss=N.createContext(void 0);function ls({children:e,theme:t="light",density:n="comfortable"}){const[r,i]=N.useState(!1);return N.useEffect(()=>{const o=setTimeout(()=>i(!0),0);return()=>clearTimeout(o)},[]),N.useEffect(()=>{r&&(document.documentElement.setAttribute("data-theme",t),document.documentElement.setAttribute("data-density",n))},[t,n,r]),a.jsx(ss.Provider,{value:{theme:t,density:n},children:a.jsx("div",{style:{minHeight:"100vh"},children:e})})}const hi=N.createContext(void 0);function as({children:e}){const[t,n]=N.useState([]),r=N.useCallback(o=>{const s=Math.random().toString(36).substring(2,9);n(l=>[...l,{...o,id:s}])},[]),i=N.useCallback(o=>{n(s=>s.filter(l=>l.id!==o))},[]);return a.jsx(hi.Provider,{value:{toast:r},children:a.jsxs(Fe.Provider,{swipeDirection:"right",children:[e,t.map(o=>a.jsxs(Fe.Root,{className:`bien-toast ${o.variant?`bien-toast--${o.variant}`:""}`,duration:o.duration||5e3,onOpenChange:s=>{s||i(o.id)},children:[a.jsx(Fe.Title,{className:"bien-toast-title",children:o.title}),o.description&&a.jsx(Fe.Description,{className:"bien-toast-description",children:o.description}),a.jsx(Fe.Close,{className:"bien-toast-close","aria-label":"Close",children:a.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]},o.id)),a.jsx(Fe.Viewport,{className:"bien-toast-viewport"})]})})}function cs(){const e=N.useContext(hi);if(!e)throw new Error("useToast must be used within ToastProvider");return e}const us=Ve.Provider;function ds({children:e,size:t="lg",padding:n="md",centered:r=!0,className:i="",style:o}){const s=["bien-container",`bien-container--${t}`,`bien-container--padding-${n}`,r&&"bien-container--centered",i].filter(Boolean).join(" ");return a.jsx("div",{className:s,style:o,children:e})}function hs({children:e,columns:t="auto",gap:n,rowGap:r,columnGap:i,responsive:o=!0,align:s,justify:l,className:c="",style:u}){const h=["bien-grid",t!=="auto"&&`bien-grid--cols-${t}`,t==="auto"&&o&&"bien-grid--auto-responsive",t==="auto"&&!o&&"bien-grid--auto",n&&`bien-grid--gap-${n}`,r&&`bien-grid--row-gap-${r}`,i&&`bien-grid--col-gap-${i}`,s&&`bien-grid--align-${s}`,l&&`bien-grid--justify-${l}`,c].filter(Boolean).join(" ");return a.jsx("div",{className:h,style:u,children:e})}function fi({children:e,direction:t="vertical",gap:n="md",align:r,justify:i,wrap:o=!1,className:s="",style:l}){const c=["bien-stack",`bien-stack--${t}`,`bien-stack--gap-${n}`,r&&`bien-stack--align-${r}`,i&&`bien-stack--justify-${i}`,o&&"bien-stack--wrap",s].filter(Boolean).join(" ");return a.jsx("div",{className:c,style:l,children:e})}function fs(e){return a.jsx(fi,{...e,direction:"vertical"})}function ps(e){return a.jsx(fi,{...e,direction:"horizontal"})}function gs({children:e,padding:t="lg",background:n="default",className:r="",style:i,id:o}){const s=["bien-section",`bien-section--padding-${t}`,`bien-section--bg-${n}`,r].filter(Boolean).join(" ");return a.jsx("section",{className:s,style:i,id:o,children:e})}function ms({size:e="md",axis:t="vertical",className:n=""}){const r=["bien-spacer",`bien-spacer--${e}`,`bien-spacer--${t}`,n].filter(Boolean).join(" ");return a.jsx("div",{className:r,"aria-hidden":"true"})}function bs({orientation:e="horizontal",spacing:t="md",variant:n="solid",thickness:r="thin",gradient:i=!1,label:o,className:s="",style:l}){const c=["bien-divider",`bien-divider--${e}`,`bien-divider--spacing-${t}`,`bien-divider--${n}`,`bien-divider--${r}`,i&&"bien-divider--gradient",o&&"bien-divider--with-label",s].filter(Boolean).join(" ");return o&&e==="horizontal"?a.jsxs("div",{className:c,style:l,children:[a.jsx("span",{className:"bien-divider__line"}),a.jsx("span",{className:"bien-divider__label",children:o}),a.jsx("span",{className:"bien-divider__line"})]}):e==="vertical"?a.jsx("div",{className:c,style:l,role:"separator","aria-orientation":"vertical"}):a.jsx("hr",{className:c,style:l})}const kn=N.forwardRef(({label:e,hint:t,error:n,startElement:r,endElement:i,required:o,className:s="",...l},c)=>{const u=N.useId(),h=l.id||u,d=`${h}-hint`,p=`${h}-error`,f=[t&&d,n&&p,l["aria-describedby"]].filter(Boolean).join(" "),g=r||i;return a.jsxs("div",{className:"bien-input-field",children:[e&&a.jsxs("label",{htmlFor:h,className:"bien-input-label",children:[e,o&&a.jsx("span",{className:"bien-input-required","aria-label":"required",children:"*"})]}),a.jsxs("div",{className:`bien-input-wrapper ${g?"bien-input-wrapper--with-adornments":""} ${n?"bien-input-wrapper--error":""}`,children:[r&&a.jsx("div",{className:"bien-input-start-element",children:r}),a.jsx("input",{ref:c,id:h,className:`bien-input ${g?"bien-input--with-adornments":""} ${r?"bien-input--with-start":""} ${i?"bien-input--with-end":""} ${n?"bien-input--error":""} ${s}`,"aria-describedby":f||void 0,"aria-invalid":n?"true":void 0,required:o,...l}),i&&a.jsx("div",{className:"bien-input-end-element",children:i})]}),t&&!n&&a.jsx("span",{id:d,className:"bien-input-hint",children:t}),n&&a.jsx("span",{id:p,className:"bien-input-error",role:"alert",children:n})]})});kn.displayName="Input";const pi=N.forwardRef(({label:e,error:t,hint:n,showCount:r,resize:i="vertical",className:o="",maxLength:s,value:l,onChange:c,...u},h)=>{const[d,p]=N.useState(l?String(l).length:0),f=x=>{p(x.target.value.length),c==null||c(x)},g=["bien-textarea-wrapper",t&&"bien-textarea-wrapper--error",o].filter(Boolean).join(" "),m=["bien-textarea",`bien-textarea--resize-${i}`].filter(Boolean).join(" ");return a.jsxs("div",{className:g,children:[e&&a.jsxs("label",{className:"bien-textarea-label",children:[e,u.required&&a.jsx("span",{className:"bien-textarea-required",children:"*"})]}),a.jsx("textarea",{ref:h,className:m,value:l,onChange:f,maxLength:s,"aria-invalid":t?"true":"false",...u}),a.jsxs("div",{className:"bien-textarea-footer",children:[a.jsxs("div",{className:"bien-textarea-messages",children:[n&&!t&&a.jsx("span",{className:"bien-textarea-hint",children:n}),t&&a.jsx("span",{className:"bien-textarea-error",children:t})]}),r&&a.jsxs("span",{className:"bien-textarea-count",children:[d,s&&` / ${s}`]})]})]})});pi.displayName="Textarea";function xs(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ys=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ks=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vs={};function er(e,t){return(vs.jsx?ks:ys).test(e)}const ws=/[ \t\n\f\r]/g;function js(e){return typeof e=="object"?e.type==="text"?tr(e.value):!1:tr(e)}function tr(e){return e.replace(ws,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function gi(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function tn(e){return e.toLowerCase()}class de{constructor(t,n){this.attribute=n,this.property=t}}de.prototype.attribute="";de.prototype.booleanish=!1;de.prototype.boolean=!1;de.prototype.commaOrSpaceSeparated=!1;de.prototype.commaSeparated=!1;de.prototype.defined=!1;de.prototype.mustUseProperty=!1;de.prototype.number=!1;de.prototype.overloadedBoolean=!1;de.prototype.property="";de.prototype.spaceSeparated=!1;de.prototype.space=void 0;let Cs=0;const U=Ae(),ie=Ae(),nn=Ae(),E=Ae(),ne=Ae(),We=Ae(),fe=Ae();function Ae(){return 2**++Cs}const rn=Object.freeze(Object.defineProperty({__proto__:null,boolean:U,booleanish:ie,commaOrSpaceSeparated:fe,commaSeparated:We,number:E,overloadedBoolean:nn,spaceSeparated:ne},Symbol.toStringTag,{value:"Module"})),Mt=Object.keys(rn);class vn extends de{constructor(t,n,r,i){let o=-1;if(super(t,n),nr(this,"space",i),typeof r=="number")for(;++o<Mt.length;){const s=Mt[o];nr(this,Mt[o],(r&rn[s])===rn[s])}}}vn.prototype.defined=!0;function nr(e,t,n){n&&(e[t]=n)}function Ye(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new vn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[tn(r)]=r,n[tn(o.attribute)]=r}return new lt(t,n,e.space)}const mi=Ye({properties:{ariaActiveDescendant:null,ariaAtomic:ie,ariaAutoComplete:null,ariaBusy:ie,ariaChecked:ie,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:ne,ariaCurrent:null,ariaDescribedBy:ne,ariaDetails:null,ariaDisabled:ie,ariaDropEffect:ne,ariaErrorMessage:null,ariaExpanded:ie,ariaFlowTo:ne,ariaGrabbed:ie,ariaHasPopup:null,ariaHidden:ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ne,ariaLevel:E,ariaLive:null,ariaModal:ie,ariaMultiLine:ie,ariaMultiSelectable:ie,ariaOrientation:null,ariaOwns:ne,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:ie,ariaReadOnly:ie,ariaRelevant:null,ariaRequired:ie,ariaRoleDescription:ne,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:ie,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function bi(e,t){return t in e?e[t]:t}function xi(e,t){return bi(e,t.toLowerCase())}const Ss=Ye({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:We,acceptCharset:ne,accessKey:ne,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:ne,autoFocus:U,autoPlay:U,blocking:ne,capture:null,charSet:null,checked:U,cite:null,className:ne,cols:E,colSpan:null,content:null,contentEditable:ie,controls:U,controlsList:ne,coords:E|We,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:nn,draggable:ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:ne,height:E,hidden:nn,high:E,href:null,hrefLang:null,htmlFor:ne,httpEquiv:ne,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:ne,itemRef:ne,itemScope:U,itemType:ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:E,pattern:null,ping:ne,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:ne,required:U,reversed:U,rows:E,rowSpan:E,sandbox:ne,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:ie,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ne,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:ie,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:xi}),_s=Ye({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fe,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:ne,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:We,g2:We,glyphName:We,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bi}),yi=Ye({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ki=Ye({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xi}),vi=Ye({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ds={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"},Ns=/[A-Z]/g,rr=/-[a-z]/g,Is=/^data[-\w.:]+$/i;function Es(e,t){const n=tn(t);let r=t,i=de;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Is.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(rr,Ls);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!rr.test(o)){let s=o.replace(Ns,Ts);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=vn}return new i(r,t)}function Ts(e){return"-"+e.toLowerCase()}function Ls(e){return e.charAt(1).toUpperCase()}const Os=gi([mi,Ss,yi,ki,vi],"html"),wn=gi([mi,_s,yi,ki,vi],"svg");function Ps(e){return e.join(" ").trim()}var xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cn={},ir=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ms=/\n/g,As=/^\s*/,Rs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Bs=/^:\s*/,Fs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,zs=/^[;\s]*/,$s=/^\s+|\s+$/g,Hs=`
2
- `,or="/",sr="*",Oe="",Vs="comment",Us="declaration";function Ws(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var m=g.match(Ms);m&&(n+=m.length);var x=g.lastIndexOf(Hs);r=~x?g.length-x:r+g.length}function o(){var g={line:n,column:r};return function(m){return m.position=new s(g),u(),m}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(g){var m=new Error(t.source+":"+n+":"+r+": "+g);if(m.reason=g,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(g){var m=g.exec(e);if(m){var x=m[0];return i(x),e=e.slice(x.length),m}}function u(){c(As)}function h(g){var m;for(g=g||[];m=d();)m!==!1&&g.push(m);return g}function d(){var g=o();if(!(or!=e.charAt(0)||sr!=e.charAt(1))){for(var m=2;Oe!=e.charAt(m)&&(sr!=e.charAt(m)||or!=e.charAt(m+1));)++m;if(m+=2,Oe===e.charAt(m-1))return l("End of comment missing");var x=e.slice(2,m-2);return r+=2,i(x),e=e.slice(m),r+=2,g({type:Vs,comment:x})}}function p(){var g=o(),m=c(Rs);if(m){if(d(),!c(Bs))return l("property missing ':'");var x=c(Fs),k=g({type:Us,property:lr(m[0].replace(ir,Oe)),value:x?lr(x[0].replace(ir,Oe)):Oe});return c(zs),k}}function f(){var g=[];h(g);for(var m;m=p();)m!==!1&&(g.push(m),h(g));return g}return u(),f()}function lr(e){return e?e.replace($s,Oe):Oe}var qs=Ws,Ys=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=Xs;const Gs=Ys(qs);function Xs(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Gs.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n||{},n[s]=l)}),n}var jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.camelCase=void 0;var Qs=/^--[a-zA-Z0-9_-]+$/,Zs=/-([a-z])/g,Js=/^[^-]+$/,Ks=/^-(webkit|moz|ms|o|khtml)-/,el=/^-(ms)-/,tl=function(e){return!e||Js.test(e)||Qs.test(e)},nl=function(e,t){return t.toUpperCase()},ar=function(e,t){return"".concat(t,"-")},rl=function(e,t){return t===void 0&&(t={}),tl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(el,ar):e=e.replace(Ks,ar),e.replace(Zs,nl))};jt.camelCase=rl;var il=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ol=il(Cn),sl=jt;function on(e,t){var n={};return!e||typeof e!="string"||(0,ol.default)(e,function(r,i){r&&i&&(n[(0,sl.camelCase)(r,t)]=i)}),n}on.default=on;var ll=on;const al=jn(ll),wi=ji("end"),Sn=ji("start");function ji(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function cl(e){const t=Sn(e),n=wi(e);if(t&&n)return{start:t,end:n}}function tt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cr(e.position):"start"in e||"end"in e?cr(e):"line"in e||"column"in e?sn(e):""}function sn(e){return ur(e&&e.line)+":"+ur(e&&e.column)}function cr(e){return sn(e&&e.start)+"-"+sn(e&&e.end)}function ur(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=tt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="";ae.prototype.name="";ae.prototype.reason="";ae.prototype.message="";ae.prototype.stack="";ae.prototype.column=void 0;ae.prototype.line=void 0;ae.prototype.ancestors=void 0;ae.prototype.cause=void 0;ae.prototype.fatal=void 0;ae.prototype.place=void 0;ae.prototype.ruleId=void 0;ae.prototype.source=void 0;const _n={}.hasOwnProperty,ul=new Map,dl=/[A-Z]/g,hl=new Set(["table","tbody","thead","tfoot","tr"]),fl=new Set(["td","th"]),Ci="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=wl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?wn:Os,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Si(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Si(e,t,n){if(t.type==="element")return gl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ml(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xl(e,t,n);if(t.type==="mdxjsEsm")return bl(e,t);if(t.type==="root")return yl(e,t,n);if(t.type==="text")return kl(e,t)}function gl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=wn,e.schema=i),e.ancestors.push(t);const o=Di(e,t.tagName,!1),s=jl(e,t);let l=Nn(e,t);return hl.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!js(c):!0})),_i(e,s,o,t),Dn(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function ml(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ot(e,t.position)}function bl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ot(e,t.position)}function xl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=wn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Di(e,t.name,!0),s=Cl(e,t),l=Nn(e,t);return _i(e,s,o,t),Dn(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function yl(e,t,n){const r={};return Dn(r,Nn(e,t)),e.create(t,e.Fragment,r,n)}function kl(e,t){return t.value}function _i(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Dn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vl(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function wl(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),c=Sn(r);return t(i,o,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function jl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&_n.call(t.properties,i)){const o=Sl(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&fl.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Cl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ot(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else ot(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Nn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ul;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const u=i.get(c)||0;s=c+"-"+u,i.set(c,u+1)}}const l=Si(e,o,s);l!==void 0&&n.push(l)}return n}function Sl(e,t,n){const r=Es(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?xs(n):Ps(n)),r.property==="style"){let i=typeof n=="object"?n:_l(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Dl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ds[r.property]||r.property:r.attribute,n]}}function _l(e,t){try{return al(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ci+"#cannot-parse-style-attribute",i}}function Di(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=er(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=er(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return _n.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ot(e)}function ot(e,t){const n=new ae("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=Ci+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dl(e){const t={};let n;for(n in e)_n.call(e,n)&&(t[Nl(n)]=e[n]);return t}function Nl(e){let t=e.replace(dl,Il);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Il(e){return"-"+e.toLowerCase()}const At={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"]},El={};function In(e,t){const n=El,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ni(e,r,i)}function Ni(e,t,n){if(Tl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return dr(e.children,t,n)}return Array.isArray(e)?dr(e,t,n):""}function dr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ni(e[i],t,n);return r.join("")}function Tl(e){return!!(e&&typeof e=="object")}const hr=document.createElement("i");function En(e){const t="&"+e+";";hr.innerHTML=t;const n=hr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pe(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function me(e,t){return e.length>0?(pe(e,e.length,0,t),e):t}const fr={}.hasOwnProperty;function Ii(e){const t={};let n=-1;for(;++n<e.length;)Ll(t,e[n]);return t}function Ll(e,t){let n;for(n in t){const i=(fr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){fr.call(i,s)||(i[s]=[]);const l=o[s];Ol(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Ol(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pe(e,0,0,r)}function Ei(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ke(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=Ie(/[A-Za-z]/),le=Ie(/[\dA-Za-z]/),Pl=Ie(/[#-'*+\--9=?A-Z^-~]/);function yt(e){return e!==null&&(e<32||e===127)}const ln=Ie(/\d/),Ml=Ie(/[\dA-Fa-f]/),Al=Ie(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function te(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}const Ct=Ie(new RegExp("\\p{P}|\\p{S}","u")),Pe=Ie(/\s/);function Ie(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ge(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&le(e.charCodeAt(n+1))&&le(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function X(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return q(c)?(e.enter(n),l(c)):t(c)}function l(c){return q(c)&&o++<i?(e.consume(c),l):(e.exit(n),t(c))}}const Rl={tokenize:Bl};function Bl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),X(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return $(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const Fl={tokenize:zl},pr={tokenize:$l};function zl(e){const t=this,n=[];let r=0,i,o,s;return l;function l(w){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const T=t.events.length;let L=T,j;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){j=t.events[L][1].end;break}k(r);let R=T;for(;R<t.events.length;)t.events[R][1].end={...j},R++;return pe(t.events,L+1,0,t.events.slice(T)),t.events.length=R,u(w)}return l(w)}function u(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pr,h,d)(w)}function h(w){return i&&S(),k(r),p(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(pr,f,g)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){i&&S(),k(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),m(w)}function m(w){if(w===null){x(e.exit("chunkFlow"),!0),k(0),e.consume(w);return}return $(w)?(e.consume(w),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),m)}function x(w,T){const L=t.sliceStream(w);if(T&&L.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(L),t.parser.lazy[w.start.line]){let j=i.events.length;for(;j--;)if(i.events[j][1].start.offset<s&&(!i.events[j][1].end||i.events[j][1].end.offset>s))return;const R=t.events.length;let A=R,F,v;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(F){v=t.events[A][1].end;break}F=!0}for(k(r),j=R;j<t.events.length;)t.events[j][1].end={...v},j++;pe(t.events,A+1,0,t.events.slice(R)),t.events.length=j}}function k(w){let T=n.length;for(;T-- >w;){const L=n[T];t.containerState=L[1],L[0].exit.call(t,e)}n.length=w}function S(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $l(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qe(e){if(e===null||te(e)||Pe(e))return 1;if(Ct(e))return 2}function St(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const an={name:"attention",resolveAll:Hl,tokenize:Vl};function Hl(e,t){let n=-1,r,i,o,s,l,c,u,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};gr(d,-c),gr(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=me(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=me(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=me(u,St(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=me(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=me(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,pe(e,r-1,n-r+3,u),n=r+u.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qe(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===o)return e.consume(c),l;const u=e.exit("attentionSequence"),h=qe(c),d=!h||h===2&&i||n.includes(c),p=!i||i===2&&h||n.includes(r);return u._open=!!(o===42?d:d&&(i||!p)),u._close=!!(o===42?p:p&&(h||!d)),t(c)}}function gr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ul={name:"autolink",tokenize:Wl};function Wl(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return ce(f)?(e.consume(f),s):f===64?n(f):u(f)}function s(f){return f===43||f===45||f===46||le(f)?(r=1,l(f)):u(f)}function l(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||le(f))&&r++<32?(e.consume(f),l):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||yt(f)?n(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),h):Pl(f)?(e.consume(f),u):n(f)}function h(f){return le(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,h):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||le(f))&&r++<63){const g=f===45?p:d;return e.consume(f),g}return n(f)}}const at={partial:!0,tokenize:ql};function ql(e,t,n){return r;function r(o){return q(o)?X(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||$(o)?t(o):n(o)}}const Ti={continuation:{tokenize:Gl},exit:Xl,name:"blockQuote",tokenize:Yl};function Yl(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return q(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Gl(e,t,n){const r=this;return i;function i(s){return q(s)?X(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Ti,t,n)(s)}}function Xl(e){e.exit("blockQuote")}const Li={name:"characterEscape",tokenize:Ql};function Ql(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Al(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Oi={name:"characterReference",tokenize:Zl};function Zl(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=le,h(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Ml,h):(e.enter("characterReferenceValue"),o=7,s=ln,h(d))}function h(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===le&&!En(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),h):n(d)}}const mr={partial:!0,tokenize:Kl},br={concrete:!0,name:"codeFenced",tokenize:Jl};function Jl(e,t,n){const r=this,i={partial:!0,tokenize:L};let o=0,s=0,l;return c;function c(j){return u(j)}function u(j){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,l=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(j)}function h(j){return j===l?(s++,e.consume(j),h):s<3?n(j):(e.exit("codeFencedFenceSequence"),q(j)?X(e,d,"whitespace")(j):d(j))}function d(j){return j===null||$(j)?(e.exit("codeFencedFence"),r.interrupt?t(j):e.check(mr,m,T)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(j))}function p(j){return j===null||$(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(j)):q(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),X(e,f,"whitespace")(j)):j===96&&j===l?n(j):(e.consume(j),p)}function f(j){return j===null||$(j)?d(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===null||$(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(j)):j===96&&j===l?n(j):(e.consume(j),g)}function m(j){return e.attempt(i,T,x)(j)}function x(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),k}function k(j){return o>0&&q(j)?X(e,S,"linePrefix",o+1)(j):S(j)}function S(j){return j===null||$(j)?e.check(mr,m,T)(j):(e.enter("codeFlowValue"),w(j))}function w(j){return j===null||$(j)?(e.exit("codeFlowValue"),S(j)):(e.consume(j),w)}function T(j){return e.exit("codeFenced"),t(j)}function L(j,R,A){let F=0;return v;function v(M){return j.enter("lineEnding"),j.consume(M),j.exit("lineEnding"),_}function _(M){return j.enter("codeFencedFence"),q(M)?X(j,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):C(M)}function C(M){return M===l?(j.enter("codeFencedFenceSequence"),P(M)):A(M)}function P(M){return M===l?(F++,j.consume(M),P):F>=s?(j.exit("codeFencedFenceSequence"),q(M)?X(j,B,"whitespace")(M):B(M)):A(M)}function B(M){return M===null||$(M)?(j.exit("codeFencedFence"),R(M)):A(M)}}}function Kl(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Rt={name:"codeIndented",tokenize:ta},ea={partial:!0,tokenize:na};function ta(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),X(e,o,"linePrefix",5)(u)}function o(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):$(u)?e.attempt(ea,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||$(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function na(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):$(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):X(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):$(s)?i(s):n(s)}}const ra={name:"codeText",previous:oa,resolve:ia,tokenize:sa};function ia(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function oa(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sa(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(o=e.enter("codeTextSequence"),i=0,h(d)):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||$(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class la{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ke(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ke(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ke(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ke(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ke(this.left,n.reverse())}}}function Ke(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 Pi(e){const t={};let n=-1,r,i,o,s,l,c,u;const h=new la(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,aa(h,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=h.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return pe(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!u}function aa(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],u={};let h,d,p=-1,f=n,g=0,m=0;const x=[m];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(h=r.sliceStream(f),f.next||h.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(m=p+1,x.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):x.pop(),p=x.length;p--;){const k=l.slice(x[p],x[p+1]),S=o.pop();c.push([S,S+k.length-1]),e.splice(S,2,k)}for(c.reverse(),p=-1;++p<c.length;)u[g+c[p][0]]=g+c[p][1],g+=c[p][1]-c[p][0]-1;return u}const ca={resolve:da,tokenize:ha},ua={partial:!0,tokenize:fa};function da(e){return Pi(e),e}function ha(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):$(l)?e.check(ua,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function fa(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),X(e,o,"linePrefix")}function o(s){if(s===null||$(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Mi(e,t,n,r,i,o,s,l,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),p):k===null||k===32||k===41||yt(k)?n(k):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(k))}function p(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===62?(e.exit("chunkString"),e.exit(l),p(k)):k===null||k===60||$(k)?n(k):(e.consume(k),k===92?g:f)}function g(k){return k===60||k===62||k===92?(e.consume(k),f):f(k)}function m(k){return!h&&(k===null||k===41||te(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(k)):h<u&&k===40?(e.consume(k),h++,m):k===41?(e.consume(k),h--,m):k===null||k===32||k===40||yt(k)?n(k):(e.consume(k),k===92?x:m)}function x(k){return k===40||k===41||k===92?(e.consume(k),m):m(k)}}function Ai(e,t,n,r,i,o){const s=this;let l=0,c;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),h}function h(f){return l>999||f===null||f===91||f===93&&!c||f===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):$(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||$(f)||l++>999?(e.exit("chunkString"),h(f)):(e.consume(f),c||(c=!q(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),l++,d):d(f)}}function Ri(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),c(s)):p===null?n(p):$(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),X(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===s||p===null||$(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:h)}function d(p){return p===s||p===92?(e.consume(p),h):h(p)}}function nt(e,t){let n;return r;function r(i){return $(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):q(i)?X(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const pa={name:"definition",tokenize:ma},ga={partial:!0,tokenize:ba};function ma(e,t,n){const r=this;let i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return Ai.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=ke(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):n(f)}function c(f){return te(f)?nt(e,u)(f):u(f)}function u(f){return Mi(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function h(f){return e.attempt(ga,d,d)(f)}function d(f){return q(f)?X(e,p,"whitespace")(f):p(f)}function p(f){return f===null||$(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function ba(e,t,n){return r;function r(l){return te(l)?nt(e,i)(l):n(l)}function i(l){return Ri(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return q(l)?X(e,s,"whitespace")(l):s(l)}function s(l){return l===null||$(l)?t(l):n(l)}}const xa={name:"hardBreakEscape",tokenize:ya};function ya(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return $(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ka={name:"headingAtx",resolve:va,tokenize:wa};function va(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},pe(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function wa(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||te(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||$(h)?(e.exit("atxHeading"),t(h)):q(h)?X(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||te(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}const ja=["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"],xr=["pre","script","style","textarea"],Ca={concrete:!0,name:"htmlFlow",resolveTo:Da,tokenize:Na},Sa={partial:!0,tokenize:Ea},_a={partial:!0,tokenize:Ia};function Da(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Na(e,t,n){const r=this;let i,o,s,l,c;return u;function u(b){return h(b)}function h(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),d}function d(b){return b===33?(e.consume(b),p):b===47?(e.consume(b),o=!0,m):b===63?(e.consume(b),i=3,r.interrupt?t:y):ce(b)?(e.consume(b),s=String.fromCharCode(b),x):n(b)}function p(b){return b===45?(e.consume(b),i=2,f):b===91?(e.consume(b),i=5,l=0,g):ce(b)?(e.consume(b),i=4,r.interrupt?t:y):n(b)}function f(b){return b===45?(e.consume(b),r.interrupt?t:y):n(b)}function g(b){const J="CDATA[";return b===J.charCodeAt(l++)?(e.consume(b),l===J.length?r.interrupt?t:C:g):n(b)}function m(b){return ce(b)?(e.consume(b),s=String.fromCharCode(b),x):n(b)}function x(b){if(b===null||b===47||b===62||te(b)){const J=b===47,I=s.toLowerCase();return!J&&!o&&xr.includes(I)?(i=1,r.interrupt?t(b):C(b)):ja.includes(s.toLowerCase())?(i=6,J?(e.consume(b),k):r.interrupt?t(b):C(b)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):o?S(b):w(b))}return b===45||le(b)?(e.consume(b),s+=String.fromCharCode(b),x):n(b)}function k(b){return b===62?(e.consume(b),r.interrupt?t:C):n(b)}function S(b){return q(b)?(e.consume(b),S):v(b)}function w(b){return b===47?(e.consume(b),v):b===58||b===95||ce(b)?(e.consume(b),T):q(b)?(e.consume(b),w):v(b)}function T(b){return b===45||b===46||b===58||b===95||le(b)?(e.consume(b),T):L(b)}function L(b){return b===61?(e.consume(b),j):q(b)?(e.consume(b),L):w(b)}function j(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),c=b,R):q(b)?(e.consume(b),j):A(b)}function R(b){return b===c?(e.consume(b),c=null,F):b===null||$(b)?n(b):(e.consume(b),R)}function A(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||te(b)?L(b):(e.consume(b),A)}function F(b){return b===47||b===62||q(b)?w(b):n(b)}function v(b){return b===62?(e.consume(b),_):n(b)}function _(b){return b===null||$(b)?C(b):q(b)?(e.consume(b),_):n(b)}function C(b){return b===45&&i===2?(e.consume(b),W):b===60&&i===1?(e.consume(b),G):b===62&&i===4?(e.consume(b),K):b===63&&i===3?(e.consume(b),y):b===93&&i===5?(e.consume(b),re):$(b)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Sa,oe,P)(b)):b===null||$(b)?(e.exit("htmlFlowData"),P(b)):(e.consume(b),C)}function P(b){return e.check(_a,B,oe)(b)}function B(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),M}function M(b){return b===null||$(b)?P(b):(e.enter("htmlFlowData"),C(b))}function W(b){return b===45?(e.consume(b),y):C(b)}function G(b){return b===47?(e.consume(b),s="",Z):C(b)}function Z(b){if(b===62){const J=s.toLowerCase();return xr.includes(J)?(e.consume(b),K):C(b)}return ce(b)&&s.length<8?(e.consume(b),s+=String.fromCharCode(b),Z):C(b)}function re(b){return b===93?(e.consume(b),y):C(b)}function y(b){return b===62?(e.consume(b),K):b===45&&i===2?(e.consume(b),y):C(b)}function K(b){return b===null||$(b)?(e.exit("htmlFlowData"),oe(b)):(e.consume(b),K)}function oe(b){return e.exit("htmlFlow"),t(b)}}function Ia(e,t,n){const r=this;return i;function i(s){return $(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Ea(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(at,t,n)}}const Ta={name:"htmlText",tokenize:La};function La(e,t,n){const r=this;let i,o,s;return l;function l(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),c}function c(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),L):y===63?(e.consume(y),w):ce(y)?(e.consume(y),A):n(y)}function u(y){return y===45?(e.consume(y),h):y===91?(e.consume(y),o=0,g):ce(y)?(e.consume(y),S):n(y)}function h(y){return y===45?(e.consume(y),f):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),p):$(y)?(s=d,G(y)):(e.consume(y),d)}function p(y){return y===45?(e.consume(y),f):d(y)}function f(y){return y===62?W(y):y===45?p(y):d(y)}function g(y){const K="CDATA[";return y===K.charCodeAt(o++)?(e.consume(y),o===K.length?m:g):n(y)}function m(y){return y===null?n(y):y===93?(e.consume(y),x):$(y)?(s=m,G(y)):(e.consume(y),m)}function x(y){return y===93?(e.consume(y),k):m(y)}function k(y){return y===62?W(y):y===93?(e.consume(y),k):m(y)}function S(y){return y===null||y===62?W(y):$(y)?(s=S,G(y)):(e.consume(y),S)}function w(y){return y===null?n(y):y===63?(e.consume(y),T):$(y)?(s=w,G(y)):(e.consume(y),w)}function T(y){return y===62?W(y):w(y)}function L(y){return ce(y)?(e.consume(y),j):n(y)}function j(y){return y===45||le(y)?(e.consume(y),j):R(y)}function R(y){return $(y)?(s=R,G(y)):q(y)?(e.consume(y),R):W(y)}function A(y){return y===45||le(y)?(e.consume(y),A):y===47||y===62||te(y)?F(y):n(y)}function F(y){return y===47?(e.consume(y),W):y===58||y===95||ce(y)?(e.consume(y),v):$(y)?(s=F,G(y)):q(y)?(e.consume(y),F):W(y)}function v(y){return y===45||y===46||y===58||y===95||le(y)?(e.consume(y),v):_(y)}function _(y){return y===61?(e.consume(y),C):$(y)?(s=_,G(y)):q(y)?(e.consume(y),_):F(y)}function C(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,P):$(y)?(s=C,G(y)):q(y)?(e.consume(y),C):(e.consume(y),B)}function P(y){return y===i?(e.consume(y),i=void 0,M):y===null?n(y):$(y)?(s=P,G(y)):(e.consume(y),P)}function B(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||te(y)?F(y):(e.consume(y),B)}function M(y){return y===47||y===62||te(y)?F(y):n(y)}function W(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function G(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Z}function Z(y){return q(y)?X(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):re(y)}function re(y){return e.enter("htmlTextData"),s(y)}}const Tn={name:"labelEnd",resolveAll:Aa,resolveTo:Ra,tokenize:Ba},Oa={tokenize:Fa},Pa={tokenize:za},Ma={tokenize:$a};function Aa(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&pe(e,0,e.length,n),e}function Ra(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=me(l,e.slice(o+1,o+r+3)),l=me(l,[["enter",h,t]]),l=me(l,St(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=me(l,[["exit",h,t],e[s-2],e[s-1],["exit",u,t]]),l=me(l,e.slice(s+1)),l=me(l,[["exit",c,t]]),pe(e,o,e.length,l),e}function Ba(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(p){return o?o._inactive?d(p):(s=r.parser.defined.includes(ke(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(Oa,h,s?h:d)(p):p===91?e.attempt(Pa,h,s?u:d)(p):s?h(p):d(p)}function u(p){return e.attempt(Ma,h,d)(p)}function h(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}function Fa(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return te(d)?nt(e,o)(d):o(d)}function o(d){return d===41?h(d):Mi(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return te(d)?nt(e,c)(d):h(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?Ri(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function u(d){return te(d)?nt(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function za(e,t,n){const r=this;return i;function i(l){return Ai.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(ke(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function $a(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Ha={name:"labelStartImage",resolveAll:Tn.resolveAll,tokenize:Va};function Va(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Ua={name:"labelStartLink",resolveAll:Tn.resolveAll,tokenize:Wa};function Wa(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Bt={name:"lineEnding",tokenize:qa};function qa(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),X(e,t,"linePrefix")}}const gt={name:"thematicBreak",tokenize:Ya};function Ya(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||$(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),q(u)?X(e,l,"whitespace")(u):l(u))}}const ue={continuation:{tokenize:Za},exit:Ka,name:"list",tokenize:Qa},Ga={partial:!0,tokenize:ec},Xa={partial:!0,tokenize:Ja};function Qa(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ln(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(gt,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return n(f)}function c(f){return ln(f)&&++s<10?(e.consume(f),c):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(at,r.interrupt?n:h,e.attempt(Ga,p,d))}function h(f){return r.containerState.initialBlankLine=!0,o++,p(f)}function d(f){return q(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Za(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(at,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!q(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xa,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(ue,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Ja(e,t,n){const r=this;return X(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Ka(e){e.exit(this.containerState.type)}function ec(e,t,n){const r=this;return X(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!q(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const yr={name:"setextUnderline",resolveTo:tc,tokenize:nc};function tc(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function nc(e,t,n){const r=this;let i;return o;function o(u){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),q(u)?X(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||$(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const rc={tokenize:ic};function ic(e){const t=this,n=e.attempt(at,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ca,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const oc={resolveAll:Fi()},sc=Bi("string"),lc=Bi("text");function Bi(e){return{resolveAll:Fi(e==="text"?ac:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(h){return u(h)?o(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return u(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function u(h){if(h===null)return!0;const d=i[h];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Fi(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function ac(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)c=!0,l++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const cc={42:ue,43:ue,45:ue,48:ue,49:ue,50:ue,51:ue,52:ue,53:ue,54:ue,55:ue,56:ue,57:ue,62:Ti},uc={91:pa},dc={[-2]:Rt,[-1]:Rt,32:Rt},hc={35:ka,42:gt,45:[yr,gt],60:Ca,61:yr,95:gt,96:br,126:br},fc={38:Oi,92:Li},pc={[-5]:Bt,[-4]:Bt,[-3]:Bt,33:Ha,38:Oi,42:an,60:[Ul,Ta],91:Ua,92:[xa,Li],93:Tn,95:an,96:ra},gc={null:[an,oc]},mc={null:[42,95]},bc={null:[]},xc=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mc,contentInitial:uc,disable:bc,document:cc,flow:hc,flowInitial:dc,insideSpan:gc,string:fc,text:pc},Symbol.toStringTag,{value:"Module"}));function yc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const c={attempt:R(L),check:R(j),consume:S,enter:w,exit:T,interrupt:R(j,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let h=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function d(_){return s=me(s,_),x(),s[s.length-1]!==null?[]:(A(t,0),u.events=St(o,u.events,u),u.events)}function p(_,C){return vc(f(_),C)}function f(_){return kc(s,_)}function g(){const{_bufferIndex:_,_index:C,line:P,column:B,offset:M}=r;return{_bufferIndex:_,_index:C,line:P,column:B,offset:M}}function m(_){i[_.line]=_.column,v()}function x(){let _;for(;r._index<s.length;){const C=s[r._index];if(typeof C=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<C.length;)k(C.charCodeAt(r._bufferIndex));else k(C)}}function k(_){h=h(_)}function S(_){$(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,v()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=_}function w(_,C){const P=C||{};return P.type=_,P.start=g(),u.events.push(["enter",P,u]),l.push(P),P}function T(_){const C=l.pop();return C.end=g(),u.events.push(["exit",C,u]),C}function L(_,C){A(_,C.from)}function j(_,C){C.restore()}function R(_,C){return P;function P(B,M,W){let G,Z,re,y;return Array.isArray(B)?oe(B):"tokenize"in B?oe([B]):K(B);function K(z){return Q;function Q(se){const Ee=se!==null&&z[se],_e=se!==null&&z.null,Re=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return oe(Re)(se)}}function oe(z){return G=z,Z=0,z.length===0?W:b(z[Z])}function b(z){return Q;function Q(se){return y=F(),re=z,z.partial||(u.currentConstruct=z),z.name&&u.parser.constructs.disable.null.includes(z.name)?I():z.tokenize.call(C?Object.assign(Object.create(u),C):u,c,J,I)(se)}}function J(z){return _(re,y),M}function I(z){return y.restore(),++Z<G.length?b(G[Z]):W}}}function A(_,C){_.resolveAll&&!o.includes(_)&&o.push(_),_.resolve&&pe(u.events,C,u.events.length-C,_.resolve(u.events.slice(C),u)),_.resolveTo&&(u.events=_.resolveTo(u.events,u))}function F(){const _=g(),C=u.previous,P=u.currentConstruct,B=u.events.length,M=Array.from(l);return{from:B,restore:W};function W(){r=_,u.previous=C,u.currentConstruct=P,u.events.length=B,l=M,v()}}function v(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function kc(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function vc(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),D=require("react"),is=require("@radix-ui/react-tooltip"),os=require("@radix-ui/react-toast"),we=require("lucide-react"),ss=require("@radix-ui/react-radio-group"),yn=require("react-dom");function kn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ve=kn(is),Fe=kn(os),Pt=kn(ss),ls=D.createContext(void 0);function as({children:e,theme:t="light",density:n="comfortable"}){const[r,i]=D.useState(!1);return D.useEffect(()=>{const o=setTimeout(()=>i(!0),0);return()=>clearTimeout(o)},[]),D.useEffect(()=>{r&&(document.documentElement.setAttribute("data-theme",t),document.documentElement.setAttribute("data-density",n))},[t,n,r]),a.jsx(ls.Provider,{value:{theme:t,density:n},children:a.jsx("div",{style:{minHeight:"100vh"},children:e})})}const fi=D.createContext(void 0);function cs({children:e}){const[t,n]=D.useState([]),r=D.useCallback(o=>{const s=Math.random().toString(36).substring(2,9);n(l=>[...l,{...o,id:s}])},[]),i=D.useCallback(o=>{n(s=>s.filter(l=>l.id!==o))},[]);return a.jsx(fi.Provider,{value:{toast:r},children:a.jsxs(Fe.Provider,{swipeDirection:"right",children:[e,t.map(o=>a.jsxs(Fe.Root,{className:`bien-toast ${o.variant?`bien-toast--${o.variant}`:""}`,duration:o.duration||5e3,onOpenChange:s=>{s||i(o.id)},children:[a.jsx(Fe.Title,{className:"bien-toast-title",children:o.title}),o.description&&a.jsx(Fe.Description,{className:"bien-toast-description",children:o.description}),a.jsx(Fe.Close,{className:"bien-toast-close","aria-label":"Close",children:a.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]},o.id)),a.jsx(Fe.Viewport,{className:"bien-toast-viewport"})]})})}function us(){const e=D.useContext(fi);if(!e)throw new Error("useToast must be used within ToastProvider");return e}const ds=Ve.Provider;function hs({children:e,size:t="lg",padding:n="md",centered:r=!0,className:i="",style:o}){const s=["bien-container",`bien-container--${t}`,`bien-container--padding-${n}`,r&&"bien-container--centered",i].filter(Boolean).join(" ");return a.jsx("div",{className:s,style:o,children:e})}function fs({children:e,columns:t="auto",gap:n,rowGap:r,columnGap:i,responsive:o=!0,align:s,justify:l,className:c="",style:u}){const h=["bien-grid",t!=="auto"&&`bien-grid--cols-${t}`,t==="auto"&&o&&"bien-grid--auto-responsive",t==="auto"&&!o&&"bien-grid--auto",n&&`bien-grid--gap-${n}`,r&&`bien-grid--row-gap-${r}`,i&&`bien-grid--col-gap-${i}`,s&&`bien-grid--align-${s}`,l&&`bien-grid--justify-${l}`,c].filter(Boolean).join(" ");return a.jsx("div",{className:h,style:u,children:e})}function pi({children:e,direction:t="vertical",gap:n="md",align:r,justify:i,wrap:o=!1,className:s="",style:l}){const c=["bien-stack",`bien-stack--${t}`,`bien-stack--gap-${n}`,r&&`bien-stack--align-${r}`,i&&`bien-stack--justify-${i}`,o&&"bien-stack--wrap",s].filter(Boolean).join(" ");return a.jsx("div",{className:c,style:l,children:e})}function ps(e){return a.jsx(pi,{...e,direction:"vertical"})}function gs(e){return a.jsx(pi,{...e,direction:"horizontal"})}function ms({children:e,padding:t="lg",background:n="default",className:r="",style:i,id:o}){const s=["bien-section",`bien-section--padding-${t}`,`bien-section--bg-${n}`,r].filter(Boolean).join(" ");return a.jsx("section",{className:s,style:i,id:o,children:e})}function bs({size:e="md",axis:t="vertical",className:n=""}){const r=["bien-spacer",`bien-spacer--${e}`,`bien-spacer--${t}`,n].filter(Boolean).join(" ");return a.jsx("div",{className:r,"aria-hidden":"true"})}function xs({orientation:e="horizontal",spacing:t="md",variant:n="solid",thickness:r="thin",gradient:i=!1,label:o,className:s="",style:l}){const c=["bien-divider",`bien-divider--${e}`,`bien-divider--spacing-${t}`,`bien-divider--${n}`,`bien-divider--${r}`,i&&"bien-divider--gradient",o&&"bien-divider--with-label",s].filter(Boolean).join(" ");return o&&e==="horizontal"?a.jsxs("div",{className:c,style:l,children:[a.jsx("span",{className:"bien-divider__line"}),a.jsx("span",{className:"bien-divider__label",children:o}),a.jsx("span",{className:"bien-divider__line"})]}):e==="vertical"?a.jsx("div",{className:c,style:l,role:"separator","aria-orientation":"vertical"}):a.jsx("hr",{className:c,style:l})}const vn=D.forwardRef(({label:e,hint:t,error:n,startElement:r,endElement:i,required:o,className:s="",...l},c)=>{const u=D.useId(),h=l.id||u,d=`${h}-hint`,p=`${h}-error`,f=[t&&d,n&&p,l["aria-describedby"]].filter(Boolean).join(" "),g=r||i;return a.jsxs("div",{className:"bien-input-field",children:[e&&a.jsxs("label",{htmlFor:h,className:"bien-input-label",children:[e,o&&a.jsx("span",{className:"bien-input-required","aria-label":"required",children:"*"})]}),a.jsxs("div",{className:`bien-input-wrapper ${g?"bien-input-wrapper--with-adornments":""} ${n?"bien-input-wrapper--error":""}`,children:[r&&a.jsx("div",{className:"bien-input-start-element",children:r}),a.jsx("input",{ref:c,id:h,className:`bien-input ${g?"bien-input--with-adornments":""} ${r?"bien-input--with-start":""} ${i?"bien-input--with-end":""} ${n?"bien-input--error":""} ${s}`,"aria-describedby":f||void 0,"aria-invalid":n?"true":void 0,required:o,...l}),i&&a.jsx("div",{className:"bien-input-end-element",children:i})]}),t&&!n&&a.jsx("span",{id:d,className:"bien-input-hint",children:t}),n&&a.jsx("span",{id:p,className:"bien-input-error",role:"alert",children:n})]})});vn.displayName="Input";const gi=D.forwardRef(({label:e,error:t,hint:n,showCount:r,resize:i="vertical",className:o="",maxLength:s,value:l,onChange:c,...u},h)=>{const[d,p]=D.useState(l?String(l).length:0),f=x=>{p(x.target.value.length),c==null||c(x)},g=["bien-textarea-wrapper",t&&"bien-textarea-wrapper--error",o].filter(Boolean).join(" "),m=["bien-textarea",`bien-textarea--resize-${i}`].filter(Boolean).join(" ");return a.jsxs("div",{className:g,children:[e&&a.jsxs("label",{className:"bien-textarea-label",children:[e,u.required&&a.jsx("span",{className:"bien-textarea-required",children:"*"})]}),a.jsx("textarea",{ref:h,className:m,value:l,onChange:f,maxLength:s,"aria-invalid":t?"true":"false",...u}),a.jsxs("div",{className:"bien-textarea-footer",children:[a.jsxs("div",{className:"bien-textarea-messages",children:[n&&!t&&a.jsx("span",{className:"bien-textarea-hint",children:n}),t&&a.jsx("span",{className:"bien-textarea-error",children:t})]}),r&&a.jsxs("span",{className:"bien-textarea-count",children:[d,s&&` / ${s}`]})]})]})});gi.displayName="Textarea";function ys(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ks=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vs=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ws={};function nr(e,t){return(ws.jsx?vs:ks).test(e)}const js=/[ \t\n\f\r]/g;function Cs(e){return typeof e=="object"?e.type==="text"?rr(e.value):!1:rr(e)}function rr(e){return e.replace(js,"")===""}class lt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}lt.prototype.normal={};lt.prototype.property={};lt.prototype.space=void 0;function mi(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new lt(n,r,t)}function tn(e){return e.toLowerCase()}class de{constructor(t,n){this.attribute=n,this.property=t}}de.prototype.attribute="";de.prototype.booleanish=!1;de.prototype.boolean=!1;de.prototype.commaOrSpaceSeparated=!1;de.prototype.commaSeparated=!1;de.prototype.defined=!1;de.prototype.mustUseProperty=!1;de.prototype.number=!1;de.prototype.overloadedBoolean=!1;de.prototype.property="";de.prototype.spaceSeparated=!1;de.prototype.space=void 0;let _s=0;const U=Re(),se=Re(),nn=Re(),T=Re(),ie=Re(),Ue=Re(),fe=Re();function Re(){return 2**++_s}const rn=Object.freeze(Object.defineProperty({__proto__:null,boolean:U,booleanish:se,commaOrSpaceSeparated:fe,commaSeparated:Ue,number:T,overloadedBoolean:nn,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),Mt=Object.keys(rn);class wn extends de{constructor(t,n,r,i){let o=-1;if(super(t,n),ir(this,"space",i),typeof r=="number")for(;++o<Mt.length;){const s=Mt[o];ir(this,Mt[o],(r&rn[s])===rn[s])}}}wn.prototype.defined=!0;function ir(e,t,n){n&&(e[t]=n)}function Ye(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new wn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[tn(r)]=r,n[tn(o.attribute)]=r}return new lt(t,n,e.space)}const bi=Ye({properties:{ariaActiveDescendant:null,ariaAtomic:se,ariaAutoComplete:null,ariaBusy:se,ariaChecked:se,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:se,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:se,ariaFlowTo:ie,ariaGrabbed:se,ariaHasPopup:null,ariaHidden:se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:T,ariaLive:null,ariaModal:se,ariaMultiLine:se,ariaMultiSelectable:se,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:se,ariaReadOnly:se,ariaRelevant:null,ariaRequired:se,ariaRoleDescription:ie,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:se,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function xi(e,t){return t in e?e[t]:t}function yi(e,t){return xi(e,t.toLowerCase())}const Ss=Ye({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ue,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:ie,autoFocus:U,autoPlay:U,blocking:ie,capture:null,charSet:null,checked:U,cite:null,className:ie,cols:T,colSpan:null,content:null,contentEditable:se,controls:U,controlsList:ie,coords:T|Ue,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:nn,draggable:se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:ie,height:T,hidden:nn,high:T,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:ie,itemRef:ie,itemScope:U,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:T,pattern:null,ping:ie,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:ie,required:U,reversed:U,rows:T,rowSpan:T,sandbox:ie,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:se,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:se,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:T,security:null,unselectable:null},space:"html",transform:yi}),Ds=Ye({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fe,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,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:Ue,g2:Ue,glyphName:Ue,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,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:T,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,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:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xi}),ki=Ye({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),vi=Ye({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yi}),wi=Ye({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ns={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"},Is=/[A-Z]/g,or=/-[a-z]/g,Ts=/^data[-\w.:]+$/i;function Es(e,t){const n=tn(t);let r=t,i=de;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ts.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(or,Os);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!or.test(o)){let s=o.replace(Is,Ls);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=wn}return new i(r,t)}function Ls(e){return"-"+e.toLowerCase()}function Os(e){return e.charAt(1).toUpperCase()}const Ps=mi([bi,Ss,ki,vi,wi],"html"),jn=mi([bi,Ds,ki,vi,wi],"svg");function Ms(e){return e.join(" ").trim()}var xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _n={},sr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,As=/\n/g,Rs=/^\s*/,Bs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Fs=/^:\s*/,zs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$s=/^[;\s]*/,Hs=/^\s+|\s+$/g,Vs=`
2
+ `,lr="/",ar="*",Pe="",Ws="comment",Us="declaration";function qs(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var m=g.match(As);m&&(n+=m.length);var x=g.lastIndexOf(Vs);r=~x?g.length-x:r+g.length}function o(){var g={line:n,column:r};return function(m){return m.position=new s(g),u(),m}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(g){var m=new Error(t.source+":"+n+":"+r+": "+g);if(m.reason=g,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function c(g){var m=g.exec(e);if(m){var x=m[0];return i(x),e=e.slice(x.length),m}}function u(){c(Rs)}function h(g){var m;for(g=g||[];m=d();)m!==!1&&g.push(m);return g}function d(){var g=o();if(!(lr!=e.charAt(0)||ar!=e.charAt(1))){for(var m=2;Pe!=e.charAt(m)&&(ar!=e.charAt(m)||lr!=e.charAt(m+1));)++m;if(m+=2,Pe===e.charAt(m-1))return l("End of comment missing");var x=e.slice(2,m-2);return r+=2,i(x),e=e.slice(m),r+=2,g({type:Ws,comment:x})}}function p(){var g=o(),m=c(Bs);if(m){if(d(),!c(Fs))return l("property missing ':'");var x=c(zs),k=g({type:Us,property:cr(m[0].replace(sr,Pe)),value:x?cr(x[0].replace(sr,Pe)):Pe});return c($s),k}}function f(){var g=[];h(g);for(var m;m=p();)m!==!1&&(g.push(m),h(g));return g}return u(),f()}function cr(e){return e?e.replace(Hs,Pe):Pe}var Ys=qs,Gs=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_n,"__esModule",{value:!0});_n.default=Qs;const Xs=Gs(Ys);function Qs(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Xs.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n||{},n[s]=l)}),n}var jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.camelCase=void 0;var Zs=/^--[a-zA-Z0-9_-]+$/,Js=/-([a-z])/g,Ks=/^[^-]+$/,el=/^-(webkit|moz|ms|o|khtml)-/,tl=/^-(ms)-/,nl=function(e){return!e||Ks.test(e)||Zs.test(e)},rl=function(e,t){return t.toUpperCase()},ur=function(e,t){return"".concat(t,"-")},il=function(e,t){return t===void 0&&(t={}),nl(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(tl,ur):e=e.replace(el,ur),e.replace(Js,rl))};jt.camelCase=il;var ol=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sl=ol(_n),ll=jt;function on(e,t){var n={};return!e||typeof e!="string"||(0,sl.default)(e,function(r,i){r&&i&&(n[(0,ll.camelCase)(r,t)]=i)}),n}on.default=on;var al=on;const cl=Cn(al),ji=Ci("end"),Sn=Ci("start");function Ci(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ul(e){const t=Sn(e),n=ji(e);if(t&&n)return{start:t,end:n}}function tt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?dr(e.position):"start"in e||"end"in e?dr(e):"line"in e||"column"in e?sn(e):""}function sn(e){return hr(e&&e.line)+":"+hr(e&&e.column)}function dr(e){return sn(e&&e.start)+"-"+sn(e&&e.end)}function hr(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=tt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="";ae.prototype.name="";ae.prototype.reason="";ae.prototype.message="";ae.prototype.stack="";ae.prototype.column=void 0;ae.prototype.line=void 0;ae.prototype.ancestors=void 0;ae.prototype.cause=void 0;ae.prototype.fatal=void 0;ae.prototype.place=void 0;ae.prototype.ruleId=void 0;ae.prototype.source=void 0;const Dn={}.hasOwnProperty,dl=new Map,hl=/[A-Z]/g,fl=new Set(["table","tbody","thead","tfoot","tr"]),pl=new Set(["td","th"]),_i="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=jl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=wl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?jn:Ps,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Si(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Si(e,t,n){if(t.type==="element")return ml(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yl(e,t,n);if(t.type==="mdxjsEsm")return xl(e,t);if(t.type==="root")return kl(e,t,n);if(t.type==="text")return vl(e,t)}function ml(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=jn,e.schema=i),e.ancestors.push(t);const o=Ni(e,t.tagName,!1),s=Cl(e,t);let l=In(e,t);return fl.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!Cs(c):!0})),Di(e,s,o,t),Nn(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function bl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ot(e,t.position)}function xl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ot(e,t.position)}function yl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=jn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Ni(e,t.name,!0),s=_l(e,t),l=In(e,t);return Di(e,s,o,t),Nn(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function kl(e,t,n){const r={};return Nn(r,In(e,t)),e.create(t,e.Fragment,r,n)}function vl(e,t){return t.value}function Di(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Nn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function wl(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function jl(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),c=Sn(r);return t(i,o,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Cl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Dn.call(t.properties,i)){const o=Sl(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&pl.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _l(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ot(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else ot(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function In(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:dl;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const u=i.get(c)||0;s=c+"-"+u,i.set(c,u+1)}}const l=Si(e,o,s);l!==void 0&&n.push(l)}return n}function Sl(e,t,n){const r=Es(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ys(n):Ms(n)),r.property==="style"){let i=typeof n=="object"?n:Dl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Nl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Ns[r.property]||r.property:r.attribute,n]}}function Dl(e,t){try{return cl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=_i+"#cannot-parse-style-attribute",i}}function Ni(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=nr(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=nr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Dn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ot(e)}function ot(e,t){const n=new ae("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=_i+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Nl(e){const t={};let n;for(n in e)Dn.call(e,n)&&(t[Il(n)]=e[n]);return t}function Il(e){let t=e.replace(hl,Tl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Tl(e){return"-"+e.toLowerCase()}const At={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"]},El={};function Tn(e,t){const n=El,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ii(e,r,i)}function Ii(e,t,n){if(Ll(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return fr(e.children,t,n)}return Array.isArray(e)?fr(e,t,n):""}function fr(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ii(e[i],t,n);return r.join("")}function Ll(e){return!!(e&&typeof e=="object")}const pr=document.createElement("i");function En(e){const t="&"+e+";";pr.innerHTML=t;const n=pr.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pe(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function be(e,t){return e.length>0?(pe(e,e.length,0,t),e):t}const gr={}.hasOwnProperty;function Ti(e){const t={};let n=-1;for(;++n<e.length;)Ol(t,e[n]);return t}function Ol(e,t){let n;for(n in t){const i=(gr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){gr.call(i,s)||(i[s]=[]);const l=o[s];Pl(i[s],Array.isArray(l)?l:l?[l]:[])}}}function Pl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pe(e,0,0,r)}function Ei(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function je(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=Ee(/[A-Za-z]/),le=Ee(/[\dA-Za-z]/),Ml=Ee(/[#-'*+\--9=?A-Z^-~]/);function yt(e){return e!==null&&(e<32||e===127)}const ln=Ee(/\d/),Al=Ee(/[\dA-Fa-f]/),Rl=Ee(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function re(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}const Ct=Ee(new RegExp("\\p{P}|\\p{S}","u")),Me=Ee(/\s/);function Ee(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ge(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&le(e.charCodeAt(n+1))&&le(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return G(c)?(e.enter(n),l(c)):t(c)}function l(c){return G(c)&&o++<i?(e.consume(c),l):(e.exit(n),t(c))}}const Bl={tokenize:Fl};function Fl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return $(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const zl={tokenize:$l},mr={tokenize:Hl};function $l(e){const t=this,n=[];let r=0,i,o,s;return l;function l(w){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const E=t.events.length;let L=E,C;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){C=t.events[L][1].end;break}k(r);let R=E;for(;R<t.events.length;)t.events[R][1].end={...C},R++;return pe(t.events,L+1,0,t.events.slice(E)),t.events.length=R,u(w)}return l(w)}function u(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mr,h,d)(w)}function h(w){return i&&_(),k(r),p(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(mr,f,g)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){i&&_(),k(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),m(w)}function m(w){if(w===null){x(e.exit("chunkFlow"),!0),k(0),e.consume(w);return}return $(w)?(e.consume(w),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),m)}function x(w,E){const L=t.sliceStream(w);if(E&&L.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(L),t.parser.lazy[w.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const R=t.events.length;let A=R,F,v;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(F){v=t.events[A][1].end;break}F=!0}for(k(r),C=R;C<t.events.length;)t.events[C][1].end={...v},C++;pe(t.events,A+1,0,t.events.slice(R)),t.events.length=C}}function k(w){let E=n.length;for(;E-- >w;){const L=n[E];t.containerState=L[1],L[0].exit.call(t,e)}n.length=w}function _(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hl(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qe(e){if(e===null||re(e)||Me(e))return 1;if(Ct(e))return 2}function _t(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const an={name:"attention",resolveAll:Vl,tokenize:Wl};function Vl(e,t){let n=-1,r,i,o,s,l,c,u,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};br(d,-c),br(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=be(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=be(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=be(u,_t(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=be(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=be(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,pe(e,r-1,n-r+3,u),n=r+u.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Wl(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=qe(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===o)return e.consume(c),l;const u=e.exit("attentionSequence"),h=qe(c),d=!h||h===2&&i||n.includes(c),p=!i||i===2&&h||n.includes(r);return u._open=!!(o===42?d:d&&(i||!p)),u._close=!!(o===42?p:p&&(h||!d)),t(c)}}function br(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ul={name:"autolink",tokenize:ql};function ql(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return ce(f)?(e.consume(f),s):f===64?n(f):u(f)}function s(f){return f===43||f===45||f===46||le(f)?(r=1,l(f)):u(f)}function l(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||le(f))&&r++<32?(e.consume(f),l):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||yt(f)?n(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),h):Ml(f)?(e.consume(f),u):n(f)}function h(f){return le(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,h):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||le(f))&&r++<63){const g=f===45?p:d;return e.consume(f),g}return n(f)}}const at={partial:!0,tokenize:Yl};function Yl(e,t,n){return r;function r(o){return G(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||$(o)?t(o):n(o)}}const Li={continuation:{tokenize:Xl},exit:Ql,name:"blockQuote",tokenize:Gl};function Gl(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return G(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Xl(e,t,n){const r=this;return i;function i(s){return G(s)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Li,t,n)(s)}}function Ql(e){e.exit("blockQuote")}const Oi={name:"characterEscape",tokenize:Zl};function Zl(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Rl(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Pi={name:"characterReference",tokenize:Jl};function Jl(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=le,h(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Al,h):(e.enter("characterReferenceValue"),o=7,s=ln,h(d))}function h(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===le&&!En(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),h):n(d)}}const xr={partial:!0,tokenize:ea},yr={concrete:!0,name:"codeFenced",tokenize:Kl};function Kl(e,t,n){const r=this,i={partial:!0,tokenize:L};let o=0,s=0,l;return c;function c(C){return u(C)}function u(C){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(C)}function h(C){return C===l?(s++,e.consume(C),h):s<3?n(C):(e.exit("codeFencedFenceSequence"),G(C)?Q(e,d,"whitespace")(C):d(C))}function d(C){return C===null||$(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(xr,m,E)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||$(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):G(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,f,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),p)}function f(C){return C===null||$(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||$(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===l?n(C):(e.consume(C),g)}function m(C){return e.attempt(i,E,x)(C)}function x(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),k}function k(C){return o>0&&G(C)?Q(e,_,"linePrefix",o+1)(C):_(C)}function _(C){return C===null||$(C)?e.check(xr,m,E)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||$(C)?(e.exit("codeFlowValue"),_(C)):(e.consume(C),w)}function E(C){return e.exit("codeFenced"),t(C)}function L(C,R,A){let F=0;return v;function v(P){return C.enter("lineEnding"),C.consume(P),C.exit("lineEnding"),S}function S(P){return C.enter("codeFencedFence"),G(P)?Q(C,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):j(P)}function j(P){return P===l?(C.enter("codeFencedFenceSequence"),O(P)):A(P)}function O(P){return P===l?(F++,C.consume(P),O):F>=s?(C.exit("codeFencedFenceSequence"),G(P)?Q(C,B,"whitespace")(P):B(P)):A(P)}function B(P){return P===null||$(P)?(C.exit("codeFencedFence"),R(P)):A(P)}}}function ea(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Rt={name:"codeIndented",tokenize:na},ta={partial:!0,tokenize:ra};function na(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):$(u)?e.attempt(ta,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||$(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function ra(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):$(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Q(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):$(s)?i(s):n(s)}}const ia={name:"codeText",previous:sa,resolve:oa,tokenize:la};function oa(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function sa(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function la(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(o=e.enter("codeTextSequence"),i=0,h(d)):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||$(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class aa{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ke(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ke(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ke(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ke(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ke(this.left,n.reverse())}}}function Ke(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 Mi(e){const t={};let n=-1,r,i,o,s,l,c,u;const h=new aa(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ca(h,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=h.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return pe(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!u}function ca(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],u={};let h,d,p=-1,f=n,g=0,m=0;const x=[m];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(h=r.sliceStream(f),f.next||h.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(m=p+1,x.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):x.pop(),p=x.length;p--;){const k=l.slice(x[p],x[p+1]),_=o.pop();c.push([_,_+k.length-1]),e.splice(_,2,k)}for(c.reverse(),p=-1;++p<c.length;)u[g+c[p][0]]=g+c[p][1],g+=c[p][1]-c[p][0]-1;return u}const ua={resolve:ha,tokenize:fa},da={partial:!0,tokenize:pa};function ha(e){return Mi(e),e}function fa(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):$(l)?e.check(da,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function pa(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(s){if(s===null||$(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ai(e,t,n,r,i,o,s,l,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(k){return k===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(k),e.exit(o),p):k===null||k===32||k===41||yt(k)?n(k):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(k))}function p(k){return k===62?(e.enter(o),e.consume(k),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===62?(e.exit("chunkString"),e.exit(l),p(k)):k===null||k===60||$(k)?n(k):(e.consume(k),k===92?g:f)}function g(k){return k===60||k===62||k===92?(e.consume(k),f):f(k)}function m(k){return!h&&(k===null||k===41||re(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(k)):h<u&&k===40?(e.consume(k),h++,m):k===41?(e.consume(k),h--,m):k===null||k===32||k===40||yt(k)?n(k):(e.consume(k),k===92?x:m)}function x(k){return k===40||k===41||k===92?(e.consume(k),m):m(k)}}function Ri(e,t,n,r,i,o){const s=this;let l=0,c;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),h}function h(f){return l>999||f===null||f===91||f===93&&!c||f===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):$(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||$(f)||l++>999?(e.exit("chunkString"),h(f)):(e.consume(f),c||(c=!G(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),l++,d):d(f)}}function Bi(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),c(s)):p===null?n(p):$(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===s||p===null||$(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:h)}function d(p){return p===s||p===92?(e.consume(p),h):h(p)}}function nt(e,t){let n;return r;function r(i){return $(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):G(i)?Q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ga={name:"definition",tokenize:ba},ma={partial:!0,tokenize:xa};function ba(e,t,n){const r=this;let i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return Ri.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=je(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):n(f)}function c(f){return re(f)?nt(e,u)(f):u(f)}function u(f){return Ai(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function h(f){return e.attempt(ma,d,d)(f)}function d(f){return G(f)?Q(e,p,"whitespace")(f):p(f)}function p(f){return f===null||$(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function xa(e,t,n){return r;function r(l){return re(l)?nt(e,i)(l):n(l)}function i(l){return Bi(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return G(l)?Q(e,s,"whitespace")(l):s(l)}function s(l){return l===null||$(l)?t(l):n(l)}}const ya={name:"hardBreakEscape",tokenize:ka};function ka(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return $(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const va={name:"headingAtx",resolve:wa,tokenize:ja};function wa(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},pe(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function ja(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||re(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||$(h)?(e.exit("atxHeading"),t(h)):G(h)?Q(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||re(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}const Ca=["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"],kr=["pre","script","style","textarea"],_a={concrete:!0,name:"htmlFlow",resolveTo:Na,tokenize:Ia},Sa={partial:!0,tokenize:Ea},Da={partial:!0,tokenize:Ta};function Na(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ia(e,t,n){const r=this;let i,o,s,l,c;return u;function u(b){return h(b)}function h(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),d}function d(b){return b===33?(e.consume(b),p):b===47?(e.consume(b),o=!0,m):b===63?(e.consume(b),i=3,r.interrupt?t:y):ce(b)?(e.consume(b),s=String.fromCharCode(b),x):n(b)}function p(b){return b===45?(e.consume(b),i=2,f):b===91?(e.consume(b),i=5,l=0,g):ce(b)?(e.consume(b),i=4,r.interrupt?t:y):n(b)}function f(b){return b===45?(e.consume(b),r.interrupt?t:y):n(b)}function g(b){const K="CDATA[";return b===K.charCodeAt(l++)?(e.consume(b),l===K.length?r.interrupt?t:j:g):n(b)}function m(b){return ce(b)?(e.consume(b),s=String.fromCharCode(b),x):n(b)}function x(b){if(b===null||b===47||b===62||re(b)){const K=b===47,I=s.toLowerCase();return!K&&!o&&kr.includes(I)?(i=1,r.interrupt?t(b):j(b)):Ca.includes(s.toLowerCase())?(i=6,K?(e.consume(b),k):r.interrupt?t(b):j(b)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):o?_(b):w(b))}return b===45||le(b)?(e.consume(b),s+=String.fromCharCode(b),x):n(b)}function k(b){return b===62?(e.consume(b),r.interrupt?t:j):n(b)}function _(b){return G(b)?(e.consume(b),_):v(b)}function w(b){return b===47?(e.consume(b),v):b===58||b===95||ce(b)?(e.consume(b),E):G(b)?(e.consume(b),w):v(b)}function E(b){return b===45||b===46||b===58||b===95||le(b)?(e.consume(b),E):L(b)}function L(b){return b===61?(e.consume(b),C):G(b)?(e.consume(b),L):w(b)}function C(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),c=b,R):G(b)?(e.consume(b),C):A(b)}function R(b){return b===c?(e.consume(b),c=null,F):b===null||$(b)?n(b):(e.consume(b),R)}function A(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||re(b)?L(b):(e.consume(b),A)}function F(b){return b===47||b===62||G(b)?w(b):n(b)}function v(b){return b===62?(e.consume(b),S):n(b)}function S(b){return b===null||$(b)?j(b):G(b)?(e.consume(b),S):n(b)}function j(b){return b===45&&i===2?(e.consume(b),q):b===60&&i===1?(e.consume(b),Y):b===62&&i===4?(e.consume(b),ee):b===63&&i===3?(e.consume(b),y):b===93&&i===5?(e.consume(b),te):$(b)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Sa,oe,O)(b)):b===null||$(b)?(e.exit("htmlFlowData"),O(b)):(e.consume(b),j)}function O(b){return e.check(Da,B,oe)(b)}function B(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),P}function P(b){return b===null||$(b)?O(b):(e.enter("htmlFlowData"),j(b))}function q(b){return b===45?(e.consume(b),y):j(b)}function Y(b){return b===47?(e.consume(b),s="",J):j(b)}function J(b){if(b===62){const K=s.toLowerCase();return kr.includes(K)?(e.consume(b),ee):j(b)}return ce(b)&&s.length<8?(e.consume(b),s+=String.fromCharCode(b),J):j(b)}function te(b){return b===93?(e.consume(b),y):j(b)}function y(b){return b===62?(e.consume(b),ee):b===45&&i===2?(e.consume(b),y):j(b)}function ee(b){return b===null||$(b)?(e.exit("htmlFlowData"),oe(b)):(e.consume(b),ee)}function oe(b){return e.exit("htmlFlow"),t(b)}}function Ta(e,t,n){const r=this;return i;function i(s){return $(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Ea(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(at,t,n)}}const La={name:"htmlText",tokenize:Oa};function Oa(e,t,n){const r=this;let i,o,s;return l;function l(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),c}function c(y){return y===33?(e.consume(y),u):y===47?(e.consume(y),L):y===63?(e.consume(y),w):ce(y)?(e.consume(y),A):n(y)}function u(y){return y===45?(e.consume(y),h):y===91?(e.consume(y),o=0,g):ce(y)?(e.consume(y),_):n(y)}function h(y){return y===45?(e.consume(y),f):n(y)}function d(y){return y===null?n(y):y===45?(e.consume(y),p):$(y)?(s=d,Y(y)):(e.consume(y),d)}function p(y){return y===45?(e.consume(y),f):d(y)}function f(y){return y===62?q(y):y===45?p(y):d(y)}function g(y){const ee="CDATA[";return y===ee.charCodeAt(o++)?(e.consume(y),o===ee.length?m:g):n(y)}function m(y){return y===null?n(y):y===93?(e.consume(y),x):$(y)?(s=m,Y(y)):(e.consume(y),m)}function x(y){return y===93?(e.consume(y),k):m(y)}function k(y){return y===62?q(y):y===93?(e.consume(y),k):m(y)}function _(y){return y===null||y===62?q(y):$(y)?(s=_,Y(y)):(e.consume(y),_)}function w(y){return y===null?n(y):y===63?(e.consume(y),E):$(y)?(s=w,Y(y)):(e.consume(y),w)}function E(y){return y===62?q(y):w(y)}function L(y){return ce(y)?(e.consume(y),C):n(y)}function C(y){return y===45||le(y)?(e.consume(y),C):R(y)}function R(y){return $(y)?(s=R,Y(y)):G(y)?(e.consume(y),R):q(y)}function A(y){return y===45||le(y)?(e.consume(y),A):y===47||y===62||re(y)?F(y):n(y)}function F(y){return y===47?(e.consume(y),q):y===58||y===95||ce(y)?(e.consume(y),v):$(y)?(s=F,Y(y)):G(y)?(e.consume(y),F):q(y)}function v(y){return y===45||y===46||y===58||y===95||le(y)?(e.consume(y),v):S(y)}function S(y){return y===61?(e.consume(y),j):$(y)?(s=S,Y(y)):G(y)?(e.consume(y),S):F(y)}function j(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),i=y,O):$(y)?(s=j,Y(y)):G(y)?(e.consume(y),j):(e.consume(y),B)}function O(y){return y===i?(e.consume(y),i=void 0,P):y===null?n(y):$(y)?(s=O,Y(y)):(e.consume(y),O)}function B(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||re(y)?F(y):(e.consume(y),B)}function P(y){return y===47||y===62||re(y)?F(y):n(y)}function q(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function Y(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),J}function J(y){return G(y)?Q(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):te(y)}function te(y){return e.enter("htmlTextData"),s(y)}}const Ln={name:"labelEnd",resolveAll:Ra,resolveTo:Ba,tokenize:Fa},Pa={tokenize:za},Ma={tokenize:$a},Aa={tokenize:Ha};function Ra(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&pe(e,0,e.length,n),e}function Ba(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=be(l,e.slice(o+1,o+r+3)),l=be(l,[["enter",h,t]]),l=be(l,_t(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=be(l,[["exit",h,t],e[s-2],e[s-1],["exit",u,t]]),l=be(l,e.slice(s+1)),l=be(l,[["exit",c,t]]),pe(e,o,e.length,l),e}function Fa(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(p){return o?o._inactive?d(p):(s=r.parser.defined.includes(je(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(Pa,h,s?h:d)(p):p===91?e.attempt(Ma,h,s?u:d)(p):s?h(p):d(p)}function u(p){return e.attempt(Aa,h,d)(p)}function h(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}function za(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return re(d)?nt(e,o)(d):o(d)}function o(d){return d===41?h(d):Ai(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return re(d)?nt(e,c)(d):h(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?Bi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function u(d){return re(d)?nt(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function $a(e,t,n){const r=this;return i;function i(l){return Ri.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(je(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function Ha(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Va={name:"labelStartImage",resolveAll:Ln.resolveAll,tokenize:Wa};function Wa(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Ua={name:"labelStartLink",resolveAll:Ln.resolveAll,tokenize:qa};function qa(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Bt={name:"lineEnding",tokenize:Ya};function Ya(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,t,"linePrefix")}}const gt={name:"thematicBreak",tokenize:Ga};function Ga(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||$(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),G(u)?Q(e,l,"whitespace")(u):l(u))}}const ue={continuation:{tokenize:Ja},exit:ec,name:"list",tokenize:Za},Xa={partial:!0,tokenize:tc},Qa={partial:!0,tokenize:Ka};function Za(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:ln(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(gt,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return n(f)}function c(f){return ln(f)&&++s<10?(e.consume(f),c):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(at,r.interrupt?n:h,e.attempt(Xa,p,d))}function h(f){return r.containerState.initialBlankLine=!0,o++,p(f)}function d(f){return G(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Ja(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(at,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!G(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qa,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(ue,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Ka(e,t,n){const r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function ec(e){e.exit(this.containerState.type)}function tc(e,t,n){const r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!G(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const vr={name:"setextUnderline",resolveTo:nc,tokenize:rc};function nc(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function rc(e,t,n){const r=this;let i;return o;function o(u){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),G(u)?Q(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||$(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const ic={tokenize:oc};function oc(e){const t=this,n=e.attempt(at,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ua,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sc={resolveAll:zi()},lc=Fi("string"),ac=Fi("text");function Fi(e){return{resolveAll:zi(e==="text"?cc:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(h){return u(h)?o(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return u(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function u(h){if(h===null)return!0;const d=i[h];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function zi(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function cc(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)c=!0,l++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const uc={42:ue,43:ue,45:ue,48:ue,49:ue,50:ue,51:ue,52:ue,53:ue,54:ue,55:ue,56:ue,57:ue,62:Li},dc={91:ga},hc={[-2]:Rt,[-1]:Rt,32:Rt},fc={35:va,42:gt,45:[vr,gt],60:_a,61:vr,95:gt,96:yr,126:yr},pc={38:Pi,92:Oi},gc={[-5]:Bt,[-4]:Bt,[-3]:Bt,33:Va,38:Pi,42:an,60:[Ul,La],91:Ua,92:[ya,Oi],93:Ln,95:an,96:ia},mc={null:[an,sc]},bc={null:[42,95]},xc={null:[]},yc=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bc,contentInitial:dc,disable:xc,document:uc,flow:fc,flowInitial:hc,insideSpan:mc,string:pc,text:gc},Symbol.toStringTag,{value:"Module"}));function kc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const c={attempt:R(L),check:R(C),consume:_,enter:w,exit:E,interrupt:R(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let h=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function d(S){return s=be(s,S),x(),s[s.length-1]!==null?[]:(A(t,0),u.events=_t(o,u.events,u),u.events)}function p(S,j){return wc(f(S),j)}function f(S){return vc(s,S)}function g(){const{_bufferIndex:S,_index:j,line:O,column:B,offset:P}=r;return{_bufferIndex:S,_index:j,line:O,column:B,offset:P}}function m(S){i[S.line]=S.column,v()}function x(){let S;for(;r._index<s.length;){const j=s[r._index];if(typeof j=="string")for(S=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===S&&r._bufferIndex<j.length;)k(j.charCodeAt(r._bufferIndex));else k(j)}}function k(S){h=h(S)}function _(S){$(S)?(r.line++,r.column=1,r.offset+=S===-3?2:1,v()):S!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=S}function w(S,j){const O=j||{};return O.type=S,O.start=g(),u.events.push(["enter",O,u]),l.push(O),O}function E(S){const j=l.pop();return j.end=g(),u.events.push(["exit",j,u]),j}function L(S,j){A(S,j.from)}function C(S,j){j.restore()}function R(S,j){return O;function O(B,P,q){let Y,J,te,y;return Array.isArray(B)?oe(B):"tokenize"in B?oe([B]):ee(B);function ee(z){return H;function H(Z){const ge=Z!==null&&z[Z],ye=Z!==null&&z.null,ke=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return oe(ke)(Z)}}function oe(z){return Y=z,J=0,z.length===0?q:b(z[J])}function b(z){return H;function H(Z){return y=F(),te=z,z.partial||(u.currentConstruct=z),z.name&&u.parser.constructs.disable.null.includes(z.name)?I():z.tokenize.call(j?Object.assign(Object.create(u),j):u,c,K,I)(Z)}}function K(z){return S(te,y),P}function I(z){return y.restore(),++J<Y.length?b(Y[J]):q}}}function A(S,j){S.resolveAll&&!o.includes(S)&&o.push(S),S.resolve&&pe(u.events,j,u.events.length-j,S.resolve(u.events.slice(j),u)),S.resolveTo&&(u.events=S.resolveTo(u.events,u))}function F(){const S=g(),j=u.previous,O=u.currentConstruct,B=u.events.length,P=Array.from(l);return{from:B,restore:q};function q(){r=S,u.previous=j,u.currentConstruct=O,u.events.length=B,l=P,v()}}function v(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function vc(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function wc(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
3
3
  `;break}case-3:{s=`\r
4
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function wc(e){const r={constructs:Ii([xc,...(e||{}).extensions||[]]),content:i(Rl),defined:[],document:i(Fl),flow:i(rc),lazy:{},string:i(sc),text:i(lc)};return r;function i(o){return s;function s(l){return yc(r,o,l)}}}function jc(e){for(;!Pi(e););return e}const kr=/[\0\t\n\r]/g;function Cc(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const c=[];let u,h,d,p,f;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(kr.lastIndex=d,u=kr.exec(o),p=u&&u.index!==void 0?u.index:o.length,f=o.charCodeAt(p),!u){t=o.slice(d);break}if(f===10&&d===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<p&&(c.push(o.slice(d,p)),e+=p-d),f){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Sc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _c(e){return e.replace(Sc,Dc)}function Dc(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Ei(n.slice(o?2:1),o?16:10)}return En(n)||e}const zi={}.hasOwnProperty;function Nc(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Ic(n)(jc(wc(n).document().write(Cc()(e,t,!0))))}function Ic(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Jn),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Xn),blockQuote:o(_e),characterEscape:F,characterReference:F,codeFenced:o(Re),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Re,s),codeText:o(Qe,s),codeTextData:F,data:F,codeFlowValue:F,definition:o(De),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Qo),hardBreakEscape:o(Qn),hardBreakTrailing:o(Qn),htmlFlow:o(Zn,s),htmlFlowData:F,htmlText:o(Zn,s),htmlTextData:F,image:o(Zo),label:s,link:o(Jn),listItem:o(Jo),listItemValue:p,listOrdered:o(Kn,d),listUnordered:o(Kn),paragraph:o(Ko),reference:b,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Xn),strong:o(es),thematicBreak:o(ns)},exit:{atxHeading:c(),atxHeadingSequence:L,autolink:c(),autolinkEmail:Ee,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:I,characterReferenceMarkerNumeric:I,characterReferenceValue:z,characterReference:Q,codeFenced:c(x),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:v,codeIndented:c(k),codeText:c(M),codeTextData:v,data:v,definition:c(),definitionDestinationString:T,definitionLabelString:S,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(C),hardBreakTrailing:c(C),htmlFlow:c(P),htmlFlowData:v,htmlText:c(B),htmlTextData:v,image:c(G),label:re,labelText:Z,lineEnding:_,link:c(W),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:J,resourceDestinationString:y,resourceTitleString:K,resource:oe,setextHeading:c(A),setextHeadingLineSequence:R,setextHeadingText:j,strong:c(),thematicBreak:c()}};$i(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let O={type:"root",children:[]};const H={stack:[O],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:h,data:n},Y=[];let ee=-1;for(;++ee<D.length;)if(D[ee][1].type==="listOrdered"||D[ee][1].type==="listUnordered")if(D[ee][0]==="enter")Y.push(ee);else{const xe=Y.pop();ee=i(D,xe,ee)}for(ee=-1;++ee<D.length;){const xe=t[D[ee][0]];zi.call(xe,D[ee][1].type)&&xe[D[ee][1].type].call(Object.assign({sliceSerialize:D[ee][2].sliceSerialize},H),D[ee][1])}if(H.tokenStack.length>0){const xe=H.tokenStack[H.tokenStack.length-1];(xe[1]||vr).call(H,void 0,xe[0])}for(O.position={start:Ne(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:Ne(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},ee=-1;++ee<t.transforms.length;)O=t.transforms[ee](O)||O;return O}function i(D,O,H){let Y=O-1,ee=-1,xe=!1,Te,je,Ze,Je;for(;++Y<=H;){const he=D[Y];switch(he[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{he[0]==="enter"?ee++:ee--,Je=void 0;break}case"lineEndingBlank":{he[0]==="enter"&&(Te&&!Je&&!ee&&!Ze&&(Ze=Y),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=void 0}if(!ee&&he[0]==="enter"&&he[1].type==="listItemPrefix"||ee===-1&&he[0]==="exit"&&(he[1].type==="listUnordered"||he[1].type==="listOrdered")){if(Te){let Be=Y;for(je=void 0;Be--;){const Ce=D[Be];if(Ce[1].type==="lineEnding"||Ce[1].type==="lineEndingBlank"){if(Ce[0]==="exit")continue;je&&(D[je][1].type="lineEndingBlank",xe=!0),Ce[1].type="lineEnding",je=Be}else if(!(Ce[1].type==="linePrefix"||Ce[1].type==="blockQuotePrefix"||Ce[1].type==="blockQuotePrefixWhitespace"||Ce[1].type==="blockQuoteMarker"||Ce[1].type==="listItemIndent"))break}Ze&&(!je||Ze<je)&&(Te._spread=!0),Te.end=Object.assign({},je?D[je][1].start:he[1].end),D.splice(je||Y,0,["exit",Te,he[2]]),Y++,H++}if(he[1].type==="listItemPrefix"){const Be={type:"listItem",_spread:!1,start:Object.assign({},he[1].start),end:void 0};Te=Be,D.splice(Y,0,["enter",Be,he[2]]),Y++,H++,Ze=void 0,Je=!0}}}return D[O][1]._spread=xe,H}function o(D,O){return H;function H(Y){l.call(this,D(Y),Y),O&&O.call(this,Y)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(D,O,H){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([O,H||void 0]),D.position={start:Ne(O.start),end:void 0}}function c(D){return O;function O(H){D&&D.call(this,H),u.call(this,H)}}function u(D,O){const H=this.stack.pop(),Y=this.tokenStack.pop();if(Y)Y[0].type!==D.type&&(O?O.call(this,D,Y[0]):(Y[1]||vr).call(this,D,Y[0]));else throw new Error("Cannot close `"+D.type+"` ("+tt({start:D.start,end:D.end})+"): it’s not open");H.position.end=Ne(D.end)}function h(){return In(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(D){if(this.data.expectingFirstListItemValue){const O=this.stack[this.stack.length-2];O.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function f(){const D=this.resume(),O=this.stack[this.stack.length-1];O.lang=D}function g(){const D=this.resume(),O=this.stack[this.stack.length-1];O.meta=D}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const D=this.resume(),O=this.stack[this.stack.length-1];O.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const D=this.resume(),O=this.stack[this.stack.length-1];O.value=D.replace(/(\r?\n|\r)$/g,"")}function S(D){const O=this.resume(),H=this.stack[this.stack.length-1];H.label=O,H.identifier=ke(this.sliceSerialize(D)).toLowerCase()}function w(){const D=this.resume(),O=this.stack[this.stack.length-1];O.title=D}function T(){const D=this.resume(),O=this.stack[this.stack.length-1];O.url=D}function L(D){const O=this.stack[this.stack.length-1];if(!O.depth){const H=this.sliceSerialize(D).length;O.depth=H}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function R(D){const O=this.stack[this.stack.length-1];O.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function F(D){const H=this.stack[this.stack.length-1].children;let Y=H[H.length-1];(!Y||Y.type!=="text")&&(Y=ts(),Y.position={start:Ne(D.start),end:void 0},H.push(Y)),this.stack.push(Y)}function v(D){const O=this.stack.pop();O.value+=this.sliceSerialize(D),O.position.end=Ne(D.end)}function _(D){const O=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=O.children[O.children.length-1];H.position.end=Ne(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(O.type)&&(F.call(this,D),v.call(this,D))}function C(){this.data.atHardBreak=!0}function P(){const D=this.resume(),O=this.stack[this.stack.length-1];O.value=D}function B(){const D=this.resume(),O=this.stack[this.stack.length-1];O.value=D}function M(){const D=this.resume(),O=this.stack[this.stack.length-1];O.value=D}function W(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=O,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function G(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const O=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=O,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function Z(D){const O=this.sliceSerialize(D),H=this.stack[this.stack.length-2];H.label=_c(O),H.identifier=ke(O).toLowerCase()}function re(){const D=this.stack[this.stack.length-1],O=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const Y=D.children;H.children=Y}else H.alt=O}function y(){const D=this.resume(),O=this.stack[this.stack.length-1];O.url=D}function K(){const D=this.resume(),O=this.stack[this.stack.length-1];O.title=D}function oe(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function J(D){const O=this.resume(),H=this.stack[this.stack.length-1];H.label=O,H.identifier=ke(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function I(D){this.data.characterReferenceType=D.type}function z(D){const O=this.sliceSerialize(D),H=this.data.characterReferenceType;let Y;H?(Y=Ei(O,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Y=En(O);const ee=this.stack[this.stack.length-1];ee.value+=Y}function Q(D){const O=this.stack.pop();O.position.end=Ne(D.end)}function se(D){v.call(this,D);const O=this.stack[this.stack.length-1];O.url=this.sliceSerialize(D)}function Ee(D){v.call(this,D);const O=this.stack[this.stack.length-1];O.url="mailto:"+this.sliceSerialize(D)}function _e(){return{type:"blockquote",children:[]}}function Re(){return{type:"code",lang:null,meta:null,value:""}}function Qe(){return{type:"inlineCode",value:""}}function De(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Qo(){return{type:"emphasis",children:[]}}function Xn(){return{type:"heading",depth:0,children:[]}}function Qn(){return{type:"break"}}function Zn(){return{type:"html",value:""}}function Zo(){return{type:"image",title:null,url:"",alt:null}}function Jn(){return{type:"link",title:null,url:"",children:[]}}function Kn(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Jo(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function Ko(){return{type:"paragraph",children:[]}}function es(){return{type:"strong",children:[]}}function ts(){return{type:"text",value:""}}function ns(){return{type:"thematicBreak"}}}function Ne(e){return{line:e.line,column:e.column,offset:e.offset}}function $i(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$i(e,r):Ec(e,r)}}function Ec(e,t){let n;for(n in t)if(zi.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function vr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is still open")}function Tc(e){const t=this;t.parser=n;function n(r){return Nc(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Lc(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Oc(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
- `}]}function Pc(e,t){const n=t.value?t.value+`
6
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Mc(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ac(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rc(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ge(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function Bc(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fc(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Hi(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function zc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hi(e,t);const i={src:Ge(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function $c(e,t){const n={src:Ge(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Hc(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Hi(e,t);const i={href:Ge(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Uc(e,t){const n={href:Ge(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wc(e,t,n){const r=e.all(t),i=n?qc(n):Vi(t),o={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
4
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function jc(e){const r={constructs:Ti([yc,...(e||{}).extensions||[]]),content:i(Bl),defined:[],document:i(zl),flow:i(ic),lazy:{},string:i(lc),text:i(ac)};return r;function i(o){return s;function s(l){return kc(r,o,l)}}}function Cc(e){for(;!Mi(e););return e}const wr=/[\0\t\n\r]/g;function _c(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const c=[];let u,h,d,p,f;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(wr.lastIndex=d,u=wr.exec(o),p=u&&u.index!==void 0?u.index:o.length,f=o.charCodeAt(p),!u){t=o.slice(d);break}if(f===10&&d===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<p&&(c.push(o.slice(d,p)),e+=p-d),f){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Sc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Dc(e){return e.replace(Sc,Nc)}function Nc(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Ei(n.slice(o?2:1),o?16:10)}return En(n)||e}const $i={}.hasOwnProperty;function Ic(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Tc(n)(Cc(jc(n).document().write(_c()(e,t,!0))))}function Tc(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(er),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Zn),blockQuote:o(ye),characterEscape:F,characterReference:F,codeFenced:o(ke),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ke,s),codeText:o(Qe,s),codeTextData:F,data:F,codeFlowValue:F,definition:o(Ie),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Zo),hardBreakEscape:o(Jn),hardBreakTrailing:o(Jn),htmlFlow:o(Kn,s),htmlFlowData:F,htmlText:o(Kn,s),htmlTextData:F,image:o(Jo),label:s,link:o(er),listItem:o(Ko),listItemValue:p,listOrdered:o(tr,d),listUnordered:o(tr),paragraph:o(es),reference:b,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Zn),strong:o(ts),thematicBreak:o(rs)},exit:{atxHeading:c(),atxHeadingSequence:L,autolink:c(),autolinkEmail:ge,autolinkProtocol:Z,blockQuote:c(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:I,characterReferenceMarkerNumeric:I,characterReferenceValue:z,characterReference:H,codeFenced:c(x),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:v,codeIndented:c(k),codeText:c(P),codeTextData:v,data:v,definition:c(),definitionDestinationString:E,definitionLabelString:_,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(O),htmlFlowData:v,htmlText:c(B),htmlTextData:v,image:c(Y),label:te,labelText:J,lineEnding:S,link:c(q),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:K,resourceDestinationString:y,resourceTitleString:ee,resource:oe,setextHeading:c(A),setextHeadingLineSequence:R,setextHeadingText:C,strong:c(),thematicBreak:c()}};Hi(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let M={type:"root",children:[]};const V={stack:[M],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:h,data:n},X=[];let ne=-1;for(;++ne<N.length;)if(N[ne][1].type==="listOrdered"||N[ne][1].type==="listUnordered")if(N[ne][0]==="enter")X.push(ne);else{const ve=X.pop();ne=i(N,ve,ne)}for(ne=-1;++ne<N.length;){const ve=t[N[ne][0]];$i.call(ve,N[ne][1].type)&&ve[N[ne][1].type].call(Object.assign({sliceSerialize:N[ne][2].sliceSerialize},V),N[ne][1])}if(V.tokenStack.length>0){const ve=V.tokenStack[V.tokenStack.length-1];(ve[1]||jr).call(V,void 0,ve[0])}for(M.position={start:Te(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Te(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<t.transforms.length;)M=t.transforms[ne](M)||M;return M}function i(N,M,V){let X=M-1,ne=-1,ve=!1,Le,Se,Ze,Je;for(;++X<=V;){const he=N[X];switch(he[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{he[0]==="enter"?ne++:ne--,Je=void 0;break}case"lineEndingBlank":{he[0]==="enter"&&(Le&&!Je&&!ne&&!Ze&&(Ze=X),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=void 0}if(!ne&&he[0]==="enter"&&he[1].type==="listItemPrefix"||ne===-1&&he[0]==="exit"&&(he[1].type==="listUnordered"||he[1].type==="listOrdered")){if(Le){let Be=X;for(Se=void 0;Be--;){const De=N[Be];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;Se&&(N[Se][1].type="lineEndingBlank",ve=!0),De[1].type="lineEnding",Se=Be}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}Ze&&(!Se||Ze<Se)&&(Le._spread=!0),Le.end=Object.assign({},Se?N[Se][1].start:he[1].end),N.splice(Se||X,0,["exit",Le,he[2]]),X++,V++}if(he[1].type==="listItemPrefix"){const Be={type:"listItem",_spread:!1,start:Object.assign({},he[1].start),end:void 0};Le=Be,N.splice(X,0,["enter",Be,he[2]]),X++,V++,Ze=void 0,Je=!0}}}return N[M][1]._spread=ve,V}function o(N,M){return V;function V(X){l.call(this,N(X),X),M&&M.call(this,X)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(N,M,V){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([M,V||void 0]),N.position={start:Te(M.start),end:void 0}}function c(N){return M;function M(V){N&&N.call(this,V),u.call(this,V)}}function u(N,M){const V=this.stack.pop(),X=this.tokenStack.pop();if(X)X[0].type!==N.type&&(M?M.call(this,N,X[0]):(X[1]||jr).call(this,N,X[0]));else throw new Error("Cannot close `"+N.type+"` ("+tt({start:N.start,end:N.end})+"): it’s not open");V.position.end=Te(N.end)}function h(){return Tn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(N){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function f(){const N=this.resume(),M=this.stack[this.stack.length-1];M.lang=N}function g(){const N=this.resume(),M=this.stack[this.stack.length-1];M.meta=N}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const N=this.resume(),M=this.stack[this.stack.length-1];M.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const N=this.resume(),M=this.stack[this.stack.length-1];M.value=N.replace(/(\r?\n|\r)$/g,"")}function _(N){const M=this.resume(),V=this.stack[this.stack.length-1];V.label=M,V.identifier=je(this.sliceSerialize(N)).toLowerCase()}function w(){const N=this.resume(),M=this.stack[this.stack.length-1];M.title=N}function E(){const N=this.resume(),M=this.stack[this.stack.length-1];M.url=N}function L(N){const M=this.stack[this.stack.length-1];if(!M.depth){const V=this.sliceSerialize(N).length;M.depth=V}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(N){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function F(N){const V=this.stack[this.stack.length-1].children;let X=V[V.length-1];(!X||X.type!=="text")&&(X=ns(),X.position={start:Te(N.start),end:void 0},V.push(X)),this.stack.push(X)}function v(N){const M=this.stack.pop();M.value+=this.sliceSerialize(N),M.position.end=Te(N.end)}function S(N){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const V=M.children[M.children.length-1];V.position.end=Te(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(F.call(this,N),v.call(this,N))}function j(){this.data.atHardBreak=!0}function O(){const N=this.resume(),M=this.stack[this.stack.length-1];M.value=N}function B(){const N=this.resume(),M=this.stack[this.stack.length-1];M.value=N}function P(){const N=this.resume(),M=this.stack[this.stack.length-1];M.value=N}function q(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=M,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function Y(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=M,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function J(N){const M=this.sliceSerialize(N),V=this.stack[this.stack.length-2];V.label=Dc(M),V.identifier=je(M).toLowerCase()}function te(){const N=this.stack[this.stack.length-1],M=this.resume(),V=this.stack[this.stack.length-1];if(this.data.inReference=!0,V.type==="link"){const X=N.children;V.children=X}else V.alt=M}function y(){const N=this.resume(),M=this.stack[this.stack.length-1];M.url=N}function ee(){const N=this.resume(),M=this.stack[this.stack.length-1];M.title=N}function oe(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function K(N){const M=this.resume(),V=this.stack[this.stack.length-1];V.label=M,V.identifier=je(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function I(N){this.data.characterReferenceType=N.type}function z(N){const M=this.sliceSerialize(N),V=this.data.characterReferenceType;let X;V?(X=Ei(M,V==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):X=En(M);const ne=this.stack[this.stack.length-1];ne.value+=X}function H(N){const M=this.stack.pop();M.position.end=Te(N.end)}function Z(N){v.call(this,N);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(N)}function ge(N){v.call(this,N);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(N)}function ye(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function Qe(){return{type:"inlineCode",value:""}}function Ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zo(){return{type:"emphasis",children:[]}}function Zn(){return{type:"heading",depth:0,children:[]}}function Jn(){return{type:"break"}}function Kn(){return{type:"html",value:""}}function Jo(){return{type:"image",title:null,url:"",alt:null}}function er(){return{type:"link",title:null,url:"",children:[]}}function tr(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Ko(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function es(){return{type:"paragraph",children:[]}}function ts(){return{type:"strong",children:[]}}function ns(){return{type:"text",value:""}}function rs(){return{type:"thematicBreak"}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function Hi(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Hi(e,r):Ec(e,r)}}function Ec(e,t){let n;for(n in t)if($i.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function jr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is still open")}function Lc(e){const t=this;t.parser=n;function n(r){return Ic(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Oc(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Pc(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function Mc(e,t){const n=t.value?t.value+`
6
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Ac(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rc(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bc(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ge(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function Fc(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zc(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vi(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function $c(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vi(e,t);const i={src:Ge(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Hc(e,t){const n={src:Ge(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Vc(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Wc(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vi(e,t);const i={href:Ge(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Uc(e,t){const n={href:Ge(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qc(e,t,n){const r=e.all(t),i=n?Yc(n):Wi(t),o={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
7
7
  `}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
8
- `});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function qc(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Vi(n[r])}return t}function Vi(e){const t=e.spread;return t??e.children.length>1}function Yc(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Gc(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xc(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Qc(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zc(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Sn(t.children[1]),c=wi(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Jc(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const d=t.children[c],p={},f=s?s[c]:void 0;f&&(p.align=f);let g={type:"element",tagName:o,properties:p,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),u.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,h),e.applyData(t,h)}function Kc(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const wr=9,jr=32;function eu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Cr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Cr(t.slice(i),i>0,!1)),o.join("")}function Cr(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===wr||o===jr;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===wr||o===jr;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function tu(e,t){const n={type:"text",value:eu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ru={blockquote:Lc,break:Oc,code:Pc,delete:Mc,emphasis:Ac,footnoteReference:Rc,heading:Bc,html:Fc,imageReference:zc,image:$c,inlineCode:Hc,linkReference:Vc,link:Uc,listItem:Wc,list:Yc,paragraph:Gc,root:Xc,strong:Qc,table:Zc,tableCell:Kc,tableRow:Jc,text:tu,thematicBreak:nu,toml:ut,yaml:ut,definition:ut,footnoteDefinition:ut};function ut(){}const Ui=-1,_t=0,rt=1,kt=2,Ln=3,On=4,Pn=5,Mn=6,Wi=7,qi=8,Sr=typeof self=="object"?self:globalThis,iu=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case _t:case Ui:return n(s,i);case rt:{const l=n([],i);for(const c of s)l.push(r(c));return l}case kt:{const l=n({},i);for(const[c,u]of s)l[r(c)]=r(u);return l}case Ln:return n(new Date(s),i);case On:{const{source:l,flags:c}=s;return n(new RegExp(l,c),i)}case Pn:{const l=n(new Map,i);for(const[c,u]of s)l.set(r(c),r(u));return l}case Mn:{const l=n(new Set,i);for(const c of s)l.add(r(c));return l}case Wi:{const{name:l,message:c}=s;return n(new Sr[l](c),i)}case qi:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new Sr[o](s),i)};return r},_r=e=>iu(new Map,e)(0),ze="",{toString:ou}={},{keys:su}=Object,et=e=>{const t=typeof e;if(t!=="object"||!e)return[_t,t];const n=ou.call(e).slice(8,-1);switch(n){case"Array":return[rt,ze];case"Object":return[kt,ze];case"Date":return[Ln,ze];case"RegExp":return[On,ze];case"Map":return[Pn,ze];case"Set":return[Mn,ze];case"DataView":return[rt,n]}return n.includes("Array")?[rt,n]:n.includes("Error")?[Wi,n]:[kt,n]},dt=([e,t])=>e===_t&&(t==="function"||t==="symbol"),lu=(e,t,n,r)=>{const i=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},o=s=>{if(n.has(s))return n.get(s);let[l,c]=et(s);switch(l){case _t:{let h=s;switch(c){case"bigint":l=qi,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([Ui],s)}return i([l,h],s)}case rt:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),i([c,[...p]],s)}const h=[],d=i([l,h],s);for(const p of s)h.push(o(p));return d}case kt:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const h=[],d=i([l,h],s);for(const p of su(s))(e||!dt(et(s[p])))&&h.push([o(p),o(s[p])]);return d}case Ln:return i([l,s.toISOString()],s);case On:{const{source:h,flags:d}=s;return i([l,{source:h,flags:d}],s)}case Pn:{const h=[],d=i([l,h],s);for(const[p,f]of s)(e||!(dt(et(p))||dt(et(f))))&&h.push([o(p),o(f)]);return d}case Mn:{const h=[],d=i([l,h],s);for(const p of s)(e||!dt(et(p)))&&h.push(o(p));return d}}const{message:u}=s;return i([l,{name:c,message:u}],s)};return o},Dr=(e,{json:t,lossy:n}={})=>{const r=[];return lu(!(t||n),!!t,new Map,r)(e),r},vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?_r(Dr(e,t)):structuredClone(e):(e,t)=>_r(Dr(e,t));function au(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function cu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function uu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||au,r=e.options.footnoteBackLabel||cu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const h=e.all(u),d=String(u.identifier).toUpperCase(),p=Ge(d.toLowerCase());let f=0;const g=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++f<=m;){g.length>0&&g.push({type:"text",value:" "});let S=typeof n=="string"?n:n(c,f);typeof S=="string"&&(S={type:"text",value:S}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,f),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const x=h[h.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const S=x.children[x.children.length-1];S&&S.type==="text"?S.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...g)}else h.push(...g);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...vt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
8
+ `});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function Yc(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Wi(n[r])}return t}function Wi(e){const t=e.spread;return t??e.children.length>1}function Gc(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Xc(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qc(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Zc(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jc(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Sn(t.children[1]),c=ji(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Kc(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const d=t.children[c],p={},f=s?s[c]:void 0;f&&(p.align=f);let g={type:"element",tagName:o,properties:p,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),u.push(g)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,h),e.applyData(t,h)}function eu(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Cr=9,_r=32;function tu(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Sr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Sr(t.slice(i),i>0,!1)),o.join("")}function Sr(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Cr||o===_r;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Cr||o===_r;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function nu(e,t){const n={type:"text",value:tu(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ru(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const iu={blockquote:Oc,break:Pc,code:Mc,delete:Ac,emphasis:Rc,footnoteReference:Bc,heading:Fc,html:zc,imageReference:$c,image:Hc,inlineCode:Vc,linkReference:Wc,link:Uc,listItem:qc,list:Gc,paragraph:Xc,root:Qc,strong:Zc,table:Jc,tableCell:eu,tableRow:Kc,text:nu,thematicBreak:ru,toml:ut,yaml:ut,definition:ut,footnoteDefinition:ut};function ut(){}const Ui=-1,St=0,rt=1,kt=2,On=3,Pn=4,Mn=5,An=6,qi=7,Yi=8,Dr=typeof self=="object"?self:globalThis,ou=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case St:case Ui:return n(s,i);case rt:{const l=n([],i);for(const c of s)l.push(r(c));return l}case kt:{const l=n({},i);for(const[c,u]of s)l[r(c)]=r(u);return l}case On:return n(new Date(s),i);case Pn:{const{source:l,flags:c}=s;return n(new RegExp(l,c),i)}case Mn:{const l=n(new Map,i);for(const[c,u]of s)l.set(r(c),r(u));return l}case An:{const l=n(new Set,i);for(const c of s)l.add(r(c));return l}case qi:{const{name:l,message:c}=s;return n(new Dr[l](c),i)}case Yi:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new Dr[o](s),i)};return r},Nr=e=>ou(new Map,e)(0),ze="",{toString:su}={},{keys:lu}=Object,et=e=>{const t=typeof e;if(t!=="object"||!e)return[St,t];const n=su.call(e).slice(8,-1);switch(n){case"Array":return[rt,ze];case"Object":return[kt,ze];case"Date":return[On,ze];case"RegExp":return[Pn,ze];case"Map":return[Mn,ze];case"Set":return[An,ze];case"DataView":return[rt,n]}return n.includes("Array")?[rt,n]:n.includes("Error")?[qi,n]:[kt,n]},dt=([e,t])=>e===St&&(t==="function"||t==="symbol"),au=(e,t,n,r)=>{const i=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},o=s=>{if(n.has(s))return n.get(s);let[l,c]=et(s);switch(l){case St:{let h=s;switch(c){case"bigint":l=Yi,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([Ui],s)}return i([l,h],s)}case rt:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),i([c,[...p]],s)}const h=[],d=i([l,h],s);for(const p of s)h.push(o(p));return d}case kt:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const h=[],d=i([l,h],s);for(const p of lu(s))(e||!dt(et(s[p])))&&h.push([o(p),o(s[p])]);return d}case On:return i([l,s.toISOString()],s);case Pn:{const{source:h,flags:d}=s;return i([l,{source:h,flags:d}],s)}case Mn:{const h=[],d=i([l,h],s);for(const[p,f]of s)(e||!(dt(et(p))||dt(et(f))))&&h.push([o(p),o(f)]);return d}case An:{const h=[],d=i([l,h],s);for(const p of s)(e||!dt(et(p)))&&h.push(o(p));return d}}const{message:u}=s;return i([l,{name:c,message:u}],s)};return o},Ir=(e,{json:t,lossy:n}={})=>{const r=[];return au(!(t||n),!!t,new Map,r)(e),r},vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Nr(Ir(e,t)):structuredClone(e):(e,t)=>Nr(Ir(e,t));function cu(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function uu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function du(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||cu,r=e.options.footnoteBackLabel||uu,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const h=e.all(u),d=String(u.identifier).toUpperCase(),p=Ge(d.toLowerCase());let f=0;const g=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++f<=m;){g.length>0&&g.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,f);typeof _=="string"&&(_={type:"text",value:_}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,f),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const x=h[h.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const _=x.children[x.children.length-1];_&&_.type==="text"?_.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...g)}else h.push(...g);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...vt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
9
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
10
- `}]}}const Dt=function(e){if(e==null)return pu;if(typeof e=="function")return Nt(e);if(typeof e=="object")return Array.isArray(e)?du(e):hu(e);if(typeof e=="string")return fu(e);throw new Error("Expected function, string, or object as test")};function du(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dt(e[n]);return Nt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function hu(e){const t=e;return Nt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function fu(e){return Nt(t);function t(n){return n&&n.type===e}}function Nt(e){return t;function t(n,r,i){return!!(gu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function pu(){return!0}function gu(e){return e!==null&&typeof e=="object"&&"type"in e}const Yi=[],mu=!0,cn=!1,bu="skip";function Gi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Dt(i),s=r?-1:1;l(e,void 0,[])();function l(c,u,h){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Yi,g,m,x;if((!t||o(c,u,h[h.length-1]||void 0))&&(f=xu(n(c,h)),f[0]===cn))return f;if("children"in c&&c.children){const k=c;if(k.children&&f[0]!==bu)for(m=(r?k.children.length:-1)+s,x=h.concat(k);m>-1&&m<k.children.length;){const S=k.children[m];if(g=l(S,m,x)(),g[0]===cn)return g;m=typeof g[1]=="number"?g[1]:m+s}}return f}}}function xu(e){return Array.isArray(e)?e:typeof e=="number"?[mu,e]:e==null?Yi:[e]}function An(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Gi(e,o,l,i);function l(c,u){const h=u[u.length-1],d=h?h.children.indexOf(c):void 0;return s(c,d,h)}}const un={}.hasOwnProperty,yu={};function ku(e,t){const n=t||yu,r=new Map,i=new Map,o=new Map,s={...ru,...n.handlers},l={all:u,applyData:wu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:c,options:n,patch:vu,wrap:Cu};return An(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function c(h,d){const p=h.type,f=l.handlers[p];if(un.call(l.handlers,p)&&f)return f(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:m,...x}=h,k=vt(x);return k.children=l.all(h),k}return vt(h)}return(l.options.unknownHandler||ju)(l,h,d)}function u(h){const d=[];if("children"in h){const p=h.children;let f=-1;for(;++f<p.length;){const g=l.one(p[f],h);if(g){if(f&&p[f-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Nr(g.value)),!Array.isArray(g)&&g.type==="element")){const m=g.children[0];m&&m.type==="text"&&(m.value=Nr(m.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function vu(e,t){e.position&&(t.position=cl(e))}function wu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,vt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function ju(e,t){const n=t.data||{},r="value"in t&&!(un.call(n,"hProperties")||un.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Cu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
10
+ `}]}}const Dt=function(e){if(e==null)return gu;if(typeof e=="function")return Nt(e);if(typeof e=="object")return Array.isArray(e)?hu(e):fu(e);if(typeof e=="string")return pu(e);throw new Error("Expected function, string, or object as test")};function hu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dt(e[n]);return Nt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function fu(e){const t=e;return Nt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function pu(e){return Nt(t);function t(n){return n&&n.type===e}}function Nt(e){return t;function t(n,r,i){return!!(mu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function gu(){return!0}function mu(e){return e!==null&&typeof e=="object"&&"type"in e}const Gi=[],bu=!0,cn=!1,xu="skip";function Xi(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Dt(i),s=r?-1:1;l(e,void 0,[])();function l(c,u,h){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Gi,g,m,x;if((!t||o(c,u,h[h.length-1]||void 0))&&(f=yu(n(c,h)),f[0]===cn))return f;if("children"in c&&c.children){const k=c;if(k.children&&f[0]!==xu)for(m=(r?k.children.length:-1)+s,x=h.concat(k);m>-1&&m<k.children.length;){const _=k.children[m];if(g=l(_,m,x)(),g[0]===cn)return g;m=typeof g[1]=="number"?g[1]:m+s}}return f}}}function yu(e){return Array.isArray(e)?e:typeof e=="number"?[bu,e]:e==null?Gi:[e]}function Rn(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Xi(e,o,l,i);function l(c,u){const h=u[u.length-1],d=h?h.children.indexOf(c):void 0;return s(c,d,h)}}const un={}.hasOwnProperty,ku={};function vu(e,t){const n=t||ku,r=new Map,i=new Map,o=new Map,s={...iu,...n.handlers},l={all:u,applyData:ju,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:c,options:n,patch:wu,wrap:_u};return Rn(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function c(h,d){const p=h.type,f=l.handlers[p];if(un.call(l.handlers,p)&&f)return f(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:m,...x}=h,k=vt(x);return k.children=l.all(h),k}return vt(h)}return(l.options.unknownHandler||Cu)(l,h,d)}function u(h){const d=[];if("children"in h){const p=h.children;let f=-1;for(;++f<p.length;){const g=l.one(p[f],h);if(g){if(f&&p[f-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Tr(g.value)),!Array.isArray(g)&&g.type==="element")){const m=g.children[0];m&&m.type==="text"&&(m.value=Tr(m.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function wu(e,t){e.position&&(t.position=ul(e))}function ju(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,vt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Cu(e,t){const n=t.data||{},r="value"in t&&!(un.call(n,"hProperties")||un.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _u(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
11
  `});++r<e.length;)r&&n.push({type:"text",value:`
12
12
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
- `}),n}function Nr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ir(e,t){const n=ku(e,t),r=n.one(e,void 0),i=uu(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
- `},i),o}function Su(e,t){return e&&"run"in e?async function(n,r){const i=Ir(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ir(n,{file:r,...e||t})}}function Er(e){if(e)throw e}var mt=Object.prototype.hasOwnProperty,Xi=Object.prototype.toString,Tr=Object.defineProperty,Lr=Object.getOwnPropertyDescriptor,Or=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Xi.call(t)==="[object Array]"},Pr=function(t){if(!t||Xi.call(t)!=="[object Object]")return!1;var n=mt.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&mt.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||mt.call(t,i)},Mr=function(t,n){Tr&&n.name==="__proto__"?Tr(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Ar=function(t,n){if(n==="__proto__")if(mt.call(t,n)){if(Lr)return Lr(t,n).value}else return;return t[n]},_u=function e(){var t,n,r,i,o,s,l=arguments[0],c=1,u=arguments.length,h=!1;for(typeof l=="boolean"&&(h=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=Ar(l,n),i=Ar(t,n),l!==i&&(h&&i&&(Pr(i)||(o=Or(i)))?(o?(o=!1,s=r&&Or(r)?r:[]):s=r&&Pr(r)?r:{},Mr(l,{name:n,newValue:e(h,s,i)})):typeof i<"u"&&Mr(l,{name:n,newValue:i}));return l};const Ft=jn(_u);function dn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Du(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(c,...u){const h=e[++o];let d=-1;if(c){s(c);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,h?Nu(h,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Nu(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(i);try{c=e.apply(this,s)}catch(u){const h=u;if(l&&n)throw h;return i(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const ve={basename:Iu,dirname:Eu,extname:Tu,join:Lu,sep:"/"};function Iu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ct(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Eu(e){if(ct(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Tu(e){ct(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Lu(...e){let t=-1,n;for(;++t<e.length;)ct(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Ou(n)}function Ou(e){ct(e);const t=e.codePointAt(0)===47;let n=Pu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Pu(e,t){let n="",r=0,i=-1,o=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function ct(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mu={cwd:Au};function Au(){return"/"}function hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ru(e){if(typeof e=="string")e=new URL(e);else if(!hn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Bu(e)}function Bu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const zt=["history","path","basename","stem","extname","dirname"];class Qi{constructor(t){let n;t?hn(t)?n={path:t}:typeof t=="string"||Fu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zt.length;){const o=zt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)zt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ve.basename(this.path):void 0}set basename(t){Ht(t,"basename"),$t(t,"basename"),this.path=ve.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ve.dirname(this.path):void 0}set dirname(t){Rr(this.basename,"dirname"),this.path=ve.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ve.extname(this.path):void 0}set extname(t){if($t(t,"extname"),Rr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ve.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hn(t)&&(t=Ru(t)),Ht(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ve.basename(this.path,this.extname):void 0}set stem(t){Ht(t,"stem"),$t(t,"stem"),this.path=ve.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ae(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function $t(e,t){if(e&&e.includes(ve.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ve.sep+"`")}function Ht(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Fu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zu=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},$u={}.hasOwnProperty;class Rn extends zu{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=Du()}copy(){const t=new Rn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ft(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Wt("data",this.frozen),this.namespace[t]=n,this):$u.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Wt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ht(t),r=this.parser||this.Parser;return Vt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vt("process",this.parser||this.Parser),Ut("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=ht(t),c=r.parse(l);r.run(c,l,function(h,d,p){if(h||!d||!p)return u(h);const f=d,g=r.stringify(f,p);Uu(g)?p.value=g:p.result=g,u(h,p)});function u(h,d){h||!d?s(h):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Vt("processSync",this.parser||this.Parser),Ut("processSync",this.compiler||this.Compiler),this.process(t,i),Fr("processSync","process",n),r;function i(o,s){n=!0,Er(o),r=s}}run(t,n,r){Br(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const c=ht(n);i.run(t,c,u);function u(h,d,p){const f=d||t;h?l(h):s?s(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Fr("runSync","run",r),i;function o(s,l){Er(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=ht(n),i=this.compiler||this.Compiler;return Ut("stringify",i),Br(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Wt("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[h,...d]=u;c(h,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Ft(!0,i.settings,u.settings))}function l(u){let h=-1;if(u!=null)if(Array.isArray(u))for(;++h<u.length;){const d=u[h];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,h){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===u){p=d;break}if(p===-1)r.push([u,...h]);else if(h.length>0){let[f,...g]=h;const m=r[p][1];dn(m)&&dn(f)&&(f=Ft(!0,m,f)),r[p]=[u,f,...g]}}}}const Hu=new Rn().freeze();function Vt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ut(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Br(e){if(!dn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ht(e){return Vu(e)?e:new Qi(e)}function Vu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Uu(e){return typeof e=="string"||Wu(e)}function Wu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zr=[],$r={allowDangerousHtml:!0},Yu=/^(https?|ircs?|mailto|xmpp)$/i,Gu=[{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 Xu(e){const t=Qu(e),n=Zu(e);return Ju(t.runSync(t.parse(n),n),e)}function Qu(e){const t=e.rehypePlugins||zr,n=e.remarkPlugins||zr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$r}:$r;return Hu().use(Tc).use(n).use(Su,r).use(t)}function Zu(e){const t=e.children||"",n=new Qi;return typeof t=="string"&&(n.value=t),n}function Ju(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Ku;for(const h of Gu)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+qu+h.id,void 0);return An(e,u),pl(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function u(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return s?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let f;for(f in At)if(Object.hasOwn(At,f)&&Object.hasOwn(h.properties,f)){const g=h.properties[f],m=At[f];(m===null||m.includes(h.tagName))&&(h.properties[f]=c(String(g||""),f,h))}}if(h.type==="element"){let f=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(h,d,p)),f&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function Ku(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Yu.test(e.slice(0,t))?e:""}function Hr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ed(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function td(e,t,n){const i=Dt((n||{}).ignore||[]),o=nd(t);let s=-1;for(;++s<o.length;)Gi(e,"text",l);function l(u,h){let d=-1,p;for(;++d<h.length;){const f=h[d],g=p?p.children:void 0;if(i(f,g?g.indexOf(f):void 0,p))return;p=f}if(p)return c(u,h)}function c(u,h){const d=h[h.length-1],p=o[s][0],f=o[s][1];let g=0;const x=d.children.indexOf(u);let k=!1,S=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const T=w.index,L={index:w.index,input:w.input,stack:[...h,u]};let j=f(...w,L);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=T+1:(g!==T&&S.push({type:"text",value:u.value.slice(g,T)}),Array.isArray(j)?S.push(...j):j&&S.push(j),g=T+w[0].length,k=!0),!p.global)break;w=p.exec(u.value)}return k?(g<u.value.length&&S.push({type:"text",value:u.value.slice(g)}),d.children.splice(x,1,...S)):S=[u],x+S.length}}function nd(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([rd(i[0]),id(i[1])])}return t}function rd(e){return typeof e=="string"?new RegExp(ed(e),"g"):e}function id(e){return typeof e=="function"?e:function(){return e}}const qt="phrasing",Yt=["autolink","link","image","label"];function od(){return{transforms:[hd],enter:{literalAutolink:ld,literalAutolinkEmail:Gt,literalAutolinkHttp:Gt,literalAutolinkWww:Gt},exit:{literalAutolink:dd,literalAutolinkEmail:ud,literalAutolinkHttp:ad,literalAutolinkWww:cd}}}function sd(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:":",before:"[ps]",after:"\\/",inConstruct:qt,notInConstruct:Yt}]}}function ld(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gt(e){this.config.enter.autolinkProtocol.call(this,e)}function ad(e){this.config.exit.autolinkProtocol.call(this,e)}function cd(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function ud(e){this.config.exit.autolinkEmail.call(this,e)}function dd(e){this.exit(e)}function hd(e){td(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fd],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),pd]],{ignore:["link","linkReference"]})}function fd(e,t,n,r,i){let o="";if(!Zi(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!gd(n)))return!1;const s=md(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function pd(e,t,n,r){return!Zi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function gd(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function md(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Hr(e,"(");let o=Hr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Zi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Pe(n)||Ct(n))&&(!t||n!==47)}Ji.peek=Sd;function bd(){this.buffer()}function xd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yd(){this.buffer()}function kd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ke(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wd(e){this.exit(e)}function jd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ke(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Cd(e){this.exit(e)}function Sd(){return"["}function Ji(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function _d(){return{enter:{gfmFootnoteCallString:bd,gfmFootnoteCall:xd,gfmFootnoteDefinitionLabelString:yd,gfmFootnoteDefinition:kd},exit:{gfmFootnoteCallString:vd,gfmFootnoteCall:wd,gfmFootnoteDefinitionLabelString:jd,gfmFootnoteDefinition:Cd}}}function Dd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ji},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let c=l.move("[^");const u=o.enter("footnoteDefinition"),h=o.enter("label");return c+=l.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
15
- `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?Ki:Nd))),u(),c}}function Nd(e,t,n){return t===0?e:Ki(e,t,n)}function Ki(e,t,n){return(n?"":" ")+e}const Id=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];eo.peek=Pd;function Ed(){return{canContainEols:["delete"],enter:{strikethrough:Ld},exit:{strikethrough:Od}}}function Td(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Id}],handlers:{delete:eo}}}function Ld(e){this.enter({type:"delete",children:[]},e)}function Od(e){this.exit(e)}function eo(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function Pd(){return"~"}function Md(e){return e.length}function Ad(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Md,o=[],s=[],l=[],c=[];let u=0,h=-1;for(;++h<e.length;){const m=[],x=[];let k=-1;for(e[h].length>u&&(u=e[h].length);++k<e[h].length;){const S=Rd(e[h][k]);if(n.alignDelimiters!==!1){const w=i(S);x[k]=w,(c[k]===void 0||w>c[k])&&(c[k]=w)}m.push(S)}s[h]=m,l[h]=x}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=Vr(r[d]);else{const m=Vr(r);for(;++d<u;)o[d]=m}d=-1;const p=[],f=[];for(;++d<u;){const m=o[d];let x="",k="";m===99?(x=":",k=":"):m===108?x=":":m===114&&(k=":");let S=n.alignDelimiters===!1?1:Math.max(1,c[d]-x.length-k.length);const w=x+"-".repeat(S)+k;n.alignDelimiters!==!1&&(S=x.length+S+k.length,S>c[d]&&(c[d]=S),f[d]=S),p[d]=w}s.splice(1,0,p),l.splice(1,0,f),h=-1;const g=[];for(;++h<s.length;){const m=s[h],x=l[h];d=-1;const k=[];for(;++d<u;){const S=m[d]||"";let w="",T="";if(n.alignDelimiters!==!1){const L=c[d]-(x[d]||0),j=o[d];j===114?w=" ".repeat(L):j===99?L%2?(w=" ".repeat(L/2+.5),T=" ".repeat(L/2-.5)):(w=" ".repeat(L/2),T=w):T=" ".repeat(L)}n.delimiterStart!==!1&&!d&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||d)&&k.push(" "),n.alignDelimiters!==!1&&k.push(w),k.push(S),n.alignDelimiters!==!1&&k.push(T),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&k.push("|")}g.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return g.join(`
16
- `)}function Rd(e){return e==null?"":String(e)}function Vr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Bd(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),Fd);return i(),s}function Fd(e,t,n){return">"+(n?"":" ")+e}function zd(e,t){return Ur(e,t.inConstruct,!0)&&!Ur(e,t.notInConstruct,!1)}function Ur(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Wr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
- `&&zd(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
- `}function $d(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function Hd(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Vd(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Ud(e,t,n,r){const i=Vd(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Hd(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,Wd);return d(),p}const l=n.createTracker(r),c=i.repeat(Math.max($d(o,i)+1,3)),u=n.enter("codeFenced");let h=l.move(c);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
13
+ `}),n}function Tr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Er(e,t){const n=vu(e,t),r=n.one(e,void 0),i=du(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
+ `},i),o}function Su(e,t){return e&&"run"in e?async function(n,r){const i=Er(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Er(n,{file:r,...e||t})}}function Lr(e){if(e)throw e}var mt=Object.prototype.hasOwnProperty,Qi=Object.prototype.toString,Or=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Mr=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Qi.call(t)==="[object Array]"},Ar=function(t){if(!t||Qi.call(t)!=="[object Object]")return!1;var n=mt.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&mt.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||mt.call(t,i)},Rr=function(t,n){Or&&n.name==="__proto__"?Or(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Br=function(t,n){if(n==="__proto__")if(mt.call(t,n)){if(Pr)return Pr(t,n).value}else return;return t[n]},Du=function e(){var t,n,r,i,o,s,l=arguments[0],c=1,u=arguments.length,h=!1;for(typeof l=="boolean"&&(h=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=Br(l,n),i=Br(t,n),l!==i&&(h&&i&&(Ar(i)||(o=Mr(i)))?(o?(o=!1,s=r&&Mr(r)?r:[]):s=r&&Ar(r)?r:{},Rr(l,{name:n,newValue:e(h,s,i)})):typeof i<"u"&&Rr(l,{name:n,newValue:i}));return l};const Ft=Cn(Du);function dn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nu(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(c,...u){const h=e[++o];let d=-1;if(c){s(c);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,h?Iu(h,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Iu(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(i);try{c=e.apply(this,s)}catch(u){const h=u;if(l&&n)throw h;return i(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const Ce={basename:Tu,dirname:Eu,extname:Lu,join:Ou,sep:"/"};function Tu(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ct(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Eu(e){if(ct(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Lu(e){ct(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Ou(...e){let t=-1,n;for(;++t<e.length;)ct(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Pu(n)}function Pu(e){ct(e);const t=e.codePointAt(0)===47;let n=Mu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Mu(e,t){let n="",r=0,i=-1,o=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function ct(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Au={cwd:Ru};function Ru(){return"/"}function hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Bu(e){if(typeof e=="string")e=new URL(e);else if(!hn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Fu(e)}function Fu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const zt=["history","path","basename","stem","extname","dirname"];class Zi{constructor(t){let n;t?hn(t)?n={path:t}:typeof t=="string"||zu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Au.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zt.length;){const o=zt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)zt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ce.basename(this.path):void 0}set basename(t){Ht(t,"basename"),$t(t,"basename"),this.path=Ce.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ce.dirname(this.path):void 0}set dirname(t){Fr(this.basename,"dirname"),this.path=Ce.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ce.extname(this.path):void 0}set extname(t){if($t(t,"extname"),Fr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ce.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hn(t)&&(t=Bu(t)),Ht(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ce.basename(this.path,this.extname):void 0}set stem(t){Ht(t,"stem"),$t(t,"stem"),this.path=Ce.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ae(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function $t(e,t){if(e&&e.includes(Ce.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ce.sep+"`")}function Ht(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $u=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Hu={}.hasOwnProperty;class Bn extends $u{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=Nu()}copy(){const t=new Bn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ft(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ut("data",this.frozen),this.namespace[t]=n,this):Hu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ut("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ht(t),r=this.parser||this.Parser;return Vt("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vt("process",this.parser||this.Parser),Wt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=ht(t),c=r.parse(l);r.run(c,l,function(h,d,p){if(h||!d||!p)return u(h);const f=d,g=r.stringify(f,p);Uu(g)?p.value=g:p.result=g,u(h,p)});function u(h,d){h||!d?s(h):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Vt("processSync",this.parser||this.Parser),Wt("processSync",this.compiler||this.Compiler),this.process(t,i),$r("processSync","process",n),r;function i(o,s){n=!0,Lr(o),r=s}}run(t,n,r){zr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const c=ht(n);i.run(t,c,u);function u(h,d,p){const f=d||t;h?l(h):s?s(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),$r("runSync","run",r),i;function o(s,l){Lr(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=ht(n),i=this.compiler||this.Compiler;return Wt("stringify",i),zr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ut("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[h,...d]=u;c(h,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Ft(!0,i.settings,u.settings))}function l(u){let h=-1;if(u!=null)if(Array.isArray(u))for(;++h<u.length;){const d=u[h];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,h){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===u){p=d;break}if(p===-1)r.push([u,...h]);else if(h.length>0){let[f,...g]=h;const m=r[p][1];dn(m)&&dn(f)&&(f=Ft(!0,m,f)),r[p]=[u,f,...g]}}}}const Vu=new Bn().freeze();function Vt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ut(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zr(e){if(!dn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $r(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ht(e){return Wu(e)?e:new Zi(e)}function Wu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Uu(e){return typeof e=="string"||qu(e)}function qu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hr=[],Vr={allowDangerousHtml:!0},Gu=/^(https?|ircs?|mailto|xmpp)$/i,Xu=[{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 Qu(e){const t=Zu(e),n=Ju(e);return Ku(t.runSync(t.parse(n),n),e)}function Zu(e){const t=e.rehypePlugins||Hr,n=e.remarkPlugins||Hr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vr}:Vr;return Vu().use(Lc).use(n).use(Su,r).use(t)}function Ju(e){const t=e.children||"",n=new Zi;return typeof t=="string"&&(n.value=t),n}function Ku(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||ed;for(const h of Xu)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Yu+h.id,void 0);return Rn(e,u),gl(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function u(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return s?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let f;for(f in At)if(Object.hasOwn(At,f)&&Object.hasOwn(h.properties,f)){const g=h.properties[f],m=At[f];(m===null||m.includes(h.tagName))&&(h.properties[f]=c(String(g||""),f,h))}}if(h.type==="element"){let f=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!f&&r&&typeof d=="number"&&(f=!r(h,d,p)),f&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function ed(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Gu.test(e.slice(0,t))?e:""}function Wr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function td(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function nd(e,t,n){const i=Dt((n||{}).ignore||[]),o=rd(t);let s=-1;for(;++s<o.length;)Xi(e,"text",l);function l(u,h){let d=-1,p;for(;++d<h.length;){const f=h[d],g=p?p.children:void 0;if(i(f,g?g.indexOf(f):void 0,p))return;p=f}if(p)return c(u,h)}function c(u,h){const d=h[h.length-1],p=o[s][0],f=o[s][1];let g=0;const x=d.children.indexOf(u);let k=!1,_=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const E=w.index,L={index:w.index,input:w.input,stack:[...h,u]};let C=f(...w,L);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?p.lastIndex=E+1:(g!==E&&_.push({type:"text",value:u.value.slice(g,E)}),Array.isArray(C)?_.push(...C):C&&_.push(C),g=E+w[0].length,k=!0),!p.global)break;w=p.exec(u.value)}return k?(g<u.value.length&&_.push({type:"text",value:u.value.slice(g)}),d.children.splice(x,1,..._)):_=[u],x+_.length}}function rd(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([id(i[0]),od(i[1])])}return t}function id(e){return typeof e=="string"?new RegExp(td(e),"g"):e}function od(e){return typeof e=="function"?e:function(){return e}}const qt="phrasing",Yt=["autolink","link","image","label"];function sd(){return{transforms:[fd],enter:{literalAutolink:ad,literalAutolinkEmail:Gt,literalAutolinkHttp:Gt,literalAutolinkWww:Gt},exit:{literalAutolink:hd,literalAutolinkEmail:dd,literalAutolinkHttp:cd,literalAutolinkWww:ud}}}function ld(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:":",before:"[ps]",after:"\\/",inConstruct:qt,notInConstruct:Yt}]}}function ad(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gt(e){this.config.enter.autolinkProtocol.call(this,e)}function cd(e){this.config.exit.autolinkProtocol.call(this,e)}function ud(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function dd(e){this.config.exit.autolinkEmail.call(this,e)}function hd(e){this.exit(e)}function fd(e){nd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pd],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),gd]],{ignore:["link","linkReference"]})}function pd(e,t,n,r,i){let o="";if(!Ji(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!md(n)))return!1;const s=bd(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function gd(e,t,n,r){return!Ji(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function md(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function bd(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Wr(e,"(");let o=Wr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Ji(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Me(n)||Ct(n))&&(!t||n!==47)}Ki.peek=Sd;function xd(){this.buffer()}function yd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kd(){this.buffer()}function vd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jd(e){this.exit(e)}function Cd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _d(e){this.exit(e)}function Sd(){return"["}function Ki(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function Dd(){return{enter:{gfmFootnoteCallString:xd,gfmFootnoteCall:yd,gfmFootnoteDefinitionLabelString:kd,gfmFootnoteDefinition:vd},exit:{gfmFootnoteCallString:wd,gfmFootnoteCall:jd,gfmFootnoteDefinitionLabelString:Cd,gfmFootnoteDefinition:_d}}}function Nd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ki},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let c=l.move("[^");const u=o.enter("footnoteDefinition"),h=o.enter("label");return c+=l.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
15
+ `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?eo:Id))),u(),c}}function Id(e,t,n){return t===0?e:eo(e,t,n)}function eo(e,t,n){return(n?"":" ")+e}const Td=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];to.peek=Md;function Ed(){return{canContainEols:["delete"],enter:{strikethrough:Od},exit:{strikethrough:Pd}}}function Ld(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Td}],handlers:{delete:to}}}function Od(e){this.enter({type:"delete",children:[]},e)}function Pd(e){this.exit(e)}function to(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function Md(){return"~"}function Ad(e){return e.length}function Rd(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ad,o=[],s=[],l=[],c=[];let u=0,h=-1;for(;++h<e.length;){const m=[],x=[];let k=-1;for(e[h].length>u&&(u=e[h].length);++k<e[h].length;){const _=Bd(e[h][k]);if(n.alignDelimiters!==!1){const w=i(_);x[k]=w,(c[k]===void 0||w>c[k])&&(c[k]=w)}m.push(_)}s[h]=m,l[h]=x}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=Ur(r[d]);else{const m=Ur(r);for(;++d<u;)o[d]=m}d=-1;const p=[],f=[];for(;++d<u;){const m=o[d];let x="",k="";m===99?(x=":",k=":"):m===108?x=":":m===114&&(k=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[d]-x.length-k.length);const w=x+"-".repeat(_)+k;n.alignDelimiters!==!1&&(_=x.length+_+k.length,_>c[d]&&(c[d]=_),f[d]=_),p[d]=w}s.splice(1,0,p),l.splice(1,0,f),h=-1;const g=[];for(;++h<s.length;){const m=s[h],x=l[h];d=-1;const k=[];for(;++d<u;){const _=m[d]||"";let w="",E="";if(n.alignDelimiters!==!1){const L=c[d]-(x[d]||0),C=o[d];C===114?w=" ".repeat(L):C===99?L%2?(w=" ".repeat(L/2+.5),E=" ".repeat(L/2-.5)):(w=" ".repeat(L/2),E=w):E=" ".repeat(L)}n.delimiterStart!==!1&&!d&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&k.push(" "),n.alignDelimiters!==!1&&k.push(w),k.push(_),n.alignDelimiters!==!1&&k.push(E),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&k.push("|")}g.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return g.join(`
16
+ `)}function Bd(e){return e==null?"":String(e)}function Ur(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Fd(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),zd);return i(),s}function zd(e,t,n){return">"+(n?"":" ")+e}function $d(e,t){return qr(e,t.inConstruct,!0)&&!qr(e,t.notInConstruct,!1)}function qr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Yr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&$d(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function Hd(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function Vd(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Wd(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Ud(e,t,n,r){const i=Wd(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Vd(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,qd);return d(),p}const l=n.createTracker(r),c=i.repeat(Math.max(Hd(o,i)+1,3)),u=n.enter("codeFenced");let h=l.move(c);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
19
19
  `,encode:["`"],...l.current()})),d()}return h+=l.move(`
20
20
  `),o&&(h+=l.move(o+`
21
- `)),h+=l.move(c),u(),h}function Wd(e,t,n){return(n?"":" ")+e}function Bn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qd(e,t,n,r){const i=Bn(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
22
- `,...c.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),s(),u}function Yd(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function st(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wt(e,t,n){const r=qe(e),i=qe(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}to.peek=Gd;function to(e,t,n,r){const i=Yd(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=c.charCodeAt(0),h=wt(r.before.charCodeAt(r.before.length-1),u,i);h.inside&&(c=st(u)+c.slice(1));const d=c.charCodeAt(c.length-1),p=wt(r.after.charCodeAt(0),d,i);p.inside&&(c=c.slice(0,-1)+st(d));const f=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+f}function Gd(e,t,n){return n.options.emphasis||"*"}function Xd(e,t){let n=!1;return An(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cn}),!!((!e.depth||e.depth<3)&&In(e)&&(t.options.setext||n))}function Qd(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Xd(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
21
+ `)),h+=l.move(c),u(),h}function qd(e,t,n){return(n?"":" ")+e}function Fn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Yd(e,t,n,r){const i=Fn(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
22
+ `,...c.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),s(),u}function Gd(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function st(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wt(e,t,n){const r=qe(e),i=qe(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}no.peek=Xd;function no(e,t,n,r){const i=Gd(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=c.charCodeAt(0),h=wt(r.before.charCodeAt(r.before.length-1),u,i);h.inside&&(c=st(u)+c.slice(1));const d=c.charCodeAt(c.length-1),p=wt(r.after.charCodeAt(0),d,i);p.inside&&(c=c.slice(0,-1)+st(d));const f=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+f}function Xd(e,t,n){return n.options.emphasis||"*"}function Qd(e,t){let n=!1;return Rn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cn}),!!((!e.depth||e.depth<3)&&Tn(e)&&(t.options.setext||n))}function Zd(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Qd(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
23
23
  `,after:`
24
24
  `});return d(),h(),p+`
25
25
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
26
26
  `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
27
- `,...o.current()});return/^[\t ]/.test(u)&&(u=st(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),c(),l(),u}no.peek=Zd;function no(e){return e.value||""}function Zd(){return"<"}ro.peek=Jd;function ro(e,t,n,r){const i=Bn(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),u+=c.move(")"),s(),u}function Jd(){return"!"}io.peek=Kd;function io(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,o(),i==="full"||!u||u!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Kd(){return"!"}oo.peek=eh;function oo(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function eh(){return"`"}function so(e,t){const n=In(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}lo.peek=th;function lo(e,t,n,r){const i=Bn(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(so(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=h,d}l=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),c()),u+=s.move(")"),l(),u}function th(e,t,n){return so(e,n)?"<":"["}ao.peek=nh;function ao(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,o(),i==="full"||!u||u!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function nh(){return"["}function Fn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function rh(e){const t=Fn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ih(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function co(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function oh(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?ih(n):Fn(n);const l=e.ordered?s==="."?")":".":rh(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),co(n)===s&&h){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function sh(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function lh(e,t,n,r){const i=sh(n);let o=n.bulletCurrent||Fn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),h);return c(),u;function h(d,p,f){return p?(f?"":" ".repeat(s))+d:(f?o:o+" ".repeat(s-o.length))+d}}function ah(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const ch=Dt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uh(e,t,n,r){return(e.children.some(function(s){return ch(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function dh(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}uo.peek=hh;function uo(e,t,n,r){const i=dh(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=c.charCodeAt(0),h=wt(r.before.charCodeAt(r.before.length-1),u,i);h.inside&&(c=st(u)+c.slice(1));const d=c.charCodeAt(c.length-1),p=wt(r.after.charCodeAt(0),d,i);p.inside&&(c=c.slice(0,-1)+st(d));const f=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+f}function hh(e,t,n){return n.options.strong||"*"}function fh(e,t,n,r){return n.safe(e.value,r)}function ph(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function gh(e,t,n){const r=(co(n)+(n.options.ruleSpaces?" ":"")).repeat(ph(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ho={blockquote:Bd,break:Wr,code:Ud,definition:qd,emphasis:to,hardBreak:Wr,heading:Qd,html:no,image:ro,imageReference:io,inlineCode:oo,link:lo,linkReference:ao,list:oh,listItem:lh,paragraph:ah,root:uh,strong:uo,text:fh,thematicBreak:gh};function mh(){return{enter:{table:bh,tableData:qr,tableHeader:qr,tableRow:yh},exit:{codeText:kh,table:xh,tableData:Xt,tableHeader:Xt,tableRow:Xt}}}function bh(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xh(e){this.exit(e),this.data.inTable=void 0}function yh(e){this.enter({type:"tableRow",children:[]},e)}function Xt(e){this.exit(e)}function qr(e){this.enter({type:"tableCell",children:[]},e)}function kh(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vh));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function vh(e,t){return t==="|"?t:e}function wh(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(f,g,m,x){return u(h(f,m,x),f.align)}function l(f,g,m,x){const k=d(f,m,x),S=u([k]);return S.slice(0,S.indexOf(`
29
- `))}function c(f,g,m,x){const k=m.enter("tableCell"),S=m.enter("phrasing"),w=m.containerPhrasing(f,{...x,before:o,after:o});return S(),k(),w}function u(f,g){return Ad(f,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function h(f,g,m){const x=f.children;let k=-1;const S=[],w=g.enter("table");for(;++k<x.length;)S[k]=d(x[k],g,m);return w(),S}function d(f,g,m){const x=f.children;let k=-1;const S=[],w=g.enter("tableRow");for(;++k<x.length;)S[k]=c(x[k],f,g,m);return w(),S}function p(f,g,m){let x=ho.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function jh(){return{exit:{taskListCheckValueChecked:Yr,taskListCheckValueUnchecked:Yr,paragraph:Sh}}}function Ch(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_h}}}function Yr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Sh(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function _h(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let c=ho.listItem(e,t,n,{...r,...l.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(h){return h+s}}function Dh(){return[od(),_d(),Ed(),mh(),jh()]}function Nh(e){return{extensions:[sd(),Dd(e),Td(),wh(e),Ch()]}}const Ih={tokenize:Mh,partial:!0},fo={tokenize:Ah,partial:!0},po={tokenize:Rh,partial:!0},go={tokenize:Bh,partial:!0},Eh={tokenize:Fh,partial:!0},mo={name:"wwwAutolink",tokenize:Oh,previous:xo},bo={name:"protocolAutolink",tokenize:Ph,previous:yo},Se={name:"emailAutolink",tokenize:Lh,previous:ko},we={};function Th(){return{text:we}}let Le=48;for(;Le<123;)we[Le]=Se,Le++,Le===58?Le=65:Le===91&&(Le=97);we[43]=Se;we[45]=Se;we[46]=Se;we[95]=Se;we[72]=[Se,bo];we[104]=[Se,bo];we[87]=[Se,mo];we[119]=[Se,mo];function Lh(e,t,n){const r=this;let i,o;return s;function s(d){return!fn(d)||!ko.call(r,r.previous)||zn(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return fn(d)?(e.consume(d),l):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(Eh,h,u)(d):d===45||d===95||le(d)?(o=!0,e.consume(d),c):h(d)}function u(d){return e.consume(d),i=!0,c}function h(d){return o&&i&&ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Oh(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!xo.call(r,r.previous)||zn(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ih,e.attempt(fo,e.attempt(po,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Ph(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&yo.call(r,r.previous)&&!zn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(ce(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),o?u:(o=!0,c)):n(d)}function u(d){return d===null||yt(d)||te(d)||Pe(d)||Ct(d)?n(d):e.attempt(fo,e.attempt(po,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Mh(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function Ah(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(go,c,l)(u):u===null||te(u)||Pe(u)||u!==45&&Ct(u)?c(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function c(u){return i||r||!o?n(u):t(u)}}function Rh(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(go,t,o)(s):s===null||te(s)||Pe(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function Bh(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||te(l)||Pe(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||te(l)||Pe(l)?t(l):r(l)}function o(l){return ce(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):ce(l)?(e.consume(l),s):n(l)}}function Fh(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return le(o)?n(o):t(o)}}function xo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||te(e)}function yo(e){return!ce(e)}function ko(e){return!(e===47||fn(e))}function fn(e){return e===43||e===45||e===46||e===95||le(e)}function zn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zh={tokenize:Gh,partial:!0};function $h(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Wh,continuation:{tokenize:qh},exit:Yh}},text:{91:{name:"gfmFootnoteCall",tokenize:Uh},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Hh,resolveTo:Vh}}}}function Hh(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const u=ke(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Vh(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Uh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||te(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ke(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return te(d)||(s=!0),o++,e.consume(d),d===92?h:u}function h(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function Wh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(s>999||g===93&&!l||g===null||g===91||te(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return o=ke(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return te(g)||(l=!0),s++,e.consume(g),g===92?d:h}function d(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),X(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function qh(e,t,n){return e.check(at,t,e.attempt(zh,t,n))}function Yh(e){e.exit("gfmFootnoteDefinition")}function Gh(e,t,n){const r=this;return X(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function Xh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let u=c;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[c][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[c][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",h,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],f=l.parser.constructs.insideSpan.null;f&&pe(p,p.length,0,St(f,s.slice(u+1,c),l)),pe(p,p.length,0,[["exit",d,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",h,l]]),pe(s,u-1,c-u+3,p),c=u+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function o(s,l,c){const u=this.previous,h=this.events;let d=0;return p;function p(g){return u===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(s.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const m=qe(u);if(g===126)return d>1?c(g):(s.consume(g),d++,f);if(d<2&&!n)return c(g);const x=s.exit("strikethroughSequenceTemporary"),k=qe(g);return x._open=!k||k===2&&!!m,x._close=!m||m===2&&!!k,l(g)}}}class Qh{constructor(){this.map=[]}add(t,n,r){Zh(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Zh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Jh(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Kh(){return{flow:{null:{name:"table",tokenize:ef,resolveAll:tf}}}}function ef(e,t,n){const r=this;let i=0,o=0,s;return l;function l(v){let _=r.events.length-1;for(;_>-1;){const B=r.events[_][1].type;if(B==="lineEnding"||B==="linePrefix")_--;else break}const C=_>-1?r.events[_][1].type:null,P=C==="tableHead"||C==="tableRow"?j:c;return P===j&&r.parser.lazy[r.now().line]?n(v):P(v)}function c(v){return e.enter("tableHead"),e.enter("tableRow"),u(v)}function u(v){return v===124||(s=!0,o+=1),h(v)}function h(v){return v===null?n(v):$(v)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):n(v):q(v)?X(e,h,"whitespace")(v):(o+=1,s&&(s=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(v)))}function d(v){return v===null||v===124||te(v)?(e.exit("data"),h(v)):(e.consume(v),v===92?p:d)}function p(v){return v===92||v===124?(e.consume(v),d):d(v)}function f(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(e.enter("tableDelimiterRow"),s=!1,q(v)?X(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):g(v))}function g(v){return v===45||v===58?x(v):v===124?(s=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),m):L(v)}function m(v){return q(v)?X(e,x,"whitespace")(v):x(v)}function x(v){return v===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):v===45?(o+=1,k(v)):v===null||$(v)?T(v):L(v)}function k(v){return v===45?(e.enter("tableDelimiterFiller"),S(v)):L(v)}function S(v){return v===45?(e.consume(v),S):v===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(v))}function w(v){return q(v)?X(e,T,"whitespace")(v):T(v)}function T(v){return v===124?g(v):v===null||$(v)?!s||i!==o?L(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(v)):L(v)}function L(v){return n(v)}function j(v){return e.enter("tableRow"),R(v)}function R(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),R):v===null||$(v)?(e.exit("tableRow"),t(v)):q(v)?X(e,R,"whitespace")(v):(e.enter("data"),A(v))}function A(v){return v===null||v===124||te(v)?(e.exit("data"),R(v)):(e.consume(v),v===92?F:A)}function F(v){return v===92||v===124?(e.consume(v),A):A(v)}}function tf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,u,h,d;const p=new Qh;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(l=!1,c!==0&&(Gr(p,t,c,u,h),h=void 0,c=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),i=g.type==="tableDelimiterRow"?2:h?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=ft(p,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=ft(p,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):g.type==="tableHead"?(l=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,o[1]!==0?(s[0]=s[1],d=ft(p,t,o,i,n,d)):s[1]!==0&&(d=ft(p,t,s,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&Gr(p,t,c,u,h),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Jh(t.events,n))}return e}function ft(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Ue(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=Ue(t.events,n[1]);if(o={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Ue(t.events,n[2]),h=Ue(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;e.add(g,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Ue(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Gr(e,t,n,r,i){const o=[],s=Ue(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ue(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const nf={name:"tasklistCheck",tokenize:of};function rf(){return{text:{91:nf}}}function of(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return te(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return $(c)?t(c):q(c)?e.check({tokenize:sf},t,n)(c):n(c)}}function sf(e,t,n){return X(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function lf(e){return Ii([Th(),$h(),Xh(e),Kh(),rf()])}const af={};function cf(e){const t=this,n=e||af,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(lf(n)),o.push(Dh()),s.push(Nh(n))}const vo=N.forwardRef(({label:e,error:t,hint:n,showCount:r,className:i="",maxLength:o,value:s,defaultValue:l="",onChange:c,...u},h)=>{const[d,p]=N.useState(l),[f,g]=N.useState("edit"),m=N.useRef(null),x=s!==void 0?s:d,k=x?String(x).length:0,S=L=>{const j=L.target.value;s===void 0&&p(j),c==null||c(j)},w=(L,j="")=>{const R=m.current;if(!R)return;const A=R.selectionStart,F=R.selectionEnd,v=x.substring(A,F),_=x.substring(0,A)+L+v+j+x.substring(F);s===void 0&&p(_),c==null||c(_),setTimeout(()=>{R.focus();const C=A+L.length+v.length;R.setSelectionRange(C,C)},0)},T=["bien-md-textarea-wrapper",t&&"bien-md-textarea-wrapper--error",i].filter(Boolean).join(" ");return a.jsxs("div",{className:T,children:[e&&a.jsxs("label",{className:"bien-md-textarea-label",children:[e,u.required&&a.jsx("span",{className:"bien-md-textarea-required",children:"*"})]}),a.jsxs("div",{className:"bien-md-textarea-container",children:[a.jsxs("div",{className:"bien-md-toolbar",children:[a.jsxs("div",{className:"bien-md-toolbar-group",children:[a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("**","**"),title:"Bold","aria-label":"Bold",children:a.jsx(ye.Bold,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("_","_"),title:"Italic","aria-label":"Italic",children:a.jsx(ye.Italic,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("# ",""),title:"Heading 1","aria-label":"Heading 1",children:a.jsx(ye.Heading1,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("## ",""),title:"Heading 2","aria-label":"Heading 2",children:a.jsx(ye.Heading2,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("- ",""),title:"List","aria-label":"List",children:a.jsx(ye.List,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("[","](url)"),title:"Link","aria-label":"Link",children:a.jsx(ye.Link,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("`","`"),title:"Code","aria-label":"Code",children:a.jsx(ye.Code,{size:16})})]}),a.jsxs("div",{className:"bien-md-toolbar-group",children:[a.jsx("button",{type:"button",className:`bien-md-toolbar-btn ${f==="edit"?"bien-md-toolbar-btn--active":""}`,onClick:()=>g("edit"),title:"Edit","aria-label":"Edit mode",children:a.jsx(ye.Edit3,{size:16})}),a.jsx("button",{type:"button",className:`bien-md-toolbar-btn ${f==="preview"?"bien-md-toolbar-btn--active":""}`,onClick:()=>g("preview"),title:"Preview","aria-label":"Preview mode",children:a.jsx(ye.Eye,{size:16})})]})]}),f==="edit"?a.jsx("textarea",{ref:L=>{m.current=L,typeof h=="function"?h(L):h&&(h.current=L)},className:"bien-md-textarea",value:x,onChange:S,maxLength:o,"aria-invalid":t?"true":"false",...u}):a.jsx("div",{className:"bien-md-preview",children:x?a.jsx(Xu,{remarkPlugins:[cf],children:String(x)}):a.jsx("p",{className:"bien-md-preview-empty",children:"Nothing to preview"})})]}),a.jsxs("div",{className:"bien-md-textarea-footer",children:[a.jsxs("div",{className:"bien-md-textarea-messages",children:[n&&!t&&a.jsx("span",{className:"bien-md-textarea-hint",children:n}),t&&a.jsx("span",{className:"bien-md-textarea-error",children:t})]}),r&&a.jsxs("span",{className:"bien-md-textarea-count",children:[k,o&&` / ${o}`]})]})]})});vo.displayName="MarkdownTextarea";const $n=N.forwardRef(({label:e,error:t,hint:n,options:r,placeholder:i,className:o="",...s},l)=>{const c=["bien-select-wrapper",t&&"bien-select-wrapper--error",o].filter(Boolean).join(" ");return a.jsxs("div",{className:c,children:[e&&a.jsxs("label",{className:"bien-select-label",children:[e,s.required&&a.jsx("span",{className:"bien-select-required",children:"*"})]}),a.jsxs("div",{className:"bien-select-container",children:[a.jsxs("select",{ref:l,className:"bien-select","aria-invalid":t?"true":"false",...s,children:[i&&a.jsx("option",{value:"",disabled:!0,children:i}),r.map(u=>a.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value))]}),a.jsx("svg",{className:"bien-select-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),n&&!t&&a.jsx("span",{className:"bien-select-hint",children:n}),t&&a.jsx("span",{className:"bien-select-error",children:t})]})});$n.displayName="Select";const Hn=N.forwardRef(({label:e,error:t,hint:n,className:r="",indeterminate:i,...o},s)=>{const l=["bien-checkbox-wrapper",t&&"bien-checkbox-wrapper--error",o.disabled&&"bien-checkbox-wrapper--disabled",r].filter(Boolean).join(" ");return a.jsxs("div",{className:l,children:[a.jsxs("label",{className:"bien-checkbox-label",children:[a.jsx("input",{ref:c=>{c&&(c.indeterminate=i||!1),typeof s=="function"?s(c):s&&(s.current=c)},type:"checkbox",className:"bien-checkbox",...o}),a.jsxs("span",{className:"bien-checkbox-box",children:[a.jsx("svg",{className:"bien-checkbox-check",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),a.jsx("svg",{className:"bien-checkbox-indeterminate",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 8H12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]}),e&&a.jsx("span",{className:"bien-checkbox-text",children:e})]}),n&&!t&&a.jsx("span",{className:"bien-checkbox-hint",children:n}),t&&a.jsx("span",{className:"bien-checkbox-error",children:t})]})});Hn.displayName="Checkbox";const wo=N.forwardRef(({children:e,variant:t="neutral",size:n="md",onRemove:r,removable:i=!1,disabled:o=!1,className:s=""},l)=>{const c=["bien-tags",`bien-tags--${t}`,`bien-tags--${n}`,o&&"bien-tags--disabled",s].filter(Boolean).join(" "),u=h=>{h.stopPropagation(),!o&&r&&r()};return a.jsxs("span",{ref:l,className:c,children:[a.jsx("span",{className:"bien-tags__text",children:e}),(i||r)&&a.jsx("button",{type:"button",className:"bien-tags__remove",onClick:u,disabled:o,"aria-label":`Remove ${typeof e=="string"?e:"tag"}`,children:a.jsx("svg",{className:"bien-tags__remove-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:a.jsx("path",{d:"M3 3L9 9M3 9L9 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});wo.displayName="Tags";const Xr=wo,jo=N.forwardRef(({label:e,error:t,hint:n,options:r,placeholder:i="Select options...",value:o=[],onChange:s,className:l="",disabled:c=!1,required:u=!1,searchable:h=!0,maxTags:d,variant:p="primary"},f)=>{const[g,m]=N.useState(!1),[x,k]=N.useState(""),S=N.useRef(null),w=N.useRef(null),T=["bien-multi-select-wrapper",t&&"bien-multi-select-wrapper--error",l].filter(Boolean).join(" "),L=r.filter(_=>_.label.toLowerCase().includes(x.toLowerCase())),j=()=>{c||(m(!g),!g&&h&&setTimeout(()=>{var _;(_=w.current)==null||_.focus()},50))},R=(_,C)=>{if(C||c)return;const P=o.includes(_)?o.filter(B=>B!==_):[...o,_];s==null||s(P)},A=_=>{c||s==null||s(o.filter(C=>C!==_))},F=d&&o.length>d?o.slice(0,d):o,v=d&&o.length>d?o.length-d:0;return N.useEffect(()=>{const _=C=>{S.current&&!S.current.contains(C.target)&&(m(!1),k(""))};return g&&document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[g]),N.useEffect(()=>{if(!g){const _=setTimeout(()=>k(""),0);return()=>clearTimeout(_)}},[g]),a.jsxs("div",{className:T,ref:S,children:[e&&a.jsxs("label",{className:"bien-multi-select-label",children:[e,u&&a.jsx("span",{className:"bien-multi-select-required",children:"*"})]}),a.jsxs("div",{style:{position:"relative"},ref:f,children:[a.jsxs("div",{className:"bien-multi-select-trigger",onClick:j,"data-open":g,tabIndex:c?-1:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),j())},role:"combobox","aria-expanded":g,"aria-haspopup":"listbox","aria-disabled":c,children:[F.length>0?a.jsxs(a.Fragment,{children:[F.map(_=>{const C=r.find(P=>P.value===_);return C?a.jsx(Xr,{variant:p,size:"sm",onRemove:()=>A(_),disabled:c,children:C.label},_):null}),v>0&&a.jsxs(Xr,{variant:p,size:"sm",disabled:!0,children:["+",v," more"]})]}):a.jsx("span",{className:"bien-multi-select-placeholder",children:i}),a.jsx("svg",{className:"bien-multi-select-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),g&&a.jsxs("div",{className:"bien-multi-select-dropdown",role:"listbox",children:[h&&a.jsx("div",{className:"bien-multi-select-search",children:a.jsx(kn,{ref:w,type:"text",placeholder:"Search...",value:x,onChange:_=>k(_.target.value),onClick:_=>_.stopPropagation()})}),L.length>0?L.map(_=>{const C=o.includes(_.value);return a.jsx(Hn,{className:"bien-multi-select-option",checked:C,disabled:_.disabled,onChange:()=>R(_.value,_.disabled),label:_.label},_.value)}):a.jsx("div",{className:"bien-multi-select-no-results",children:"No options found"})]})]}),n&&!t&&a.jsx("span",{className:"bien-multi-select-hint",children:n}),t&&a.jsx("span",{className:"bien-multi-select-error",children:t})]})});jo.displayName="MultiSelect";const Co=N.forwardRef(({label:e,className:t="",...n},r)=>{const i=["bien-radio-wrapper",t].filter(Boolean).join(" ");return a.jsx("div",{className:i,children:a.jsxs("label",{className:"bien-radio-label",children:[a.jsx("input",{ref:r,type:"radio",className:"bien-radio",...n}),a.jsx("span",{className:"bien-radio-box",children:a.jsx("span",{className:"bien-radio-dot"})}),e&&a.jsx("span",{className:"bien-radio-text",children:e})]})})});Co.displayName="Radio";const So=N.forwardRef(({label:e,hint:t,options:n,value:r,defaultValue:i,onValueChange:o,disabled:s,required:l,name:c,orientation:u="vertical",children:h},d)=>a.jsxs("div",{className:"bien-radio-group-wrapper",children:[e&&a.jsxs("div",{className:"bien-radio-group-label",children:[e,l&&a.jsx("span",{className:"bien-radio-required",children:"*"})]}),t&&a.jsx("div",{className:"bien-radio-group-hint",children:t}),a.jsx(Pt.Root,{ref:d,className:`bien-radio-group bien-radio-group--${u}`,value:r,defaultValue:i,onValueChange:o,disabled:s,required:l,name:c,children:n?n.map(p=>a.jsxs("div",{className:"bien-radio-item-wrapper",children:[a.jsx(Pt.Item,{className:"bien-radio-item",value:p.value,disabled:p.disabled||s,id:`${c}-${p.value}`,children:a.jsx(Pt.Indicator,{className:"bien-radio-indicator"})}),a.jsx("label",{htmlFor:`${c}-${p.value}`,className:"bien-radio-label",children:p.label})]},p.value)):h})]}));So.displayName="RadioGroup";const _o=N.forwardRef(({label:e,hint:t,variant:n="default",className:r="",...i},o)=>{const s=["bien-switch-wrapper",i.disabled&&"bien-switch-wrapper--disabled",r].filter(Boolean).join(" "),l=["bien-switch-track",`bien-switch-track--${n}`].filter(Boolean).join(" "),c={...i};return c.checked!==void 0&&c.defaultChecked!==void 0&&delete c.defaultChecked,a.jsx("div",{className:s,children:a.jsxs("label",{className:"bien-switch-label",children:[a.jsx("input",{ref:o,type:"checkbox",className:"bien-switch-input",...c}),a.jsx("span",{className:l,children:a.jsx("span",{className:"bien-switch-thumb"})}),e&&a.jsxs("span",{className:"bien-switch-content",children:[a.jsx("span",{className:"bien-switch-text",children:e}),t&&a.jsx("span",{className:"bien-switch-hint",children:t})]})]})})});_o.displayName="Switch";const Do=N.forwardRef(({label:e,hint:t,showValue:n=!0,variant:r="default",className:i="",value:o,onChange:s,min:l=0,max:c=100,...u},h)=>{const[d,p]=N.useState(o||l),f=k=>{p(k.target.value),s==null||s(k)},g=["bien-slider-wrapper",u.disabled&&"bien-slider-wrapper--disabled",i].filter(Boolean).join(" "),m=["bien-slider",`bien-slider--${r}`].filter(Boolean).join(" "),x=(Number(d)-Number(l))/(Number(c)-Number(l))*100;return a.jsxs("div",{className:g,children:[a.jsxs("div",{className:"bien-slider-header",children:[e&&a.jsx("label",{className:"bien-slider-label",children:e}),n&&a.jsx("span",{className:"bien-slider-value",children:d})]}),a.jsx("div",{className:"bien-slider-container",children:a.jsx("input",{ref:h,type:"range",className:m,value:o,onChange:f,min:l,max:c,style:{"--slider-percentage":`${x}%`},...u})}),t&&a.jsx("span",{className:"bien-slider-hint",children:t})]})});Do.displayName="Slider";const Qr=["January","February","March","April","May","June","July","August","September","October","November","December"],uf=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function df({value:e,onChange:t,range:n=!1,rangeValue:r,onRangeChange:i,minDate:o,maxDate:s,placeholder:l="Select date",disabled:c=!1,className:u=""}){const[h,d]=N.useState(!1),[p,f]=N.useState(e||new Date),[g,m]=N.useState(r==null?void 0:r.start),[x,k]=N.useState(r==null?void 0:r.end),[S,w]=N.useState(!1),[T,L]=N.useState(!1),j=I=>I?I.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",R=(I,z)=>!I&&!z?"":I&&!z?`${j(I)} - ...`:!I&&z?`... - ${j(z)}`:`${j(I)} - ${j(z)}`,A=I=>{const z=I.getFullYear(),Q=I.getMonth(),se=new Date(z,Q,1),_e=new Date(z,Q+1,0).getDate(),Re=se.getDay(),Qe=[];for(let De=0;De<Re;De++)Qe.push(null);for(let De=1;De<=_e;De++)Qe.push(new Date(z,Q,De));return Qe},F=I=>{if(n){if(!g||g&&x)m(I),k(void 0);else if(g&&!x){if(I<g?(m(I),k(g)):k(I),i){const z=I<g?g:I,Q=I<g?I:g;i({start:Q,end:z})}setTimeout(()=>d(!1),200)}}else t&&t(I),d(!1)},v=()=>{f(new Date(p.getFullYear(),p.getMonth()-1))},_=()=>{f(new Date(p.getFullYear(),p.getMonth()+1))},C=I=>{f(new Date(p.getFullYear(),I)),w(!1)},P=I=>{f(new Date(I,p.getMonth())),L(!1)},B=()=>{const I=new Date;n?(m(I),k(I),i&&i({start:I,end:I})):t&&t(I),f(I),d(!1)},M=I=>!!(o&&I<o||s&&I>s),W=I=>{const z=new Date;return I.getDate()===z.getDate()&&I.getMonth()===z.getMonth()&&I.getFullYear()===z.getFullYear()},G=I=>{if(n){if(!g)return!1;const z=I.getTime(),Q=new Date(g.getFullYear(),g.getMonth(),g.getDate()).getTime(),se=x?new Date(x.getFullYear(),x.getMonth(),x.getDate()).getTime():Q;return z>=Q&&z<=se}else return e?I.getDate()===e.getDate()&&I.getMonth()===e.getMonth()&&I.getFullYear()===e.getFullYear():!1},Z=I=>g?I.getDate()===g.getDate()&&I.getMonth()===g.getMonth()&&I.getFullYear()===g.getFullYear():!1,re=I=>x?I.getDate()===x.getDate()&&I.getMonth()===x.getMonth()&&I.getFullYear()===x.getFullYear():!1,y=A(p),K=p.getFullYear(),oe=Array.from({length:20},(I,z)=>K-10+z),b=["bien-datepicker",c&&"bien-datepicker--disabled",u].filter(Boolean).join(" "),J=n?R(g,x):e?j(e):"";return a.jsxs("div",{className:b,children:[a.jsxs("button",{type:"button",className:"bien-datepicker__input",onClick:()=>!c&&d(!h),disabled:c,children:[a.jsx("span",{className:J?"bien-datepicker__value":"bien-datepicker__placeholder",children:J||l}),a.jsxs("svg",{className:"bien-datepicker__icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{x:"3",y:"4",width:"14",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.5"}),a.jsx("path",{d:"M3 8h14M7 2v4M13 2v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})]}),h&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"bien-datepicker__overlay",onClick:()=>d(!1)}),a.jsxs("div",{className:"bien-datepicker__dropdown",children:[a.jsxs("div",{className:"bien-datepicker__header",children:[a.jsx("button",{type:"button",className:"bien-datepicker__nav-button",onClick:v,children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M12 14L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsxs("div",{className:"bien-datepicker__month-year-selector",children:[a.jsxs("button",{type:"button",className:"bien-datepicker__month-button",onClick:()=>{w(!S),L(!1)},children:[Qr[p.getMonth()],a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),a.jsxs("button",{type:"button",className:"bien-datepicker__year-button",onClick:()=>{L(!T),w(!1)},children:[p.getFullYear(),a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),a.jsx("button",{type:"button",className:"bien-datepicker__nav-button",onClick:_,children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M8 6L12 10L8 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),S&&a.jsx("div",{className:"bien-datepicker__month-grid",children:Qr.map((I,z)=>a.jsx("button",{type:"button",className:`bien-datepicker__month-option ${z===p.getMonth()?"bien-datepicker__month-option--active":""}`,onClick:()=>C(z),children:I.slice(0,3)},I))}),T&&a.jsx("div",{className:"bien-datepicker__year-grid",children:oe.map(I=>a.jsx("button",{type:"button",className:`bien-datepicker__year-option ${I===p.getFullYear()?"bien-datepicker__year-option--active":""}`,onClick:()=>P(I),children:I},I))}),!S&&!T&&a.jsxs("div",{className:"bien-datepicker__calendar",children:[a.jsx("div",{className:"bien-datepicker__weekdays",children:uf.map(I=>a.jsx("div",{className:"bien-datepicker__weekday",children:I},I))}),a.jsx("div",{className:"bien-datepicker__days",children:y.map((I,z)=>a.jsx("div",{className:"bien-datepicker__day-cell",children:I&&a.jsx("button",{type:"button",className:["bien-datepicker__day",G(I)&&"bien-datepicker__day--selected",Z(I)&&"bien-datepicker__day--range-start",re(I)&&"bien-datepicker__day--range-end",W(I)&&"bien-datepicker__day--today",M(I)&&"bien-datepicker__day--disabled"].filter(Boolean).join(" "),onClick:()=>!M(I)&&F(I),disabled:M(I),children:I.getDate()})},z))})]}),a.jsx("div",{className:"bien-datepicker__footer",children:a.jsx("button",{type:"button",className:"bien-datepicker__today-button",onClick:B,children:"Today"})})]})]})]})}function hf({href:e,variant:t="default",size:n="md",underline:r="hover",disabled:i=!1,iconStart:o,iconEnd:s,external:l=!1,weight:c="medium",children:u,className:h="",...d}){const p=["bien-link",`bien-link--${t}`,`bien-link--${n}`,`bien-link--underline-${r}`,`bien-link--weight-${c}`,i&&"bien-link--disabled",l&&"bien-link--external",h].filter(Boolean).join(" "),g={...d,href:i?void 0:e,className:p,onClick:m=>{if(i){m.preventDefault();return}d.onClick&&d.onClick(m)},...l&&!i?{target:"_blank",rel:"noopener noreferrer"}:{}};return a.jsxs("a",{...g,children:[o&&a.jsx("span",{className:"bien-link__icon bien-link__icon--start",children:o}),a.jsx("span",{className:"bien-link__text",children:u}),s&&a.jsx("span",{className:"bien-link__icon bien-link__icon--end",children:s}),l&&!s&&a.jsx("span",{className:"bien-link__icon bien-link__icon--external",children:a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("polyline",{points:"15 3 21 3 21 9"}),a.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})})]})}const ff=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M6 12l4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),pf=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("line",{x1:"6",y1:"12",x2:"10",y2:"4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),gf=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor"})}),mf=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"13",cy:"8",r:"1.5",fill:"currentColor"})]});function bf({items:e,separator:t="chevron",size:n="md",maxItems:r,onNavigate:i,className:o=""}){const s=t==="slash"?pf:t==="dot"?gf:ff;let l=e,c=!1;if(r&&e.length>r){c=!0;const d=e[0],p=e.slice(-(r-1));l=[d,...p]}const u=["bien-breadcrumb",`bien-breadcrumb--${n}`,o].filter(Boolean).join(" "),h=(d,p,f)=>{if(p.current){d.preventDefault();return}i&&(d.preventDefault(),i(p,f))};return a.jsx("nav",{"aria-label":"Breadcrumb",className:u,children:a.jsx("ol",{className:"bien-breadcrumb__list",children:l.map((d,p)=>{const f=p===l.length-1,g=d.current||f,m=c&&p>0?e.length-(l.length-p):p,x=[];return c&&p===1&&(x.push(a.jsx("li",{className:"bien-breadcrumb__separator","aria-hidden":"true",children:a.jsx(s,{})},`sep-ellipsis-${m}`)),x.push(a.jsx("li",{className:"bien-breadcrumb__item",children:a.jsx("span",{className:"bien-breadcrumb__ellipsis",children:a.jsx(mf,{})})},`ellipsis-${m}`))),p>0&&(!c||p>1)&&x.push(a.jsx("li",{className:"bien-breadcrumb__separator","aria-hidden":"true",children:a.jsx(s,{})},`sep-${m}`)),x.push(a.jsx("li",{className:"bien-breadcrumb__item",children:d.href&&!g?a.jsxs("a",{href:d.href,className:"bien-breadcrumb__link",onClick:k=>h(k,d,m),"aria-current":g?"page":void 0,children:[d.icon&&a.jsx("span",{className:"bien-breadcrumb__icon",children:d.icon}),a.jsx("span",{className:"bien-breadcrumb__label",children:d.label})]}):a.jsxs("span",{className:`bien-breadcrumb__text ${g?"bien-breadcrumb__text--current":""}`,"aria-current":g?"page":void 0,children:[d.icon&&a.jsx("span",{className:"bien-breadcrumb__icon",children:d.icon}),a.jsx("span",{className:"bien-breadcrumb__label",children:d.label})]})},`item-${m}`)),x})})})}function xf({logo:e,logoText:t="Bien UI",logoHref:n="#",navigation:r=[],actions:i,variant:o="default",sticky:s=!1,bordered:l=!0,children:c,className:u=""}){const[h,d]=N.useState(!1),p=["bien-header",`bien-header--${o}`,s&&"bien-header--sticky",l&&"bien-header--bordered",h&&"bien-header--menu-open",u].filter(Boolean).join(" "),f=m=>{m.onClick&&m.onClick(),d(!1)},g=()=>{d(!h)};return a.jsxs("header",{className:p,children:[a.jsxs("div",{className:"bien-header__container",children:[a.jsx("div",{className:"bien-header__logo",children:a.jsx("a",{href:n,className:"bien-header__logo-link",children:e||a.jsx("span",{className:"bien-header__logo-text",children:t})})}),r.length>0&&a.jsx("nav",{className:"bien-header__nav",children:r.map((m,x)=>a.jsx("a",{href:m.href||"#",className:`bien-header__nav-item ${m.active?"bien-header__nav-item--active":""}`,onClick:k=>{m.onClick&&(k.preventDefault(),f(m))},children:m.label},x))}),c&&a.jsx("div",{className:"bien-header__custom",children:c}),i&&a.jsx("div",{className:"bien-header__actions",children:i}),a.jsx("button",{className:"bien-header__mobile-toggle",onClick:g,"aria-label":"Toggle menu","aria-expanded":h,children:a.jsx("span",{className:"bien-header__mobile-toggle-icon",children:h?a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}):a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M3 12H21M3 6H21M3 18H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})]}),(r.length>0||i||c)&&a.jsxs("div",{className:"bien-header__mobile-menu",children:[r.length>0&&a.jsx("nav",{className:"bien-header__mobile-nav",children:r.map((m,x)=>a.jsx("a",{href:m.href||"#",className:`bien-header__mobile-nav-item ${m.active?"bien-header__mobile-nav-item--active":""}`,onClick:k=>{m.onClick?(k.preventDefault(),f(m)):d(!1)},children:m.label},x))}),c&&a.jsx("div",{className:"bien-header__mobile-custom",children:c}),i&&a.jsx("div",{className:"bien-header__mobile-actions",children:i})]})]})}function yf({items:e,variant:t="solid",density:n="comfortable",onItemClick:r,className:i=""}){const[o,s]=N.useState(!1),l=N.useRef(),c=()=>{l.current&&clearTimeout(l.current),s(!0)},u=()=>{l.current=window.setTimeout(()=>{s(!1)},500)};N.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const h=g=>{g.onClick&&g.onClick(),r&&r(g)},d=["bien-sidenav",`bien-sidenav--${t}`,`bien-sidenav--${n}`,o&&"bien-sidenav--expanded",i].filter(Boolean).join(" ");let p="";const f=[];return e.forEach((g,m)=>{g.divider&&g.category&&g.category!==p?(p=g.category,f.push({...g,showCategoryLabel:!0})):f.push(g)}),a.jsx("nav",{className:d,onMouseEnter:c,onMouseLeave:u,"aria-label":"Side navigation",children:a.jsx("div",{className:"bien-sidenav__items",children:f.map((g,m)=>{if(g.divider)return a.jsx("div",{className:"bien-sidenav__divider",children:g.showCategoryLabel&&o&&g.category&&a.jsx("span",{className:"bien-sidenav__category",children:g.category})},`divider-${m}`);const x=["bien-sidenav__item",g.active&&"bien-sidenav__item--active"].filter(Boolean).join(" "),k=a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"bien-sidenav__icon",children:g.icon}),a.jsx("span",{className:"bien-sidenav__label",children:g.label})]});return g.href?a.jsx("a",{href:g.href,className:x,onClick:()=>h(g),"aria-current":g.active?"page":void 0,children:k},g.id):a.jsx("button",{className:x,onClick:()=>h(g),"aria-current":g.active?"page":void 0,type:"button",children:k},g.id)})})})}function kf({children:e,as:t="p",size:n="md",weight:r="normal",tone:i="primary",align:o,truncate:s=!1,maxLines:l,gradient:c,highlight:u,highlightColor:h,decoration:d,transform:p,letterSpacing:f,lineHeight:g,italic:m=!1,className:x="",style:k}){const S=["bien-text",`bien-text--${n}`,`bien-text--weight-${r}`,!c&&`bien-text--${i}`,c&&`bien-text--gradient-${c}`,o&&`bien-text--${o}`,s&&"bien-text--truncate",l&&"bien-text--clamp",d&&`bien-text--decoration-${d}`,p&&`bien-text--transform-${p}`,f&&`bien-text--spacing-${f}`,g&&`bien-text--line-${g}`,m&&"bien-text--italic",u&&`bien-text--highlight-${h}`,x].filter(Boolean).join(" "),w=l?{...k,WebkitLineClamp:l,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"}:k;return a.jsx(t,{className:S,style:w,children:e})}function vf({children:e,variant:t="elevated",color:n,padding:r="md",radius:i="lg",shadow:o="sm",gradient:s,topGradient:l,hoverable:c=!1,clickable:u=!1,bordered:h=!1,collapsible:d=!1,defaultExpanded:p=!0,expanded:f,onExpandChange:g,header:m,footer:x,title:k,subtitle:S,className:w="",style:T,onClick:L}){const[j,R]=N.useState(p),A=f!==void 0,F=A?f:j,v=()=>{if(!d)return;const P=!F;A||R(P),g==null||g(P)},_=["bien-card",`bien-card--${t}`,n&&`bien-card--color-${n}`,`bien-card--padding-${r}`,`bien-card--radius-${i}`,!s&&`bien-card--shadow-${o}`,s&&`bien-card--gradient-${s}`,l&&"bien-card--has-top-gradient",l&&`bien-card--top-gradient-${l}`,c&&"bien-card--hoverable",u&&"bien-card--clickable",h&&"bien-card--bordered",d&&"bien-card--collapsible",(m||k)&&"bien-card--has-header",x&&"bien-card--has-footer",w].filter(Boolean).join(" "),C=m||k||S;return a.jsxs("div",{className:_,style:T,onClick:u?L:void 0,children:[t==="ai"&&a.jsx("div",{className:"bien-card__ai-border"}),C&&a.jsx("div",{className:"bien-card__header",onClick:d?v:void 0,style:{cursor:d?"pointer":"default"},children:m||a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[a.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[k&&a.jsx("div",{className:"bien-card__title",children:k}),S&&a.jsx("div",{className:"bien-card__subtitle",children:S})]}),d&&a.jsx("button",{className:"bien-card__expand-button","aria-label":F?"Collapse":"Expand","aria-expanded":F,type:"button",onClick:v,children:a.jsx("svg",{className:`bien-card__expand-icon ${F?"bien-card__expand-icon--expanded":""}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),a.jsx("div",{className:`bien-card__content ${d&&!F?"bien-card__content--collapsed":""}`,children:e}),x&&a.jsx("div",{className:"bien-card__footer",children:x})]})}const No=N.forwardRef(({children:e,variant:t="neutral",size:n="md",icon:r,dot:i=!1,outline:o=!1,className:s=""},l)=>{const c=["bien-badge",`bien-badge--${t}`,`bien-badge--${n}`,o&&"bien-badge--outline",s].filter(Boolean).join(" ");return a.jsxs("span",{ref:l,className:c,children:[i&&a.jsx("span",{className:"bien-badge__dot"}),r&&a.jsx("span",{className:"bien-badge__icon",children:r}),a.jsx("span",{className:"bien-badge__text",children:e}),t==="ai"&&a.jsx("span",{className:"bien-badge__shimmer"})]})});No.displayName="Badge";const wf=No;function jf(e){const t=e.trim().split(" ");return t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}function Cf(e){const t=["var(--color-blue)","var(--color-teal)","var(--color-purple)","var(--color-accent)"];let n=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r)+((n<<5)-n);return t[Math.abs(n)%t.length]}function Sf({src:e,alt:t,name:n,size:r="md",shape:i="circle",status:o,showStatus:s=!1,icon:l,className:c=""}){const[u,h]=N.useState(!1),d=["bien-avatar",`bien-avatar--${r}`,`bien-avatar--${i}`,c].filter(Boolean).join(" "),p=n||t||"",f=p?jf(p):"",g=p?Cf(p):"var(--color-bg-subtle)",m=e&&!u,x=!m&&!l&&f,k=!m&&l;return a.jsxs("div",{className:d,children:[a.jsxs("div",{className:"bien-avatar__container",style:{backgroundColor:x?g:void 0},children:[m&&a.jsx("img",{src:e,alt:t||n||"Avatar",className:"bien-avatar__image",onError:()=>h(!0)}),x&&a.jsx("span",{className:"bien-avatar__initials",children:f}),k&&a.jsx("span",{className:"bien-avatar__icon",children:l})]}),s&&o&&a.jsx("span",{className:`bien-avatar__status bien-avatar__status--${o}`})]})}function _f({children:e,max:t=3,size:n="md",className:r=""}){const i=Array.isArray(e)?e:[e],o=i.slice(0,t),s=i.length-t,l=["bien-avatar-group",`bien-avatar-group--${n}`,r].filter(Boolean).join(" ");return a.jsxs("div",{className:l,children:[o,s>0&&a.jsx("div",{className:`bien-avatar bien-avatar--${n} bien-avatar--circle`,children:a.jsx("div",{className:"bien-avatar__container bien-avatar__overflow",children:a.jsxs("span",{className:"bien-avatar__initials",children:["+",s]})})})]})}function Df(e){const t=e.trim().split(" ");return t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}function Nf(e){const t=["var(--color-blue)","var(--color-teal)","var(--color-purple)","var(--color-accent)"];let n=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r)+((n<<5)-n);return t[Math.abs(n)%t.length]}function If({src:e,alt:t,name:n,size:r="xl",shape:i="circle",status:o,showStatus:s=!1,editable:l=!1,onEdit:c,badge:u,ring:h=!1,ringColor:d="brand",className:p=""}){const[f,g]=N.useState(!1),m=["bien-profile-avatar",`bien-profile-avatar--${r}`,`bien-profile-avatar--${i}`,h&&`bien-profile-avatar--ring-${d}`,p].filter(Boolean).join(" "),x=n||t||"",k=x?Df(x):"",S=x?Nf(x):"var(--color-bg-subtle)",w=e&&!f,T=!w&&k;return a.jsxs("div",{className:m,children:[a.jsxs("div",{className:"bien-profile-avatar__container",style:{backgroundColor:T?S:void 0},children:[w&&a.jsx("img",{src:e,alt:t||n||"Profile avatar",className:"bien-profile-avatar__image",onError:()=>g(!0)}),T&&a.jsx("span",{className:"bien-profile-avatar__initials",children:k})]}),l&&a.jsx("button",{type:"button",className:"bien-profile-avatar__edit",onClick:c,"aria-label":"Edit profile picture",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[a.jsx("path",{d:"M9 3H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M15 1l4 4L9 15H5v-4L15 1z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),s&&o&&a.jsx("span",{className:`bien-profile-avatar__status bien-profile-avatar__status--${o}`}),u&&a.jsx("div",{className:"bien-profile-avatar__badge",children:u})]})}function Ef({items:e,orientation:t="vertical",className:n=""}){const r=["bien-timeline",`bien-timeline--${t}`,n].filter(Boolean).join(" ");return a.jsx("div",{className:r,children:e.map((i,o)=>{const s=o===e.length-1,l=["bien-timeline__item",s&&"bien-timeline__item--last"].filter(Boolean).join(" ");return a.jsxs("div",{className:l,children:[a.jsxs("div",{className:"bien-timeline__marker",children:[a.jsx("div",{className:"bien-timeline__dot"}),!s&&a.jsx("div",{className:"bien-timeline__line"})]}),a.jsxs("div",{className:"bien-timeline__content",children:[i.time&&a.jsx("div",{className:"bien-timeline__time",children:i.time}),a.jsx("div",{className:"bien-timeline__title",children:i.title}),i.description&&a.jsx("div",{className:"bien-timeline__description",children:i.description}),i.content&&a.jsx("div",{className:"bien-timeline__extra",children:i.content})]})]},i.id)})})}function Tf({value:e,min:t=0,max:n=100,variant:r="default",size:i="md",label:o,showValue:s=!1,valueFormatter:l,optimum:c,thresholds:u,animated:h=!0,className:d="",style:p}){const f=Math.max(t,Math.min(n,e)),g=(f-t)/(n-t)*100;let m=r;u&&r==="default"&&(c==="low"?u.low!==void 0&&f<=u.low?m="success":u.high!==void 0&&f>=u.high?m="error":m="warning":c==="high"&&(u.high!==void 0&&f>=u.high?m="success":u.low!==void 0&&f<=u.low?m="error":m="warning"));const x=["bien-meter",`bien-meter--${m}`,`bien-meter--${i}`,h&&"bien-meter--animated",d].filter(Boolean).join(" "),k=S=>l?l(S):`${Math.round(S)}`;return a.jsxs("div",{className:x,style:p,children:[(o||s)&&a.jsxs("div",{className:"bien-meter__header",children:[o&&a.jsx("span",{className:"bien-meter__label",children:o}),s&&a.jsxs("span",{className:"bien-meter__value",children:[k(f),"/",n]})]}),a.jsx("div",{className:"bien-meter__track",children:a.jsx("div",{className:"bien-meter__fill",style:{width:`${g}%`},role:"meter","aria-valuenow":f,"aria-valuemin":t,"aria-valuemax":n,"aria-label":o})})]})}function Lf({value:e,min:t=0,max:n=100,variant:r="default",size:i=120,strokeWidth:o=8,label:s,showValue:l=!0,valueFormatter:c,animated:u=!0,className:h=""}){const d=Math.max(t,Math.min(n,e)),p=(d-t)/(n-t)*100,f=(i-o)/2,g=2*Math.PI*f,m=g-p/100*g,x=["bien-circular-meter",`bien-circular-meter--${r}`,u&&"bien-circular-meter--animated",h].filter(Boolean).join(" "),k=S=>c?c(S):`${Math.round(S/n*100)}%`;return a.jsxs("div",{className:x,style:{width:i,height:i},children:[a.jsxs("svg",{width:i,height:i,children:[a.jsx("circle",{className:"bien-circular-meter__track",cx:i/2,cy:i/2,r:f,strokeWidth:o}),a.jsx("circle",{className:"bien-circular-meter__fill",cx:i/2,cy:i/2,r:f,strokeWidth:o,strokeDasharray:g,strokeDashoffset:m,transform:`rotate(-90 ${i/2} ${i/2})`})]}),a.jsxs("div",{className:"bien-circular-meter__content",children:[l&&a.jsx("div",{className:"bien-circular-meter__value",children:k(d)}),s&&a.jsx("div",{className:"bien-circular-meter__label",children:s})]})]})}function Of({columns:e,data:t,variant:n="default",headerVariant:r="glass-frost",size:i="comfortable",hoverable:o=!0,selectable:s=!1,selectedRows:l=[],onSelectionChange:c,rowKey:u=A=>String(A.id)||String(A),onRowClick:h,emptyState:d,caption:p,stickyHeader:f=!1,maxHeight:g,pagination:m=!1,page:x=1,pageSize:k=10,total:S,onPageChange:w,onPageSizeChange:T,pageSizeOptions:L=[5,10,25,50],className:j="",style:R}){const[A,F]=N.useState(null),[v,_]=N.useState("asc"),C=b=>{A===b?_(v==="asc"?"desc":"asc"):(F(b),_("asc"))},P=()=>{c&&(l.length===t.length?c([]):c(t.map(u)))},B=b=>{if(!c)return;const J=u(b);l.includes(J)?c(l.filter(I=>I!==J)):c([...l,J])},M=[...t];A&&M.sort((b,J)=>{const I=b[A],z=J[A];if(I===z)return 0;if(typeof I=="string"&&typeof z=="string"){const se=I.localeCompare(z);return v==="asc"?se:-se}if(typeof I=="number"&&typeof z=="number"){const se=I-z;return v==="asc"?se:-se}const Q=String(I).localeCompare(String(z));return v==="asc"?Q:-Q});const W=["bien-table-container",f&&"bien-table-container--sticky",j].filter(Boolean).join(" "),G=["bien-table",`bien-table--${n}`,`bien-table--${i}`,o&&"bien-table--hoverable",s&&"bien-table--selectable"].filter(Boolean).join(" "),Z=["bien-table__head",`bien-table__head--${r}`].filter(Boolean).join(" "),re=S||t.length,y=Math.ceil(re/k),K=m?M.slice((x-1)*k,x*k):M,oe={...R,...g?{maxHeight:typeof g=="number"?`${g}px`:g}:{}};return t.length===0&&d?a.jsx("div",{className:W,style:oe,children:a.jsx("div",{className:"bien-table-empty",children:d})}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:W,style:oe,children:a.jsxs("table",{className:G,children:[p&&a.jsx("caption",{className:"bien-table__caption",children:p}),a.jsx("thead",{className:Z,children:a.jsxs("tr",{children:[s&&a.jsx("th",{className:"bien-table__header bien-table__header--checkbox",children:a.jsx("input",{type:"checkbox",checked:l.length===t.length&&t.length>0,onChange:P,className:"bien-table__checkbox"})}),e.map(b=>a.jsx("th",{className:`bien-table__header bien-table__header--${b.align||"left"} ${b.sortable?"bien-table__header--sortable":""} ${A===b.key?"bien-table__header--sorted":""}`,style:{width:b.width},onClick:()=>b.sortable&&C(b.key),children:a.jsxs("div",{className:"bien-table__header-content",children:[b.label,b.sortable&&a.jsx("span",{className:"bien-table__sort-icon",children:A===b.key?v==="asc"?"↑":"↓":"↕"})]})},b.key))]})}),a.jsx("tbody",{className:"bien-table__body",children:K.map((b,J)=>{const I=u(b),z=l.includes(I);return a.jsxs("tr",{className:`bien-table__row ${z?"bien-table__row--selected":""}`,onClick:()=>h==null?void 0:h(b,J),children:[s&&a.jsx("td",{className:"bien-table__cell bien-table__cell--checkbox",children:a.jsx("input",{type:"checkbox",checked:z,onChange:()=>B(b),onClick:Q=>Q.stopPropagation(),className:"bien-table__checkbox"})}),e.map(Q=>a.jsx("td",{className:`bien-table__cell bien-table__cell--${Q.align||"left"}`,children:Q.render?Q.render(b[Q.key],b,J):b[Q.key]},Q.key))]},I)})})]})}),m&&a.jsxs("div",{className:"bien-table-pagination",children:[T&&a.jsxs("div",{className:"bien-table-pagination__page-size",children:[a.jsx("span",{className:"bien-table-pagination__page-size-label",children:"Rows per page:"}),a.jsx($n,{value:String(k),onChange:b=>T(Number(b.target.value)),options:L.map(b=>({value:String(b),label:String(b)}))})]}),a.jsxs("div",{className:"bien-table-pagination__right",children:[a.jsxs("div",{className:"bien-table-pagination__info",children:["Showing ",re===0?0:(x-1)*k+1,"-",Math.min(x*k,re)," of ",re]}),a.jsxs("div",{className:"bien-table-pagination__controls",children:[a.jsx("button",{className:"bien-table-pagination__button bien-table-pagination__button--icon",onClick:()=>w==null?void 0:w(x-1),disabled:x===1,"aria-label":"Previous page",children:a.jsx(ye.ChevronLeft,{})}),(()=>{const b=[];if(y<=7)for(let I=1;I<=y;I++)b.push(I);else{b.push(1),x>3&&b.push("...");const I=Math.max(2,x-1),z=Math.min(y-1,x+1);for(let Q=I;Q<=z;Q++)b.includes(Q)||b.push(Q);x<y-2&&b.push("..."),y>1&&b.push(y)}return b.map((I,z)=>I==="..."?a.jsx("span",{className:"bien-table-pagination__ellipsis",children:"..."},`ellipsis-${z}`):a.jsx("button",{className:`bien-table-pagination__button ${x===I?"bien-table-pagination__button--active":""}`,onClick:()=>w==null?void 0:w(I),children:I},I))})(),a.jsx("button",{className:"bien-table-pagination__button bien-table-pagination__button--icon",onClick:()=>w==null?void 0:w(x+1),disabled:x===y,"aria-label":"Next page",children:a.jsx(ye.ChevronRight,{})})]})]})]})]})}function Pf({type:e="unordered",markerStyle:t="default",size:n="md",spacing:r="sm",dividers:i=!1,children:o,className:s="",...l}){const c=["bien-list",`bien-list--${e}`,`bien-list--marker-${t}`,`bien-list--size-${n}`,`bien-list--spacing-${r}`,i&&"bien-list--dividers",s].filter(Boolean).join(" "),u=e==="ordered"?"ol":"ul";return a.jsx(u,{className:c,...l,children:o})}function Mf({icon:e,avatar:t,interactive:n=!1,active:r=!1,disabled:i=!1,onClick:o,children:s,className:l="",...c}){const u=["bien-list-item",n&&"bien-list-item--interactive",r&&"bien-list-item--active",i&&"bien-list-item--disabled",(e||t)&&"bien-list-item--with-prefix",l].filter(Boolean).join(" "),h=()=>{!i&&o&&o()};return a.jsxs("li",{className:u,onClick:h,...c,children:[t&&a.jsx("div",{className:"bien-list-item__avatar",children:t}),e&&a.jsx("div",{className:"bien-list-item__icon",children:e}),a.jsx("div",{className:"bien-list-item__content",children:s})]})}function Af({size:e="md",orientation:t="vertical",spacing:n="sm",dividers:r=!1,children:i,className:o="",...s}){const l=["bien-description-list",`bien-description-list--${t}`,`bien-description-list--size-${e}`,`bien-description-list--spacing-${n}`,r&&"bien-description-list--dividers",o].filter(Boolean).join(" ");return a.jsx("dl",{className:l,...s,children:i})}function Rf({children:e,className:t="",...n}){return a.jsx("dt",{className:`bien-description-term ${t}`,...n,children:e})}function Bf({children:e,className:t="",...n}){return a.jsx("dd",{className:`bien-description-details ${t}`,...n,children:e})}function Ff({name:e,hex:t,rgb:n,usage:r,gradient:i}){const o=i?{background:i}:{backgroundColor:t};return a.jsxs("div",{className:"bien-color-swatch",children:[a.jsx("div",{className:"bien-color-swatch__preview",style:o}),a.jsxs("div",{className:"bien-color-swatch__info",children:[a.jsx("div",{className:"bien-color-swatch__name",children:e}),a.jsx("div",{className:"bien-color-swatch__value",children:t}),n&&a.jsx("div",{className:"bien-color-swatch__rgb",children:n}),a.jsx("div",{className:"bien-color-swatch__usage",children:r})]})]})}function zf({size:e="md",variant:t="spinner",message:n,className:r="",style:i}){const o=["bien-loading",`bien-loading--${e}`,r].filter(Boolean).join(" ");return a.jsxs("div",{className:o,style:i,children:[a.jsx("div",{className:`bien-loading__${t}`}),n&&a.jsx("p",{className:"bien-loading__message",children:n})]})}const $f={"no-data":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("rect",{x:"40",y:"60",width:"120",height:"80",rx:"8",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"85",r:"15",fill:"var(--color-primary)",opacity:"0.2"}),a.jsx("path",{d:"M93 85L98 90L107 78",stroke:"var(--color-primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("rect",{x:"60",y:"110",width:"80",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("rect",{x:"70",y:"120",width:"60",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("circle",{cx:"50",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"150",cy:"35",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"160",cy:"120",r:"3",fill:"var(--color-purple)",opacity:"0.3"})]}),"no-results":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("circle",{cx:"90",cy:"75",r:"32",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"3"}),a.jsx("line",{x1:"113",y1:"98",x2:"135",y2:"120",stroke:"var(--color-border-base)",strokeWidth:"3",strokeLinecap:"round"}),a.jsx("line",{x1:"82",y1:"67",x2:"98",y2:"83",stroke:"var(--color-status-error)",strokeWidth:"2.5",strokeLinecap:"round"}),a.jsx("line",{x1:"98",y1:"67",x2:"82",y2:"83",stroke:"var(--color-status-error)",strokeWidth:"2.5",strokeLinecap:"round"}),a.jsx("circle",{cx:"45",cy:"45",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"155",cy:"50",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"40",cy:"120",r:"3",fill:"var(--color-purple)",opacity:"0.3"}),a.jsx("circle",{cx:"160",cy:"115",r:"3",fill:"var(--color-primary)",opacity:"0.3"})]}),"no-notifications":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("path",{d:"M100 50C95 50 91 54 91 59V65C80 68 72 78 72 90V105L65 112V117H135V112L128 105V90C128 78 120 68 109 65V59C109 54 105 50 100 50Z",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"125",r:"5",fill:"var(--color-border-base)"}),a.jsx("circle",{cx:"115",cy:"60",r:"8",fill:"var(--color-primary)",opacity:"0.2"}),a.jsx("circle",{cx:"50",cy:"45",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"150",cy:"55",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"45",cy:"125",r:"3",fill:"var(--color-purple)",opacity:"0.3"})]}),error:a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("circle",{cx:"100",cy:"80",r:"35",fill:"var(--color-status-error-subtle)",stroke:"var(--color-status-error)",strokeWidth:"2"}),a.jsx("path",{d:"M100 65V85",stroke:"var(--color-status-error)",strokeWidth:"3",strokeLinecap:"round"}),a.jsx("circle",{cx:"100",cy:"95",r:"2.5",fill:"var(--color-status-error)"}),a.jsx("path",{d:"M70 50L80 40M130 50L120 40M70 110L80 120M130 110L120 120",stroke:"var(--color-status-error)",strokeWidth:"2",strokeLinecap:"round",opacity:"0.3"})]}),"coming-soon":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("rect",{x:"60",y:"50",width:"80",height:"70",rx:"8",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"75",r:"12",fill:"var(--color-primary)",opacity:"0.2"}),a.jsx("path",{d:"M100 70V75L103 78",stroke:"var(--color-primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("rect",{x:"75",y:"100",width:"50",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("rect",{x:"85",y:"108",width:"30",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("circle",{cx:"50",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"150",cy:"40",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"45",cy:"130",r:"3",fill:"var(--color-purple)",opacity:"0.3"}),a.jsx("circle",{cx:"155",cy:"125",r:"4",fill:"var(--color-primary)",opacity:"0.3"})]}),"folder-empty":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("path",{d:"M40 70C40 65.5817 43.5817 62 48 62H85L95 52H48C38.0589 52 30 60.0589 30 70V110C30 119.941 38.0589 128 48 128H152C161.941 128 170 119.941 170 110V80C170 70.0589 161.941 62 152 62H105L95 72H152C156.418 72 160 75.5817 160 80V110C160 114.418 156.418 118 152 118H48C43.5817 118 40 114.418 40 110V70Z",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"90",r:"15",fill:"var(--color-primary)",opacity:"0.1"}),a.jsx("circle",{cx:"50",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"155",cy:"45",r:"4",fill:"var(--color-accent)",opacity:"0.3"})]}),"inbox-zero":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("rect",{x:"50",y:"50",width:"100",height:"70",rx:"4",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("path",{d:"M50 70L100 95L150 70",stroke:"var(--color-border-base)",strokeWidth:"2",strokeLinejoin:"round"}),a.jsx("line",{x1:"50",y1:"50",x2:"100",y2:"80",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("line",{x1:"150",y1:"50",x2:"100",y2:"80",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"125",cy:"55",r:"8",fill:"var(--color-status-success)",opacity:"0.8"}),a.jsx("path",{d:"M122 55L124 57L128 53",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("circle",{cx:"45",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"160",cy:"125",r:"4",fill:"var(--color-accent)",opacity:"0.3"})]})};function Hf({illustration:e="no-data",title:t,description:n,action:r,className:i="",style:o}){const s=["bien-empty-state",i].filter(Boolean).join(" "),l=typeof e=="string"?$f[e]:e;return a.jsxs("div",{className:s,style:o,children:[a.jsx("div",{className:"bien-empty-state__illustration",children:l}),a.jsxs("div",{className:"bien-empty-state__content",children:[a.jsx("h3",{className:"bien-empty-state__title",children:t}),n&&a.jsx("p",{className:"bien-empty-state__description",children:n}),r&&a.jsx("div",{className:"bien-empty-state__action",children:r})]})]})}function Vf({title:e,children:t,variant:n="neutral",icon:r,actions:i,dismissible:o=!1,onDismiss:s,defaultVisible:l=!0,visible:c,sticky:u=!1,className:h="",style:d}){const[p,f]=N.useState(l),g=c!==void 0,m=g?c:p,x=()=>{g||f(!1),s==null||s()};if(!m)return null;const k=["bien-banner",`bien-banner--${n}`,u&&"bien-banner--sticky",h].filter(Boolean).join(" "),w=r!==void 0?r:{info:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 15C9.45 15 9 14.55 9 14V10C9 9.45 9.45 9 10 9C10.55 9 11 9.45 11 10V14C11 14.55 10.55 15 10 15ZM11 7H9V5H11V7Z",fill:"currentColor"})}),success:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM8 15L3 10L4.41 8.59L8 12.17L15.59 4.58L17 6L8 15Z",fill:"currentColor"})}),warning:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M1 17H19L10 2L1 17ZM11 14H9V12H11V14ZM11 10H9V6H11V10Z",fill:"currentColor"})}),error:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V13H11V15ZM11 11H9V5H11V11Z",fill:"currentColor"})}),neutral:null,ai:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 15C9.45 15 9 14.55 9 14V10C9 9.45 9.45 9 10 9C10.55 9 11 9.45 11 10V14C11 14.55 10.55 15 10 15ZM11 7H9V5H11V7Z",fill:"currentColor"})})}[n];return a.jsx("div",{className:k,style:d,role:"alert","aria-live":"polite",children:a.jsxs("div",{className:"bien-banner__content",children:[w&&a.jsx("div",{className:"bien-banner__icon",children:w}),a.jsxs("div",{className:"bien-banner__text",children:[e&&a.jsx("div",{className:"bien-banner__title",children:e}),a.jsx("div",{className:"bien-banner__description",children:t})]}),i&&i.length>0&&a.jsx("div",{className:"bien-banner__actions",children:i.map((T,L)=>a.jsx("button",{className:`bien-banner__action bien-banner__action--${T.variant||"secondary"}`,onClick:T.onClick,children:T.label},L))}),o&&a.jsx("button",{className:"bien-banner__dismiss",onClick:x,"aria-label":"Dismiss banner",children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 4L12 12M4 12L12 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]})})}function Uf({children:e,trigger:t,title:n,description:r,actions:i,variant:o="default",position:s="auto",showArrow:l=!0,open:c,defaultOpen:u=!1,onOpenChange:h,closeOnClickOutside:d=!0,className:p=""}){const[f,g]=N.useState(u),[m,x]=N.useState("bottom"),[k,S]=N.useState({top:0,left:0}),w=N.useRef(null),T=N.useRef(null),L=c!==void 0,j=L?c:f,R=()=>{const _=!j;L||g(_),h==null||h(_)},A=N.useCallback(()=>{L||g(!1),h==null||h(!1)},[L,h]);N.useEffect(()=>{if(!j||!w.current||!T.current)return;const _=()=>{const C=w.current.getBoundingClientRect(),P=T.current.getBoundingClientRect(),B=8,M=l?8:0;let W=s==="auto"?"bottom":s,G=0,Z=0;if(s==="auto"){const y=window.innerHeight,K=window.innerWidth,oe=y-C.bottom,b=C.top,J=K-C.right,I=C.left;oe>=P.height+B+M?W="bottom":b>=P.height+B+M?W="top":J>=P.width+B+M?W="right":I>=P.width+B+M?W="left":W="bottom"}switch(W){case"top":G=C.top-P.height-B-M,Z=C.left+C.width/2-P.width/2;break;case"bottom":G=C.bottom+B+M,Z=C.left+C.width/2-P.width/2;break;case"left":G=C.top+C.height/2-P.height/2,Z=C.left-P.width-B-M;break;case"right":G=C.top+C.height/2-P.height/2,Z=C.right+B+M;break}const re=8;Z=Math.max(re,Math.min(Z,window.innerWidth-P.width-re)),G=Math.max(re,Math.min(G,window.innerHeight-P.height-re)),x(W),S({top:G,left:Z})};return _(),window.addEventListener("resize",_),window.addEventListener("scroll",_),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_)}},[j,s,l]),N.useEffect(()=>{if(!j||!d)return;const _=C=>{T.current&&w.current&&!T.current.contains(C.target)&&!w.current.contains(C.target)&&A()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[j,d,A]);const F=["bien-callout",`bien-callout--${o}`,`bien-callout--${m}`,l&&"bien-callout--with-arrow",p].filter(Boolean).join(" "),v=j?di.createPortal(a.jsxs("div",{ref:T,className:F,style:{position:"fixed",top:`${k.top}px`,left:`${k.left}px`,zIndex:9999},role:"dialog","aria-modal":"false",children:[l&&a.jsx("div",{className:"bien-callout__arrow"}),a.jsxs("div",{className:"bien-callout__content",children:[(n||r)&&a.jsxs("div",{className:"bien-callout__header",children:[n&&a.jsx("div",{className:"bien-callout__title",children:n}),r&&a.jsx("div",{className:"bien-callout__description",children:r})]}),a.jsx("div",{className:"bien-callout__body",children:e}),i&&i.length>0&&a.jsx("div",{className:"bien-callout__actions",children:i.map((_,C)=>a.jsx("button",{className:`bien-callout__action bien-callout__action--${_.variant||"secondary"}`,onClick:()=>{_.onClick(),A()},children:_.label},C))})]})]}),document.body):null;return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,onClick:R,style:{display:"inline-block"},children:t}),v]})}function Wf({open:e,onClose:t,children:n,title:r,subtitle:i,header:o,footer:s,size:l="md",variant:c="default",headerVariant:u="default",gradient:h,closeOnOverlayClick:d=!0,showCloseButton:p=!0,className:f=""}){const g=N.useRef(null);if(N.useEffect(()=>{const w=T=>{T.key==="Escape"&&e&&t()};return e&&(document.addEventListener("keydown",w),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",w),document.body.style.overflow=""}},[e,t]),N.useEffect(()=>{if(e&&g.current){const w=g.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),T=w[0],L=w[w.length-1],j=R=>{R.key==="Tab"&&(R.shiftKey?document.activeElement===T&&(R.preventDefault(),L==null||L.focus()):document.activeElement===L&&(R.preventDefault(),T==null||T.focus()))};return document.addEventListener("keydown",j),T==null||T.focus(),()=>{document.removeEventListener("keydown",j)}}},[e]),!e)return null;const m=w=>{w.target===w.currentTarget&&d&&t()},x=["bien-modal",`bien-modal--${l}`,`bien-modal--${c}`,h&&`bien-modal--gradient-${h}`,f].filter(Boolean).join(" "),k=o||r||i,S=a.jsx("div",{className:`bien-modal-overlay ${l==="fullscreen"?"bien-modal-overlay--fullscreen":""}`,onClick:m,children:a.jsxs("div",{className:x,ref:g,role:"dialog","aria-modal":"true",children:[p&&a.jsx("button",{className:"bien-modal__close",onClick:t,"aria-label":"Close modal",children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 5L15 15M5 15L15 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),k&&a.jsx("div",{className:`bien-modal__header bien-modal__header--${u}`,children:o||a.jsxs(a.Fragment,{children:[r&&a.jsx("div",{className:"bien-modal__title",children:r}),i&&a.jsx("div",{className:"bien-modal__subtitle",children:i})]})}),a.jsx("div",{className:"bien-modal__content",children:n}),s&&a.jsx("div",{className:"bien-modal__footer",children:s})]})});return di.createPortal(S,document.body)}function qf({value:e,title:t,subtitle:n,children:r,disabled:i=!1,className:o=""}){const{expandedItems:s,toggleItem:l,variant:c}=Yf(),u=s.includes(e),h=()=>{i||l(e)},d=["bien-accordion-item",`bien-accordion-item--${c}`,u&&"bien-accordion-item--expanded",i&&"bien-accordion-item--disabled",o].filter(Boolean).join(" ");return a.jsxs("div",{className:d,children:[c==="ai"&&a.jsx("div",{className:"bien-accordion-item__ai-border"}),a.jsx("button",{className:"bien-accordion-item__trigger",onClick:h,disabled:i,"aria-expanded":u,"aria-controls":`accordion-content-${e}`,id:`accordion-trigger-${e}`,children:a.jsxs("div",{className:"bien-accordion-item__header",children:[a.jsxs("div",{className:"bien-accordion-item__text",children:[a.jsx("div",{className:"bien-accordion-item__title",children:t}),n&&a.jsx("div",{className:"bien-accordion-item__subtitle",children:n})]}),a.jsx("svg",{className:`bien-accordion-item__icon ${u?"bien-accordion-item__icon--expanded":""}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),a.jsx("div",{className:`bien-accordion-item__content ${u?"bien-accordion-item__content--expanded":"bien-accordion-item__content--collapsed"}`,id:`accordion-content-${e}`,role:"region","aria-labelledby":`accordion-trigger-${e}`,children:a.jsx("div",{className:"bien-accordion-item__content-inner",children:r})})]})}const Io=N.createContext(void 0),Yf=()=>{const e=N.useContext(Io);if(!e)throw new Error("Accordion components must be used within an Accordion");return e};function Gf({children:e,variant:t="default",allowMultiple:n=!1,defaultValue:r,value:i,onValueChange:o,className:s="",style:l}){const c=m=>m?Array.isArray(m)?m:[m]:[],[u,h]=N.useState(c(r)),d=i!==void 0,p=d?c(i):u,f=m=>{let x;n?x=p.includes(m)?p.filter(k=>k!==m):[...p,m]:x=p.includes(m)?[]:[m],d||h(x),o&&o(n?x:x[0]||"")},g=["bien-accordion",`bien-accordion--${t}`,s].filter(Boolean).join(" ");return a.jsx(Io.Provider,{value:{expandedItems:p,toggleItem:f,variant:t,allowMultiple:n},children:a.jsx("div",{className:g,style:l,children:e})})}const Xf=Object.assign(Gf,{Item:qf});function Qf({tabs:e,defaultTab:t,variant:n="default",size:r="md",fullWidth:i=!1,vertical:o=!1,onChange:s,className:l=""}){var g,m;const[c,u]=N.useState(t||((g=e[0])==null?void 0:g.id)),h=(x,k)=>{k||(u(x),s&&s(x))},d=(m=e.find(x=>x.id===c))==null?void 0:m.content,p=["bien-tabs__list",`bien-tabs__list--${n}`,`bien-tabs__list--${r}`,i&&"bien-tabs__list--full-width",o&&"bien-tabs__list--vertical"].filter(Boolean).join(" "),f=["bien-tabs",o&&"bien-tabs--vertical",l].filter(Boolean).join(" ");return a.jsxs("div",{className:f,children:[a.jsx("div",{className:p,role:"tablist","aria-orientation":o?"vertical":"horizontal",children:e.map(x=>{const k=x.id===c,S=["bien-tabs__tab",k&&"bien-tabs__tab--active",x.disabled&&"bien-tabs__tab--disabled"].filter(Boolean).join(" ");return a.jsxs("button",{className:S,onClick:()=>h(x.id,x.disabled),role:"tab","aria-selected":k,"aria-disabled":x.disabled,disabled:x.disabled,type:"button",children:[x.icon&&a.jsx("span",{className:"bien-tabs__icon",children:x.icon}),a.jsx("span",{className:"bien-tabs__label",children:x.label}),x.badge!==void 0&&a.jsx("span",{className:"bien-tabs__badge",children:x.badge})]},x.id)})}),d&&a.jsx("div",{className:"bien-tabs__content",role:"tabpanel",children:d})]})}function Zf({steps:e,currentStep:t,orientation:n="horizontal",variant:r="numbered",size:i="default",clickable:o=!1,onStepClick:s,className:l="",style:c}){const u=["bien-stepper",`bien-stepper--${n}`,`bien-stepper--${r}`,`bien-stepper--${i}`,l].filter(Boolean).join(" "),h=p=>{o&&s&&p<=t&&s(p)},d=p=>p<t?"completed":p===t?"active":"upcoming";return a.jsx("div",{className:u,style:c,children:e.map((p,f)=>{const g=d(f),m=o&&f<=t;return a.jsxs("div",{className:`bien-stepper__step bien-stepper__step--${g} ${m?"bien-stepper__step--clickable":""}`,onClick:()=>h(f),children:[a.jsxs("div",{className:"bien-stepper__step-indicator",children:[r==="numbered"&&a.jsx("span",{className:"bien-stepper__step-number",children:g==="completed"?a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M13.3332 4L5.99984 11.3333L2.6665 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):f+1}),r==="default"&&p.icon&&a.jsx("span",{className:"bien-stepper__step-icon",children:p.icon}),r==="dots"&&a.jsx("span",{className:"bien-stepper__step-dot"})]}),f<e.length-1&&a.jsx("div",{className:"bien-stepper__connector",children:a.jsx("div",{className:"bien-stepper__connector-line",style:{width:g==="completed"?"100%":"0%"}})}),a.jsxs("div",{className:"bien-stepper__step-content",children:[a.jsx("span",{className:"bien-stepper__step-label",children:p.label}),p.description&&a.jsx("span",{className:"bien-stepper__step-description",children:p.description})]})]},f)})})}const Eo=N.forwardRef(({children:e,variant:t="primary",size:n="md",loading:r=!1,fullWidth:i=!1,icon:o,iconPosition:s="start",iconOnly:l=!1,shape:c="default",disabled:u,className:h="",...d},p)=>{const f=["bien-button",`bien-button--${t}`,`bien-button--${n}`,i&&"bien-button--full-width",l&&"bien-button--icon-only",c==="circle"&&"bien-button--circle",h].filter(Boolean).join(" "),g=t==null?void 0:t.startsWith("gradient-"),m=o&&a.jsx("span",{className:`bien-button__icon bien-button__icon--${s}`,children:o}),x=a.jsxs(a.Fragment,{children:[r&&a.jsx("span",{className:"bien-button__spinner","aria-hidden":"true"}),!r&&s==="start"&&m,!l&&e,!r&&s==="end"&&m]});return a.jsx("button",{ref:p,className:f,disabled:u||r,"aria-busy":r,"aria-label":l&&typeof e=="string"?e:void 0,...d,children:g?a.jsx("span",{className:"bien-button__content",children:x}):x})});Eo.displayName="Button";function Jf({children:e,content:t,side:n="top",align:r="center",delayDuration:i=200}){return a.jsxs(Ve.Root,{delayDuration:i,children:[a.jsx(Ve.Trigger,{asChild:!0,children:e}),a.jsx(Ve.Portal,{children:a.jsxs(Ve.Content,{className:"bien-tooltip",side:n,align:r,sideOffset:5,children:[t,a.jsx(Ve.Arrow,{className:"bien-tooltip-arrow"})]})})]})}function Kf({trigger:e,placement:t="bottom-start",autoPlacement:n=!1,variant:r="default",width:i="220px",open:o,onOpenChange:s,children:l,className:c=""}){const[u,h]=N.useState(!1),[d,p]=N.useState({top:0,left:0}),[f,g]=N.useState(t),m=o!==void 0,x=m?o:u,k=N.useRef(null),S=N.useRef(null),w=R=>{m||h(R),s==null||s(R)},T=()=>{w(!x)};N.useEffect(()=>{if(!x||!S.current)return;const R=()=>{const A=S.current.getBoundingClientRect(),F={width:window.innerWidth,height:window.innerHeight},v=k.current,_=typeof i=="number"?i:220,C=v?v.offsetHeight:200;let P=t;if(n){const W=F.height-A.bottom,G=A.top,Z=F.width-A.right,re=A.left,y=C+8,K=W>=y,oe=G>=y,b=_+8,J=Z>=b,I=re>=b;K&&W>=G?P=A.left+_<=F.width?"bottom-start":"bottom-end":oe?P=A.left+_<=F.width?"top-start":"top-end":J?P="right":I?P="left":P="bottom-start"}g(P);let B=0,M=0;switch(P){case"bottom-start":B=A.bottom+4,M=A.left;break;case"bottom-end":B=A.bottom+4,M=A.right-_;break;case"top-start":B=A.top-C-4,M=A.left;break;case"top-end":B=A.top-C-4,M=A.right-_;break;case"left":B=A.top,M=A.left-_-4;break;case"right":B=A.top,M=A.right+4;break}n&&(M+_>F.width&&(M=F.width-_-8),M<8&&(M=8),B+C>F.height&&(B=F.height-C-8),B<8&&(B=8)),p({top:B,left:M})};return R(),window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[x,t,i,n]),N.useEffect(()=>{if(!x)return;const R=A=>{k.current&&S.current&&!k.current.contains(A.target)&&!S.current.contains(A.target)&&w(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[x]),N.useEffect(()=>{if(!x)return;const R=A=>{A.key==="Escape"&&w(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[x]);const L=["bien-menu",`bien-menu--${f}`,`bien-menu--${r}`,x&&"bien-menu--open",c].filter(Boolean).join(" "),j={width:typeof i=="number"?`${i}px`:i,top:`${d.top}px`,left:`${d.left}px`};return a.jsxs("div",{className:"bien-menu-container",children:[a.jsx("div",{ref:S,onClick:T,className:"bien-menu-trigger",children:e}),x&&a.jsx("div",{ref:k,className:L,style:j,children:a.jsx("div",{className:"bien-menu__content",onClick:()=>w(!1),children:l})})]})}function ep({icon:e,children:t,disabled:n=!1,destructive:r=!1,onClick:i,className:o=""}){const s=["bien-menu-item",n&&"bien-menu-item--disabled",r&&"bien-menu-item--destructive",o].filter(Boolean).join(" "),l=c=>{if(n){c.stopPropagation();return}i==null||i()};return a.jsxs("div",{className:s,onClick:l,children:[e&&a.jsx("span",{className:"bien-menu-item__icon",children:e}),a.jsx("span",{className:"bien-menu-item__label",children:t})]})}function tp({className:e=""}){return a.jsx("div",{className:`bien-menu-divider ${e}`})}function np({label:e,children:t,className:n=""}){return a.jsxs("div",{className:`bien-menu-group ${n}`,children:[e&&a.jsx("div",{className:"bien-menu-group__label",children:e}),t]})}function rp({position:e="center",customPosition:t,variant:n="primary",size:r="md",label:i,badge:o,tooltipPosition:s="top",onClick:l,animation:c="pulse",children:u,className:h="",style:d}){const p=["bien-hotspot",`bien-hotspot--${n}`,`bien-hotspot--${r}`,`bien-hotspot--${e}`,c!=="none"&&`bien-hotspot--${c}`,l&&"bien-hotspot--clickable",i&&"bien-hotspot--with-label",h].filter(Boolean).join(" "),g={...e==="custom"&&t?t:{},...d};return a.jsxs("div",{className:p,style:g,onClick:l,children:[c!=="none"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"bien-hotspot__ring bien-hotspot__ring--1"}),a.jsx("div",{className:"bien-hotspot__ring bien-hotspot__ring--2"}),c==="ripple"&&a.jsx("div",{className:"bien-hotspot__ring bien-hotspot__ring--3"})]}),a.jsx("div",{className:"bien-hotspot__dot",children:o!==void 0?a.jsx("span",{className:"bien-hotspot__badge",children:o}):u?a.jsx("div",{className:"bien-hotspot__content",children:u}):null}),i&&a.jsx("div",{className:`bien-hotspot__label bien-hotspot__label--${s}`,children:i})]})}const To=N.createContext({dragDropManager:void 0});function ge(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Zr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Jr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Kr={INIT:"@@redux/INIT"+Jr(),REPLACE:"@@redux/REPLACE"+Jr()};function ip(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function op(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(ap(e))return"date";if(lp(e))return"error";var n=sp(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function sp(e){return typeof e.constructor=="function"?e.constructor.name:null}function lp(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ap(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function $e(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=op(e)),t}function Lo(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ge(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?ge(1):"Expected the enhancer to be a function. Instead, received: '"+$e(n)+"'");return n(Lo)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ge(2):"Expected the root reducer to be a function. Instead, received: '"+$e(e)+"'");var i=e,o=t,s=[],l=s,c=!1;function u(){l===s&&(l=s.slice())}function h(){if(c)throw new Error(process.env.NODE_ENV==="production"?ge(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?ge(4):"Expected the listener to be a function. Instead, received: '"+$e(m)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?ge(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var x=!0;return u(),l.push(m),function(){if(x){if(c)throw new Error(process.env.NODE_ENV==="production"?ge(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");x=!1,u();var S=l.indexOf(m);l.splice(S,1),s=null}}}function p(m){if(!ip(m))throw new Error(process.env.NODE_ENV==="production"?ge(7):"Actions must be plain objects. Instead, the actual type was: '"+$e(m)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?ge(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?ge(9):"Reducers may not dispatch actions.");try{c=!0,o=i(o,m)}finally{c=!1}for(var x=s=l,k=0;k<x.length;k++){var S=x[k];S()}return m}function f(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?ge(10):"Expected the nextReducer to be a function. Instead, received: '"+$e(m));i=m,p({type:Kr.REPLACE})}function g(){var m,x=d;return m={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(process.env.NODE_ENV==="production"?ge(11):"Expected the observer to be an object. Instead, received: '"+$e(S)+"'");function w(){S.next&&S.next(h())}w();var T=x(w);return{unsubscribe:T}}},m[Zr]=function(){return this},m}return p({type:Kr.INIT}),r={dispatch:p,subscribe:d,getState:h,replaceReducer:f},r[Zr]=g,r}function V(e,t,...n){if(cp()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let r;if(t===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(t.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function cp(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function up(e,t,n){return t.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,e)}function dp(e,t){return e.filter(n=>n!==t)}function Oo(e){return typeof e=="object"}function hp(e,t){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((o,s)=>{o===1&&i.push(s)}),i}function fp(e,t){return e.filter(n=>t.indexOf(n)>-1)}const Vn="dnd-core/INIT_COORDS",It="dnd-core/BEGIN_DRAG",Un="dnd-core/PUBLISH_DRAG_SOURCE",Et="dnd-core/HOVER",Tt="dnd-core/DROP",Lt="dnd-core/END_DRAG";function ei(e,t){return{type:Vn,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const pp={type:Vn,payload:{clientOffset:null,sourceClientOffset:null}};function gp(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:s}=r,l=e.getMonitor(),c=e.getRegistry();e.dispatch(ei(o)),mp(n,l,c);const u=yp(n,l);if(u==null){e.dispatch(pp);return}let h=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");bp(s),h=s(u)}e.dispatch(ei(o,h));const p=c.getSource(u).beginDrag(l,u);if(p==null)return;xp(p),c.pinSource(u);const f=c.getSourceType(u);return{type:It,payload:{itemType:f,item:p,sourceId:u,clientOffset:o||null,sourceClientOffset:h||null,isSourcePublic:!!i}}}}function mp(e,t,n){V(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){V(n.getSource(r),"Expected sourceIds to be registered.")})}function bp(e){V(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function xp(e){V(Oo(e),"Item must be an object.")}function yp(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function kp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){kp(e,i,n[i])})}return e}function wp(e){return function(n={}){const r=e.getMonitor(),i=e.getRegistry();jp(r),_p(r).forEach((s,l)=>{const c=Cp(s,l,i,r),u={type:Tt,payload:{dropResult:vp({},n,c)}};e.dispatch(u)})}}function jp(e){V(e.isDragging(),"Cannot call drop while not dragging."),V(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Cp(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return Sp(o),typeof o>"u"&&(o=t===0?{}:r.getDropResult()),o}function Sp(e){V(typeof e>"u"||Oo(e),"Drop result must either be an object or undefined.")}function _p(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Dp(e){return function(){const n=e.getMonitor(),r=e.getRegistry();Np(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Lt}}}function Np(e){V(e.isDragging(),"Cannot call endDrag while not dragging.")}function pn(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function Ip(e){return function(n,{clientOffset:r}={}){Ep(n);const i=n.slice(0),o=e.getMonitor(),s=e.getRegistry(),l=o.getItemType();return Lp(i,s,l),Tp(i,o,s),Op(i,o,s),{type:Et,payload:{targetIds:i,clientOffset:r||null}}}}function Ep(e){V(Array.isArray(e),"Expected targetIds to be an array.")}function Tp(e,t,n){V(t.isDragging(),"Cannot call hover while not dragging."),V(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const i=e[r];V(e.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const o=n.getTarget(i);V(o,"Expected targetIds to be registered.")}}function Lp(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r],o=t.getTargetType(i);pn(o,n)||e.splice(r,1)}}function Op(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Pp(e){return function(){if(e.getMonitor().isDragging())return{type:Un}}}function Mp(e){return{beginDrag:gp(e),publishDragSource:Pp(e),hover:Ip(e),drop:wp(e),endDrag:Dp(e)}}class Ap{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(o){return(...s)=>{const l=o.apply(t,s);typeof l<"u"&&n(l)}}const i=Mp(this);return Object.keys(i).reduce((o,s)=>{const l=i[s];return o[s]=r(l),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function Rp(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Po(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bp(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Po(Rp(t,r),n)}function Fp(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Po(t,n)}const it=[],Wn=[];it.__IS_NONE__=!0;Wn.__IS_ALL__=!0;function zp(e,t){return e===it?!1:e===Wn||typeof t>"u"?!0:fp(t,e).length>0}class $p{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;V(typeof t=="function","listener must be a function."),V(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!zp(s.dirtyHandlerIds,r)||t()}finally{i=l}};return this.store.subscribe(o)}subscribeToOffsetChange(t){V(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return V(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(V(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return pn(r,i)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(V(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!pn(i,o))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(t);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Bp(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Fp(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const ti=typeof global<"u"?global:self,Mo=ti.MutationObserver||ti.WebKitMutationObserver;function Ao(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function Hp(e){let t=1;const n=new Mo(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Vp=typeof Mo=="function"?Hp:Ao;class Up{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const n=this.index;if(this.index++,t[n].call(),this.index>this.capacity){for(let r=0,i=t.length-this.index;r<i;r++)t[r]=t[r+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Vp(this.flush),this.requestErrorThrow=Ao(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Wp{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class qp{create(t){const n=this.freeTasks,r=n.length?n.pop():new Wp(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const Ro=new Up,Yp=new qp(Ro.registerPendingError);function Gp(e){Ro.enqueueTask(Yp.create(e))}const qn="dnd-core/ADD_SOURCE",Yn="dnd-core/ADD_TARGET",Gn="dnd-core/REMOVE_SOURCE",Ot="dnd-core/REMOVE_TARGET";function Xp(e){return{type:qn,payload:{sourceId:e}}}function Qp(e){return{type:Yn,payload:{targetId:e}}}function Zp(e){return{type:Gn,payload:{sourceId:e}}}function Jp(e){return{type:Ot,payload:{targetId:e}}}function Kp(e){V(typeof e.canDrag=="function","Expected canDrag to be a function."),V(typeof e.beginDrag=="function","Expected beginDrag to be a function."),V(typeof e.endDrag=="function","Expected endDrag to be a function.")}function eg(e){V(typeof e.canDrop=="function","Expected canDrop to be a function."),V(typeof e.hover=="function","Expected hover to be a function."),V(typeof e.drop=="function","Expected beginDrag to be a function.")}function gn(e,t){if(t&&Array.isArray(e)){e.forEach(n=>gn(n,!1));return}V(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var be;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(be||(be={}));let tg=0;function ng(){return tg++}function rg(e){const t=ng().toString();switch(e){case be.SOURCE:return`S${t}`;case be.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function ni(e){switch(e[0]){case"S":return be.SOURCE;case"T":return be.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function ri(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,o]}=n.next();if(o===t)return!0;r=!!i}while(!r);return!1}class ig{addSource(t,n){gn(t),Kp(n);const r=this.addHandler(be.SOURCE,t,n);return this.store.dispatch(Xp(r)),r}addTarget(t,n){gn(t,!0),eg(n);const r=this.addHandler(be.TARGET,t,n);return this.store.dispatch(Qp(r)),r}containsHandler(t){return ri(this.dragSources,t)||ri(this.dropTargets,t)}getSource(t,n=!1){return V(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return V(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return V(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return V(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return ni(t)===be.SOURCE}isTargetId(t){return ni(t)===be.TARGET}removeSource(t){V(this.getSource(t),"Expected an existing source."),this.store.dispatch(Zp(t)),Gp(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){V(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Jp(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);V(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){V(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=rg(t);return this.types.set(i,n),t===be.SOURCE?this.dragSources.set(i,r):t===be.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const og=(e,t)=>e===t;function sg(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function lg(e,t,n=og){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function ag(e=it,t){switch(t.type){case Et:break;case qn:case Yn:case Ot:case Gn:return it;case It:case Un:case Lt:case Tt:default:return Wn}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=hp(n,r);if(!(i.length>0||!lg(n,r)))return it;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function cg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ug(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){cg(e,i,n[i])})}return e}const ii={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function dg(e=ii,t){const{payload:n}=t;switch(t.type){case Vn:case It:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Et:return sg(e.clientOffset,n.clientOffset)?e:ug({},e,{clientOffset:n.clientOffset});case Lt:case Tt:return ii;default:return e}}function hg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){hg(e,i,n[i])})}return e}const fg={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function pg(e=fg,t){const{payload:n}=t;switch(t.type){case It:return He({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Un:return He({},e,{isSourcePublic:!0});case Et:return He({},e,{targetIds:n.targetIds});case Ot:return e.targetIds.indexOf(n.targetId)===-1?e:He({},e,{targetIds:dp(e.targetIds,n.targetId)});case Tt:return He({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Lt:return He({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function gg(e=0,t){switch(t.type){case qn:case Yn:return e+1;case Gn:case Ot:return e-1;default:return e}}function mg(e=0){return e+1}function bg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){bg(e,i,n[i])})}return e}function yg(e={},t){return{dirtyHandlerIds:ag(e.dirtyHandlerIds,{type:t.type,payload:xg({},t.payload,{prevTargetIds:up(e,"dragOperation.targetIds",[])})}),dragOffset:dg(e.dragOffset,t),refCount:gg(e.refCount,t),dragOperation:pg(e.dragOperation,t),stateId:mg(e.stateId)}}function kg(e,t=void 0,n={},r=!1){const i=vg(r),o=new $p(i,new ig(i)),s=new Ap(i,o),l=e(s,t,n);return s.receiveBackend(l),s}function vg(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Lo(yg,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function wg(e,t){if(e==null)return{};var n=jg(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jg(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}let oi=0;const bt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Cg=N.memo(function(t){var{children:n}=t,r=wg(t,["children"]);const[i,o]=Sg(r);return N.useEffect(()=>{if(o){const s=Bo();return++oi,()=>{--oi===0&&(s[bt]=null)}}},[]),a.jsx(To.Provider,{value:i,children:n})});function Sg(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=_g(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function _g(e,t=Bo(),n,r){const i=t;return i[bt]||(i[bt]={dragDropManager:kg(e,t,n,r)}),i[bt]}function Bo(){return typeof global<"u"?global:window}var Dg=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const Ng=jn(Dg),Me=typeof window<"u"?N.useLayoutEffect:N.useEffect;function Ig(e,t,n){const[r,i]=N.useState(()=>t(e)),o=N.useCallback(()=>{const s=t(e);Ng(r,s)||(i(s),n&&n())},[r,e,n]);return Me(o),[r,o]}function Eg(e,t,n){const[r,i]=Ig(e,t,n);return Me(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function Fo(e,t,n){return Eg(t,e||(()=>({})),()=>n.reconnect())}function zo(e,t){const n=[];return typeof e!="function"&&n.push(e),N.useMemo(()=>typeof e=="function"?e():e,n)}function Tg(e){return N.useMemo(()=>e.hooks.dragSource(),[e])}function Lg(e){return N.useMemo(()=>e.hooks.dragPreview(),[e])}let Qt=!1,Zt=!1;class Og{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){V(!Qt,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Qt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Qt=!1}}isDragging(){if(!this.sourceId)return!1;V(!Zt,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Zt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Zt=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Jt=!1;class Pg{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;V(!Jt,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Jt=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Jt=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function Mg(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function Ag(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function mn(e,t,n,r){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<o.length;c++){const u=o[c];if(!l(u))return!1;const h=e[u],d=t[u];if(i=void 0,i===!1||i===void 0&&h!==d)return!1}return!0}function bn(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rg(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Bg(e){return(t=null,n=null)=>{if(!N.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return Rg(r),Fg(r,n?o=>e(o,n):e)}}function $o(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=Bg(r);t[n]=()=>i}}),t}function si(e,t){typeof e=="function"?e(t):e.current=t}function Fg(e,t){const n=e.ref;return V(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?N.cloneElement(e,{ref:r=>{si(n,r),si(t,r)}}):N.cloneElement(e,{ref:t})}class zg{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!mn(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!mn(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=$o({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,bn(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,bn(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class $g{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!mn(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=$o({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,bn(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Xe(){const{dragDropManager:e}=N.useContext(To);return V(e!=null,"Expected drag drop context"),e}function Hg(e,t){const n=Xe(),r=N.useMemo(()=>new zg(n.getBackend()),[n]);return Me(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),Me(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Vg(){const e=Xe();return N.useMemo(()=>new Og(e),[e])}class Ug{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function Wg(e,t,n){const r=N.useMemo(()=>new Ug(e,t,n),[t,n]);return N.useEffect(()=>{r.spec=e},[e]),r}function qg(e){return N.useMemo(()=>{const t=e.type;return V(t!=null,"spec.type must be defined"),t},[e])}function Yg(e,t,n){const r=Xe(),i=Wg(e,t,n),o=qg(e);Me(function(){if(o!=null){const[l,c]=Ag(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),c}},[r,t,n,i,o])}function Gg(e,t){const n=zo(e);V(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Vg(),i=Hg(n.options,n.previewOptions);return Yg(n,r,i),[Fo(n.collect,r,i),Tg(i),Lg(i)]}function Xg(e){return N.useMemo(()=>e.hooks.dropTarget(),[e])}function Qg(e){const t=Xe(),n=N.useMemo(()=>new $g(t.getBackend()),[t]);return Me(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Zg(){const e=Xe();return N.useMemo(()=>new Pg(e),[e])}function Jg(e){const{accept:t}=e;return N.useMemo(()=>(V(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Kg{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function em(e,t){const n=N.useMemo(()=>new Kg(e,t),[t]);return N.useEffect(()=>{n.spec=e},[e]),n}function tm(e,t,n){const r=Xe(),i=em(e,t),o=Jg(e);Me(function(){const[l,c]=Mg(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),c},[r,t,i,n,o.map(s=>s.toString()).join("|")])}function nm(e,t){const n=zo(e),r=Zg(),i=Qg(n.options);return tm(n,r,i),[Fo(n.collect,r,i),Xg(i)]}function Ho(e){let t=null;return()=>(t==null&&(t=e()),t)}function rm(e,t){return e.filter(n=>n!==t)}function im(e,t){const n=new Set,r=o=>n.add(o);e.forEach(r),t.forEach(r);const i=[];return n.forEach(o=>i.push(o)),i}class om{enter(t){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=im(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=rm(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class sm{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Vo="__NATIVE_FILE__",Uo="__NATIVE_URL__",Wo="__NATIVE_TEXT__",qo="__NATIVE_HTML__",li=Object.freeze(Object.defineProperty({__proto__:null,FILE:Vo,HTML:qo,TEXT:Wo,URL:Uo},Symbol.toStringTag,{value:"Module"}));function Kt(e,t,n){const r=t.reduce((i,o)=>i||e.getData(o),"");return r??n}const xn={[Vo]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[qo]:{exposeProperties:{html:(e,t)=>Kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Uo]:{exposeProperties:{urls:(e,t)=>Kt(e,t,"").split(`
30
- `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Wo]:{exposeProperties:{text:(e,t)=>Kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function lm(e,t){const n=xn[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new sm(n);return r.loadDataTransfer(t),r}function en(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(xn).filter(n=>{const r=xn[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const am=Ho(()=>/firefox/i.test(navigator.userAgent)),Yo=Ho(()=>!!window.safari);class ai{interpolate(t){const{xs:n,ys:r,c1s:i,c2s:o,c3s:s}=this;let l=n.length-1;if(t===n[l])return r[l];let c=0,u=s.length-1,h;for(;c<=u;){h=Math.floor(.5*(c+u));const f=n[h];if(f<t)c=h+1;else if(f>t)u=h-1;else return r[h]}l=Math.max(0,u);const d=t-n[l],p=d*d;return r[l]+i[l]*d+o[l]*p+s[l]*d*p}constructor(t,n){const{length:r}=t,i=[];for(let f=0;f<r;f++)i.push(f);i.sort((f,g)=>t[f]<t[g]?-1:1);const o=[],s=[];let l,c;for(let f=0;f<r-1;f++)l=t[f+1]-t[f],c=n[f+1]-n[f],o.push(l),s.push(c/l);const u=[s[0]];for(let f=0;f<o.length-1;f++){const g=s[f],m=s[f+1];if(g*m<=0)u.push(0);else{l=o[f];const x=o[f+1],k=l+x;u.push(3*k/((k+x)/g+(k+l)/m))}}u.push(s[s.length-1]);const h=[],d=[];let p;for(let f=0;f<u.length-1;f++){p=s[f];const g=u[f],m=1/o[f],x=g+u[f+1]-p-p;h.push((p-g-x)*m),d.push(x*m*m)}this.xs=t,this.ys=n,this.c1s=u,this.c2s=h,this.c3s=d}}const cm=1;function Go(e){const t=e.nodeType===cm?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function pt(e){return{x:e.clientX,y:e.clientY}}function um(e){var t;return e.nodeName==="IMG"&&(am()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function dm(e,t,n,r){let i=e?t.width:n,o=e?t.height:r;return Yo()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function hm(e,t,n,r,i){const o=um(t),l=Go(o?e:t),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:h}=e,{anchorX:d,anchorY:p}=r,{dragPreviewWidth:f,dragPreviewHeight:g}=dm(o,t,u,h),m=()=>{let j=new ai([0,.5,1],[c.y,c.y/h*g,c.y+g-h]).interpolate(p);return Yo()&&o&&(j+=(window.devicePixelRatio-1)*g),j},x=()=>new ai([0,.5,1],[c.x,c.x/u*f,c.x+f-u]).interpolate(d),{offsetX:k,offsetY:S}=i,w=k===0||k,T=S===0||S;return{x:w?k:x(),y:T?S:m()}}class fm{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}}function pm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ci(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){pm(e,i,n[i])})}return e}class gm{profile(){var t,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const i=s=>this.handleDragStart(s,t),o=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",o),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=s=>this.handleDragEnter(s,t),i=s=>this.handleDragOver(s,t),o=s=>this.handleDrop(s,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",o),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return ci({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return ci({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(li).some(n=>li[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=lm(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&Go(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const s=pt(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=en(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const h=this.monitor.getSourceId(),d=this.sourceNodes.get(h),p=this.sourcePreviewNodes.get(h)||d;if(p){const{anchorX:f,anchorY:g,offsetX:m,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),w=hm(d,p,s,{anchorX:f,anchorY:g},{offsetX:m,offsetY:x});l.setDragImage(p,w.x,w.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=en(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:pt(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=pt(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else en(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:pt(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new fm(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new om(this.isNodeInDocument)}}const mm=function(t,n,r){return new gm(t,n,r)},ui="DRAGGABLE_ITEM";function bm({item:e,index:t,moveItem:n,renderItem:r,showHandle:i}){const o=N.useRef(null),s=N.useRef(null),[{handlerId:l},c]=nm({accept:ui,collect(f){return{handlerId:f.getHandlerId()}},hover(f,g){var L;if(!o.current)return;const m=f.index,x=t;if(m===x)return;const k=(L=o.current)==null?void 0:L.getBoundingClientRect(),S=(k.bottom-k.top)/2,T=g.getClientOffset().y-k.top;m<x&&T<S||m>x&&T>S||(n(m,x),f.index=x)}}),[{isDragging:u},h,d]=Gg({type:ui,item:()=>({id:e.id,index:t}),collect:f=>({isDragging:f.isDragging()})}),p=u?.5:1;return N.useEffect(()=>{i?(d(c(o)),h(s)):h(c(o))},[i,h,c,d]),r?a.jsxs("div",{ref:o,className:`bien-draggable-item ${i?"bien-draggable-item--with-handle":""}`,style:{opacity:p},"data-handler-id":l,children:[i&&a.jsx("div",{ref:s,className:"bien-draggable-handle",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"6",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"12",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"12",r:"1.5",fill:"currentColor"})]})}),a.jsx("div",{className:"bien-draggable-content",children:r(e,u)})]}):a.jsxs("div",{ref:o,className:`bien-draggable-item ${i?"bien-draggable-item--with-handle":""}`,style:{opacity:p},"data-handler-id":l,children:[i&&a.jsx("div",{ref:s,className:"bien-draggable-handle",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"6",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"12",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"12",r:"1.5",fill:"currentColor"})]})}),a.jsx("div",{className:"bien-draggable-content",children:e.content})]})}function xm({items:e,onReorder:t,renderItem:n,showHandle:r=!0,className:i=""}){const o=N.useCallback((l,c)=>{if(l===c)return;const u=[...e],[h]=u.splice(l,1);u.splice(c,0,h),t(u)},[e,t]),s=["bien-draggable-list",i].filter(Boolean).join(" ");return a.jsx("div",{className:s,children:e.map((l,c)=>a.jsx(bm,{item:l,index:c,moveItem:o,renderItem:n,showHandle:r},l.id))})}function ym({children:e,backend:t=mm}){return a.jsx(Cg,{backend:t,children:e})}function km({onFilesSelected:e,onFilesRemoved:t,accept:n,multiple:r=!0,maxSize:i=10*1024*1024,maxFiles:o=10,disabled:s=!1,variant:l="default",showPreview:c=!0,className:u=""}){const[h,d]=N.useState(!1),[p,f]=N.useState([]),[g,m]=N.useState(""),x=N.useRef(null),k=C=>{if(C===0)return"0 Bytes";const P=1024,B=["Bytes","KB","MB","GB"],M=Math.floor(Math.log(C)/Math.log(P));return Math.round(C/Math.pow(P,M)*100)/100+" "+B[M]},S=C=>{const P=[],B=[];return!r&&C.length>1?(P.push("Only one file is allowed"),{valid:B,errors:P}):p.length+C.length>o?(P.push(`Maximum ${o} files allowed`),{valid:B,errors:P}):(C.forEach(M=>{if(i&&M.size>i){P.push(`${M.name} exceeds maximum size of ${k(i)}`);return}if(n){const G=n.split(",").map(K=>K.trim()),Z=M.type,re="."+M.name.split(".").pop();if(!G.some(K=>K.startsWith(".")?re===K:K.endsWith("/*")?Z.startsWith(K.replace("/*","")):Z===K)){P.push(`${M.name} type not accepted`);return}}const W=Object.assign(M,{id:Math.random().toString(36).substr(2,9),preview:M.type.startsWith("image/")?URL.createObjectURL(M):void 0});B.push(W)}),{valid:B,errors:P})},w=C=>{if(!C||C.length===0)return;const P=Array.from(C),{valid:B,errors:M}=S(P);if(M.length>0){m(M.join(", ")),setTimeout(()=>m(""),5e3);return}const W=r?[...p,...B]:B;f(W),m(""),e==null||e(W)},T=C=>{C.preventDefault(),C.stopPropagation(),s||d(!0)},L=C=>{C.preventDefault(),C.stopPropagation(),d(!1)},j=C=>{C.preventDefault(),C.stopPropagation()},R=C=>{C.preventDefault(),C.stopPropagation(),d(!1),!s&&w(C.dataTransfer.files)},A=C=>{w(C.target.files),x.current&&(x.current.value="")},F=C=>{C.preview&&URL.revokeObjectURL(C.preview);const P=p.filter(B=>B.id!==C.id);f(P),t==null||t(P)},v=()=>{var C;s||(C=x.current)==null||C.click()},_=["bien-file-drop",`bien-file-drop--${l}`,h&&"bien-file-drop--dragging",s&&"bien-file-drop--disabled",g&&"bien-file-drop--error",u].filter(Boolean).join(" ");return a.jsxs("div",{className:"bien-file-drop-wrapper",children:[a.jsxs("div",{className:_,onDragEnter:T,onDragOver:j,onDragLeave:L,onDrop:R,onClick:v,children:[l==="ai"&&a.jsx("div",{className:"bien-file-drop__ai-border"}),a.jsx("input",{ref:x,type:"file",onChange:A,accept:n,multiple:r,disabled:s,style:{display:"none"}}),a.jsxs("div",{className:"bien-file-drop__content",children:[a.jsxs("svg",{className:"bien-file-drop__icon",width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[a.jsx("path",{d:"M24 14V34M24 14L18 20M24 14L30 20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M36 28V38C36 39.1046 35.1046 40 34 40H14C12.8954 40 12 39.1046 12 38V28",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),a.jsxs("div",{className:"bien-file-drop__text",children:[a.jsx("p",{className:"bien-file-drop__title",children:h?"Drop files here":"Drag & drop files here"}),a.jsx("p",{className:"bien-file-drop__subtitle",children:"or click to browse"})]}),(n||i)&&a.jsxs("div",{className:"bien-file-drop__info",children:[n&&a.jsxs("span",{children:["Accepted: ",n]}),i&&a.jsxs("span",{children:["Max size: ",k(i)]})]})]})]}),g&&a.jsx("div",{className:"bien-file-drop__error",children:g}),c&&p.length>0&&a.jsx("div",{className:"bien-file-drop__preview",children:p.map(C=>a.jsxs("div",{className:"bien-file-drop__file",children:[a.jsx("div",{className:"bien-file-drop__file-preview",children:C.preview?a.jsx("img",{src:C.preview,alt:C.name}):a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M14 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V8L14 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M14 2V8H20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),a.jsxs("div",{className:"bien-file-drop__file-info",children:[a.jsx("p",{className:"bien-file-drop__file-name",children:C.name}),a.jsx("p",{className:"bien-file-drop__file-size",children:k(C.size)})]}),a.jsx("button",{className:"bien-file-drop__file-remove",onClick:P=>{P.stopPropagation(),F(C)},"aria-label":"Remove file",children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 4L12 12M4 12L12 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]},C.id))})]})}const Xo=N.createContext(null),vm=()=>{const e=N.useContext(Xo);if(!e)throw new Error("Panel components must be used within a PanelGroup");return e};function wm({children:e,side:t="left",variant:n="elevated",defaultCollapsed:r=!1,collapsed:i,onCollapsedChange:o,sidebarWidth:s=280,collapsedWidth:l=60,className:c="",style:u}){const[h,d]=N.useState(r),p=i!==void 0,f=p?i:h,g=x=>{p||d(x),o==null||o(x)},m=["bien-panel-group",`bien-panel-group--${t}`,c].filter(Boolean).join(" ");return a.jsx(Xo.Provider,{value:{collapsed:f,setCollapsed:g,side:t,variant:n,sidebarWidth:s,collapsedWidth:l},children:a.jsx("div",{className:m,style:u,children:e})})}function jm({children:e,className:t="",style:n}){const{collapsed:r,setCollapsed:i,side:o,variant:s,sidebarWidth:l,collapsedWidth:c}=vm(),[u,h]=N.useState(!1),d=["bien-panel-sidebar",`bien-panel-sidebar--${s}`,r&&"bien-panel-sidebar--collapsed",u&&"bien-panel-sidebar--mobile-open",t].filter(Boolean).join(" "),p={...n,width:r?`${c}px`:`${l}px`},f=()=>{i(!r)},g=()=>{h(!u)},m=()=>{h(!1)};return a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"bien-panel-mobile-toggle",onClick:g,"aria-label":"Toggle sidebar",children:a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),u&&a.jsx("div",{className:"bien-panel-backdrop",onClick:m}),a.jsxs("aside",{className:d,style:p,children:[s==="glass-frost"&&a.jsx("div",{className:"bien-panel-sidebar__glass"}),s==="glass-tint"&&a.jsx("div",{className:"bien-panel-sidebar__glass bien-panel-sidebar__glass--tint"}),a.jsx("div",{className:"bien-panel-sidebar__content",children:e}),a.jsx("button",{className:"bien-panel-sidebar__toggle",onClick:f,"aria-label":r?"Expand sidebar":"Collapse sidebar",children:a.jsx("span",{className:"bien-panel-sidebar__toggle-icon",style:{transform:o==="left"?r?"rotate(0deg)":"rotate(180deg)":r?"rotate(180deg)":"rotate(0deg)"}})})]})]})}function Cm({children:e,className:t="",style:n}){const r=["bien-panel-content",t].filter(Boolean).join(" ");return a.jsx("main",{className:r,style:n,children:e})}const Sm=Object.assign(wm,{Sidebar:jm,Content:Cm}),_m={thinking:{icon:"🤔",label:"Thinking",gradient:"var(--gradient-primary)"},reasoning:{icon:"🧠",label:"Reasoning",gradient:"var(--gradient-purple)"},analyzing:{icon:"🔍",label:"Analyzing",gradient:"linear-gradient(135deg, var(--color-teal) 0%, var(--color-blue) 100%)"},processing:{icon:"⚙️",label:"Processing",gradient:"linear-gradient(135deg, var(--color-accent) 0%, var(--color-teal) 100%)"},generating:{icon:"✨",label:"Generating",gradient:"linear-gradient(135deg, var(--color-purple) 0%, var(--color-blue) 100%)"}},Dm={slow:80,normal:50,fast:30};function Nm({text:e,variant:t="thinking",speed:n="normal",showCursor:r=!0,loop:i=!1,onComplete:o,className:s=""}){const[l,c]=N.useState(""),[u,h]=N.useState(0),[d,p]=N.useState(!1),f=_m[t],g=Dm[n];N.useEffect(()=>{if(!e){const x=setTimeout(()=>{c(""),h(0),p(!1)},0);return()=>clearTimeout(x)}if(u<e.length){const x=setTimeout(()=>{c(e.slice(0,u+1)),h(u+1)},g);return()=>clearTimeout(x)}else if(!d){const x=setTimeout(()=>{p(!0),o==null||o(),i&&setTimeout(()=>{c(""),h(0),p(!1)},2e3)},0);return()=>clearTimeout(x)}},[u,e,g,d,i,o]);const m=["bien-thinking-text",`bien-thinking-text--${t}`,s].filter(Boolean).join(" ");return e?a.jsxs("div",{className:m,children:[a.jsxs("div",{className:"bien-thinking-text__content",children:[a.jsx("span",{className:"bien-thinking-text__icon",children:f.icon}),a.jsxs("div",{className:"bien-thinking-text__text-wrapper",children:[a.jsx("span",{className:"bien-thinking-text__text",children:l}),r&&!d&&a.jsx("span",{className:"bien-thinking-text__cursor",children:"|"})]})]}),a.jsx("div",{className:"bien-thinking-text__shimmer"})]}):a.jsx("div",{className:m,children:a.jsxs("div",{className:"bien-thinking-text__indicator",children:[a.jsx("span",{className:"bien-thinking-text__icon",children:f.icon}),a.jsx("span",{className:"bien-thinking-text__label",children:f.label}),a.jsxs("div",{className:"bien-thinking-text__dots",children:[a.jsx("span",{className:"bien-thinking-text__dot"}),a.jsx("span",{className:"bien-thinking-text__dot"}),a.jsx("span",{className:"bien-thinking-text__dot"})]})]})})}function Im({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),a.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function Em({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.jsx("polyline",{points:"7 10 12 15 17 10"}),a.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function Tm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),a.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}function Lm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}function Om({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"12",cy:"12",r:"3"}),a.jsx("path",{d:"M12 1v6m0 6v6m8.66-13.66l-4.24 4.24m-4.24 4.24l-4.24 4.24M23 12h-6m-6 0H1m20.66 8.66l-4.24-4.24m-4.24-4.24l-4.24-4.24"})]})}function Pm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("polyline",{points:"3 6 5 6 21 6"}),a.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}function Mm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Am({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Rm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),a.jsx("polyline",{points:"12 5 19 12 12 19"})]})}function Bm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M12 3v3m0 12v3m9-9h-3M6 12H3m15.364 6.364l-2.121-2.121M8.757 8.757L6.636 6.636m12.728 0l-2.121 2.121M8.757 15.243l-2.121 2.121"})})}function Fm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),a.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})}function zm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("polyline",{points:"15 18 9 12 15 6"})})}function $m({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Hm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}function Vm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),a.jsx("circle",{cx:"9",cy:"7",r:"4"}),a.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),a.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function Um({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),a.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),a.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]})}function Wm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),a.jsx("polyline",{points:"13 2 13 9 20 9"})]})}function qm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function Ym({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"9",cy:"21",r:"1"}),a.jsx("circle",{cx:"20",cy:"21",r:"1"}),a.jsx("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]})}function Gm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),a.jsx("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]})}function Xm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Qm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),a.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}function Zm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),a.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}function Jm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("rect",{x:"3",y:"3",width:"7",height:"9"}),a.jsx("rect",{x:"14",y:"3",width:"7",height:"5"}),a.jsx("rect",{x:"14",y:"12",width:"7",height:"9"}),a.jsx("rect",{x:"3",y:"16",width:"7",height:"5"})]})}exports.Accordion=Xf;exports.ArrowRightIcon=Rm;exports.Avatar=Sf;exports.AvatarGroup=_f;exports.Badge=wf;exports.Banner=Vf;exports.BellIcon=Fm;exports.BienProvider=ls;exports.Breadcrumb=bf;exports.Button=Eo;exports.Callout=Uf;exports.Card=vf;exports.ChartIcon=Um;exports.CheckIcon=Am;exports.Checkbox=Hn;exports.ChevronLeftIcon=zm;exports.ChevronRightIcon=$m;exports.CircularMeter=Lf;exports.ColorSwatch=Ff;exports.Container=ds;exports.CreditCardIcon=Gm;exports.DatePicker=df;exports.DescriptionDetails=Bf;exports.DescriptionList=Af;exports.DescriptionTerm=Rf;exports.Divider=bs;exports.DownloadIcon=Em;exports.DraggableList=xm;exports.DraggableListProvider=ym;exports.EmptyState=Hf;exports.FileDrop=km;exports.FileIcon=Wm;exports.FolderIcon=qm;exports.Grid=hs;exports.HStack=ps;exports.Header=xf;exports.HeartIcon=Lm;exports.HelpCircleIcon=Qm;exports.HomeIcon=Hm;exports.Hotspot=rp;exports.Input=kn;exports.LayoutDashboardIcon=Jm;exports.Link=hf;exports.List=Pf;exports.ListItem=Mf;exports.Loading=zf;exports.MarkdownTextarea=vo;exports.Menu=Kf;exports.MenuDivider=tp;exports.MenuGroup=np;exports.MenuItem=ep;exports.MessageIcon=Xm;exports.Meter=Tf;exports.Modal=Wf;exports.MultiSelect=jo;exports.Panel=Sm;exports.PlusIcon=Im;exports.ProfileAvatar=If;exports.Radio=Co;exports.RadioGroup=So;exports.SearchIcon=Mm;exports.Section=gs;exports.Select=$n;exports.SendIcon=Tm;exports.SettingsIcon=Om;exports.ShoppingCartIcon=Ym;exports.Sidenav=yf;exports.Slider=Do;exports.Spacer=ms;exports.SparklesIcon=Bm;exports.Stepper=Zf;exports.Switch=_o;exports.Table=Of;exports.Tabs=Qf;exports.Text=kf;exports.Textarea=pi;exports.ThinkingText=Nm;exports.Timeline=Ef;exports.ToastProvider=as;exports.Tooltip=Jf;exports.TooltipProvider=us;exports.TrashIcon=Pm;exports.UserIcon=Zm;exports.UsersIcon=Vm;exports.VStack=fs;exports.useToast=cs;
27
+ `,...o.current()});return/^[\t ]/.test(u)&&(u=st(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),c(),l(),u}ro.peek=Jd;function ro(e){return e.value||""}function Jd(){return"<"}io.peek=Kd;function io(e,t,n,r){const i=Fn(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),l()),u+=c.move(")"),s(),u}function Kd(){return"!"}oo.peek=eh;function oo(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,o(),i==="full"||!u||u!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function eh(){return"!"}so.peek=th;function so(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function th(){return"`"}function lo(e,t){const n=Tn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ao.peek=nh;function ao(e,t,n,r){const i=Fn(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(lo(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=h,d}l=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),c()),u+=s.move(")"),l(),u}function nh(e,t,n){return lo(e,n)?"<":"["}co.peek=rh;function co(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,o(),i==="full"||!u||u!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function rh(){return"["}function zn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ih(e){const t=zn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function oh(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function uo(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function sh(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?oh(n):zn(n);const l=e.ordered?s==="."?")":".":ih(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),uo(n)===s&&h){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function lh(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ah(e,t,n,r){const i=lh(n);let o=n.bulletCurrent||zn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),h);return c(),u;function h(d,p,f){return p?(f?"":" ".repeat(s))+d:(f?o:o+" ".repeat(s-o.length))+d}}function ch(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const uh=Dt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dh(e,t,n,r){return(e.children.some(function(s){return uh(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function hh(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ho.peek=fh;function ho(e,t,n,r){const i=hh(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const u=c.charCodeAt(0),h=wt(r.before.charCodeAt(r.before.length-1),u,i);h.inside&&(c=st(u)+c.slice(1));const d=c.charCodeAt(c.length-1),p=wt(r.after.charCodeAt(0),d,i);p.inside&&(c=c.slice(0,-1)+st(d));const f=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+f}function fh(e,t,n){return n.options.strong||"*"}function ph(e,t,n,r){return n.safe(e.value,r)}function gh(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function mh(e,t,n){const r=(uo(n)+(n.options.ruleSpaces?" ":"")).repeat(gh(n));return n.options.ruleSpaces?r.slice(0,-1):r}const fo={blockquote:Fd,break:Yr,code:Ud,definition:Yd,emphasis:no,hardBreak:Yr,heading:Zd,html:ro,image:io,imageReference:oo,inlineCode:so,link:ao,linkReference:co,list:sh,listItem:ah,paragraph:ch,root:dh,strong:ho,text:ph,thematicBreak:mh};function bh(){return{enter:{table:xh,tableData:Gr,tableHeader:Gr,tableRow:kh},exit:{codeText:vh,table:yh,tableData:Xt,tableHeader:Xt,tableRow:Xt}}}function xh(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function yh(e){this.exit(e),this.data.inTable=void 0}function kh(e){this.enter({type:"tableRow",children:[]},e)}function Xt(e){this.exit(e)}function Gr(e){this.enter({type:"tableCell",children:[]},e)}function vh(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,wh));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function wh(e,t){return t==="|"?t:e}function jh(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(f,g,m,x){return u(h(f,m,x),f.align)}function l(f,g,m,x){const k=d(f,m,x),_=u([k]);return _.slice(0,_.indexOf(`
29
+ `))}function c(f,g,m,x){const k=m.enter("tableCell"),_=m.enter("phrasing"),w=m.containerPhrasing(f,{...x,before:o,after:o});return _(),k(),w}function u(f,g){return Rd(f,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function h(f,g,m){const x=f.children;let k=-1;const _=[],w=g.enter("table");for(;++k<x.length;)_[k]=d(x[k],g,m);return w(),_}function d(f,g,m){const x=f.children;let k=-1;const _=[],w=g.enter("tableRow");for(;++k<x.length;)_[k]=c(x[k],f,g,m);return w(),_}function p(f,g,m){let x=fo.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function Ch(){return{exit:{taskListCheckValueChecked:Xr,taskListCheckValueUnchecked:Xr,paragraph:Sh}}}function _h(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Dh}}}function Xr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Sh(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Dh(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let c=fo.listItem(e,t,n,{...r,...l.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(h){return h+s}}function Nh(){return[sd(),Dd(),Ed(),bh(),Ch()]}function Ih(e){return{extensions:[ld(),Nd(e),Ld(),jh(e),_h()]}}const Th={tokenize:Ah,partial:!0},po={tokenize:Rh,partial:!0},go={tokenize:Bh,partial:!0},mo={tokenize:Fh,partial:!0},Eh={tokenize:zh,partial:!0},bo={name:"wwwAutolink",tokenize:Ph,previous:yo},xo={name:"protocolAutolink",tokenize:Mh,previous:ko},Ne={name:"emailAutolink",tokenize:Oh,previous:vo},_e={};function Lh(){return{text:_e}}let Oe=48;for(;Oe<123;)_e[Oe]=Ne,Oe++,Oe===58?Oe=65:Oe===91&&(Oe=97);_e[43]=Ne;_e[45]=Ne;_e[46]=Ne;_e[95]=Ne;_e[72]=[Ne,xo];_e[104]=[Ne,xo];_e[87]=[Ne,bo];_e[119]=[Ne,bo];function Oh(e,t,n){const r=this;let i,o;return s;function s(d){return!fn(d)||!vo.call(r,r.previous)||$n(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return fn(d)?(e.consume(d),l):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(Eh,h,u)(d):d===45||d===95||le(d)?(o=!0,e.consume(d),c):h(d)}function u(d){return e.consume(d),i=!0,c}function h(d){return o&&i&&ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Ph(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!yo.call(r,r.previous)||$n(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Th,e.attempt(po,e.attempt(go,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Mh(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&ko.call(r,r.previous)&&!$n(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(ce(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),o?u:(o=!0,c)):n(d)}function u(d){return d===null||yt(d)||re(d)||Me(d)||Ct(d)?n(d):e.attempt(po,e.attempt(go,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function Ah(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function Rh(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(mo,c,l)(u):u===null||re(u)||Me(u)||u!==45&&Ct(u)?c(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function c(u){return i||r||!o?n(u):t(u)}}function Bh(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(mo,t,o)(s):s===null||re(s)||Me(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function Fh(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||re(l)||Me(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||re(l)||Me(l)?t(l):r(l)}function o(l){return ce(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):ce(l)?(e.consume(l),s):n(l)}}function zh(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return le(o)?n(o):t(o)}}function yo(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||re(e)}function ko(e){return!ce(e)}function vo(e){return!(e===47||fn(e))}function fn(e){return e===43||e===45||e===46||e===95||le(e)}function $n(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const $h={tokenize:Xh,partial:!0};function Hh(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qh,continuation:{tokenize:Yh},exit:Gh}},text:{91:{name:"gfmFootnoteCall",tokenize:Uh},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Vh,resolveTo:Wh}}}}function Vh(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const u=je(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Wh(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Uh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||re(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(je(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return re(d)||(s=!0),o++,e.consume(d),d===92?h:u}function h(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function qh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(s>999||g===93&&!l||g===null||g===91||re(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return o=je(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return re(g)||(l=!0),s++,e.consume(g),g===92?d:h}function d(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function Yh(e,t,n){return e.check(at,t,e.attempt($h,t,n))}function Gh(e){e.exit("gfmFootnoteDefinition")}function Xh(e,t,n){const r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function Qh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let u=c;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[c][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[c][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[c][1].start)},p=[["enter",h,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],f=l.parser.constructs.insideSpan.null;f&&pe(p,p.length,0,_t(f,s.slice(u+1,c),l)),pe(p,p.length,0,[["exit",d,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",h,l]]),pe(s,u-1,c-u+3,p),c=u+p.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function o(s,l,c){const u=this.previous,h=this.events;let d=0;return p;function p(g){return u===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(s.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const m=qe(u);if(g===126)return d>1?c(g):(s.consume(g),d++,f);if(d<2&&!n)return c(g);const x=s.exit("strikethroughSequenceTemporary"),k=qe(g);return x._open=!k||k===2&&!!m,x._close=!m||m===2&&!!k,l(g)}}}class Zh{constructor(){this.map=[]}add(t,n,r){Jh(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Jh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Kh(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function ef(){return{flow:{null:{name:"table",tokenize:tf,resolveAll:nf}}}}function tf(e,t,n){const r=this;let i=0,o=0,s;return l;function l(v){let S=r.events.length-1;for(;S>-1;){const B=r.events[S][1].type;if(B==="lineEnding"||B==="linePrefix")S--;else break}const j=S>-1?r.events[S][1].type:null,O=j==="tableHead"||j==="tableRow"?C:c;return O===C&&r.parser.lazy[r.now().line]?n(v):O(v)}function c(v){return e.enter("tableHead"),e.enter("tableRow"),u(v)}function u(v){return v===124||(s=!0,o+=1),h(v)}function h(v){return v===null?n(v):$(v)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):n(v):G(v)?Q(e,h,"whitespace")(v):(o+=1,s&&(s=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(v)))}function d(v){return v===null||v===124||re(v)?(e.exit("data"),h(v)):(e.consume(v),v===92?p:d)}function p(v){return v===92||v===124?(e.consume(v),d):d(v)}function f(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(e.enter("tableDelimiterRow"),s=!1,G(v)?Q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):g(v))}function g(v){return v===45||v===58?x(v):v===124?(s=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),m):L(v)}function m(v){return G(v)?Q(e,x,"whitespace")(v):x(v)}function x(v){return v===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):v===45?(o+=1,k(v)):v===null||$(v)?E(v):L(v)}function k(v){return v===45?(e.enter("tableDelimiterFiller"),_(v)):L(v)}function _(v){return v===45?(e.consume(v),_):v===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(v))}function w(v){return G(v)?Q(e,E,"whitespace")(v):E(v)}function E(v){return v===124?g(v):v===null||$(v)?!s||i!==o?L(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(v)):L(v)}function L(v){return n(v)}function C(v){return e.enter("tableRow"),R(v)}function R(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),R):v===null||$(v)?(e.exit("tableRow"),t(v)):G(v)?Q(e,R,"whitespace")(v):(e.enter("data"),A(v))}function A(v){return v===null||v===124||re(v)?(e.exit("data"),R(v)):(e.consume(v),v===92?F:A)}function F(v){return v===92||v===124?(e.consume(v),A):A(v)}}function nf(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,u,h,d;const p=new Zh;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(l=!1,c!==0&&(Qr(p,t,c,u,h),h=void 0,c=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),i=g.type==="tableDelimiterRow"?2:h?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=ft(p,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=ft(p,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):g.type==="tableHead"?(l=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,o[1]!==0?(s[0]=s[1],d=ft(p,t,o,i,n,d)):s[1]!==0&&(d=ft(p,t,s,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&Qr(p,t,c,u,h),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=Kh(t.events,n))}return e}function ft(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},We(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=We(t.events,n[1]);if(o={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=We(t.events,n[2]),h=We(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;e.add(g,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},We(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Qr(e,t,n,r,i){const o=[],s=We(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function We(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const rf={name:"tasklistCheck",tokenize:sf};function of(){return{text:{91:rf}}}function sf(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return re(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return $(c)?t(c):G(c)?e.check({tokenize:lf},t,n)(c):n(c)}}function lf(e,t,n){return Q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function af(e){return Ti([Lh(),Hh(),Qh(e),ef(),of()])}const cf={};function uf(e){const t=this,n=e||cf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(af(n)),o.push(Nh()),s.push(Ih(n))}const wo=D.forwardRef(({label:e,error:t,hint:n,showCount:r,className:i="",maxLength:o,value:s,defaultValue:l="",onChange:c,...u},h)=>{const[d,p]=D.useState(l),[f,g]=D.useState("edit"),m=D.useRef(null),x=s!==void 0?s:d,k=x?String(x).length:0,_=L=>{const C=L.target.value;s===void 0&&p(C),c==null||c(C)},w=(L,C="")=>{const R=m.current;if(!R)return;const A=R.selectionStart,F=R.selectionEnd,v=x.substring(A,F),S=x.substring(0,A)+L+v+C+x.substring(F);s===void 0&&p(S),c==null||c(S),setTimeout(()=>{R.focus();const j=A+L.length+v.length;R.setSelectionRange(j,j)},0)},E=["bien-md-textarea-wrapper",t&&"bien-md-textarea-wrapper--error",i].filter(Boolean).join(" ");return a.jsxs("div",{className:E,children:[e&&a.jsxs("label",{className:"bien-md-textarea-label",children:[e,u.required&&a.jsx("span",{className:"bien-md-textarea-required",children:"*"})]}),a.jsxs("div",{className:"bien-md-textarea-container",children:[a.jsxs("div",{className:"bien-md-toolbar",children:[a.jsxs("div",{className:"bien-md-toolbar-group",children:[a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("**","**"),title:"Bold","aria-label":"Bold",children:a.jsx(we.Bold,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("_","_"),title:"Italic","aria-label":"Italic",children:a.jsx(we.Italic,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("# ",""),title:"Heading 1","aria-label":"Heading 1",children:a.jsx(we.Heading1,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("## ",""),title:"Heading 2","aria-label":"Heading 2",children:a.jsx(we.Heading2,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("- ",""),title:"List","aria-label":"List",children:a.jsx(we.List,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("[","](url)"),title:"Link","aria-label":"Link",children:a.jsx(we.Link,{size:16})}),a.jsx("button",{type:"button",className:"bien-md-toolbar-btn",onClick:()=>w("`","`"),title:"Code","aria-label":"Code",children:a.jsx(we.Code,{size:16})})]}),a.jsxs("div",{className:"bien-md-toolbar-group",children:[a.jsx("button",{type:"button",className:`bien-md-toolbar-btn ${f==="edit"?"bien-md-toolbar-btn--active":""}`,onClick:()=>g("edit"),title:"Edit","aria-label":"Edit mode",children:a.jsx(we.Edit3,{size:16})}),a.jsx("button",{type:"button",className:`bien-md-toolbar-btn ${f==="preview"?"bien-md-toolbar-btn--active":""}`,onClick:()=>g("preview"),title:"Preview","aria-label":"Preview mode",children:a.jsx(we.Eye,{size:16})})]})]}),f==="edit"?a.jsx("textarea",{ref:L=>{m.current=L,typeof h=="function"?h(L):h&&(h.current=L)},className:"bien-md-textarea",value:x,onChange:_,maxLength:o,"aria-invalid":t?"true":"false",...u}):a.jsx("div",{className:"bien-md-preview",children:x?a.jsx(Qu,{remarkPlugins:[uf],children:String(x)}):a.jsx("p",{className:"bien-md-preview-empty",children:"Nothing to preview"})})]}),a.jsxs("div",{className:"bien-md-textarea-footer",children:[a.jsxs("div",{className:"bien-md-textarea-messages",children:[n&&!t&&a.jsx("span",{className:"bien-md-textarea-hint",children:n}),t&&a.jsx("span",{className:"bien-md-textarea-error",children:t})]}),r&&a.jsxs("span",{className:"bien-md-textarea-count",children:[k,o&&` / ${o}`]})]})]})});wo.displayName="MarkdownTextarea";const Hn=D.forwardRef(({label:e,error:t,hint:n,options:r,placeholder:i,className:o="",...s},l)=>{const c=["bien-select-wrapper",t&&"bien-select-wrapper--error",o].filter(Boolean).join(" ");return a.jsxs("div",{className:c,children:[e&&a.jsxs("label",{className:"bien-select-label",children:[e,s.required&&a.jsx("span",{className:"bien-select-required",children:"*"})]}),a.jsxs("div",{className:"bien-select-container",children:[a.jsxs("select",{ref:l,className:"bien-select","aria-invalid":t?"true":"false",...s,children:[i&&a.jsx("option",{value:"",disabled:!0,children:i}),r.map(u=>a.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value))]}),a.jsx("svg",{className:"bien-select-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),n&&!t&&a.jsx("span",{className:"bien-select-hint",children:n}),t&&a.jsx("span",{className:"bien-select-error",children:t})]})});Hn.displayName="Select";const Vn=D.forwardRef(({label:e,error:t,hint:n,className:r="",indeterminate:i,...o},s)=>{const l=["bien-checkbox-wrapper",t&&"bien-checkbox-wrapper--error",o.disabled&&"bien-checkbox-wrapper--disabled",r].filter(Boolean).join(" ");return a.jsxs("div",{className:l,children:[a.jsxs("label",{className:"bien-checkbox-label",children:[a.jsx("input",{ref:c=>{c&&(c.indeterminate=i||!1),typeof s=="function"?s(c):s&&(s.current=c)},type:"checkbox",className:"bien-checkbox",...o}),a.jsxs("span",{className:"bien-checkbox-box",children:[a.jsx("svg",{className:"bien-checkbox-check",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),a.jsx("svg",{className:"bien-checkbox-indeterminate",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 8H12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]}),e&&a.jsx("span",{className:"bien-checkbox-text",children:e})]}),n&&!t&&a.jsx("span",{className:"bien-checkbox-hint",children:n}),t&&a.jsx("span",{className:"bien-checkbox-error",children:t})]})});Vn.displayName="Checkbox";const jo=D.forwardRef(({children:e,variant:t="neutral",size:n="md",onRemove:r,removable:i=!1,disabled:o=!1,className:s=""},l)=>{const c=["bien-tags",`bien-tags--${t}`,`bien-tags--${n}`,o&&"bien-tags--disabled",s].filter(Boolean).join(" "),u=h=>{h.stopPropagation(),!o&&r&&r()};return a.jsxs("span",{ref:l,className:c,children:[a.jsx("span",{className:"bien-tags__text",children:e}),(i||r)&&a.jsx("button",{type:"button",className:"bien-tags__remove",onClick:u,disabled:o,"aria-label":`Remove ${typeof e=="string"?e:"tag"}`,children:a.jsx("svg",{className:"bien-tags__remove-icon",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:a.jsx("path",{d:"M3 3L9 9M3 9L9 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});jo.displayName="Tags";const Zr=jo,Co=D.forwardRef(({label:e,error:t,hint:n,options:r,placeholder:i="Select options...",value:o=[],onChange:s,className:l="",disabled:c=!1,required:u=!1,searchable:h=!0,maxTags:d,variant:p="primary"},f)=>{const[g,m]=D.useState(!1),[x,k]=D.useState(""),_=D.useRef(null),w=D.useRef(null),E=["bien-multi-select-wrapper",t&&"bien-multi-select-wrapper--error",l].filter(Boolean).join(" "),L=r.filter(S=>S.label.toLowerCase().includes(x.toLowerCase())),C=()=>{c||(m(!g),!g&&h&&setTimeout(()=>{var S;(S=w.current)==null||S.focus()},50))},R=(S,j)=>{if(j||c)return;const O=o.includes(S)?o.filter(B=>B!==S):[...o,S];s==null||s(O)},A=S=>{c||s==null||s(o.filter(j=>j!==S))},F=d&&o.length>d?o.slice(0,d):o,v=d&&o.length>d?o.length-d:0;return D.useEffect(()=>{const S=j=>{_.current&&!_.current.contains(j.target)&&(m(!1),k(""))};return g&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[g]),D.useEffect(()=>{if(!g){const S=setTimeout(()=>k(""),0);return()=>clearTimeout(S)}},[g]),a.jsxs("div",{className:E,ref:_,children:[e&&a.jsxs("label",{className:"bien-multi-select-label",children:[e,u&&a.jsx("span",{className:"bien-multi-select-required",children:"*"})]}),a.jsxs("div",{style:{position:"relative"},ref:f,children:[a.jsxs("div",{className:"bien-multi-select-trigger",onClick:C,"data-open":g,tabIndex:c?-1:0,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C())},role:"combobox","aria-expanded":g,"aria-haspopup":"listbox","aria-disabled":c,children:[F.length>0?a.jsxs(a.Fragment,{children:[F.map(S=>{const j=r.find(O=>O.value===S);return j?a.jsx(Zr,{variant:p,size:"sm",onRemove:()=>A(S),disabled:c,children:j.label},S):null}),v>0&&a.jsxs(Zr,{variant:p,size:"sm",disabled:!0,children:["+",v," more"]})]}):a.jsx("span",{className:"bien-multi-select-placeholder",children:i}),a.jsx("svg",{className:"bien-multi-select-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),g&&a.jsxs("div",{className:"bien-multi-select-dropdown",role:"listbox",children:[h&&a.jsx("div",{className:"bien-multi-select-search",children:a.jsx(vn,{ref:w,type:"text",placeholder:"Search...",value:x,onChange:S=>k(S.target.value),onClick:S=>S.stopPropagation()})}),L.length>0?L.map(S=>{const j=o.includes(S.value);return a.jsx(Vn,{className:"bien-multi-select-option",checked:j,disabled:S.disabled,onChange:()=>R(S.value,S.disabled),label:S.label},S.value)}):a.jsx("div",{className:"bien-multi-select-no-results",children:"No options found"})]})]}),n&&!t&&a.jsx("span",{className:"bien-multi-select-hint",children:n}),t&&a.jsx("span",{className:"bien-multi-select-error",children:t})]})});Co.displayName="MultiSelect";const _o=D.forwardRef(({label:e,className:t="",...n},r)=>{const i=["bien-radio-wrapper",t].filter(Boolean).join(" ");return a.jsx("div",{className:i,children:a.jsxs("label",{className:"bien-radio-label",children:[a.jsx("input",{ref:r,type:"radio",className:"bien-radio",...n}),a.jsx("span",{className:"bien-radio-box",children:a.jsx("span",{className:"bien-radio-dot"})}),e&&a.jsx("span",{className:"bien-radio-text",children:e})]})})});_o.displayName="Radio";const So=D.forwardRef(({label:e,hint:t,options:n,value:r,defaultValue:i,onValueChange:o,disabled:s,required:l,name:c,orientation:u="vertical",children:h},d)=>a.jsxs("div",{className:"bien-radio-group-wrapper",children:[e&&a.jsxs("div",{className:"bien-radio-group-label",children:[e,l&&a.jsx("span",{className:"bien-radio-required",children:"*"})]}),t&&a.jsx("div",{className:"bien-radio-group-hint",children:t}),a.jsx(Pt.Root,{ref:d,className:`bien-radio-group bien-radio-group--${u}`,value:r,defaultValue:i,onValueChange:o,disabled:s,required:l,name:c,children:n?n.map(p=>a.jsxs("div",{className:"bien-radio-item-wrapper",children:[a.jsx(Pt.Item,{className:"bien-radio-item",value:p.value,disabled:p.disabled||s,id:`${c}-${p.value}`,children:a.jsx(Pt.Indicator,{className:"bien-radio-indicator"})}),a.jsx("label",{htmlFor:`${c}-${p.value}`,className:"bien-radio-label",children:p.label})]},p.value)):h})]}));So.displayName="RadioGroup";const Do=D.forwardRef(({label:e,hint:t,variant:n="default",className:r="",...i},o)=>{const s=["bien-switch-wrapper",i.disabled&&"bien-switch-wrapper--disabled",r].filter(Boolean).join(" "),l=["bien-switch-track",`bien-switch-track--${n}`].filter(Boolean).join(" "),c={...i};return c.checked!==void 0&&c.defaultChecked!==void 0&&delete c.defaultChecked,a.jsx("div",{className:s,children:a.jsxs("label",{className:"bien-switch-label",children:[a.jsx("input",{ref:o,type:"checkbox",className:"bien-switch-input",...c}),a.jsx("span",{className:l,children:a.jsx("span",{className:"bien-switch-thumb"})}),e&&a.jsxs("span",{className:"bien-switch-content",children:[a.jsx("span",{className:"bien-switch-text",children:e}),t&&a.jsx("span",{className:"bien-switch-hint",children:t})]})]})})});Do.displayName="Switch";const No=D.forwardRef(({label:e,hint:t,showValue:n=!0,variant:r="default",className:i="",value:o,onChange:s,min:l=0,max:c=100,...u},h)=>{const[d,p]=D.useState(o||l),f=k=>{p(k.target.value),s==null||s(k)},g=["bien-slider-wrapper",u.disabled&&"bien-slider-wrapper--disabled",i].filter(Boolean).join(" "),m=["bien-slider",`bien-slider--${r}`].filter(Boolean).join(" "),x=(Number(d)-Number(l))/(Number(c)-Number(l))*100;return a.jsxs("div",{className:g,children:[a.jsxs("div",{className:"bien-slider-header",children:[e&&a.jsx("label",{className:"bien-slider-label",children:e}),n&&a.jsx("span",{className:"bien-slider-value",children:d})]}),a.jsx("div",{className:"bien-slider-container",children:a.jsx("input",{ref:h,type:"range",className:m,value:o,onChange:f,min:l,max:c,style:{"--slider-percentage":`${x}%`},...u})}),t&&a.jsx("span",{className:"bien-slider-hint",children:t})]})});No.displayName="Slider";const Jr=["January","February","March","April","May","June","July","August","September","October","November","December"],df=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function hf({value:e,onChange:t,range:n=!1,rangeValue:r,onRangeChange:i,minDate:o,maxDate:s,placeholder:l="Select date",disabled:c=!1,className:u=""}){const[h,d]=D.useState(!1),[p,f]=D.useState(e||new Date),[g,m]=D.useState(r==null?void 0:r.start),[x,k]=D.useState(r==null?void 0:r.end),[_,w]=D.useState(!1),[E,L]=D.useState(!1),C=I=>I?I.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",R=(I,z)=>!I&&!z?"":I&&!z?`${C(I)} - ...`:!I&&z?`... - ${C(z)}`:`${C(I)} - ${C(z)}`,A=I=>{const z=I.getFullYear(),H=I.getMonth(),Z=new Date(z,H,1),ye=new Date(z,H+1,0).getDate(),ke=Z.getDay(),Qe=[];for(let Ie=0;Ie<ke;Ie++)Qe.push(null);for(let Ie=1;Ie<=ye;Ie++)Qe.push(new Date(z,H,Ie));return Qe},F=I=>{if(n){if(!g||g&&x)m(I),k(void 0);else if(g&&!x){if(I<g?(m(I),k(g)):k(I),i){const z=I<g?g:I,H=I<g?I:g;i({start:H,end:z})}setTimeout(()=>d(!1),200)}}else t&&t(I),d(!1)},v=()=>{f(new Date(p.getFullYear(),p.getMonth()-1))},S=()=>{f(new Date(p.getFullYear(),p.getMonth()+1))},j=I=>{f(new Date(p.getFullYear(),I)),w(!1)},O=I=>{f(new Date(I,p.getMonth())),L(!1)},B=()=>{const I=new Date;n?(m(I),k(I),i&&i({start:I,end:I})):t&&t(I),f(I),d(!1)},P=I=>!!(o&&I<o||s&&I>s),q=I=>{const z=new Date;return I.getDate()===z.getDate()&&I.getMonth()===z.getMonth()&&I.getFullYear()===z.getFullYear()},Y=I=>{if(n){if(!g)return!1;const z=I.getTime(),H=new Date(g.getFullYear(),g.getMonth(),g.getDate()).getTime(),Z=x?new Date(x.getFullYear(),x.getMonth(),x.getDate()).getTime():H;return z>=H&&z<=Z}else return e?I.getDate()===e.getDate()&&I.getMonth()===e.getMonth()&&I.getFullYear()===e.getFullYear():!1},J=I=>g?I.getDate()===g.getDate()&&I.getMonth()===g.getMonth()&&I.getFullYear()===g.getFullYear():!1,te=I=>x?I.getDate()===x.getDate()&&I.getMonth()===x.getMonth()&&I.getFullYear()===x.getFullYear():!1,y=A(p),ee=p.getFullYear(),oe=Array.from({length:20},(I,z)=>ee-10+z),b=["bien-datepicker",c&&"bien-datepicker--disabled",u].filter(Boolean).join(" "),K=n?R(g,x):e?C(e):"";return a.jsxs("div",{className:b,children:[a.jsxs("button",{type:"button",className:"bien-datepicker__input",onClick:()=>!c&&d(!h),disabled:c,children:[a.jsx("span",{className:K?"bien-datepicker__value":"bien-datepicker__placeholder",children:K||l}),a.jsxs("svg",{className:"bien-datepicker__icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("rect",{x:"3",y:"4",width:"14",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.5"}),a.jsx("path",{d:"M3 8h14M7 2v4M13 2v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})]}),h&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"bien-datepicker__overlay",onClick:()=>d(!1)}),a.jsxs("div",{className:"bien-datepicker__dropdown",children:[a.jsxs("div",{className:"bien-datepicker__header",children:[a.jsx("button",{type:"button",className:"bien-datepicker__nav-button",onClick:v,children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M12 14L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsxs("div",{className:"bien-datepicker__month-year-selector",children:[a.jsxs("button",{type:"button",className:"bien-datepicker__month-button",onClick:()=>{w(!_),L(!1)},children:[Jr[p.getMonth()],a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),a.jsxs("button",{type:"button",className:"bien-datepicker__year-button",onClick:()=>{L(!E),w(!1)},children:[p.getFullYear(),a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),a.jsx("button",{type:"button",className:"bien-datepicker__nav-button",onClick:S,children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M8 6L12 10L8 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),_&&a.jsx("div",{className:"bien-datepicker__month-grid",children:Jr.map((I,z)=>a.jsx("button",{type:"button",className:`bien-datepicker__month-option ${z===p.getMonth()?"bien-datepicker__month-option--active":""}`,onClick:()=>j(z),children:I.slice(0,3)},I))}),E&&a.jsx("div",{className:"bien-datepicker__year-grid",children:oe.map(I=>a.jsx("button",{type:"button",className:`bien-datepicker__year-option ${I===p.getFullYear()?"bien-datepicker__year-option--active":""}`,onClick:()=>O(I),children:I},I))}),!_&&!E&&a.jsxs("div",{className:"bien-datepicker__calendar",children:[a.jsx("div",{className:"bien-datepicker__weekdays",children:df.map(I=>a.jsx("div",{className:"bien-datepicker__weekday",children:I},I))}),a.jsx("div",{className:"bien-datepicker__days",children:y.map((I,z)=>a.jsx("div",{className:"bien-datepicker__day-cell",children:I&&a.jsx("button",{type:"button",className:["bien-datepicker__day",Y(I)&&"bien-datepicker__day--selected",J(I)&&"bien-datepicker__day--range-start",te(I)&&"bien-datepicker__day--range-end",q(I)&&"bien-datepicker__day--today",P(I)&&"bien-datepicker__day--disabled"].filter(Boolean).join(" "),onClick:()=>!P(I)&&F(I),disabled:P(I),children:I.getDate()})},z))})]}),a.jsx("div",{className:"bien-datepicker__footer",children:a.jsx("button",{type:"button",className:"bien-datepicker__today-button",onClick:B,children:"Today"})})]})]})]})}function ff({href:e,variant:t="default",size:n="md",underline:r="hover",disabled:i=!1,iconStart:o,iconEnd:s,external:l=!1,weight:c="medium",children:u,className:h="",...d}){const p=["bien-link",`bien-link--${t}`,`bien-link--${n}`,`bien-link--underline-${r}`,`bien-link--weight-${c}`,i&&"bien-link--disabled",l&&"bien-link--external",h].filter(Boolean).join(" "),g={...d,href:i?void 0:e,className:p,onClick:m=>{if(i){m.preventDefault();return}d.onClick&&d.onClick(m)},...l&&!i?{target:"_blank",rel:"noopener noreferrer"}:{}};return a.jsxs("a",{...g,children:[o&&a.jsx("span",{className:"bien-link__icon bien-link__icon--start",children:o}),a.jsx("span",{className:"bien-link__text",children:u}),s&&a.jsx("span",{className:"bien-link__icon bien-link__icon--end",children:s}),l&&!s&&a.jsx("span",{className:"bien-link__icon bien-link__icon--external",children:a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),a.jsx("polyline",{points:"15 3 21 3 21 9"}),a.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})})]})}const pf=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M6 12l4-4-4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),gf=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("line",{x1:"6",y1:"12",x2:"10",y2:"4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),mf=()=>a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor"})}),bf=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"13",cy:"8",r:"1.5",fill:"currentColor"})]});function xf({items:e,separator:t="chevron",size:n="md",maxItems:r,onNavigate:i,className:o=""}){const s=t==="slash"?gf:t==="dot"?mf:pf;let l=e,c=!1;if(r&&e.length>r){c=!0;const d=e[0],p=e.slice(-(r-1));l=[d,...p]}const u=["bien-breadcrumb",`bien-breadcrumb--${n}`,o].filter(Boolean).join(" "),h=(d,p,f)=>{if(p.current){d.preventDefault();return}i&&(d.preventDefault(),i(p,f))};return a.jsx("nav",{"aria-label":"Breadcrumb",className:u,children:a.jsx("ol",{className:"bien-breadcrumb__list",children:l.map((d,p)=>{const f=p===l.length-1,g=d.current||f,m=c&&p>0?e.length-(l.length-p):p,x=[];return c&&p===1&&(x.push(a.jsx("li",{className:"bien-breadcrumb__separator","aria-hidden":"true",children:a.jsx(s,{})},`sep-ellipsis-${m}`)),x.push(a.jsx("li",{className:"bien-breadcrumb__item",children:a.jsx("span",{className:"bien-breadcrumb__ellipsis",children:a.jsx(bf,{})})},`ellipsis-${m}`))),p>0&&(!c||p>1)&&x.push(a.jsx("li",{className:"bien-breadcrumb__separator","aria-hidden":"true",children:a.jsx(s,{})},`sep-${m}`)),x.push(a.jsx("li",{className:"bien-breadcrumb__item",children:d.href&&!g?a.jsxs("a",{href:d.href,className:"bien-breadcrumb__link",onClick:k=>h(k,d,m),"aria-current":g?"page":void 0,children:[d.icon&&a.jsx("span",{className:"bien-breadcrumb__icon",children:d.icon}),a.jsx("span",{className:"bien-breadcrumb__label",children:d.label})]}):a.jsxs("span",{className:`bien-breadcrumb__text ${g?"bien-breadcrumb__text--current":""}`,"aria-current":g?"page":void 0,children:[d.icon&&a.jsx("span",{className:"bien-breadcrumb__icon",children:d.icon}),a.jsx("span",{className:"bien-breadcrumb__label",children:d.label})]})},`item-${m}`)),x})})})}function yf({logo:e,logoText:t="Bien UI",logoHref:n="#",navigation:r=[],actions:i,variant:o="default",sticky:s=!1,bordered:l=!0,children:c,className:u=""}){const[h,d]=D.useState(!1),p=["bien-header",`bien-header--${o}`,s&&"bien-header--sticky",l&&"bien-header--bordered",h&&"bien-header--menu-open",u].filter(Boolean).join(" "),f=m=>{m.onClick&&m.onClick(),d(!1)},g=()=>{d(!h)};return a.jsxs("header",{className:p,children:[a.jsxs("div",{className:"bien-header__container",children:[a.jsx("div",{className:"bien-header__logo",children:a.jsx("a",{href:n,className:"bien-header__logo-link",children:e||a.jsx("span",{className:"bien-header__logo-text",children:t})})}),r.length>0&&a.jsx("nav",{className:"bien-header__nav",children:r.map((m,x)=>a.jsx("a",{href:m.href||"#",className:`bien-header__nav-item ${m.active?"bien-header__nav-item--active":""}`,onClick:k=>{m.onClick&&(k.preventDefault(),f(m))},children:m.label},x))}),c&&a.jsx("div",{className:"bien-header__custom",children:c}),i&&a.jsx("div",{className:"bien-header__actions",children:i}),a.jsx("button",{className:"bien-header__mobile-toggle",onClick:g,"aria-label":"Toggle menu","aria-expanded":h,children:a.jsx("span",{className:"bien-header__mobile-toggle-icon",children:h?a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}):a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M3 12H21M3 6H21M3 18H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})]}),(r.length>0||i||c)&&a.jsxs("div",{className:"bien-header__mobile-menu",children:[r.length>0&&a.jsx("nav",{className:"bien-header__mobile-nav",children:r.map((m,x)=>a.jsx("a",{href:m.href||"#",className:`bien-header__mobile-nav-item ${m.active?"bien-header__mobile-nav-item--active":""}`,onClick:k=>{m.onClick?(k.preventDefault(),f(m)):d(!1)},children:m.label},x))}),c&&a.jsx("div",{className:"bien-header__mobile-custom",children:c}),i&&a.jsx("div",{className:"bien-header__mobile-actions",children:i})]})]})}function kf({items:e,variant:t="solid",density:n="comfortable",onItemClick:r,className:i=""}){const[o,s]=D.useState(!1),l=D.useRef(),c=()=>{l.current&&clearTimeout(l.current),s(!0)},u=()=>{l.current=window.setTimeout(()=>{s(!1)},500)};D.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const h=g=>{g.onClick&&g.onClick(),r&&r(g)},d=["bien-sidenav",`bien-sidenav--${t}`,`bien-sidenav--${n}`,o&&"bien-sidenav--expanded",i].filter(Boolean).join(" ");let p="";const f=[];return e.forEach((g,m)=>{g.divider&&g.category&&g.category!==p?(p=g.category,f.push({...g,showCategoryLabel:!0})):f.push(g)}),a.jsx("nav",{className:d,onMouseEnter:c,onMouseLeave:u,"aria-label":"Side navigation",children:a.jsx("div",{className:"bien-sidenav__items",children:f.map((g,m)=>{if(g.divider)return a.jsx("div",{className:"bien-sidenav__divider",children:g.showCategoryLabel&&o&&g.category&&a.jsx("span",{className:"bien-sidenav__category",children:g.category})},`divider-${m}`);const x=["bien-sidenav__item",g.active&&"bien-sidenav__item--active"].filter(Boolean).join(" "),k=a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"bien-sidenav__icon",children:g.icon}),a.jsx("span",{className:"bien-sidenav__label",children:g.label})]});return g.href?a.jsx("a",{href:g.href,className:x,onClick:()=>h(g),"aria-current":g.active?"page":void 0,children:k},g.id):a.jsx("button",{className:x,onClick:()=>h(g),"aria-current":g.active?"page":void 0,type:"button",children:k},g.id)})})})}function vf({children:e,as:t="p",size:n="md",weight:r="normal",tone:i="primary",align:o,truncate:s=!1,maxLines:l,gradient:c,highlight:u,highlightColor:h,decoration:d,transform:p,letterSpacing:f,lineHeight:g,italic:m=!1,className:x="",style:k}){const _=["bien-text",`bien-text--${n}`,`bien-text--weight-${r}`,!c&&`bien-text--${i}`,c&&`bien-text--gradient-${c}`,o&&`bien-text--${o}`,s&&"bien-text--truncate",l&&"bien-text--clamp",d&&`bien-text--decoration-${d}`,p&&`bien-text--transform-${p}`,f&&`bien-text--spacing-${f}`,g&&`bien-text--line-${g}`,m&&"bien-text--italic",u&&`bien-text--highlight-${h}`,x].filter(Boolean).join(" "),w=l?{...k,WebkitLineClamp:l,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden"}:k;return a.jsx(t,{className:_,style:w,children:e})}function wf({children:e,variant:t="elevated",color:n,padding:r="md",radius:i="lg",shadow:o="sm",gradient:s,topGradient:l,hoverable:c=!1,clickable:u=!1,bordered:h=!1,collapsible:d=!1,defaultExpanded:p=!0,expanded:f,onExpandChange:g,header:m,footer:x,title:k,subtitle:_,className:w="",style:E,onClick:L}){const[C,R]=D.useState(p),A=f!==void 0,F=A?f:C,v=()=>{if(!d)return;const O=!F;A||R(O),g==null||g(O)},S=["bien-card",`bien-card--${t}`,n&&`bien-card--color-${n}`,`bien-card--padding-${r}`,`bien-card--radius-${i}`,!s&&`bien-card--shadow-${o}`,s&&`bien-card--gradient-${s}`,l&&"bien-card--has-top-gradient",l&&`bien-card--top-gradient-${l}`,c&&"bien-card--hoverable",u&&"bien-card--clickable",h&&"bien-card--bordered",d&&"bien-card--collapsible",(m||k)&&"bien-card--has-header",x&&"bien-card--has-footer",w].filter(Boolean).join(" "),j=m||k||_;return a.jsxs("div",{className:S,style:E,onClick:u?L:void 0,children:[t==="ai"&&a.jsx("div",{className:"bien-card__ai-border"}),j&&a.jsx("div",{className:"bien-card__header",onClick:d?v:void 0,style:{cursor:d?"pointer":"default"},children:m||a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[a.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[k&&a.jsx("div",{className:"bien-card__title",children:k}),_&&a.jsx("div",{className:"bien-card__subtitle",children:_})]}),d&&a.jsx("button",{className:"bien-card__expand-button","aria-label":F?"Collapse":"Expand","aria-expanded":F,type:"button",onClick:v,children:a.jsx("svg",{className:`bien-card__expand-icon ${F?"bien-card__expand-icon--expanded":""}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),a.jsx("div",{className:`bien-card__content ${d&&!F?"bien-card__content--collapsed":""}`,children:e}),x&&a.jsx("div",{className:"bien-card__footer",children:x})]})}const Io=D.forwardRef(({children:e,variant:t="neutral",size:n="md",icon:r,dot:i=!1,outline:o=!1,className:s=""},l)=>{const c=["bien-badge",`bien-badge--${t}`,`bien-badge--${n}`,o&&"bien-badge--outline",s].filter(Boolean).join(" ");return a.jsxs("span",{ref:l,className:c,children:[i&&a.jsx("span",{className:"bien-badge__dot"}),r&&a.jsx("span",{className:"bien-badge__icon",children:r}),a.jsx("span",{className:"bien-badge__text",children:e}),t==="ai"&&a.jsx("span",{className:"bien-badge__shimmer"})]})});Io.displayName="Badge";const jf=Io;function Cf(e){const t=e.trim().split(" ");return t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}function _f(e){const t=["var(--color-blue)","var(--color-teal)","var(--color-purple)","var(--color-accent)"];let n=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r)+((n<<5)-n);return t[Math.abs(n)%t.length]}function Sf({src:e,alt:t,name:n,size:r="md",shape:i="circle",status:o,showStatus:s=!1,icon:l,className:c=""}){const[u,h]=D.useState(!1),d=["bien-avatar",`bien-avatar--${r}`,`bien-avatar--${i}`,c].filter(Boolean).join(" "),p=n||t||"",f=p?Cf(p):"",g=p?_f(p):"var(--color-bg-subtle)",m=e&&!u,x=!m&&!l&&f,k=!m&&l;return a.jsxs("div",{className:d,children:[a.jsxs("div",{className:"bien-avatar__container",style:{backgroundColor:x?g:void 0},children:[m&&a.jsx("img",{src:e,alt:t||n||"Avatar",className:"bien-avatar__image",onError:()=>h(!0)}),x&&a.jsx("span",{className:"bien-avatar__initials",children:f}),k&&a.jsx("span",{className:"bien-avatar__icon",children:l})]}),s&&o&&a.jsx("span",{className:`bien-avatar__status bien-avatar__status--${o}`})]})}function Df({children:e,max:t=3,size:n="md",className:r=""}){const i=Array.isArray(e)?e:[e],o=i.slice(0,t),s=i.length-t,l=["bien-avatar-group",`bien-avatar-group--${n}`,r].filter(Boolean).join(" ");return a.jsxs("div",{className:l,children:[o,s>0&&a.jsx("div",{className:`bien-avatar bien-avatar--${n} bien-avatar--circle`,children:a.jsx("div",{className:"bien-avatar__container bien-avatar__overflow",children:a.jsxs("span",{className:"bien-avatar__initials",children:["+",s]})})})]})}function Nf(e){const t=e.trim().split(" ");return t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}function If(e){const t=["var(--color-blue)","var(--color-teal)","var(--color-purple)","var(--color-accent)"];let n=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r)+((n<<5)-n);return t[Math.abs(n)%t.length]}function Tf({src:e,alt:t,name:n,size:r="xl",shape:i="circle",status:o,showStatus:s=!1,editable:l=!1,onEdit:c,badge:u,ring:h=!1,ringColor:d="brand",className:p=""}){const[f,g]=D.useState(!1),m=["bien-profile-avatar",`bien-profile-avatar--${r}`,`bien-profile-avatar--${i}`,h&&`bien-profile-avatar--ring-${d}`,p].filter(Boolean).join(" "),x=n||t||"",k=x?Nf(x):"",_=x?If(x):"var(--color-bg-subtle)",w=e&&!f,E=!w&&k;return a.jsxs("div",{className:m,children:[a.jsxs("div",{className:"bien-profile-avatar__container",style:{backgroundColor:E?_:void 0},children:[w&&a.jsx("img",{src:e,alt:t||n||"Profile avatar",className:"bien-profile-avatar__image",onError:()=>g(!0)}),E&&a.jsx("span",{className:"bien-profile-avatar__initials",children:k})]}),l&&a.jsx("button",{type:"button",className:"bien-profile-avatar__edit",onClick:c,"aria-label":"Edit profile picture",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[a.jsx("path",{d:"M9 3H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M15 1l4 4L9 15H5v-4L15 1z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),s&&o&&a.jsx("span",{className:`bien-profile-avatar__status bien-profile-avatar__status--${o}`}),u&&a.jsx("div",{className:"bien-profile-avatar__badge",children:u})]})}function Ef({items:e,orientation:t="vertical",className:n=""}){const r=["bien-timeline",`bien-timeline--${t}`,n].filter(Boolean).join(" ");return a.jsx("div",{className:r,children:e.map((i,o)=>{const s=o===e.length-1,l=["bien-timeline__item",s&&"bien-timeline__item--last"].filter(Boolean).join(" ");return a.jsxs("div",{className:l,children:[a.jsxs("div",{className:"bien-timeline__marker",children:[a.jsx("div",{className:"bien-timeline__dot"}),!s&&a.jsx("div",{className:"bien-timeline__line"})]}),a.jsxs("div",{className:"bien-timeline__content",children:[i.time&&a.jsx("div",{className:"bien-timeline__time",children:i.time}),a.jsx("div",{className:"bien-timeline__title",children:i.title}),i.description&&a.jsx("div",{className:"bien-timeline__description",children:i.description}),i.content&&a.jsx("div",{className:"bien-timeline__extra",children:i.content})]})]},i.id)})})}function Lf({value:e,min:t=0,max:n=100,variant:r="default",size:i="md",label:o,showValue:s=!1,valueFormatter:l,optimum:c,thresholds:u,animated:h=!0,className:d="",style:p}){const f=Math.max(t,Math.min(n,e)),g=(f-t)/(n-t)*100;let m=r;u&&r==="default"&&(c==="low"?u.low!==void 0&&f<=u.low?m="success":u.high!==void 0&&f>=u.high?m="error":m="warning":c==="high"&&(u.high!==void 0&&f>=u.high?m="success":u.low!==void 0&&f<=u.low?m="error":m="warning"));const x=["bien-meter",`bien-meter--${m}`,`bien-meter--${i}`,h&&"bien-meter--animated",d].filter(Boolean).join(" "),k=_=>l?l(_):`${Math.round(_)}`;return a.jsxs("div",{className:x,style:p,children:[(o||s)&&a.jsxs("div",{className:"bien-meter__header",children:[o&&a.jsx("span",{className:"bien-meter__label",children:o}),s&&a.jsxs("span",{className:"bien-meter__value",children:[k(f),"/",n]})]}),a.jsx("div",{className:"bien-meter__track",children:a.jsx("div",{className:"bien-meter__fill",style:{width:`${g}%`},role:"meter","aria-valuenow":f,"aria-valuemin":t,"aria-valuemax":n,"aria-label":o})})]})}function Of({value:e,min:t=0,max:n=100,variant:r="default",size:i=120,strokeWidth:o=8,label:s,showValue:l=!0,valueFormatter:c,animated:u=!0,className:h=""}){const d=Math.max(t,Math.min(n,e)),p=(d-t)/(n-t)*100,f=(i-o)/2,g=2*Math.PI*f,m=g-p/100*g,x=["bien-circular-meter",`bien-circular-meter--${r}`,u&&"bien-circular-meter--animated",h].filter(Boolean).join(" "),k=_=>c?c(_):`${Math.round(_/n*100)}%`;return a.jsxs("div",{className:x,style:{width:i,height:i},children:[a.jsxs("svg",{width:i,height:i,children:[a.jsx("circle",{className:"bien-circular-meter__track",cx:i/2,cy:i/2,r:f,strokeWidth:o}),a.jsx("circle",{className:"bien-circular-meter__fill",cx:i/2,cy:i/2,r:f,strokeWidth:o,strokeDasharray:g,strokeDashoffset:m,transform:`rotate(-90 ${i/2} ${i/2})`})]}),a.jsxs("div",{className:"bien-circular-meter__content",children:[l&&a.jsx("div",{className:"bien-circular-meter__value",children:k(d)}),s&&a.jsx("div",{className:"bien-circular-meter__label",children:s})]})]})}function Pf({columns:e,data:t,variant:n="default",headerVariant:r="glass-frost",size:i="comfortable",hoverable:o=!0,selectable:s=!1,selectedRows:l=[],onSelectionChange:c,rowKey:u=A=>String(A.id)||String(A),onRowClick:h,emptyState:d,caption:p,stickyHeader:f=!1,maxHeight:g,pagination:m=!1,page:x=1,pageSize:k=10,total:_,onPageChange:w,onPageSizeChange:E,pageSizeOptions:L=[5,10,25,50],className:C="",style:R}){const[A,F]=D.useState(null),[v,S]=D.useState("asc"),j=b=>{A===b?S(v==="asc"?"desc":"asc"):(F(b),S("asc"))},O=()=>{c&&(l.length===t.length?c([]):c(t.map(u)))},B=b=>{if(!c)return;const K=u(b);l.includes(K)?c(l.filter(I=>I!==K)):c([...l,K])},P=[...t];A&&P.sort((b,K)=>{const I=b[A],z=K[A];if(I===z)return 0;if(typeof I=="string"&&typeof z=="string"){const Z=I.localeCompare(z);return v==="asc"?Z:-Z}if(typeof I=="number"&&typeof z=="number"){const Z=I-z;return v==="asc"?Z:-Z}const H=String(I).localeCompare(String(z));return v==="asc"?H:-H});const q=["bien-table-container",f&&"bien-table-container--sticky",C].filter(Boolean).join(" "),Y=["bien-table",`bien-table--${n}`,`bien-table--${i}`,o&&"bien-table--hoverable",s&&"bien-table--selectable"].filter(Boolean).join(" "),J=["bien-table__head",`bien-table__head--${r}`].filter(Boolean).join(" "),te=_||t.length,y=Math.ceil(te/k),ee=m?P.slice((x-1)*k,x*k):P,oe={...R,...g?{maxHeight:typeof g=="number"?`${g}px`:g}:{}};return t.length===0&&d?a.jsx("div",{className:q,style:oe,children:a.jsx("div",{className:"bien-table-empty",children:d})}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:q,style:oe,children:a.jsxs("table",{className:Y,children:[p&&a.jsx("caption",{className:"bien-table__caption",children:p}),a.jsx("thead",{className:J,children:a.jsxs("tr",{children:[s&&a.jsx("th",{className:"bien-table__header bien-table__header--checkbox",children:a.jsx("input",{type:"checkbox",checked:l.length===t.length&&t.length>0,onChange:O,className:"bien-table__checkbox"})}),e.map(b=>a.jsx("th",{className:`bien-table__header bien-table__header--${b.align||"left"} ${b.sortable?"bien-table__header--sortable":""} ${A===b.key?"bien-table__header--sorted":""}`,style:{width:b.width},onClick:()=>b.sortable&&j(b.key),children:a.jsxs("div",{className:"bien-table__header-content",children:[b.label,b.sortable&&a.jsx("span",{className:"bien-table__sort-icon",children:A===b.key?v==="asc"?"↑":"↓":"↕"})]})},b.key))]})}),a.jsx("tbody",{className:"bien-table__body",children:ee.map((b,K)=>{const I=u(b),z=l.includes(I);return a.jsxs("tr",{className:`bien-table__row ${z?"bien-table__row--selected":""}`,onClick:()=>h==null?void 0:h(b,K),children:[s&&a.jsx("td",{className:"bien-table__cell bien-table__cell--checkbox",children:a.jsx("input",{type:"checkbox",checked:z,onChange:()=>B(b),onClick:H=>H.stopPropagation(),className:"bien-table__checkbox"})}),e.map(H=>a.jsx("td",{className:`bien-table__cell bien-table__cell--${H.align||"left"}`,children:H.render?H.render(b[H.key],b,K):b[H.key]},H.key))]},I)})})]})}),m&&a.jsxs("div",{className:"bien-table-pagination",children:[E&&a.jsxs("div",{className:"bien-table-pagination__page-size",children:[a.jsx("span",{className:"bien-table-pagination__page-size-label",children:"Rows per page:"}),a.jsx(Hn,{value:String(k),onChange:b=>E(Number(b.target.value)),options:L.map(b=>({value:String(b),label:String(b)}))})]}),a.jsxs("div",{className:"bien-table-pagination__right",children:[a.jsxs("div",{className:"bien-table-pagination__info",children:["Showing ",te===0?0:(x-1)*k+1,"-",Math.min(x*k,te)," of ",te]}),a.jsxs("div",{className:"bien-table-pagination__controls",children:[a.jsx("button",{className:"bien-table-pagination__button bien-table-pagination__button--icon",onClick:()=>w==null?void 0:w(x-1),disabled:x===1,"aria-label":"Previous page",children:a.jsx(we.ChevronLeft,{})}),(()=>{const b=[];if(y<=7)for(let I=1;I<=y;I++)b.push(I);else{b.push(1),x>3&&b.push("...");const I=Math.max(2,x-1),z=Math.min(y-1,x+1);for(let H=I;H<=z;H++)b.includes(H)||b.push(H);x<y-2&&b.push("..."),y>1&&b.push(y)}return b.map((I,z)=>I==="..."?a.jsx("span",{className:"bien-table-pagination__ellipsis",children:"..."},`ellipsis-${z}`):a.jsx("button",{className:`bien-table-pagination__button ${x===I?"bien-table-pagination__button--active":""}`,onClick:()=>w==null?void 0:w(I),children:I},I))})(),a.jsx("button",{className:"bien-table-pagination__button bien-table-pagination__button--icon",onClick:()=>w==null?void 0:w(x+1),disabled:x===y,"aria-label":"Next page",children:a.jsx(we.ChevronRight,{})})]})]})]})]})}function Mf({type:e="unordered",markerStyle:t="default",size:n="md",spacing:r="sm",dividers:i=!1,children:o,className:s="",...l}){const c=["bien-list",`bien-list--${e}`,`bien-list--marker-${t}`,`bien-list--size-${n}`,`bien-list--spacing-${r}`,i&&"bien-list--dividers",s].filter(Boolean).join(" "),u=e==="ordered"?"ol":"ul";return a.jsx(u,{className:c,...l,children:o})}function Af({icon:e,avatar:t,interactive:n=!1,active:r=!1,disabled:i=!1,onClick:o,children:s,className:l="",...c}){const u=["bien-list-item",n&&"bien-list-item--interactive",r&&"bien-list-item--active",i&&"bien-list-item--disabled",(e||t)&&"bien-list-item--with-prefix",l].filter(Boolean).join(" "),h=()=>{!i&&o&&o()};return a.jsxs("li",{className:u,onClick:h,...c,children:[t&&a.jsx("div",{className:"bien-list-item__avatar",children:t}),e&&a.jsx("div",{className:"bien-list-item__icon",children:e}),a.jsx("div",{className:"bien-list-item__content",children:s})]})}function Rf({size:e="md",orientation:t="vertical",spacing:n="sm",dividers:r=!1,children:i,className:o="",...s}){const l=["bien-description-list",`bien-description-list--${t}`,`bien-description-list--size-${e}`,`bien-description-list--spacing-${n}`,r&&"bien-description-list--dividers",o].filter(Boolean).join(" ");return a.jsx("dl",{className:l,...s,children:i})}function Bf({children:e,className:t="",...n}){return a.jsx("dt",{className:`bien-description-term ${t}`,...n,children:e})}function Ff({children:e,className:t="",...n}){return a.jsx("dd",{className:`bien-description-details ${t}`,...n,children:e})}function zf({name:e,hex:t,rgb:n,usage:r,gradient:i}){const o=i?{background:i}:{backgroundColor:t};return a.jsxs("div",{className:"bien-color-swatch",children:[a.jsx("div",{className:"bien-color-swatch__preview",style:o}),a.jsxs("div",{className:"bien-color-swatch__info",children:[a.jsx("div",{className:"bien-color-swatch__name",children:e}),a.jsx("div",{className:"bien-color-swatch__value",children:t}),n&&a.jsx("div",{className:"bien-color-swatch__rgb",children:n}),a.jsx("div",{className:"bien-color-swatch__usage",children:r})]})]})}function $f({size:e="md",variant:t="spinner",message:n,className:r="",style:i}){const o=["bien-loading",`bien-loading--${e}`,r].filter(Boolean).join(" ");return a.jsxs("div",{className:o,style:i,children:[a.jsx("div",{className:`bien-loading__${t}`}),n&&a.jsx("p",{className:"bien-loading__message",children:n})]})}const Hf={"no-data":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("rect",{x:"40",y:"60",width:"120",height:"80",rx:"8",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"85",r:"15",fill:"var(--color-primary)",opacity:"0.2"}),a.jsx("path",{d:"M93 85L98 90L107 78",stroke:"var(--color-primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("rect",{x:"60",y:"110",width:"80",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("rect",{x:"70",y:"120",width:"60",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("circle",{cx:"50",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"150",cy:"35",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"160",cy:"120",r:"3",fill:"var(--color-purple)",opacity:"0.3"})]}),"no-results":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("circle",{cx:"90",cy:"75",r:"32",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"3"}),a.jsx("line",{x1:"113",y1:"98",x2:"135",y2:"120",stroke:"var(--color-border-base)",strokeWidth:"3",strokeLinecap:"round"}),a.jsx("line",{x1:"82",y1:"67",x2:"98",y2:"83",stroke:"var(--color-status-error)",strokeWidth:"2.5",strokeLinecap:"round"}),a.jsx("line",{x1:"98",y1:"67",x2:"82",y2:"83",stroke:"var(--color-status-error)",strokeWidth:"2.5",strokeLinecap:"round"}),a.jsx("circle",{cx:"45",cy:"45",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"155",cy:"50",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"40",cy:"120",r:"3",fill:"var(--color-purple)",opacity:"0.3"}),a.jsx("circle",{cx:"160",cy:"115",r:"3",fill:"var(--color-primary)",opacity:"0.3"})]}),"no-notifications":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("path",{d:"M100 50C95 50 91 54 91 59V65C80 68 72 78 72 90V105L65 112V117H135V112L128 105V90C128 78 120 68 109 65V59C109 54 105 50 100 50Z",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"125",r:"5",fill:"var(--color-border-base)"}),a.jsx("circle",{cx:"115",cy:"60",r:"8",fill:"var(--color-primary)",opacity:"0.2"}),a.jsx("circle",{cx:"50",cy:"45",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"150",cy:"55",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"45",cy:"125",r:"3",fill:"var(--color-purple)",opacity:"0.3"})]}),error:a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("circle",{cx:"100",cy:"80",r:"35",fill:"var(--color-status-error-subtle)",stroke:"var(--color-status-error)",strokeWidth:"2"}),a.jsx("path",{d:"M100 65V85",stroke:"var(--color-status-error)",strokeWidth:"3",strokeLinecap:"round"}),a.jsx("circle",{cx:"100",cy:"95",r:"2.5",fill:"var(--color-status-error)"}),a.jsx("path",{d:"M70 50L80 40M130 50L120 40M70 110L80 120M130 110L120 120",stroke:"var(--color-status-error)",strokeWidth:"2",strokeLinecap:"round",opacity:"0.3"})]}),"coming-soon":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("rect",{x:"60",y:"50",width:"80",height:"70",rx:"8",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"75",r:"12",fill:"var(--color-primary)",opacity:"0.2"}),a.jsx("path",{d:"M100 70V75L103 78",stroke:"var(--color-primary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("rect",{x:"75",y:"100",width:"50",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("rect",{x:"85",y:"108",width:"30",height:"4",rx:"2",fill:"var(--color-border-base)"}),a.jsx("circle",{cx:"50",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"150",cy:"40",r:"4",fill:"var(--color-accent)",opacity:"0.3"}),a.jsx("circle",{cx:"45",cy:"130",r:"3",fill:"var(--color-purple)",opacity:"0.3"}),a.jsx("circle",{cx:"155",cy:"125",r:"4",fill:"var(--color-primary)",opacity:"0.3"})]}),"folder-empty":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("path",{d:"M40 70C40 65.5817 43.5817 62 48 62H85L95 52H48C38.0589 52 30 60.0589 30 70V110C30 119.941 38.0589 128 48 128H152C161.941 128 170 119.941 170 110V80C170 70.0589 161.941 62 152 62H105L95 72H152C156.418 72 160 75.5817 160 80V110C160 114.418 156.418 118 152 118H48C43.5817 118 40 114.418 40 110V70Z",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"100",cy:"90",r:"15",fill:"var(--color-primary)",opacity:"0.1"}),a.jsx("circle",{cx:"50",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"155",cy:"45",r:"4",fill:"var(--color-accent)",opacity:"0.3"})]}),"inbox-zero":a.jsxs("svg",{width:"200",height:"160",viewBox:"0 0 200 160",fill:"none",children:[a.jsx("rect",{x:"50",y:"50",width:"100",height:"70",rx:"4",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("path",{d:"M50 70L100 95L150 70",stroke:"var(--color-border-base)",strokeWidth:"2",strokeLinejoin:"round"}),a.jsx("line",{x1:"50",y1:"50",x2:"100",y2:"80",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("line",{x1:"150",y1:"50",x2:"100",y2:"80",stroke:"var(--color-border-base)",strokeWidth:"2"}),a.jsx("circle",{cx:"125",cy:"55",r:"8",fill:"var(--color-status-success)",opacity:"0.8"}),a.jsx("path",{d:"M122 55L124 57L128 53",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("circle",{cx:"45",cy:"40",r:"3",fill:"var(--color-primary)",opacity:"0.3"}),a.jsx("circle",{cx:"160",cy:"125",r:"4",fill:"var(--color-accent)",opacity:"0.3"})]})};function Vf({illustration:e="no-data",title:t,description:n,action:r,className:i="",style:o}){const s=["bien-empty-state",i].filter(Boolean).join(" "),l=typeof e=="string"?Hf[e]:e;return a.jsxs("div",{className:s,style:o,children:[a.jsx("div",{className:"bien-empty-state__illustration",children:l}),a.jsxs("div",{className:"bien-empty-state__content",children:[a.jsx("h3",{className:"bien-empty-state__title",children:t}),n&&a.jsx("p",{className:"bien-empty-state__description",children:n}),r&&a.jsx("div",{className:"bien-empty-state__action",children:r})]})]})}function Wf({title:e,children:t,variant:n="neutral",icon:r,actions:i,dismissible:o=!1,onDismiss:s,defaultVisible:l=!0,visible:c,sticky:u=!1,className:h="",style:d}){const[p,f]=D.useState(l),g=c!==void 0,m=g?c:p,x=()=>{g||f(!1),s==null||s()};if(!m)return null;const k=["bien-banner",`bien-banner--${n}`,u&&"bien-banner--sticky",h].filter(Boolean).join(" "),w=r!==void 0?r:{info:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 15C9.45 15 9 14.55 9 14V10C9 9.45 9.45 9 10 9C10.55 9 11 9.45 11 10V14C11 14.55 10.55 15 10 15ZM11 7H9V5H11V7Z",fill:"currentColor"})}),success:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM8 15L3 10L4.41 8.59L8 12.17L15.59 4.58L17 6L8 15Z",fill:"currentColor"})}),warning:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M1 17H19L10 2L1 17ZM11 14H9V12H11V14ZM11 10H9V6H11V10Z",fill:"currentColor"})}),error:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V13H11V15ZM11 11H9V5H11V11Z",fill:"currentColor"})}),neutral:null,ai:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 15C9.45 15 9 14.55 9 14V10C9 9.45 9.45 9 10 9C10.55 9 11 9.45 11 10V14C11 14.55 10.55 15 10 15ZM11 7H9V5H11V7Z",fill:"currentColor"})})}[n];return a.jsx("div",{className:k,style:d,role:"alert","aria-live":"polite",children:a.jsxs("div",{className:"bien-banner__content",children:[w&&a.jsx("div",{className:"bien-banner__icon",children:w}),a.jsxs("div",{className:"bien-banner__text",children:[e&&a.jsx("div",{className:"bien-banner__title",children:e}),a.jsx("div",{className:"bien-banner__description",children:t})]}),i&&i.length>0&&a.jsx("div",{className:"bien-banner__actions",children:i.map((E,L)=>a.jsx("button",{className:`bien-banner__action bien-banner__action--${E.variant||"secondary"}`,onClick:E.onClick,children:E.label},L))}),o&&a.jsx("button",{className:"bien-banner__dismiss",onClick:x,"aria-label":"Dismiss banner",children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 4L12 12M4 12L12 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]})})}function Uf({children:e,trigger:t,title:n,description:r,actions:i,variant:o="default",position:s="auto",showArrow:l=!0,open:c,defaultOpen:u=!1,onOpenChange:h,closeOnClickOutside:d=!0,className:p=""}){const[f,g]=D.useState(u),[m,x]=D.useState("bottom"),[k,_]=D.useState({top:0,left:0}),w=D.useRef(null),E=D.useRef(null),L=c!==void 0,C=L?c:f,R=()=>{const S=!C;L||g(S),h==null||h(S)},A=D.useCallback(()=>{L||g(!1),h==null||h(!1)},[L,h]);D.useEffect(()=>{if(!C||!w.current||!E.current)return;const S=()=>{const j=w.current.getBoundingClientRect(),O=E.current.getBoundingClientRect(),B=8,P=l?8:0;let q=s==="auto"?"bottom":s,Y=0,J=0;if(s==="auto"){const y=window.innerHeight,ee=window.innerWidth,oe=y-j.bottom,b=j.top,K=ee-j.right,I=j.left;oe>=O.height+B+P?q="bottom":b>=O.height+B+P?q="top":K>=O.width+B+P?q="right":I>=O.width+B+P?q="left":q="bottom"}switch(q){case"top":Y=j.top-O.height-B-P,J=j.left+j.width/2-O.width/2;break;case"bottom":Y=j.bottom+B+P,J=j.left+j.width/2-O.width/2;break;case"left":Y=j.top+j.height/2-O.height/2,J=j.left-O.width-B-P;break;case"right":Y=j.top+j.height/2-O.height/2,J=j.right+B+P;break}const te=8;J=Math.max(te,Math.min(J,window.innerWidth-O.width-te)),Y=Math.max(te,Math.min(Y,window.innerHeight-O.height-te)),x(q),_({top:Y,left:J})};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S)}},[C,s,l]),D.useEffect(()=>{if(!C||!d)return;const S=j=>{E.current&&w.current&&!E.current.contains(j.target)&&!w.current.contains(j.target)&&A()};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[C,d,A]);const F=["bien-callout",`bien-callout--${o}`,`bien-callout--${m}`,l&&"bien-callout--with-arrow",p].filter(Boolean).join(" "),v=C?yn.createPortal(a.jsxs("div",{ref:E,className:F,style:{position:"fixed",top:`${k.top}px`,left:`${k.left}px`,zIndex:9999},role:"dialog","aria-modal":"false",children:[l&&a.jsx("div",{className:"bien-callout__arrow"}),a.jsxs("div",{className:"bien-callout__content",children:[(n||r)&&a.jsxs("div",{className:"bien-callout__header",children:[n&&a.jsx("div",{className:"bien-callout__title",children:n}),r&&a.jsx("div",{className:"bien-callout__description",children:r})]}),a.jsx("div",{className:"bien-callout__body",children:e}),i&&i.length>0&&a.jsx("div",{className:"bien-callout__actions",children:i.map((S,j)=>a.jsx("button",{className:`bien-callout__action bien-callout__action--${S.variant||"secondary"}`,onClick:()=>{S.onClick(),A()},children:S.label},j))})]})]}),document.body):null;return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,onClick:R,style:{display:"inline-block"},children:t}),v]})}function qf({open:e,onClose:t,children:n,title:r,subtitle:i,header:o,footer:s,size:l="md",variant:c="default",headerVariant:u="default",gradient:h,closeOnOverlayClick:d=!0,showCloseButton:p=!0,className:f=""}){const g=D.useRef(null);if(D.useEffect(()=>{const w=E=>{E.key==="Escape"&&e&&t()};return e&&(document.addEventListener("keydown",w),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",w),document.body.style.overflow=""}},[e,t]),D.useEffect(()=>{if(e&&g.current){const w=g.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),E=w[0],L=w[w.length-1],C=R=>{R.key==="Tab"&&(R.shiftKey?document.activeElement===E&&(R.preventDefault(),L==null||L.focus()):document.activeElement===L&&(R.preventDefault(),E==null||E.focus()))};return document.addEventListener("keydown",C),E==null||E.focus(),()=>{document.removeEventListener("keydown",C)}}},[e]),!e)return null;const m=w=>{w.target===w.currentTarget&&d&&t()},x=["bien-modal",`bien-modal--${l}`,`bien-modal--${c}`,h&&`bien-modal--gradient-${h}`,f].filter(Boolean).join(" "),k=o||r||i,_=a.jsx("div",{className:`bien-modal-overlay ${l==="fullscreen"?"bien-modal-overlay--fullscreen":""}`,onClick:m,children:a.jsxs("div",{className:x,ref:g,role:"dialog","aria-modal":"true",children:[p&&a.jsx("button",{className:"bien-modal__close",onClick:t,"aria-label":"Close modal",children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a.jsx("path",{d:"M5 5L15 15M5 15L15 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),k&&a.jsx("div",{className:`bien-modal__header bien-modal__header--${u}`,children:o||a.jsxs(a.Fragment,{children:[r&&a.jsx("div",{className:"bien-modal__title",children:r}),i&&a.jsx("div",{className:"bien-modal__subtitle",children:i})]})}),a.jsx("div",{className:"bien-modal__content",children:n}),s&&a.jsx("div",{className:"bien-modal__footer",children:s})]})});return yn.createPortal(_,document.body)}function Yf({value:e,title:t,subtitle:n,children:r,disabled:i=!1,className:o=""}){const{expandedItems:s,toggleItem:l,variant:c}=Gf(),u=s.includes(e),h=()=>{i||l(e)},d=["bien-accordion-item",`bien-accordion-item--${c}`,u&&"bien-accordion-item--expanded",i&&"bien-accordion-item--disabled",o].filter(Boolean).join(" ");return a.jsxs("div",{className:d,children:[c==="ai"&&a.jsx("div",{className:"bien-accordion-item__ai-border"}),a.jsx("button",{className:"bien-accordion-item__trigger",onClick:h,disabled:i,"aria-expanded":u,"aria-controls":`accordion-content-${e}`,id:`accordion-trigger-${e}`,children:a.jsxs("div",{className:"bien-accordion-item__header",children:[a.jsxs("div",{className:"bien-accordion-item__text",children:[a.jsx("div",{className:"bien-accordion-item__title",children:t}),n&&a.jsx("div",{className:"bien-accordion-item__subtitle",children:n})]}),a.jsx("svg",{className:`bien-accordion-item__icon ${u?"bien-accordion-item__icon--expanded":""}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),a.jsx("div",{className:`bien-accordion-item__content ${u?"bien-accordion-item__content--expanded":"bien-accordion-item__content--collapsed"}`,id:`accordion-content-${e}`,role:"region","aria-labelledby":`accordion-trigger-${e}`,children:a.jsx("div",{className:"bien-accordion-item__content-inner",children:r})})]})}const To=D.createContext(void 0),Gf=()=>{const e=D.useContext(To);if(!e)throw new Error("Accordion components must be used within an Accordion");return e};function Xf({children:e,variant:t="default",allowMultiple:n=!1,defaultValue:r,value:i,onValueChange:o,className:s="",style:l}){const c=m=>m?Array.isArray(m)?m:[m]:[],[u,h]=D.useState(c(r)),d=i!==void 0,p=d?c(i):u,f=m=>{let x;n?x=p.includes(m)?p.filter(k=>k!==m):[...p,m]:x=p.includes(m)?[]:[m],d||h(x),o&&o(n?x:x[0]||"")},g=["bien-accordion",`bien-accordion--${t}`,s].filter(Boolean).join(" ");return a.jsx(To.Provider,{value:{expandedItems:p,toggleItem:f,variant:t,allowMultiple:n},children:a.jsx("div",{className:g,style:l,children:e})})}const Qf=Object.assign(Xf,{Item:Yf});function Zf({tabs:e,defaultTab:t,variant:n="default",size:r="md",fullWidth:i=!1,vertical:o=!1,onChange:s,className:l=""}){var g,m;const[c,u]=D.useState(t||((g=e[0])==null?void 0:g.id)),h=(x,k)=>{k||(u(x),s&&s(x))},d=(m=e.find(x=>x.id===c))==null?void 0:m.content,p=["bien-tabs__list",`bien-tabs__list--${n}`,`bien-tabs__list--${r}`,i&&"bien-tabs__list--full-width",o&&"bien-tabs__list--vertical"].filter(Boolean).join(" "),f=["bien-tabs",o&&"bien-tabs--vertical",l].filter(Boolean).join(" ");return a.jsxs("div",{className:f,children:[a.jsx("div",{className:p,role:"tablist","aria-orientation":o?"vertical":"horizontal",children:e.map(x=>{const k=x.id===c,_=["bien-tabs__tab",k&&"bien-tabs__tab--active",x.disabled&&"bien-tabs__tab--disabled"].filter(Boolean).join(" ");return a.jsxs("button",{className:_,onClick:()=>h(x.id,x.disabled),role:"tab","aria-selected":k,"aria-disabled":x.disabled,disabled:x.disabled,type:"button",children:[x.icon&&a.jsx("span",{className:"bien-tabs__icon",children:x.icon}),a.jsx("span",{className:"bien-tabs__label",children:x.label}),x.badge!==void 0&&a.jsx("span",{className:"bien-tabs__badge",children:x.badge})]},x.id)})}),d&&a.jsx("div",{className:"bien-tabs__content",role:"tabpanel",children:d})]})}function Jf({steps:e,currentStep:t,orientation:n="horizontal",variant:r="numbered",size:i="default",clickable:o=!1,onStepClick:s,className:l="",style:c}){const u=["bien-stepper",`bien-stepper--${n}`,`bien-stepper--${r}`,`bien-stepper--${i}`,l].filter(Boolean).join(" "),h=p=>{o&&s&&p<=t&&s(p)},d=p=>p<t?"completed":p===t?"active":"upcoming";return a.jsx("div",{className:u,style:c,children:e.map((p,f)=>{const g=d(f),m=o&&f<=t;return a.jsxs("div",{className:`bien-stepper__step bien-stepper__step--${g} ${m?"bien-stepper__step--clickable":""}`,onClick:()=>h(f),children:[a.jsxs("div",{className:"bien-stepper__step-indicator",children:[r==="numbered"&&a.jsx("span",{className:"bien-stepper__step-number",children:g==="completed"?a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M13.3332 4L5.99984 11.3333L2.6665 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):f+1}),r==="default"&&p.icon&&a.jsx("span",{className:"bien-stepper__step-icon",children:p.icon}),r==="dots"&&a.jsx("span",{className:"bien-stepper__step-dot"})]}),f<e.length-1&&a.jsx("div",{className:"bien-stepper__connector",children:a.jsx("div",{className:"bien-stepper__connector-line",style:{width:g==="completed"?"100%":"0%"}})}),a.jsxs("div",{className:"bien-stepper__step-content",children:[a.jsx("span",{className:"bien-stepper__step-label",children:p.label}),p.description&&a.jsx("span",{className:"bien-stepper__step-description",children:p.description})]})]},f)})})}const Wn=D.forwardRef(({children:e,variant:t="primary",size:n="md",loading:r=!1,fullWidth:i=!1,icon:o,iconPosition:s="start",iconOnly:l=!1,shape:c="default",disabled:u,className:h="",...d},p)=>{const f=["bien-button",`bien-button--${t}`,`bien-button--${n}`,i&&"bien-button--full-width",l&&"bien-button--icon-only",c==="circle"&&"bien-button--circle",h].filter(Boolean).join(" "),g=t==null?void 0:t.startsWith("gradient-"),m=o&&a.jsx("span",{className:`bien-button__icon bien-button__icon--${s}`,children:o}),x=a.jsxs(a.Fragment,{children:[r&&a.jsx("span",{className:"bien-button__spinner","aria-hidden":"true"}),!r&&s==="start"&&m,!l&&e,!r&&s==="end"&&m]});return a.jsx("button",{ref:p,className:f,disabled:u||r,"aria-busy":r,"aria-label":l&&typeof e=="string"?e:void 0,...d,children:g?a.jsx("span",{className:"bien-button__content",children:x}):x})});Wn.displayName="Button";function Kf({children:e,content:t,side:n="top",align:r="center",delayDuration:i=200}){return a.jsxs(Ve.Root,{delayDuration:i,children:[a.jsx(Ve.Trigger,{asChild:!0,children:e}),a.jsx(Ve.Portal,{children:a.jsxs(Ve.Content,{className:"bien-tooltip",side:n,align:r,sideOffset:5,children:[t,a.jsx(Ve.Arrow,{className:"bien-tooltip-arrow"})]})})]})}function ep({trigger:e,placement:t="bottom-start",autoPlacement:n=!1,variant:r="default",width:i="220px",open:o,onOpenChange:s,children:l,className:c=""}){const[u,h]=D.useState(!1),[d,p]=D.useState({top:0,left:0}),[f,g]=D.useState(t),m=o!==void 0,x=m?o:u,k=D.useRef(null),_=D.useRef(null),w=R=>{m||h(R),s==null||s(R)},E=()=>{w(!x)};D.useEffect(()=>{if(!x||!_.current)return;const R=()=>{const A=_.current.getBoundingClientRect(),F={width:window.innerWidth,height:window.innerHeight},v=k.current,S=typeof i=="number"?i:220,j=v?v.offsetHeight:200;let O=t;if(n){const q=F.height-A.bottom,Y=A.top,J=F.width-A.right,te=A.left,y=j+8,ee=q>=y,oe=Y>=y,b=S+8,K=J>=b,I=te>=b;ee&&q>=Y?O=A.left+S<=F.width?"bottom-start":"bottom-end":oe?O=A.left+S<=F.width?"top-start":"top-end":K?O="right":I?O="left":O="bottom-start"}g(O);let B=0,P=0;switch(O){case"bottom-start":B=A.bottom+4,P=A.left;break;case"bottom-end":B=A.bottom+4,P=A.right-S;break;case"top-start":B=A.top-j-4,P=A.left;break;case"top-end":B=A.top-j-4,P=A.right-S;break;case"left":B=A.top,P=A.left-S-4;break;case"right":B=A.top,P=A.right+4;break}n&&(P+S>F.width&&(P=F.width-S-8),P<8&&(P=8),B+j>F.height&&(B=F.height-j-8),B<8&&(B=8)),p({top:B,left:P})};return R(),window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[x,t,i,n]),D.useEffect(()=>{if(!x)return;const R=A=>{k.current&&_.current&&!k.current.contains(A.target)&&!_.current.contains(A.target)&&w(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[x]),D.useEffect(()=>{if(!x)return;const R=A=>{A.key==="Escape"&&w(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[x]);const L=["bien-menu",`bien-menu--${f}`,`bien-menu--${r}`,x&&"bien-menu--open",c].filter(Boolean).join(" "),C={width:typeof i=="number"?`${i}px`:i,top:`${d.top}px`,left:`${d.left}px`};return a.jsxs("div",{className:"bien-menu-container",children:[a.jsx("div",{ref:_,onClick:E,className:"bien-menu-trigger",children:e}),x&&a.jsx("div",{ref:k,className:L,style:C,children:a.jsx("div",{className:"bien-menu__content",onClick:()=>w(!1),children:l})})]})}function tp({icon:e,children:t,disabled:n=!1,destructive:r=!1,onClick:i,className:o=""}){const s=["bien-menu-item",n&&"bien-menu-item--disabled",r&&"bien-menu-item--destructive",o].filter(Boolean).join(" "),l=c=>{if(n){c.stopPropagation();return}i==null||i()};return a.jsxs("div",{className:s,onClick:l,children:[e&&a.jsx("span",{className:"bien-menu-item__icon",children:e}),a.jsx("span",{className:"bien-menu-item__label",children:t})]})}function np({className:e=""}){return a.jsx("div",{className:`bien-menu-divider ${e}`})}function rp({label:e,children:t,className:n=""}){return a.jsxs("div",{className:`bien-menu-group ${n}`,children:[e&&a.jsx("div",{className:"bien-menu-group__label",children:e}),t]})}function ip({position:e="center",customPosition:t,variant:n="primary",size:r="md",label:i,badge:o,tooltipPosition:s="top",onClick:l,animation:c="pulse",children:u,className:h="",style:d}){const p=["bien-hotspot",`bien-hotspot--${n}`,`bien-hotspot--${r}`,`bien-hotspot--${e}`,c!=="none"&&`bien-hotspot--${c}`,l&&"bien-hotspot--clickable",i&&"bien-hotspot--with-label",h].filter(Boolean).join(" "),g={...e==="custom"&&t?t:{},...d};return a.jsxs("div",{className:p,style:g,onClick:l,children:[c!=="none"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"bien-hotspot__ring bien-hotspot__ring--1"}),a.jsx("div",{className:"bien-hotspot__ring bien-hotspot__ring--2"}),c==="ripple"&&a.jsx("div",{className:"bien-hotspot__ring bien-hotspot__ring--3"})]}),a.jsx("div",{className:"bien-hotspot__dot",children:o!==void 0?a.jsx("span",{className:"bien-hotspot__badge",children:o}):u?a.jsx("div",{className:"bien-hotspot__content",children:u}):null}),i&&a.jsx("div",{className:`bien-hotspot__label bien-hotspot__label--${s}`,children:i})]})}const Eo=D.createContext({dragDropManager:void 0});function me(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Kr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ei=function(){return Math.random().toString(36).substring(7).split("").join(".")},ti={INIT:"@@redux/INIT"+ei(),REPLACE:"@@redux/REPLACE"+ei()};function op(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function sp(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(cp(e))return"date";if(ap(e))return"error";var n=lp(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function lp(e){return typeof e.constructor=="function"?e.constructor.name:null}function ap(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function cp(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function $e(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=sp(e)),t}function Lo(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?me(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?me(1):"Expected the enhancer to be a function. Instead, received: '"+$e(n)+"'");return n(Lo)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?me(2):"Expected the root reducer to be a function. Instead, received: '"+$e(e)+"'");var i=e,o=t,s=[],l=s,c=!1;function u(){l===s&&(l=s.slice())}function h(){if(c)throw new Error(process.env.NODE_ENV==="production"?me(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?me(4):"Expected the listener to be a function. Instead, received: '"+$e(m)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?me(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var x=!0;return u(),l.push(m),function(){if(x){if(c)throw new Error(process.env.NODE_ENV==="production"?me(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");x=!1,u();var _=l.indexOf(m);l.splice(_,1),s=null}}}function p(m){if(!op(m))throw new Error(process.env.NODE_ENV==="production"?me(7):"Actions must be plain objects. Instead, the actual type was: '"+$e(m)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?me(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?me(9):"Reducers may not dispatch actions.");try{c=!0,o=i(o,m)}finally{c=!1}for(var x=s=l,k=0;k<x.length;k++){var _=x[k];_()}return m}function f(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?me(10):"Expected the nextReducer to be a function. Instead, received: '"+$e(m));i=m,p({type:ti.REPLACE})}function g(){var m,x=d;return m={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(process.env.NODE_ENV==="production"?me(11):"Expected the observer to be an object. Instead, received: '"+$e(_)+"'");function w(){_.next&&_.next(h())}w();var E=x(w);return{unsubscribe:E}}},m[Kr]=function(){return this},m}return p({type:ti.INIT}),r={dispatch:p,subscribe:d,getState:h,replaceReducer:f},r[Kr]=g,r}function W(e,t,...n){if(up()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let r;if(t===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(t.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function up(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function dp(e,t,n){return t.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,e)}function hp(e,t){return e.filter(n=>n!==t)}function Oo(e){return typeof e=="object"}function fp(e,t){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((o,s)=>{o===1&&i.push(s)}),i}function pp(e,t){return e.filter(n=>t.indexOf(n)>-1)}const Un="dnd-core/INIT_COORDS",It="dnd-core/BEGIN_DRAG",qn="dnd-core/PUBLISH_DRAG_SOURCE",Tt="dnd-core/HOVER",Et="dnd-core/DROP",Lt="dnd-core/END_DRAG";function ni(e,t){return{type:Un,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const gp={type:Un,payload:{clientOffset:null,sourceClientOffset:null}};function mp(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:s}=r,l=e.getMonitor(),c=e.getRegistry();e.dispatch(ni(o)),bp(n,l,c);const u=kp(n,l);if(u==null){e.dispatch(gp);return}let h=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");xp(s),h=s(u)}e.dispatch(ni(o,h));const p=c.getSource(u).beginDrag(l,u);if(p==null)return;yp(p),c.pinSource(u);const f=c.getSourceType(u);return{type:It,payload:{itemType:f,item:p,sourceId:u,clientOffset:o||null,sourceClientOffset:h||null,isSourcePublic:!!i}}}}function bp(e,t,n){W(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){W(n.getSource(r),"Expected sourceIds to be registered.")})}function xp(e){W(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function yp(e){W(Oo(e),"Item must be an object.")}function kp(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function vp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){vp(e,i,n[i])})}return e}function jp(e){return function(n={}){const r=e.getMonitor(),i=e.getRegistry();Cp(r),Dp(r).forEach((s,l)=>{const c=_p(s,l,i,r),u={type:Et,payload:{dropResult:wp({},n,c)}};e.dispatch(u)})}}function Cp(e){W(e.isDragging(),"Cannot call drop while not dragging."),W(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function _p(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return Sp(o),typeof o>"u"&&(o=t===0?{}:r.getDropResult()),o}function Sp(e){W(typeof e>"u"||Oo(e),"Drop result must either be an object or undefined.")}function Dp(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Np(e){return function(){const n=e.getMonitor(),r=e.getRegistry();Ip(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Lt}}}function Ip(e){W(e.isDragging(),"Cannot call endDrag while not dragging.")}function pn(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function Tp(e){return function(n,{clientOffset:r}={}){Ep(n);const i=n.slice(0),o=e.getMonitor(),s=e.getRegistry(),l=o.getItemType();return Op(i,s,l),Lp(i,o,s),Pp(i,o,s),{type:Tt,payload:{targetIds:i,clientOffset:r||null}}}}function Ep(e){W(Array.isArray(e),"Expected targetIds to be an array.")}function Lp(e,t,n){W(t.isDragging(),"Cannot call hover while not dragging."),W(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const i=e[r];W(e.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const o=n.getTarget(i);W(o,"Expected targetIds to be registered.")}}function Op(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r],o=t.getTargetType(i);pn(o,n)||e.splice(r,1)}}function Pp(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Mp(e){return function(){if(e.getMonitor().isDragging())return{type:qn}}}function Ap(e){return{beginDrag:mp(e),publishDragSource:Mp(e),hover:Tp(e),drop:jp(e),endDrag:Np(e)}}class Rp{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(o){return(...s)=>{const l=o.apply(t,s);typeof l<"u"&&n(l)}}const i=Ap(this);return Object.keys(i).reduce((o,s)=>{const l=i[s];return o[s]=r(l),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function Bp(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Po(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fp(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Po(Bp(t,r),n)}function zp(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Po(t,n)}const it=[],Yn=[];it.__IS_NONE__=!0;Yn.__IS_ALL__=!0;function $p(e,t){return e===it?!1:e===Yn||typeof t>"u"?!0:pp(t,e).length>0}class Hp{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;W(typeof t=="function","listener must be a function."),W(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!$p(s.dirtyHandlerIds,r)||t()}finally{i=l}};return this.store.subscribe(o)}subscribeToOffsetChange(t){W(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return W(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(W(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return pn(r,i)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(W(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!pn(i,o))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(t);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Fp(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return zp(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const ri=typeof global<"u"?global:self,Mo=ri.MutationObserver||ri.WebKitMutationObserver;function Ao(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function Vp(e){let t=1;const n=new Mo(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Wp=typeof Mo=="function"?Vp:Ao;class Up{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const n=this.index;if(this.index++,t[n].call(),this.index>this.capacity){for(let r=0,i=t.length-this.index;r<i;r++)t[r]=t[r+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Wp(this.flush),this.requestErrorThrow=Ao(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class qp{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class Yp{create(t){const n=this.freeTasks,r=n.length?n.pop():new qp(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const Ro=new Up,Gp=new Yp(Ro.registerPendingError);function Xp(e){Ro.enqueueTask(Gp.create(e))}const Gn="dnd-core/ADD_SOURCE",Xn="dnd-core/ADD_TARGET",Qn="dnd-core/REMOVE_SOURCE",Ot="dnd-core/REMOVE_TARGET";function Qp(e){return{type:Gn,payload:{sourceId:e}}}function Zp(e){return{type:Xn,payload:{targetId:e}}}function Jp(e){return{type:Qn,payload:{sourceId:e}}}function Kp(e){return{type:Ot,payload:{targetId:e}}}function eg(e){W(typeof e.canDrag=="function","Expected canDrag to be a function."),W(typeof e.beginDrag=="function","Expected beginDrag to be a function."),W(typeof e.endDrag=="function","Expected endDrag to be a function.")}function tg(e){W(typeof e.canDrop=="function","Expected canDrop to be a function."),W(typeof e.hover=="function","Expected hover to be a function."),W(typeof e.drop=="function","Expected beginDrag to be a function.")}function gn(e,t){if(t&&Array.isArray(e)){e.forEach(n=>gn(n,!1));return}W(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var xe;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(xe||(xe={}));let ng=0;function rg(){return ng++}function ig(e){const t=rg().toString();switch(e){case xe.SOURCE:return`S${t}`;case xe.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function ii(e){switch(e[0]){case"S":return xe.SOURCE;case"T":return xe.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function oi(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,o]}=n.next();if(o===t)return!0;r=!!i}while(!r);return!1}class og{addSource(t,n){gn(t),eg(n);const r=this.addHandler(xe.SOURCE,t,n);return this.store.dispatch(Qp(r)),r}addTarget(t,n){gn(t,!0),tg(n);const r=this.addHandler(xe.TARGET,t,n);return this.store.dispatch(Zp(r)),r}containsHandler(t){return oi(this.dragSources,t)||oi(this.dropTargets,t)}getSource(t,n=!1){return W(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return W(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return W(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return W(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return ii(t)===xe.SOURCE}isTargetId(t){return ii(t)===xe.TARGET}removeSource(t){W(this.getSource(t),"Expected an existing source."),this.store.dispatch(Jp(t)),Xp(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){W(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Kp(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);W(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){W(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=ig(t);return this.types.set(i,n),t===xe.SOURCE?this.dragSources.set(i,r):t===xe.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const sg=(e,t)=>e===t;function lg(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function ag(e,t,n=sg){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function cg(e=it,t){switch(t.type){case Tt:break;case Gn:case Xn:case Ot:case Qn:return it;case It:case qn:case Lt:case Et:default:return Yn}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=fp(n,r);if(!(i.length>0||!ag(n,r)))return it;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function ug(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ug(e,i,n[i])})}return e}const si={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function hg(e=si,t){const{payload:n}=t;switch(t.type){case Un:case It:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Tt:return lg(e.clientOffset,n.clientOffset)?e:dg({},e,{clientOffset:n.clientOffset});case Lt:case Et:return si;default:return e}}function fg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){fg(e,i,n[i])})}return e}const pg={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gg(e=pg,t){const{payload:n}=t;switch(t.type){case It:return He({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case qn:return He({},e,{isSourcePublic:!0});case Tt:return He({},e,{targetIds:n.targetIds});case Ot:return e.targetIds.indexOf(n.targetId)===-1?e:He({},e,{targetIds:hp(e.targetIds,n.targetId)});case Et:return He({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Lt:return He({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function mg(e=0,t){switch(t.type){case Gn:case Xn:return e+1;case Qn:case Ot:return e-1;default:return e}}function bg(e=0){return e+1}function xg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){xg(e,i,n[i])})}return e}function kg(e={},t){return{dirtyHandlerIds:cg(e.dirtyHandlerIds,{type:t.type,payload:yg({},t.payload,{prevTargetIds:dp(e,"dragOperation.targetIds",[])})}),dragOffset:hg(e.dragOffset,t),refCount:mg(e.refCount,t),dragOperation:gg(e.dragOperation,t),stateId:bg(e.stateId)}}function vg(e,t=void 0,n={},r=!1){const i=wg(r),o=new Hp(i,new og(i)),s=new Rp(i,o),l=e(s,t,n);return s.receiveBackend(l),s}function wg(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Lo(kg,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function jg(e,t){if(e==null)return{};var n=Cg(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cg(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}let li=0;const bt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var _g=D.memo(function(t){var{children:n}=t,r=jg(t,["children"]);const[i,o]=Sg(r);return D.useEffect(()=>{if(o){const s=Bo();return++li,()=>{--li===0&&(s[bt]=null)}}},[]),a.jsx(Eo.Provider,{value:i,children:n})});function Sg(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Dg(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function Dg(e,t=Bo(),n,r){const i=t;return i[bt]||(i[bt]={dragDropManager:vg(e,t,n,r)}),i[bt]}function Bo(){return typeof global<"u"?global:window}var Ng=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const Ig=Cn(Ng),Ae=typeof window<"u"?D.useLayoutEffect:D.useEffect;function Tg(e,t,n){const[r,i]=D.useState(()=>t(e)),o=D.useCallback(()=>{const s=t(e);Ig(r,s)||(i(s),n&&n())},[r,e,n]);return Ae(o),[r,o]}function Eg(e,t,n){const[r,i]=Tg(e,t,n);return Ae(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function Fo(e,t,n){return Eg(t,e||(()=>({})),()=>n.reconnect())}function zo(e,t){const n=[];return typeof e!="function"&&n.push(e),D.useMemo(()=>typeof e=="function"?e():e,n)}function Lg(e){return D.useMemo(()=>e.hooks.dragSource(),[e])}function Og(e){return D.useMemo(()=>e.hooks.dragPreview(),[e])}let Qt=!1,Zt=!1;class Pg{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){W(!Qt,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Qt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Qt=!1}}isDragging(){if(!this.sourceId)return!1;W(!Zt,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Zt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Zt=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Jt=!1;class Mg{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;W(!Jt,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Jt=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Jt=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function Ag(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function Rg(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function mn(e,t,n,r){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<o.length;c++){const u=o[c];if(!l(u))return!1;const h=e[u],d=t[u];if(i=void 0,i===!1||i===void 0&&h!==d)return!1}return!0}function bn(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Bg(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Fg(e){return(t=null,n=null)=>{if(!D.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return Bg(r),zg(r,n?o=>e(o,n):e)}}function $o(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=Fg(r);t[n]=()=>i}}),t}function ai(e,t){typeof e=="function"?e(t):e.current=t}function zg(e,t){const n=e.ref;return W(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?D.cloneElement(e,{ref:r=>{ai(n,r),ai(t,r)}}):D.cloneElement(e,{ref:t})}class $g{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!mn(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!mn(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=$o({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,bn(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,bn(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Hg{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!mn(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=$o({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,bn(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Xe(){const{dragDropManager:e}=D.useContext(Eo);return W(e!=null,"Expected drag drop context"),e}function Vg(e,t){const n=Xe(),r=D.useMemo(()=>new $g(n.getBackend()),[n]);return Ae(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),Ae(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Wg(){const e=Xe();return D.useMemo(()=>new Pg(e),[e])}class Ug{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function qg(e,t,n){const r=D.useMemo(()=>new Ug(e,t,n),[t,n]);return D.useEffect(()=>{r.spec=e},[e]),r}function Yg(e){return D.useMemo(()=>{const t=e.type;return W(t!=null,"spec.type must be defined"),t},[e])}function Gg(e,t,n){const r=Xe(),i=qg(e,t,n),o=Yg(e);Ae(function(){if(o!=null){const[l,c]=Rg(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),c}},[r,t,n,i,o])}function Xg(e,t){const n=zo(e);W(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Wg(),i=Vg(n.options,n.previewOptions);return Gg(n,r,i),[Fo(n.collect,r,i),Lg(i),Og(i)]}function Qg(e){return D.useMemo(()=>e.hooks.dropTarget(),[e])}function Zg(e){const t=Xe(),n=D.useMemo(()=>new Hg(t.getBackend()),[t]);return Ae(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Jg(){const e=Xe();return D.useMemo(()=>new Mg(e),[e])}function Kg(e){const{accept:t}=e;return D.useMemo(()=>(W(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class em{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function tm(e,t){const n=D.useMemo(()=>new em(e,t),[t]);return D.useEffect(()=>{n.spec=e},[e]),n}function nm(e,t,n){const r=Xe(),i=tm(e,t),o=Kg(e);Ae(function(){const[l,c]=Ag(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),c},[r,t,i,n,o.map(s=>s.toString()).join("|")])}function rm(e,t){const n=zo(e),r=Jg(),i=Zg(n.options);return nm(n,r,i),[Fo(n.collect,r,i),Qg(i)]}function Ho(e){let t=null;return()=>(t==null&&(t=e()),t)}function im(e,t){return e.filter(n=>n!==t)}function om(e,t){const n=new Set,r=o=>n.add(o);e.forEach(r),t.forEach(r);const i=[];return n.forEach(o=>i.push(o)),i}class sm{enter(t){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=om(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=im(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class lm{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Vo="__NATIVE_FILE__",Wo="__NATIVE_URL__",Uo="__NATIVE_TEXT__",qo="__NATIVE_HTML__",ci=Object.freeze(Object.defineProperty({__proto__:null,FILE:Vo,HTML:qo,TEXT:Uo,URL:Wo},Symbol.toStringTag,{value:"Module"}));function Kt(e,t,n){const r=t.reduce((i,o)=>i||e.getData(o),"");return r??n}const xn={[Vo]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[qo]:{exposeProperties:{html:(e,t)=>Kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Wo]:{exposeProperties:{urls:(e,t)=>Kt(e,t,"").split(`
30
+ `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Uo]:{exposeProperties:{text:(e,t)=>Kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function am(e,t){const n=xn[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new lm(n);return r.loadDataTransfer(t),r}function en(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(xn).filter(n=>{const r=xn[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const cm=Ho(()=>/firefox/i.test(navigator.userAgent)),Yo=Ho(()=>!!window.safari);class ui{interpolate(t){const{xs:n,ys:r,c1s:i,c2s:o,c3s:s}=this;let l=n.length-1;if(t===n[l])return r[l];let c=0,u=s.length-1,h;for(;c<=u;){h=Math.floor(.5*(c+u));const f=n[h];if(f<t)c=h+1;else if(f>t)u=h-1;else return r[h]}l=Math.max(0,u);const d=t-n[l],p=d*d;return r[l]+i[l]*d+o[l]*p+s[l]*d*p}constructor(t,n){const{length:r}=t,i=[];for(let f=0;f<r;f++)i.push(f);i.sort((f,g)=>t[f]<t[g]?-1:1);const o=[],s=[];let l,c;for(let f=0;f<r-1;f++)l=t[f+1]-t[f],c=n[f+1]-n[f],o.push(l),s.push(c/l);const u=[s[0]];for(let f=0;f<o.length-1;f++){const g=s[f],m=s[f+1];if(g*m<=0)u.push(0);else{l=o[f];const x=o[f+1],k=l+x;u.push(3*k/((k+x)/g+(k+l)/m))}}u.push(s[s.length-1]);const h=[],d=[];let p;for(let f=0;f<u.length-1;f++){p=s[f];const g=u[f],m=1/o[f],x=g+u[f+1]-p-p;h.push((p-g-x)*m),d.push(x*m*m)}this.xs=t,this.ys=n,this.c1s=u,this.c2s=h,this.c3s=d}}const um=1;function Go(e){const t=e.nodeType===um?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function pt(e){return{x:e.clientX,y:e.clientY}}function dm(e){var t;return e.nodeName==="IMG"&&(cm()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function hm(e,t,n,r){let i=e?t.width:n,o=e?t.height:r;return Yo()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function fm(e,t,n,r,i){const o=dm(t),l=Go(o?e:t),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:h}=e,{anchorX:d,anchorY:p}=r,{dragPreviewWidth:f,dragPreviewHeight:g}=hm(o,t,u,h),m=()=>{let C=new ui([0,.5,1],[c.y,c.y/h*g,c.y+g-h]).interpolate(p);return Yo()&&o&&(C+=(window.devicePixelRatio-1)*g),C},x=()=>new ui([0,.5,1],[c.x,c.x/u*f,c.x+f-u]).interpolate(d),{offsetX:k,offsetY:_}=i,w=k===0||k,E=_===0||_;return{x:w?k:x(),y:E?_:m()}}class pm{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}}function gm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function di(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){gm(e,i,n[i])})}return e}class mm{profile(){var t,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const i=s=>this.handleDragStart(s,t),o=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",o),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=s=>this.handleDragEnter(s,t),i=s=>this.handleDragOver(s,t),o=s=>this.handleDrop(s,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",o),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return di({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return di({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(ci).some(n=>ci[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=am(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&Go(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const s=pt(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=en(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const h=this.monitor.getSourceId(),d=this.sourceNodes.get(h),p=this.sourcePreviewNodes.get(h)||d;if(p){const{anchorX:f,anchorY:g,offsetX:m,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),w=fm(d,p,s,{anchorX:f,anchorY:g},{offsetX:m,offsetY:x});l.setDragImage(p,w.x,w.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=en(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:pt(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=pt(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else en(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:pt(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new pm(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new sm(this.isNodeInDocument)}}const bm=function(t,n,r){return new mm(t,n,r)},hi="DRAGGABLE_ITEM";function xm({item:e,index:t,moveItem:n,renderItem:r,showHandle:i}){const o=D.useRef(null),s=D.useRef(null),[{handlerId:l},c]=rm({accept:hi,collect(f){return{handlerId:f.getHandlerId()}},hover(f,g){var L;if(!o.current)return;const m=f.index,x=t;if(m===x)return;const k=(L=o.current)==null?void 0:L.getBoundingClientRect(),_=(k.bottom-k.top)/2,E=g.getClientOffset().y-k.top;m<x&&E<_||m>x&&E>_||(n(m,x),f.index=x)}}),[{isDragging:u},h,d]=Xg({type:hi,item:()=>({id:e.id,index:t}),collect:f=>({isDragging:f.isDragging()})}),p=u?.5:1;return D.useEffect(()=>{i?(d(c(o)),h(s)):h(c(o))},[i,h,c,d]),r?a.jsxs("div",{ref:o,className:`bien-draggable-item ${i?"bien-draggable-item--with-handle":""}`,style:{opacity:p},"data-handler-id":l,children:[i&&a.jsx("div",{ref:s,className:"bien-draggable-handle",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"6",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"12",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"12",r:"1.5",fill:"currentColor"})]})}),a.jsx("div",{className:"bien-draggable-content",children:r(e,u)})]}):a.jsxs("div",{ref:o,className:`bien-draggable-item ${i?"bien-draggable-item--with-handle":""}`,style:{opacity:p},"data-handler-id":l,children:[i&&a.jsx("div",{ref:s,className:"bien-draggable-handle",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("circle",{cx:"6",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"4",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"8",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"6",cy:"12",r:"1.5",fill:"currentColor"}),a.jsx("circle",{cx:"10",cy:"12",r:"1.5",fill:"currentColor"})]})}),a.jsx("div",{className:"bien-draggable-content",children:e.content})]})}function ym({items:e,onReorder:t,renderItem:n,showHandle:r=!0,className:i=""}){const o=D.useCallback((l,c)=>{if(l===c)return;const u=[...e],[h]=u.splice(l,1);u.splice(c,0,h),t(u)},[e,t]),s=["bien-draggable-list",i].filter(Boolean).join(" ");return a.jsx("div",{className:s,children:e.map((l,c)=>a.jsx(xm,{item:l,index:c,moveItem:o,renderItem:n,showHandle:r},l.id))})}function km({children:e,backend:t=bm}){return a.jsx(_g,{backend:t,children:e})}function vm({onFilesSelected:e,onFilesRemoved:t,accept:n,multiple:r=!0,maxSize:i=10*1024*1024,maxFiles:o=10,disabled:s=!1,variant:l="default",showPreview:c=!0,className:u=""}){const[h,d]=D.useState(!1),[p,f]=D.useState([]),[g,m]=D.useState(""),x=D.useRef(null),k=j=>{if(j===0)return"0 Bytes";const O=1024,B=["Bytes","KB","MB","GB"],P=Math.floor(Math.log(j)/Math.log(O));return Math.round(j/Math.pow(O,P)*100)/100+" "+B[P]},_=j=>{const O=[],B=[];return!r&&j.length>1?(O.push("Only one file is allowed"),{valid:B,errors:O}):p.length+j.length>o?(O.push(`Maximum ${o} files allowed`),{valid:B,errors:O}):(j.forEach(P=>{if(i&&P.size>i){O.push(`${P.name} exceeds maximum size of ${k(i)}`);return}if(n){const Y=n.split(",").map(ee=>ee.trim()),J=P.type,te="."+P.name.split(".").pop();if(!Y.some(ee=>ee.startsWith(".")?te===ee:ee.endsWith("/*")?J.startsWith(ee.replace("/*","")):J===ee)){O.push(`${P.name} type not accepted`);return}}const q=Object.assign(P,{id:Math.random().toString(36).substr(2,9),preview:P.type.startsWith("image/")?URL.createObjectURL(P):void 0});B.push(q)}),{valid:B,errors:O})},w=j=>{if(!j||j.length===0)return;const O=Array.from(j),{valid:B,errors:P}=_(O);if(P.length>0){m(P.join(", ")),setTimeout(()=>m(""),5e3);return}const q=r?[...p,...B]:B;f(q),m(""),e==null||e(q)},E=j=>{j.preventDefault(),j.stopPropagation(),s||d(!0)},L=j=>{j.preventDefault(),j.stopPropagation(),d(!1)},C=j=>{j.preventDefault(),j.stopPropagation()},R=j=>{j.preventDefault(),j.stopPropagation(),d(!1),!s&&w(j.dataTransfer.files)},A=j=>{w(j.target.files),x.current&&(x.current.value="")},F=j=>{j.preview&&URL.revokeObjectURL(j.preview);const O=p.filter(B=>B.id!==j.id);f(O),t==null||t(O)},v=()=>{var j;s||(j=x.current)==null||j.click()},S=["bien-file-drop",`bien-file-drop--${l}`,h&&"bien-file-drop--dragging",s&&"bien-file-drop--disabled",g&&"bien-file-drop--error",u].filter(Boolean).join(" ");return a.jsxs("div",{className:"bien-file-drop-wrapper",children:[a.jsxs("div",{className:S,onDragEnter:E,onDragOver:C,onDragLeave:L,onDrop:R,onClick:v,children:[l==="ai"&&a.jsx("div",{className:"bien-file-drop__ai-border"}),a.jsx("input",{ref:x,type:"file",onChange:A,accept:n,multiple:r,disabled:s,style:{display:"none"}}),a.jsxs("div",{className:"bien-file-drop__content",children:[a.jsxs("svg",{className:"bien-file-drop__icon",width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[a.jsx("path",{d:"M24 14V34M24 14L18 20M24 14L30 20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M36 28V38C36 39.1046 35.1046 40 34 40H14C12.8954 40 12 39.1046 12 38V28",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),a.jsxs("div",{className:"bien-file-drop__text",children:[a.jsx("p",{className:"bien-file-drop__title",children:h?"Drop files here":"Drag & drop files here"}),a.jsx("p",{className:"bien-file-drop__subtitle",children:"or click to browse"})]}),(n||i)&&a.jsxs("div",{className:"bien-file-drop__info",children:[n&&a.jsxs("span",{children:["Accepted: ",n]}),i&&a.jsxs("span",{children:["Max size: ",k(i)]})]})]})]}),g&&a.jsx("div",{className:"bien-file-drop__error",children:g}),c&&p.length>0&&a.jsx("div",{className:"bien-file-drop__preview",children:p.map(j=>a.jsxs("div",{className:"bien-file-drop__file",children:[a.jsx("div",{className:"bien-file-drop__file-preview",children:j.preview?a.jsx("img",{src:j.preview,alt:j.name}):a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M14 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V8L14 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M14 2V8H20",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),a.jsxs("div",{className:"bien-file-drop__file-info",children:[a.jsx("p",{className:"bien-file-drop__file-name",children:j.name}),a.jsx("p",{className:"bien-file-drop__file-size",children:k(j.size)})]}),a.jsx("button",{className:"bien-file-drop__file-remove",onClick:O=>{O.stopPropagation(),F(j)},"aria-label":"Remove file",children:a.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M4 4L12 12M4 12L12 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]},j.id))})]})}const Xo=D.createContext(null),wm=()=>{const e=D.useContext(Xo);if(!e)throw new Error("Panel components must be used within a PanelGroup");return e};function jm({children:e,side:t="left",variant:n="elevated",defaultCollapsed:r=!1,collapsed:i,onCollapsedChange:o,sidebarWidth:s=280,collapsedWidth:l=60,className:c="",style:u}){const[h,d]=D.useState(r),p=i!==void 0,f=p?i:h,g=x=>{p||d(x),o==null||o(x)},m=["bien-panel-group",`bien-panel-group--${t}`,c].filter(Boolean).join(" ");return a.jsx(Xo.Provider,{value:{collapsed:f,setCollapsed:g,side:t,variant:n,sidebarWidth:s,collapsedWidth:l},children:a.jsx("div",{className:m,style:u,children:e})})}function Cm({children:e,className:t="",style:n}){const{collapsed:r,setCollapsed:i,side:o,variant:s,sidebarWidth:l,collapsedWidth:c}=wm(),[u,h]=D.useState(!1),d=["bien-panel-sidebar",`bien-panel-sidebar--${s}`,r&&"bien-panel-sidebar--collapsed",u&&"bien-panel-sidebar--mobile-open",t].filter(Boolean).join(" "),p={...n,width:r?`${c}px`:`${l}px`},f=()=>{i(!r)},g=()=>{h(!u)},m=()=>{h(!1)};return a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"bien-panel-mobile-toggle",onClick:g,"aria-label":"Toggle sidebar",children:a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),u&&a.jsx("div",{className:"bien-panel-backdrop",onClick:m}),a.jsxs("aside",{className:d,style:p,children:[s==="glass-frost"&&a.jsx("div",{className:"bien-panel-sidebar__glass"}),s==="glass-tint"&&a.jsx("div",{className:"bien-panel-sidebar__glass bien-panel-sidebar__glass--tint"}),a.jsx("div",{className:"bien-panel-sidebar__content",children:e}),a.jsx("button",{className:"bien-panel-sidebar__toggle",onClick:f,"aria-label":r?"Expand sidebar":"Collapse sidebar",children:a.jsx("span",{className:"bien-panel-sidebar__toggle-icon",style:{transform:o==="left"?r?"rotate(0deg)":"rotate(180deg)":r?"rotate(180deg)":"rotate(0deg)"}})})]})]})}function _m({children:e,className:t="",style:n}){const r=["bien-panel-content",t].filter(Boolean).join(" ");return a.jsx("main",{className:r,style:n,children:e})}const Sm=Object.assign(jm,{Sidebar:Cm,Content:_m}),Qo=D.forwardRef(({open:e,onClose:t,children:n,title:r,subtitle:i,header:o,footer:s,side:l="right",size:c="md",variant:u="default",gradient:h,radius:d="lg",closeOnBackdropClick:p=!0,closeOnEscape:f=!0,showCloseButton:g=!0,showBackdrop:m=!0,persistent:x=!1,className:k="",style:_,backdropClassName:w="",contentClassName:E="",headerClassName:L="",footerClassName:C="","aria-label":R,"aria-labelledby":A,"aria-describedby":F,...v},S)=>{const j=D.useRef(null),O=D.useRef(null),[B,P]=D.useState(!1),[q,Y]=D.useState(!1);D.useEffect(()=>{if(e){const H=setTimeout(()=>P(!0),0),Z=setTimeout(()=>Y(!0),10);return()=>{clearTimeout(H),clearTimeout(Z)}}else{const H=setTimeout(()=>Y(!1),0),Z=setTimeout(()=>P(!1),250);return()=>{clearTimeout(H),clearTimeout(Z)}}},[e]),D.useEffect(()=>{const H=Z=>{Z.key==="Escape"&&e&&f&&!x&&t()};return e&&(document.addEventListener("keydown",H),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",H),document.body.style.overflow=""}},[e,f,x,t]),D.useEffect(()=>{if(e&&j.current){const H=j.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),Z=H[0],ge=H[H.length-1],ye=ke=>{ke.key==="Tab"&&(ke.shiftKey?document.activeElement===Z&&(ke.preventDefault(),ge==null||ge.focus()):document.activeElement===ge&&(ke.preventDefault(),Z==null||Z.focus()))};return document.addEventListener("keydown",ye),Z?Z.focus():j.current.focus(),()=>{document.removeEventListener("keydown",ye)}}},[e]);const J=H=>{H.target===O.current&&p&&!x&&t()};if(!B)return null;const te=o||r||i,y=e&&q,ee=["bien-drawer",`bien-drawer--${l}`,`bien-drawer--${c}`,`bien-drawer--${u}`,`bien-drawer--radius-${d}`,h&&`bien-drawer--gradient-${h}`,k].filter(Boolean).join(" "),oe=["bien-drawer-backdrop",m&&"bien-drawer-backdrop--visible",y&&"bien-drawer-backdrop--active",w].filter(Boolean).join(" "),b=["bien-drawer__content",E].filter(Boolean).join(" "),K=["bien-drawer__header",L].filter(Boolean).join(" "),I=["bien-drawer__footer",C].filter(Boolean).join(" "),z=a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:O,className:oe,onClick:J,"aria-hidden":"true"}),a.jsxs("div",{ref:S||j,className:ee,style:_,role:"dialog","aria-modal":"true","aria-label":R,"aria-labelledby":A||(r?"drawer-title":void 0),"aria-describedby":F||(i?"drawer-subtitle":void 0),tabIndex:-1,"data-state":y?"open":"closed",...v,children:[u==="glass-frost"&&a.jsx("div",{className:"bien-drawer__glass","aria-hidden":"true"}),u==="glass-tint"&&a.jsx("div",{className:"bien-drawer__glass bien-drawer__glass--tint","aria-hidden":"true"}),g&&a.jsx(Wn,{className:"bien-drawer__close",onClick:t,variant:"ghost",size:"sm",iconOnly:!0,shape:"circle",icon:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M5 5L15 15M5 15L15 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),"aria-label":"Close drawer",children:"Close"}),te&&a.jsx("div",{className:K,children:o||a.jsxs(a.Fragment,{children:[r&&a.jsx("div",{id:"drawer-title",className:"bien-drawer__title",children:r}),i&&a.jsx("div",{id:"drawer-subtitle",className:"bien-drawer__subtitle",children:i})]})}),a.jsx("div",{className:b,children:n}),s&&a.jsx("div",{className:I,children:s})]})]});return yn.createPortal(z,document.body)});Qo.displayName="Drawer";const Dm={thinking:{icon:"🤔",label:"Thinking",gradient:"var(--gradient-primary)"},reasoning:{icon:"🧠",label:"Reasoning",gradient:"var(--gradient-purple)"},analyzing:{icon:"🔍",label:"Analyzing",gradient:"linear-gradient(135deg, var(--color-teal) 0%, var(--color-blue) 100%)"},processing:{icon:"⚙️",label:"Processing",gradient:"linear-gradient(135deg, var(--color-accent) 0%, var(--color-teal) 100%)"},generating:{icon:"✨",label:"Generating",gradient:"linear-gradient(135deg, var(--color-purple) 0%, var(--color-blue) 100%)"}},Nm={slow:80,normal:50,fast:30};function Im({text:e,variant:t="thinking",speed:n="normal",showCursor:r=!0,loop:i=!1,onComplete:o,className:s=""}){const[l,c]=D.useState(""),[u,h]=D.useState(0),[d,p]=D.useState(!1),f=Dm[t],g=Nm[n];D.useEffect(()=>{if(!e){const x=setTimeout(()=>{c(""),h(0),p(!1)},0);return()=>clearTimeout(x)}if(u<e.length){const x=setTimeout(()=>{c(e.slice(0,u+1)),h(u+1)},g);return()=>clearTimeout(x)}else if(!d){const x=setTimeout(()=>{p(!0),o==null||o(),i&&setTimeout(()=>{c(""),h(0),p(!1)},2e3)},0);return()=>clearTimeout(x)}},[u,e,g,d,i,o]);const m=["bien-thinking-text",`bien-thinking-text--${t}`,s].filter(Boolean).join(" ");return e?a.jsxs("div",{className:m,children:[a.jsxs("div",{className:"bien-thinking-text__content",children:[a.jsx("span",{className:"bien-thinking-text__icon",children:f.icon}),a.jsxs("div",{className:"bien-thinking-text__text-wrapper",children:[a.jsx("span",{className:"bien-thinking-text__text",children:l}),r&&!d&&a.jsx("span",{className:"bien-thinking-text__cursor",children:"|"})]})]}),a.jsx("div",{className:"bien-thinking-text__shimmer"})]}):a.jsx("div",{className:m,children:a.jsxs("div",{className:"bien-thinking-text__indicator",children:[a.jsx("span",{className:"bien-thinking-text__icon",children:f.icon}),a.jsx("span",{className:"bien-thinking-text__label",children:f.label}),a.jsxs("div",{className:"bien-thinking-text__dots",children:[a.jsx("span",{className:"bien-thinking-text__dot"}),a.jsx("span",{className:"bien-thinking-text__dot"}),a.jsx("span",{className:"bien-thinking-text__dot"})]})]})})}function Tm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),a.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function Em({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.jsx("polyline",{points:"7 10 12 15 17 10"}),a.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function Lm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),a.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})}function Om({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}function Pm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"12",cy:"12",r:"3"}),a.jsx("path",{d:"M12 1v6m0 6v6m8.66-13.66l-4.24 4.24m-4.24 4.24l-4.24 4.24M23 12h-6m-6 0H1m20.66 8.66l-4.24-4.24m-4.24-4.24l-4.24-4.24"})]})}function Mm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("polyline",{points:"3 6 5 6 21 6"}),a.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}function Am({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Rm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Bm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),a.jsx("polyline",{points:"12 5 19 12 12 19"})]})}function Fm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M12 3v3m0 12v3m9-9h-3M6 12H3m15.364 6.364l-2.121-2.121M8.757 8.757L6.636 6.636m12.728 0l-2.121 2.121M8.757 15.243l-2.121 2.121"})})}function zm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),a.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})}function $m({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Hm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Vm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}function Wm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),a.jsx("circle",{cx:"9",cy:"7",r:"4"}),a.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),a.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function Um({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),a.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),a.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]})}function qm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),a.jsx("polyline",{points:"13 2 13 9 20 9"})]})}function Ym({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function Gm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"9",cy:"21",r:"1"}),a.jsx("circle",{cx:"20",cy:"21",r:"1"}),a.jsx("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]})}function Xm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),a.jsx("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]})}function Qm({size:e=24,className:t,style:n}){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Zm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10"}),a.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),a.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}function Jm({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),a.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}function Km({size:e=24,className:t,style:n}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,style:n,children:[a.jsx("rect",{x:"3",y:"3",width:"7",height:"9"}),a.jsx("rect",{x:"14",y:"3",width:"7",height:"5"}),a.jsx("rect",{x:"14",y:"12",width:"7",height:"9"}),a.jsx("rect",{x:"3",y:"16",width:"7",height:"5"})]})}exports.Accordion=Qf;exports.ArrowRightIcon=Bm;exports.Avatar=Sf;exports.AvatarGroup=Df;exports.Badge=jf;exports.Banner=Wf;exports.BellIcon=zm;exports.BienProvider=as;exports.Breadcrumb=xf;exports.Button=Wn;exports.Callout=Uf;exports.Card=wf;exports.ChartIcon=Um;exports.CheckIcon=Rm;exports.Checkbox=Vn;exports.ChevronLeftIcon=$m;exports.ChevronRightIcon=Hm;exports.CircularMeter=Of;exports.ColorSwatch=zf;exports.Container=hs;exports.CreditCardIcon=Xm;exports.DatePicker=hf;exports.DescriptionDetails=Ff;exports.DescriptionList=Rf;exports.DescriptionTerm=Bf;exports.Divider=xs;exports.DownloadIcon=Em;exports.DraggableList=ym;exports.DraggableListProvider=km;exports.Drawer=Qo;exports.EmptyState=Vf;exports.FileDrop=vm;exports.FileIcon=qm;exports.FolderIcon=Ym;exports.Grid=fs;exports.HStack=gs;exports.Header=yf;exports.HeartIcon=Om;exports.HelpCircleIcon=Zm;exports.HomeIcon=Vm;exports.Hotspot=ip;exports.Input=vn;exports.LayoutDashboardIcon=Km;exports.Link=ff;exports.List=Mf;exports.ListItem=Af;exports.Loading=$f;exports.MarkdownTextarea=wo;exports.Menu=ep;exports.MenuDivider=np;exports.MenuGroup=rp;exports.MenuItem=tp;exports.MessageIcon=Qm;exports.Meter=Lf;exports.Modal=qf;exports.MultiSelect=Co;exports.Panel=Sm;exports.PlusIcon=Tm;exports.ProfileAvatar=Tf;exports.Radio=_o;exports.RadioGroup=So;exports.SearchIcon=Am;exports.Section=ms;exports.Select=Hn;exports.SendIcon=Lm;exports.SettingsIcon=Pm;exports.ShoppingCartIcon=Gm;exports.Sidenav=kf;exports.Slider=No;exports.Spacer=bs;exports.SparklesIcon=Fm;exports.Stepper=Jf;exports.Switch=Do;exports.Table=Pf;exports.Tabs=Zf;exports.Text=vf;exports.Textarea=gi;exports.ThinkingText=Im;exports.Timeline=Ef;exports.ToastProvider=cs;exports.Tooltip=Kf;exports.TooltipProvider=ds;exports.TrashIcon=Mm;exports.UserIcon=Jm;exports.UsersIcon=Wm;exports.VStack=ps;exports.useToast=us;
31
31
  //# sourceMappingURL=bien-ui.cjs.js.map