@telnyx/ai-chat-widget 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +12 -68
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +10 -66
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -105,14 +105,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
105
105
|
--color-gray-500: oklch(55.1% 0.027 264.364);
|
|
106
106
|
--color-gray-700: oklch(37.3% 0.034 259.733);
|
|
107
107
|
--color-gray-800: oklch(27.8% 0.033 256.848);
|
|
108
|
-
--color-zinc-500: oklch(55.2% 0.016 285.938);
|
|
109
|
-
--color-zinc-800: oklch(27.4% 0.006 286.033);
|
|
110
|
-
--color-zinc-900: oklch(21% 0.006 285.885);
|
|
111
108
|
--color-neutral-500: oklch(55.6% 0 0);
|
|
112
109
|
--color-neutral-600: oklch(43.9% 0 0);
|
|
113
110
|
--color-neutral-700: oklch(37.1% 0 0);
|
|
114
111
|
--color-stone-600: oklch(44.4% 0.011 73.639);
|
|
115
112
|
--color-stone-700: oklch(37.4% 0.01 67.558);
|
|
113
|
+
--color-stone-800: oklch(26.8% 0.007 34.298);
|
|
116
114
|
--color-stone-900: oklch(21.6% 0.006 56.043);
|
|
117
115
|
--color-black: #000;
|
|
118
116
|
--color-white: #fff;
|
|
@@ -156,9 +154,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
156
154
|
--color-telnyx-dark-cream: rgb(229 227 212);
|
|
157
155
|
--color-telnyx-gray-hover-light: rgb(87 87 87);
|
|
158
156
|
--color-telnyx-blue: rgb(52 52 239);
|
|
159
|
-
--color-heroui-content2: hsl(240 3.7% 15.88% / 1);
|
|
160
157
|
--color-heroui-content3: hsl(240 5.26% 26.08% / 1);
|
|
161
|
-
--color-heroui-default-700: hsl(240 5.88% 90% / 1);
|
|
162
158
|
--font-pp-formula: PPFormula;
|
|
163
159
|
--animate-rotate-loader: rotate 4s linear infinite;
|
|
164
160
|
--animate-scale-loader: scale 4s linear infinite;
|
|
@@ -1307,6 +1303,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1307
1303
|
.text-stone-700 {
|
|
1308
1304
|
color: var(--color-stone-700);
|
|
1309
1305
|
}
|
|
1306
|
+
.text-stone-800 {
|
|
1307
|
+
color: var(--color-stone-800);
|
|
1308
|
+
}
|
|
1310
1309
|
.text-telnyx-blue {
|
|
1311
1310
|
color: var(--color-telnyx-blue);
|
|
1312
1311
|
}
|
|
@@ -2065,65 +2064,6 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2065
2064
|
line-height: var(--tw-leading, var(--text-base--line-height));
|
|
2066
2065
|
}
|
|
2067
2066
|
}
|
|
2068
|
-
.dark\\:bg-zinc-800 {
|
|
2069
|
-
@media (prefers-color-scheme: dark) {
|
|
2070
|
-
background-color: var(--color-zinc-800);
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
.dark\\:bg-zinc-900 {
|
|
2074
|
-
@media (prefers-color-scheme: dark) {
|
|
2075
|
-
background-color: var(--color-zinc-900);
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
.dark\\:text-transparent {
|
|
2079
|
-
@media (prefers-color-scheme: dark) {
|
|
2080
|
-
color: transparent;
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
.dark\\:text-white {
|
|
2084
|
-
@media (prefers-color-scheme: dark) {
|
|
2085
|
-
color: var(--color-white);
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
.dark\\:text-zinc-500 {
|
|
2089
|
-
@media (prefers-color-scheme: dark) {
|
|
2090
|
-
color: var(--color-zinc-500);
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
.dark\\:invert-0 {
|
|
2094
|
-
@media (prefers-color-scheme: dark) {
|
|
2095
|
-
--tw-invert: invert(0%);
|
|
2096
|
-
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
.dark\\:before\\:via-heroui-default-700\\/10 {
|
|
2100
|
-
@media (prefers-color-scheme: dark) {
|
|
2101
|
-
&::before {
|
|
2102
|
-
content: var(--tw-content);
|
|
2103
|
-
--tw-gradient-via: color-mix(in srgb, hsl(240 5.88% 90% / 1) 10%, transparent);
|
|
2104
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2105
|
-
--tw-gradient-via: color-mix(in oklab, var(--color-heroui-default-700) 10%, transparent);
|
|
2106
|
-
}
|
|
2107
|
-
--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
|
|
2108
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops);
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
.dark\\:after\\:bg-heroui-content2 {
|
|
2113
|
-
@media (prefers-color-scheme: dark) {
|
|
2114
|
-
&::after {
|
|
2115
|
-
content: var(--tw-content);
|
|
2116
|
-
background-color: var(--color-heroui-content2);
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
.dark\\:disabled\\:bg-zinc-800 {
|
|
2121
|
-
@media (prefers-color-scheme: dark) {
|
|
2122
|
-
&:disabled {
|
|
2123
|
-
background-color: var(--color-zinc-800);
|
|
2124
|
-
}
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
2067
|
.\\[\\&_\\*\\]\\:scrollbar {
|
|
2128
2068
|
& * {
|
|
2129
2069
|
&::-webkit-scrollbar-track {
|
|
@@ -2208,6 +2148,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2208
2148
|
syntax: "*";
|
|
2209
2149
|
inherits: false;
|
|
2210
2150
|
}
|
|
2151
|
+
:root, :host {
|
|
2152
|
+
color-scheme: light;
|
|
2153
|
+
color: #1c1917;
|
|
2154
|
+
}
|
|
2211
2155
|
@layer base {
|
|
2212
2156
|
* {
|
|
2213
2157
|
@supports (-moz-appearance:none) {
|
|
@@ -2538,7 +2482,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2538
2482
|
black 0%,
|
|
2539
2483
|
transparent 100%
|
|
2540
2484
|
)
|
|
2541
|
-
`}}),y.jsx("div",{className:J("relative z-20",t),children:e})]})},Th=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ah=BE,Oi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ah(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Th(u)||Th(d);return a[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(g=>{let[b,h]=g;return Array.isArray(h)?h.includes({...i,...s}[b]):{...i,...s}[b]===h})?[...c,d,p]:c},[]);return Ah(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},xO=se.create(MI),kO=se.create(PI),Rh={copied:{scale:1,opacity:1,transition:{duration:.15}},idle:{scale:.8,opacity:0,transition:{duration:.15}}},$l=_.memo(({textToCopy:e,onClick:t,className:n,iconClassName:r,disabled:a})=>{const[i,o]=_.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(c){console.error("Failed to copy text: ",c)}},l=()=>{s(),t&&t()};return y.jsxs(Nt,{children:[y.jsx(_t,{onClick:l,className:n,disabled:a,children:y.jsx(Ot,{mode:"wait",initial:!1,children:i?y.jsx(xO,{initial:"idle",animate:"copied",exit:"idle",variants:Rh,className:J("size-4 text-telnyx-green",r)},"check"):y.jsx(kO,{initial:"idle",animate:"copied",exit:"idle",variants:Rh,className:J("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"copy")})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:i?"Copied!":"Copy this message"})})]})}),TO=({size:e=96,spokeWidth:t=6,animationDuration:n=4})=>y.jsxs("div",{className:"relative animate-rotate-loader flex items-center justify-center",style:{width:e,height:e,animationDuration:`${n}s`},children:[y.jsx("div",{className:`rounded-full z-10 animate-scale-loader bg-telnyx-light-green duration-[${n/2}s]`,style:{width:e/8,height:e/8}}),Array.from({length:12}).map((a,i)=>{const o=i*30;return y.jsx("div",{className:"absolute bg-stone-700 rounded-[30px] top-0 left-1/2 transform origin-bottom",style:{transform:`translateX(-50%) rotate(${o}deg)`,height:e/2,width:t}},i+o)})]}),AO=e=>{const t=new CSSStyleSheet;return t.replaceSync(e.replace("((-webkit-hyphens: none) and (not (margin-trim: inline)))","(not (margin-trim: inline))")),t},RO=(e,t)=>{if(!t)return;const n=AO(t);e.adoptedStyleSheets=[n]};function Wl({children:e,shadowRootInit:t,targetMountContainer:n,ref:r,...a}){const i=K(d=>d.widgetStyleSheetText),[o,s]=_.useState(null),l=_.useCallback(d=>{if(!d||d.shadowRoot)return;const p=d.attachShadow({mode:"open",...t});i&&RO(p,i),s(p)},[i,t]),c=_.useCallback(d=>{l(d),typeof r=="function"?r(d):r&&(r.current=d)},[l,r]),u=y.jsx("div",{ref:c,...a,children:o&&Vo.createPortal(e,o)});return n?Vo.createPortal(u,n):u}const _n=({isLoaded:e=!1,className:t,contentClassName:n,children:r,disableAnimation:a=!1,loadingDuration:i})=>{const[o,s]=_.useState(e);_.useEffect(()=>{if(i&&!e){const c=setTimeout(()=>{s(!0)},i);return()=>clearTimeout(c)}},[i,e]);const l=e||o;return y.jsx("div",{"data-loaded":l,className:J("group relative overflow-hidden bg-neutral-700/20 dark:bg-heroui-content-2","pointer-events-none",!a&&!l&&["before:opacity-100 before:absolute before:inset-0","before:-translate-x-full before:animate-shimmer","before:bg-gradient-to-r","before:from-transparent before:via-neutral-600/30 dark:before:via-heroui-default-700/10","before:to-transparent"],"after:opacity-100 after:absolute after:inset-0 after:-z-10","after:bg-heroui-content3 dark:after:bg-heroui-content2","data-[loaded=true]:pointer-events-auto data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent data-[loaded=true]:before:opacity-0","data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0","transition-[background] !duration-300","h-4 rounded-lg",t),children:y.jsx("div",{className:J("opacity-0 group-data-[loaded=true]:opacity-100","transition-opacity motion-reduce:transition-none !duration-300",n),children:r})})},IO=({words:e,className:t,filter:n=!0,duration:r=.5})=>{const[a,i]=K0();let o=e.split(" ");_.useEffect(()=>{const l=setTimeout(()=>{a.current&&i("span",{opacity:1,filter:n?"blur(0px)":"none"},{duration:r||1,delay:Ak(.2)})},50);return()=>clearTimeout(l)},[e,a,i,r,n]);const s=()=>y.jsx(se.div,{ref:a,children:o.map((l,c)=>y.jsxs(se.span,{className:"text-gray-700/60 opacity-0",style:{filter:n?"blur(10px)":"none"},children:[l," "]},`${l}-${c}`))});return y.jsx("span",{className:J("text-gray-700 text-xs font-medium leading-snug tracking-wide",t),children:s()})},CO=({isLoaded:e=!1,progressMessage:t="Processing..."})=>y.jsxs("div",{className:"flex w-64 flex-col gap-2 relative",children:[y.jsx(_n,{isLoaded:e}),y.jsx(_n,{isLoaded:e}),y.jsxs("div",{className:"flex gap-1 items-center",children:[y.jsx(_n,{className:"duration-100 flex-1",isLoaded:e}),y.jsx("div",{className:"bg-[#fefef8] px-3 z-10",children:y.jsx(IO,{words:t,className:"text-gray-700/60 font-medium"},t)}),y.jsx(_n,{className:"duration-100 flex-1",isLoaded:e})]}),y.jsx(_n,{isLoaded:e}),y.jsx(_n,{isLoaded:e})]});function Ih(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function NO(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _O=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LO={};function Ch(e,t){return(LO.jsx?OO:_O).test(e)}const DO=/[ \t\n\f\r]/g;function MO(e){return typeof e=="object"?e.type==="text"?Nh(e.value):!1:Nh(e)}function Nh(e){return e.replace(DO,"")===""}class pa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}pa.prototype.normal={};pa.prototype.property={};pa.prototype.space=void 0;function aS(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new pa(n,r,t)}function Xr(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let FO=0;const re=vn(),Ie=vn(),Ls=vn(),V=vn(),Se=vn(),$n=vn(),Qe=vn();function vn(){return 2**++FO}const Ds=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:Ie,commaOrSpaceSeparated:Qe,commaSeparated:$n,number:V,overloadedBoolean:Ls,spaceSeparated:Se},Symbol.toStringTag,{value:"Module"})),To=Object.keys(Ds);class ql extends Xe{constructor(t,n,r,a){let i=-1;if(super(t,n),_h(this,"space",a),typeof r=="number")for(;++i<To.length;){const o=To[i];_h(this,To[i],(r&Ds[o])===Ds[o])}}}ql.prototype.defined=!0;function _h(e,t,n){n&&(e[t]=n)}function or(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new ql(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Xr(r)]=r,n[Xr(i.attribute)]=r}return new pa(t,n,e.space)}const iS=or({properties:{ariaActiveDescendant:null,ariaAtomic:Ie,ariaAutoComplete:null,ariaBusy:Ie,ariaChecked:Ie,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Se,ariaCurrent:null,ariaDescribedBy:Se,ariaDetails:null,ariaDisabled:Ie,ariaDropEffect:Se,ariaErrorMessage:null,ariaExpanded:Ie,ariaFlowTo:Se,ariaGrabbed:Ie,ariaHasPopup:null,ariaHidden:Ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Se,ariaLevel:V,ariaLive:null,ariaModal:Ie,ariaMultiLine:Ie,ariaMultiSelectable:Ie,ariaOrientation:null,ariaOwns:Se,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ie,ariaReadOnly:Ie,ariaRelevant:null,ariaRequired:Ie,ariaRoleDescription:Se,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ie,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function oS(e,t){return t in e?e[t]:t}function sS(e,t){return oS(e,t.toLowerCase())}const PO=or({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$n,acceptCharset:Se,accessKey:Se,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:Se,autoFocus:re,autoPlay:re,blocking:Se,capture:null,charSet:null,checked:re,cite:null,className:Se,cols:V,colSpan:null,content:null,contentEditable:Ie,controls:re,controlsList:Se,coords:V|$n,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Ls,draggable:Ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:Se,height:V,hidden:Ls,high:V,href:null,hrefLang:null,htmlFor:Se,httpEquiv:Se,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:Se,itemRef:Se,itemScope:re,itemType:Se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,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:re,optimum:V,pattern:null,ping:Se,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:Se,required:re,reversed:re,rows:V,rowSpan:V,sandbox:Se,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:Ie,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Se,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ie,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:re,disableRemotePlayback:re,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:sS}),BO=or({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:Qe,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Se,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:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,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:$n,g2:$n,glyphName:$n,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,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:V,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:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qe,rev:Qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qe,requiredFeatures:Qe,requiredFonts:Qe,requiredFormats:Qe,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:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qe,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:oS}),lS=or({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()}}),cS=or({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sS}),uS=or({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),UO={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"},zO=/[A-Z]/g,Oh=/-[a-z]/g,jO=/^data[-\w.:]+$/i;function dS(e,t){const n=Xr(t);let r=t,a=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jO.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Oh,VO);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Oh.test(i)){let o=i.replace(zO,GO);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=ql}return new a(r,t)}function GO(e){return"-"+e.toLowerCase()}function VO(e){return e.charAt(1).toUpperCase()}const pS=aS([iS,PO,lS,cS,uS],"html"),Li=aS([iS,BO,lS,cS,uS],"svg");function Lh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function HO(e){return e.join(" ").trim()}var On={},Ao,Dh;function $O(){if(Dh)return Ao;Dh=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
2485
|
+
`}}),y.jsx("div",{className:J("relative z-20",t),children:e})]})},Th=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ah=BE,Oi=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ah(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const p=Th(u)||Th(d);return a[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:p,...f}=u;return Object.entries(f).every(g=>{let[b,h]=g;return Array.isArray(h)?h.includes({...i,...s}[b]):{...i,...s}[b]===h})?[...c,d,p]:c},[]);return Ah(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},xO=se.create(MI),kO=se.create(PI),Rh={copied:{scale:1,opacity:1,transition:{duration:.15}},idle:{scale:.8,opacity:0,transition:{duration:.15}}},$l=_.memo(({textToCopy:e,onClick:t,className:n,iconClassName:r,disabled:a})=>{const[i,o]=_.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(c){console.error("Failed to copy text: ",c)}},l=()=>{s(),t&&t()};return y.jsxs(Nt,{children:[y.jsx(_t,{onClick:l,className:n,disabled:a,children:y.jsx(Ot,{mode:"wait",initial:!1,children:i?y.jsx(xO,{initial:"idle",animate:"copied",exit:"idle",variants:Rh,className:J("size-4 text-telnyx-green",r)},"check"):y.jsx(kO,{initial:"idle",animate:"copied",exit:"idle",variants:Rh,className:J("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"copy")})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:i?"Copied!":"Copy this message"})})]})}),TO=({size:e=96,spokeWidth:t=6,animationDuration:n=4})=>y.jsxs("div",{className:"relative animate-rotate-loader flex items-center justify-center",style:{width:e,height:e,animationDuration:`${n}s`},children:[y.jsx("div",{className:`rounded-full z-10 animate-scale-loader bg-telnyx-light-green duration-[${n/2}s]`,style:{width:e/8,height:e/8}}),Array.from({length:12}).map((a,i)=>{const o=i*30;return y.jsx("div",{className:"absolute bg-stone-700 rounded-[30px] top-0 left-1/2 transform origin-bottom",style:{transform:`translateX(-50%) rotate(${o}deg)`,height:e/2,width:t}},i+o)})]}),AO=e=>{const t=new CSSStyleSheet;return t.replaceSync(e.replace("((-webkit-hyphens: none) and (not (margin-trim: inline)))","(not (margin-trim: inline))")),t},RO=(e,t)=>{if(!t)return;const n=AO(t);e.adoptedStyleSheets=[n]};function Wl({children:e,shadowRootInit:t,targetMountContainer:n,ref:r,...a}){const i=K(d=>d.widgetStyleSheetText),[o,s]=_.useState(null),l=_.useCallback(d=>{if(!d||d.shadowRoot)return;const p=d.attachShadow({mode:"open",...t});i&&RO(p,i),s(p)},[i,t]),c=_.useCallback(d=>{l(d),typeof r=="function"?r(d):r&&(r.current=d)},[l,r]),u=y.jsx("div",{ref:c,...a,children:o&&Vo.createPortal(e,o)});return n?Vo.createPortal(u,n):u}const _n=({isLoaded:e=!1,className:t,contentClassName:n,children:r,disableAnimation:a=!1,loadingDuration:i})=>{const[o,s]=_.useState(e);_.useEffect(()=>{if(i&&!e){const c=setTimeout(()=>{s(!0)},i);return()=>clearTimeout(c)}},[i,e]);const l=e||o;return y.jsx("div",{"data-loaded":l,className:J("group relative overflow-hidden bg-neutral-700/20","pointer-events-none",!a&&!l&&["before:opacity-100 before:absolute before:inset-0","before:-translate-x-full before:animate-shimmer","before:bg-gradient-to-r","before:from-transparent before:via-neutral-600/30","before:to-transparent"],"after:opacity-100 after:absolute after:inset-0 after:-z-10","after:bg-heroui-content3","data-[loaded=true]:pointer-events-auto data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent data-[loaded=true]:before:opacity-0","data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0","transition-[background] !duration-300","h-4 rounded-lg",t),children:y.jsx("div",{className:J("opacity-0 group-data-[loaded=true]:opacity-100","transition-opacity motion-reduce:transition-none !duration-300",n),children:r})})},IO=({words:e,className:t,filter:n=!0,duration:r=.5})=>{const[a,i]=K0();let o=e.split(" ");_.useEffect(()=>{const l=setTimeout(()=>{a.current&&i("span",{opacity:1,filter:n?"blur(0px)":"none"},{duration:r||1,delay:Ak(.2)})},50);return()=>clearTimeout(l)},[e,a,i,r,n]);const s=()=>y.jsx(se.div,{ref:a,children:o.map((l,c)=>y.jsxs(se.span,{className:"text-gray-700/60 opacity-0",style:{filter:n?"blur(10px)":"none"},children:[l," "]},`${l}-${c}`))});return y.jsx("span",{className:J("text-gray-700 text-xs font-medium leading-snug tracking-wide",t),children:s()})},CO=({isLoaded:e=!1,progressMessage:t="Processing..."})=>y.jsxs("div",{className:"flex w-64 flex-col gap-2 relative",children:[y.jsx(_n,{isLoaded:e}),y.jsx(_n,{isLoaded:e}),y.jsxs("div",{className:"flex gap-1 items-center",children:[y.jsx(_n,{className:"duration-100 flex-1",isLoaded:e}),y.jsx("div",{className:"bg-[#fefef8] px-3 z-10",children:y.jsx(IO,{words:t,className:"text-gray-700/60 font-medium"},t)}),y.jsx(_n,{className:"duration-100 flex-1",isLoaded:e})]}),y.jsx(_n,{isLoaded:e}),y.jsx(_n,{isLoaded:e})]});function Ih(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function NO(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _O=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LO={};function Ch(e,t){return(LO.jsx?OO:_O).test(e)}const DO=/[ \t\n\f\r]/g;function MO(e){return typeof e=="object"?e.type==="text"?Nh(e.value):!1:Nh(e)}function Nh(e){return e.replace(DO,"")===""}class pa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}pa.prototype.normal={};pa.prototype.property={};pa.prototype.space=void 0;function aS(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new pa(n,r,t)}function Xr(e){return e.toLowerCase()}class Xe{constructor(t,n){this.attribute=n,this.property=t}}Xe.prototype.attribute="";Xe.prototype.booleanish=!1;Xe.prototype.boolean=!1;Xe.prototype.commaOrSpaceSeparated=!1;Xe.prototype.commaSeparated=!1;Xe.prototype.defined=!1;Xe.prototype.mustUseProperty=!1;Xe.prototype.number=!1;Xe.prototype.overloadedBoolean=!1;Xe.prototype.property="";Xe.prototype.spaceSeparated=!1;Xe.prototype.space=void 0;let FO=0;const re=vn(),Ie=vn(),Ls=vn(),V=vn(),Se=vn(),$n=vn(),Qe=vn();function vn(){return 2**++FO}const Ds=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:Ie,commaOrSpaceSeparated:Qe,commaSeparated:$n,number:V,overloadedBoolean:Ls,spaceSeparated:Se},Symbol.toStringTag,{value:"Module"})),To=Object.keys(Ds);class ql extends Xe{constructor(t,n,r,a){let i=-1;if(super(t,n),_h(this,"space",a),typeof r=="number")for(;++i<To.length;){const o=To[i];_h(this,To[i],(r&Ds[o])===Ds[o])}}}ql.prototype.defined=!0;function _h(e,t,n){n&&(e[t]=n)}function or(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new ql(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Xr(r)]=r,n[Xr(i.attribute)]=r}return new pa(t,n,e.space)}const iS=or({properties:{ariaActiveDescendant:null,ariaAtomic:Ie,ariaAutoComplete:null,ariaBusy:Ie,ariaChecked:Ie,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Se,ariaCurrent:null,ariaDescribedBy:Se,ariaDetails:null,ariaDisabled:Ie,ariaDropEffect:Se,ariaErrorMessage:null,ariaExpanded:Ie,ariaFlowTo:Se,ariaGrabbed:Ie,ariaHasPopup:null,ariaHidden:Ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Se,ariaLevel:V,ariaLive:null,ariaModal:Ie,ariaMultiLine:Ie,ariaMultiSelectable:Ie,ariaOrientation:null,ariaOwns:Se,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ie,ariaReadOnly:Ie,ariaRelevant:null,ariaRequired:Ie,ariaRoleDescription:Se,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ie,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function oS(e,t){return t in e?e[t]:t}function sS(e,t){return oS(e,t.toLowerCase())}const PO=or({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$n,acceptCharset:Se,accessKey:Se,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:Se,autoFocus:re,autoPlay:re,blocking:Se,capture:null,charSet:null,checked:re,cite:null,className:Se,cols:V,colSpan:null,content:null,contentEditable:Ie,controls:re,controlsList:Se,coords:V|$n,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Ls,draggable:Ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:Se,height:V,hidden:Ls,high:V,href:null,hrefLang:null,htmlFor:Se,httpEquiv:Se,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:Se,itemRef:Se,itemScope:re,itemType:Se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,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:re,optimum:V,pattern:null,ping:Se,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:Se,required:re,reversed:re,rows:V,rowSpan:V,sandbox:Se,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:Ie,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Se,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ie,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:re,disableRemotePlayback:re,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:sS}),BO=or({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:Qe,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Se,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:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,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:$n,g2:$n,glyphName:$n,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,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:V,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:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qe,rev:Qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qe,requiredFeatures:Qe,requiredFonts:Qe,requiredFormats:Qe,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:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qe,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:oS}),lS=or({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()}}),cS=or({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sS}),uS=or({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),UO={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"},zO=/[A-Z]/g,Oh=/-[a-z]/g,jO=/^data[-\w.:]+$/i;function dS(e,t){const n=Xr(t);let r=t,a=Xe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jO.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Oh,VO);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Oh.test(i)){let o=i.replace(zO,GO);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=ql}return new a(r,t)}function GO(e){return"-"+e.toLowerCase()}function VO(e){return e.charAt(1).toUpperCase()}const pS=aS([iS,PO,lS,cS,uS],"html"),Li=aS([iS,BO,lS,cS,uS],"svg");function Lh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function HO(e){return e.join(" ").trim()}var On={},Ao,Dh;function $O(){if(Dh)return Ao;Dh=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
2542
2486
|
`,c="/",u="*",d="",p="comment",f="declaration";function g(h,m){if(typeof h!="string")throw new TypeError("First argument must be a string");if(!h)return[];m=m||{};var E=1,w=1;function T(z){var B=z.match(t);B&&(E+=B.length);var H=z.lastIndexOf(l);w=~H?z.length-H:w+z.length}function A(){var z={line:E,column:w};return function(B){return B.position=new v(z),L(),B}}function v(z){this.start=z,this.end={line:E,column:w},this.source=m.source}v.prototype.content=h;function N(z){var B=new Error(m.source+":"+E+":"+w+": "+z);if(B.reason=z,B.filename=m.source,B.line=E,B.column=w,B.source=h,!m.silent)throw B}function R(z){var B=z.exec(h);if(B){var H=B[0];return T(H),h=h.slice(H.length),B}}function L(){R(n)}function I(z){var B;for(z=z||[];B=M();)B!==!1&&z.push(B);return z}function M(){var z=A();if(!(c!=h.charAt(0)||u!=h.charAt(1))){for(var B=2;d!=h.charAt(B)&&(u!=h.charAt(B)||c!=h.charAt(B+1));)++B;if(B+=2,d===h.charAt(B-1))return N("End of comment missing");var H=h.slice(2,B-2);return w+=2,T(H),h=h.slice(B),w+=2,z({type:p,comment:H})}}function P(){var z=A(),B=R(r);if(B){if(M(),!R(a))return N("property missing ':'");var H=R(i),j=z({type:f,property:b(B[0].replace(e,d)),value:H?b(H[0].replace(e,d)):d});return R(o),j}}function U(){var z=[];I(z);for(var B;B=P();)B!==!1&&(z.push(B),I(z));return z}return L(),U()}function b(h){return h?h.replace(s,d):d}return Ao=g,Ao}var Mh;function WO(){if(Mh)return On;Mh=1;var e=On&&On.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(On,"__esModule",{value:!0}),On.default=n;const t=e($O());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const o=(0,t.default)(r),s=typeof a=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;s?a(c,u,l):u&&(i=i||{},i[c]=u)}),i}return On}var kr={},Fh;function qO(){if(Fh)return kr;Fh=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(c){return!c||n.test(c)||e.test(c)},o=function(c,u){return u.toUpperCase()},s=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),i(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(a,s):c=c.replace(r,s),c.replace(t,o))};return kr.camelCase=l,kr}var Tr,Ph;function YO(){if(Ph)return Tr;Ph=1;var e=Tr&&Tr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(WO()),n=qO();function r(a,i){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(s,l){s&&l&&(o[(0,n.camelCase)(s,i)]=l)}),o}return r.default=r,Tr=r,Tr}var KO=YO();const XO=Fb(KO),fS=gS("end"),Yl=gS("start");function gS(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 ZO(e){const t=Yl(e),n=fS(e);if(t&&n)return{start:t,end:n}}function Lr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bh(e.position):"start"in e||"end"in e?Bh(e):"line"in e||"column"in e?Ms(e):""}function Ms(e){return Uh(e&&e.line)+":"+Uh(e&&e.column)}function Bh(e){return Ms(e&&e.start)+"-"+Ms(e&&e.end)}function Uh(e){return e&&typeof e=="number"?e:1}class Be extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=s?s.line:void 0,this.name=Lr(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Be.prototype.file="";Be.prototype.name="";Be.prototype.reason="";Be.prototype.message="";Be.prototype.stack="";Be.prototype.column=void 0;Be.prototype.line=void 0;Be.prototype.ancestors=void 0;Be.prototype.cause=void 0;Be.prototype.fatal=void 0;Be.prototype.place=void 0;Be.prototype.ruleId=void 0;Be.prototype.source=void 0;const Kl={}.hasOwnProperty,QO=new Map,JO=/[A-Z]/g,e1=new Set(["table","tbody","thead","tfoot","tr"]),t1=new Set(["td","th"]),mS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function n1(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=u1(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=c1(n,t.jsx,t.jsxs)}const a={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"?Li:pS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=hS(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function hS(e,t,n){if(t.type==="element")return r1(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return a1(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return o1(e,t,n);if(t.type==="mdxjsEsm")return i1(e,t);if(t.type==="root")return s1(e,t,n);if(t.type==="text")return l1(e,t)}function r1(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Li,e.schema=a),e.ancestors.push(t);const i=yS(e,t.tagName,!1),o=d1(e,t);let s=Zl(e,t);return e1.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!MO(l):!0})),bS(e,o,i,t),Xl(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function a1(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)}Zr(e,t.position)}function i1(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zr(e,t.position)}function o1(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Li,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:yS(e,t.name,!0),o=p1(e,t),s=Zl(e,t);return bS(e,o,i,t),Xl(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function s1(e,t,n){const r={};return Xl(r,Zl(e,t)),e.create(t,e.Fragment,r,n)}function l1(e,t){return t.value}function bS(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xl(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function c1(e,t,n){return r;function r(a,i,o,s){const c=Array.isArray(o.children)?n:t;return s?c(i,o,s):c(i,o)}}function u1(e,t){return n;function n(r,a,i,o){const s=Array.isArray(i.children),l=Yl(r);return t(a,i,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function d1(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Kl.call(t.properties,a)){const i=f1(e,a,t.properties[a]);if(i){const[o,s]=i;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&t1.has(t.tagName)?r=s:n[o]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function p1(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Zr(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Zr(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Zl(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:QO;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=a.get(l)||0;o=l+"-"+c,a.set(l,c+1)}}const s=hS(e,i,o);s!==void 0&&n.push(s)}return n}function f1(e,t,n){const r=dS(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?NO(n):HO(n)),r.property==="style"){let a=typeof n=="object"?n:g1(e,String(n));return e.stylePropertyNameCase==="css"&&(a=m1(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?UO[r.property]||r.property:r.attribute,n]}}function g1(e,t){try{return XO(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Be("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=mS+"#cannot-parse-style-attribute",a}}function yS(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,o;for(;++i<a.length;){const s=Ch(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=o}else r=Ch(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Kl.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zr(e)}function Zr(e,t){const n=new Be("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=mS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function m1(e){const t={};let n;for(n in e)Kl.call(e,n)&&(t[h1(n)]=e[n]);return t}function h1(e){let t=e.replace(JO,b1);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function b1(e){return"-"+e.toLowerCase()}const Ro={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"]},y1={};function Ql(e,t){const n=y1,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ES(e,r,a)}function ES(e,t,n){if(E1(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 zh(e.children,t,n)}return Array.isArray(e)?zh(e,t,n):""}function zh(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ES(e[a],t,n);return r.join("")}function E1(e){return!!(e&&typeof e=="object")}const jh=document.createElement("i");function Qr(e){const t="&"+e+";";jh.innerHTML=t;const n=jh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function tt(e,t,n,r){const a=e.length;let i=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function st(e,t){return e.length>0?(tt(e,e.length,0,t),e):t}const Gh={}.hasOwnProperty;function wS(e){const t={};let n=-1;for(;++n<e.length;)w1(t,e[n]);return t}function w1(e,t){let n;for(n in t){const a=(Gh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){Gh.call(a,o)||(a[o]=[]);const s=i[o];S1(a[o],Array.isArray(s)?s:s?[s]:[])}}}function S1(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);tt(e,0,0,r)}function SS(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 yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const je=nn(/[A-Za-z]/),Pe=nn(/[\dA-Za-z]/),v1=nn(/[#-'*+\--9=?A-Z^-~]/);function ui(e){return e!==null&&(e<32||e===127)}const Fs=nn(/\d/),x1=nn(/[\dA-Fa-f]/),k1=nn(/[!-/:-@[-`{-~]/);function ee(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const Di=nn(new RegExp("\\p{P}|\\p{S}","u")),Sn=nn(/\s/);function nn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function sr(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&Pe(e.charCodeAt(n+1))&&Pe(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(o=String.fromCharCode(i,s),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function de(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return oe(l)?(e.enter(n),s(l)):t(l)}function s(l){return oe(l)&&i++<a?(e.consume(l),s):(e.exit(n),t(l))}}const T1={tokenize:A1};function A1(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),de(e,t,"linePrefix")}function a(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return ee(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),o)}}const R1={tokenize:I1},Vh={tokenize:C1};function I1(e){const t=this,n=[];let r=0,a,i,o;return s;function s(w){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&E();const T=t.events.length;let A=T,v;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){v=t.events[A][1].end;break}m(r);let N=T;for(;N<t.events.length;)t.events[N][1].end={...v},N++;return tt(t.events,A+1,0,t.events.slice(T)),t.events.length=N,c(w)}return s(w)}function c(w){if(r===n.length){if(!a)return p(w);if(a.currentConstruct&&a.currentConstruct.concrete)return g(w);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vh,u,d)(w)}function u(w){return a&&E(),m(r),p(w)}function d(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(Vh,f,g)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){a&&E(),m(0),e.consume(w);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),b(w)}function b(w){if(w===null){h(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return ee(w)?(e.consume(w),h(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),b)}function h(w,T){const A=t.sliceStream(w);if(T&&A.push(null),w.previous=i,i&&(i.next=w),i=w,a.defineSkip(w.start),a.write(A),t.parser.lazy[w.start.line]){let v=a.events.length;for(;v--;)if(a.events[v][1].start.offset<o&&(!a.events[v][1].end||a.events[v][1].end.offset>o))return;const N=t.events.length;let R=N,L,I;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(L){I=t.events[R][1].end;break}L=!0}for(m(r),v=N;v<t.events.length;)t.events[v][1].end={...I},v++;tt(t.events,R+1,0,t.events.slice(N)),t.events.length=v}}function m(w){let T=n.length;for(;T-- >w;){const A=n[T];t.containerState=A[1],A[0].exit.call(t,e)}n.length=w}function E(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function C1(e,t,n){return de(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zn(e){if(e===null||Ee(e)||Sn(e))return 1;if(Di(e))return 2}function Mi(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Ps={name:"attention",resolveAll:N1,tokenize:_1};function N1(e,t){let n=-1,r,a,i,o,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Hh(d,-l),Hh(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=st(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=st(c,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=st(c,Mi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=st(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=st(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,tt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Zn(r);let i;return o;function o(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=Zn(l),d=!u||u===2&&a||n.includes(l),p=!a||a===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(a||!p)),c._close=!!(i===42?p:p&&(u||!d)),t(l)}}function Hh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const O1={name:"autolink",tokenize:L1};function L1(e,t,n){let r=0;return a;function a(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return je(f)?(e.consume(f),o):f===64?n(f):c(f)}function o(f){return f===43||f===45||f===46||Pe(f)?(r=1,s(f)):c(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Pe(f))&&r++<32?(e.consume(f),s):(r=0,c(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||ui(f)?n(f):(e.consume(f),l)}function c(f){return f===64?(e.consume(f),u):v1(f)?(e.consume(f),c):n(f)}function u(f){return Pe(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Pe(f))&&r++<63){const g=f===45?p:d;return e.consume(f),g}return n(f)}}const fa={partial:!0,tokenize:D1};function D1(e,t,n){return r;function r(i){return oe(i)?de(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||ee(i)?t(i):n(i)}}const vS={continuation:{tokenize:F1},exit:P1,name:"blockQuote",tokenize:M1};function M1(e,t,n){const r=this;return a;function a(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return oe(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function F1(e,t,n){const r=this;return a;function a(o){return oe(o)?de(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(vS,t,n)(o)}}function P1(e){e.exit("blockQuote")}const xS={name:"characterEscape",tokenize:B1};function B1(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return k1(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const kS={name:"characterReference",tokenize:U1};function U1(e,t,n){const r=this;let a=0,i,o;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,o=Pe,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=x1,u):(e.enter("characterReferenceValue"),i=7,o=Fs,u(d))}function u(d){if(d===59&&a){const p=e.exit("characterReferenceValue");return o===Pe&&!Qr(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&a++<i?(e.consume(d),u):n(d)}}const $h={partial:!0,tokenize:j1},Wh={concrete:!0,name:"codeFenced",tokenize:z1};function z1(e,t,n){const r=this,a={partial:!0,tokenize:A};let i=0,o=0,s;return l;function l(v){return c(v)}function c(v){const N=r.events[r.events.length-1];return i=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,s=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(v)}function u(v){return v===s?(o++,e.consume(v),u):o<3?n(v):(e.exit("codeFencedFenceSequence"),oe(v)?de(e,d,"whitespace")(v):d(v))}function d(v){return v===null||ee(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check($h,b,T)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||ee(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):oe(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),de(e,f,"whitespace")(v)):v===96&&v===s?n(v):(e.consume(v),p)}function f(v){return v===null||ee(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||ee(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===s?n(v):(e.consume(v),g)}function b(v){return e.attempt(a,T,h)(v)}function h(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m}function m(v){return i>0&&oe(v)?de(e,E,"linePrefix",i+1)(v):E(v)}function E(v){return v===null||ee(v)?e.check($h,b,T)(v):(e.enter("codeFlowValue"),w(v))}function w(v){return v===null||ee(v)?(e.exit("codeFlowValue"),E(v)):(e.consume(v),w)}function T(v){return e.exit("codeFenced"),t(v)}function A(v,N,R){let L=0;return I;function I(B){return v.enter("lineEnding"),v.consume(B),v.exit("lineEnding"),M}function M(B){return v.enter("codeFencedFence"),oe(B)?de(v,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):P(B)}function P(B){return B===s?(v.enter("codeFencedFenceSequence"),U(B)):R(B)}function U(B){return B===s?(L++,v.consume(B),U):L>=o?(v.exit("codeFencedFenceSequence"),oe(B)?de(v,z,"whitespace")(B):z(B)):R(B)}function z(B){return B===null||ee(B)?(v.exit("codeFencedFence"),N(B)):R(B)}}}function j1(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Io={name:"codeIndented",tokenize:V1},G1={partial:!0,tokenize:H1};function V1(e,t,n){const r=this;return a;function a(c){return e.enter("codeIndented"),de(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):ee(c)?e.attempt(G1,o,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||ee(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function H1(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):de(e,i,"linePrefix",5)(o)}function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):ee(o)?a(o):n(o)}}const $1={name:"codeText",previous:q1,resolve:W1,tokenize:Y1};function W1(e){let t=e.length-4,n=3,r,a;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;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function q1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Y1(e,t,n){let r=0,a,i;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),a=0,u(d)):ee(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||ee(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),a++,u):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class K1{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 a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Ar(this.left,r),i.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),Ar(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ar(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);Ar(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ar(this.left,n.reverse())}}}function Ar(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 TS(e){const t={};let n=-1,r,a,i,o,s,l,c;const u=new K1(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,X1(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=u.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(u.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...u.get(a)[1].start},s=u.slice(a,n),s.unshift(r),u.splice(a,n-a+1,s))}}return tt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function X1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],c={};let u,d,p=-1,f=n,g=0,b=0;const h=[b];for(;f;){for(;e.get(++a)[1]!==f;);i.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(b=p+1,h.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),p=h.length;p--;){const m=s.slice(h[p],h[p+1]),E=i.pop();l.push([E,E+m.length-1]),e.splice(E,2,m)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const Z1={resolve:J1,tokenize:eL},Q1={partial:!0,tokenize:tL};function J1(e){return TS(e),e}function eL(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(s)}function a(s){return s===null?i(s):ee(s)?e.check(Q1,o,i)(s):(e.consume(s),a)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function tL(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),de(e,i,"linePrefix")}function i(o){if(o===null||ee(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function AS(e,t,n,r,a,i,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return m===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(m),e.exit(i),p):m===null||m===32||m===41||ui(m)?n(m):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(m))}function p(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||ee(m)?n(m):(e.consume(m),m===92?g:f)}function g(m){return m===60||m===62||m===92?(e.consume(m),f):f(m)}function b(m){return!u&&(m===null||m===41||Ee(m))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(m)):u<c&&m===40?(e.consume(m),u++,b):m===41?(e.consume(m),u--,b):m===null||m===32||m===40||ui(m)?n(m):(e.consume(m),m===92?h:b)}function h(m){return m===40||m===41||m===92?(e.consume(m),b):b(m)}}function RS(e,t,n,r,a,i){const o=this;let s=0,l;return c;function c(f){return e.enter(r),e.enter(a),e.consume(f),e.exit(a),e.enter(i),u}function u(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(i),e.enter(a),e.consume(f),e.exit(a),e.exit(r),t):ee(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||ee(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),l||(l=!oe(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function IS(e,t,n,r,a,i){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(a),e.consume(p),e.exit(a),o=p===40?41:p,l):n(p)}function l(p){return p===o?(e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===o?(e.exit(i),l(o)):p===null?n(p):ee(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),de(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===o||p===null||ee(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:u)}function d(p){return p===o||p===92?(e.consume(p),u):u(p)}}function Dr(e,t){let n;return r;function r(a){return ee(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):oe(a)?de(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const nL={name:"definition",tokenize:aL},rL={partial:!0,tokenize:iL};function aL(e,t,n){const r=this;let a;return i;function i(f){return e.enter("definition"),o(f)}function o(f){return RS.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return a=yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Ee(f)?Dr(e,c)(f):c(f)}function c(f){return AS(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(rL,d,d)(f)}function d(f){return oe(f)?de(e,p,"whitespace")(f):p(f)}function p(f){return f===null||ee(f)?(e.exit("definition"),r.parser.defined.push(a),t(f)):n(f)}}function iL(e,t,n){return r;function r(s){return Ee(s)?Dr(e,a)(s):n(s)}function a(s){return IS(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return oe(s)?de(e,o,"whitespace")(s):o(s)}function o(s){return s===null||ee(s)?t(s):n(s)}}const oL={name:"hardBreakEscape",tokenize:sL};function sL(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return ee(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const lL={name:"headingAtx",resolve:cL,tokenize:uL};function cL(e,t){let n=e.length-2,r=3,a,i;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&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},tt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function uL(e,t,n){let r=0;return a;function a(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Ee(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||ee(u)?(e.exit("atxHeading"),t(u)):oe(u)?de(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||Ee(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const dL=["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"],qh=["pre","script","style","textarea"],pL={concrete:!0,name:"htmlFlow",resolveTo:mL,tokenize:hL},fL={partial:!0,tokenize:yL},gL={partial:!0,tokenize:bL};function mL(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 hL(e,t,n){const r=this;let a,i,o,s,l;return c;function c(k){return u(k)}function u(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),p):k===47?(e.consume(k),i=!0,b):k===63?(e.consume(k),a=3,r.interrupt?t:x):je(k)?(e.consume(k),o=String.fromCharCode(k),h):n(k)}function p(k){return k===45?(e.consume(k),a=2,f):k===91?(e.consume(k),a=5,s=0,g):je(k)?(e.consume(k),a=4,r.interrupt?t:x):n(k)}function f(k){return k===45?(e.consume(k),r.interrupt?t:x):n(k)}function g(k){const X="CDATA[";return k===X.charCodeAt(s++)?(e.consume(k),s===X.length?r.interrupt?t:P:g):n(k)}function b(k){return je(k)?(e.consume(k),o=String.fromCharCode(k),h):n(k)}function h(k){if(k===null||k===47||k===62||Ee(k)){const X=k===47,ge=o.toLowerCase();return!X&&!i&&qh.includes(ge)?(a=1,r.interrupt?t(k):P(k)):dL.includes(o.toLowerCase())?(a=6,X?(e.consume(k),m):r.interrupt?t(k):P(k)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):i?E(k):w(k))}return k===45||Pe(k)?(e.consume(k),o+=String.fromCharCode(k),h):n(k)}function m(k){return k===62?(e.consume(k),r.interrupt?t:P):n(k)}function E(k){return oe(k)?(e.consume(k),E):I(k)}function w(k){return k===47?(e.consume(k),I):k===58||k===95||je(k)?(e.consume(k),T):oe(k)?(e.consume(k),w):I(k)}function T(k){return k===45||k===46||k===58||k===95||Pe(k)?(e.consume(k),T):A(k)}function A(k){return k===61?(e.consume(k),v):oe(k)?(e.consume(k),A):w(k)}function v(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),l=k,N):oe(k)?(e.consume(k),v):R(k)}function N(k){return k===l?(e.consume(k),l=null,L):k===null||ee(k)?n(k):(e.consume(k),N)}function R(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Ee(k)?A(k):(e.consume(k),R)}function L(k){return k===47||k===62||oe(k)?w(k):n(k)}function I(k){return k===62?(e.consume(k),M):n(k)}function M(k){return k===null||ee(k)?P(k):oe(k)?(e.consume(k),M):n(k)}function P(k){return k===45&&a===2?(e.consume(k),H):k===60&&a===1?(e.consume(k),j):k===62&&a===4?(e.consume(k),O):k===63&&a===3?(e.consume(k),x):k===93&&a===5?(e.consume(k),Z):ee(k)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(fL,W,U)(k)):k===null||ee(k)?(e.exit("htmlFlowData"),U(k)):(e.consume(k),P)}function U(k){return e.check(gL,z,W)(k)}function z(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),B}function B(k){return k===null||ee(k)?U(k):(e.enter("htmlFlowData"),P(k))}function H(k){return k===45?(e.consume(k),x):P(k)}function j(k){return k===47?(e.consume(k),o="",D):P(k)}function D(k){if(k===62){const X=o.toLowerCase();return qh.includes(X)?(e.consume(k),O):P(k)}return je(k)&&o.length<8?(e.consume(k),o+=String.fromCharCode(k),D):P(k)}function Z(k){return k===93?(e.consume(k),x):P(k)}function x(k){return k===62?(e.consume(k),O):k===45&&a===2?(e.consume(k),x):P(k)}function O(k){return k===null||ee(k)?(e.exit("htmlFlowData"),W(k)):(e.consume(k),O)}function W(k){return e.exit("htmlFlow"),t(k)}}function bL(e,t,n){const r=this;return a;function a(o){return ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function yL(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(fa,t,n)}}const EL={name:"htmlText",tokenize:wL};function wL(e,t,n){const r=this;let a,i,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),A):x===63?(e.consume(x),w):je(x)?(e.consume(x),R):n(x)}function c(x){return x===45?(e.consume(x),u):x===91?(e.consume(x),i=0,g):je(x)?(e.consume(x),E):n(x)}function u(x){return x===45?(e.consume(x),f):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),p):ee(x)?(o=d,j(x)):(e.consume(x),d)}function p(x){return x===45?(e.consume(x),f):d(x)}function f(x){return x===62?H(x):x===45?p(x):d(x)}function g(x){const O="CDATA[";return x===O.charCodeAt(i++)?(e.consume(x),i===O.length?b:g):n(x)}function b(x){return x===null?n(x):x===93?(e.consume(x),h):ee(x)?(o=b,j(x)):(e.consume(x),b)}function h(x){return x===93?(e.consume(x),m):b(x)}function m(x){return x===62?H(x):x===93?(e.consume(x),m):b(x)}function E(x){return x===null||x===62?H(x):ee(x)?(o=E,j(x)):(e.consume(x),E)}function w(x){return x===null?n(x):x===63?(e.consume(x),T):ee(x)?(o=w,j(x)):(e.consume(x),w)}function T(x){return x===62?H(x):w(x)}function A(x){return je(x)?(e.consume(x),v):n(x)}function v(x){return x===45||Pe(x)?(e.consume(x),v):N(x)}function N(x){return ee(x)?(o=N,j(x)):oe(x)?(e.consume(x),N):H(x)}function R(x){return x===45||Pe(x)?(e.consume(x),R):x===47||x===62||Ee(x)?L(x):n(x)}function L(x){return x===47?(e.consume(x),H):x===58||x===95||je(x)?(e.consume(x),I):ee(x)?(o=L,j(x)):oe(x)?(e.consume(x),L):H(x)}function I(x){return x===45||x===46||x===58||x===95||Pe(x)?(e.consume(x),I):M(x)}function M(x){return x===61?(e.consume(x),P):ee(x)?(o=M,j(x)):oe(x)?(e.consume(x),M):L(x)}function P(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),a=x,U):ee(x)?(o=P,j(x)):oe(x)?(e.consume(x),P):(e.consume(x),z)}function U(x){return x===a?(e.consume(x),a=void 0,B):x===null?n(x):ee(x)?(o=U,j(x)):(e.consume(x),U)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||Ee(x)?L(x):(e.consume(x),z)}function B(x){return x===47||x===62||Ee(x)?L(x):n(x)}function H(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function j(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),D}function D(x){return oe(x)?de(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):Z(x)}function Z(x){return e.enter("htmlTextData"),o(x)}}const Jl={name:"labelEnd",resolveAll:kL,resolveTo:TL,tokenize:AL},SL={tokenize:RL},vL={tokenize:IL},xL={tokenize:CL};function kL(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 a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&tt(e,0,e.length,n),e}function TL(e,t){let n=e.length,r=0,a,i,o,s;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=st(s,e.slice(i+1,i+r+3)),s=st(s,[["enter",u,t]]),s=st(s,Mi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=st(s,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),s=st(s,e.slice(o+1)),s=st(s,[["exit",l,t]]),tt(e,i,e.length,s),e}function AL(e,t,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return s;function s(p){return i?i._inactive?d(p):(o=r.parser.defined.includes(yt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(SL,u,o?u:d)(p):p===91?e.attempt(vL,u,o?c:d)(p):o?u(p):d(p)}function c(p){return e.attempt(xL,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,n(p)}}function RL(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),a}function a(d){return Ee(d)?Dr(e,i)(d):i(d)}function i(d){return d===41?u(d):AS(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Ee(d)?Dr(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?IS(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Ee(d)?Dr(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function IL(e,t,n){const r=this;return a;function a(s){return RS.call(r,e,i,o,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function CL(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const NL={name:"labelStartImage",resolveAll:Jl.resolveAll,tokenize:_L};function _L(e,t,n){const r=this;return a;function a(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const OL={name:"labelStartLink",resolveAll:Jl.resolveAll,tokenize:LL};function LL(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Co={name:"lineEnding",tokenize:DL};function DL(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),de(e,t,"linePrefix")}}const Wa={name:"thematicBreak",tokenize:ML};function ML(e,t,n){let r=0,a;return i;function i(c){return e.enter("thematicBreak"),o(c)}function o(c){return a=c,s(c)}function s(c){return c===a?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||ee(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===a?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),oe(c)?de(e,s,"whitespace")(c):s(c))}}const He={continuation:{tokenize:UL},exit:jL,name:"list",tokenize:BL},FL={partial:!0,tokenize:GL},PL={partial:!0,tokenize:zL};function BL(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Fs(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(Wa,n,c)(f):c(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Fs(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):n(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(fa,r.interrupt?n:u,e.attempt(FL,p,d))}function u(f){return r.containerState.initialBlankLine=!0,i++,p(f)}function d(f){return oe(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function UL(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(fa,a,i);function a(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,de(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!oe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(PL,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,de(e,e.attempt(He,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function zL(e,t,n){const r=this;return de(e,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function jL(e){e.exit(this.containerState.type)}function GL(e,t,n){const r=this;return de(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!oe(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Yh={name:"setextUnderline",resolveTo:VL,tokenize:HL};function VL(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function HL(e,t,n){const r=this;let a;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),a=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===a?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),oe(c)?de(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ee(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const $L={tokenize:WL};function WL(e){const t=this,n=e.attempt(fa,r,e.attempt(this.parser.constructs.flowInitial,a,de(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Z1,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qL={resolveAll:NS()},YL=CS("string"),KL=CS("text");function CS(e){return{resolveAll:NS(e==="text"?XL:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,o,s);return o;function o(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=a[u];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 NS(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function XL(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],a=t.sliceStream(r);let i=a.length,o=-1,s=0,l;for(;i--;){const c=a[i];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const ZL={42:He,43:He,45:He,48:He,49:He,50:He,51:He,52:He,53:He,54:He,55:He,56:He,57:He,62:vS},QL={91:nL},JL={[-2]:Io,[-1]:Io,32:Io},eD={35:lL,42:Wa,45:[Yh,Wa],60:pL,61:Yh,95:Wa,96:Wh,126:Wh},tD={38:kS,92:xS},nD={[-5]:Co,[-4]:Co,[-3]:Co,33:NL,38:kS,42:Ps,60:[O1,EL],91:OL,92:[oL,xS],93:Jl,95:Ps,96:$1},rD={null:[Ps,qL]},aD={null:[42,95]},iD={null:[]},oD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:aD,contentInitial:QL,disable:iD,document:ZL,flow:eD,flowInitial:JL,insideSpan:rD,string:tD,text:nD},Symbol.toStringTag,{value:"Module"}));function sD(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 a={},i=[];let o=[],s=[];const l={attempt:N(A),check:N(v),consume:E,enter:w,exit:T,interrupt:N(v,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(M){return o=st(o,M),h(),o[o.length-1]!==null?[]:(R(t,0),c.events=Mi(i,c.events,c),c.events)}function p(M,P){return cD(f(M),P)}function f(M){return lD(o,M)}function g(){const{_bufferIndex:M,_index:P,line:U,column:z,offset:B}=r;return{_bufferIndex:M,_index:P,line:U,column:z,offset:B}}function b(M){a[M.line]=M.column,I()}function h(){let M;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<P.length;)m(P.charCodeAt(r._bufferIndex));else m(P)}}function m(M){u=u(M)}function E(M){ee(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,I()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function w(M,P){const U=P||{};return U.type=M,U.start=g(),c.events.push(["enter",U,c]),s.push(U),U}function T(M){const P=s.pop();return P.end=g(),c.events.push(["exit",P,c]),P}function A(M,P){R(M,P.from)}function v(M,P){P.restore()}function N(M,P){return U;function U(z,B,H){let j,D,Z,x;return Array.isArray(z)?W(z):"tokenize"in z?W([z]):O(z);function O(ie){return Q;function Q(pe){const be=pe!==null&&ie[pe],Te=pe!==null&&ie.null,Ae=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return W(Ae)(pe)}}function W(ie){return j=ie,D=0,ie.length===0?H:k(ie[D])}function k(ie){return Q;function Q(pe){return x=L(),Z=ie,ie.partial||(c.currentConstruct=ie),ie.name&&c.parser.constructs.disable.null.includes(ie.name)?ge():ie.tokenize.call(P?Object.assign(Object.create(c),P):c,l,X,ge)(pe)}}function X(ie){return M(Z,x),B}function ge(ie){return x.restore(),++D<j.length?k(j[D]):H}}}function R(M,P){M.resolveAll&&!i.includes(M)&&i.push(M),M.resolve&&tt(c.events,P,c.events.length-P,M.resolve(c.events.slice(P),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function L(){const M=g(),P=c.previous,U=c.currentConstruct,z=c.events.length,B=Array.from(s);return{from:z,restore:H};function H(){r=M,c.previous=P,c.currentConstruct=U,c.events.length=z,s=B,I()}}function I(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function lD(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,i)];else{if(o=e.slice(n,a),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}i>0&&o.push(e[a].slice(0,i))}return o}function cD(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
2543
2487
|
`;break}case-3:{o=`\r
|
|
2544
2488
|
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function uD(e){const r={constructs:wS([oD,...(e||{}).extensions||[]]),content:a(T1),defined:[],document:a(R1),flow:a($L),lazy:{},string:a(YL),text:a(KL)};return r;function a(i){return o;function o(s){return sD(r,i,s)}}}function dD(e){for(;!TS(e););return e}const Kh=/[\0\t\n\r]/g;function pD(){let e=1,t="",n=!0,r;return a;function a(i,o,s){const l=[];let c,u,d,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(Kh.lastIndex=d,c=Kh.exec(i),p=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(p),!c){t=i.slice(d);break}if(f===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(i.slice(d,p)),e+=p-d),f){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const fD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gD(e){return e.replace(fD,mD)}function mD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return SS(n.slice(i?2:1),i?16:10)}return Qr(n)||e}const _S={}.hasOwnProperty;function hD(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bD(n)(dD(uD(n).document().write(pD()(e,t,!0))))}function bD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(pt),autolinkProtocol:L,autolinkEmail:L,atxHeading:i(Ht),blockQuote:i(Te),characterEscape:L,characterReference:L,codeFenced:i(Ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(Ae,o),codeText:i(rt,o),codeTextData:L,data:L,codeFlowValue:L,definition:i(Ft),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(kn),hardBreakEscape:i(at),hardBreakTrailing:i(at),htmlFlow:i(Tn,o),htmlFlowData:L,htmlText:i(Tn,o),htmlTextData:L,image:i(An),label:o,link:i(pt),listItem:i(Yi),listItemValue:p,listOrdered:i($t,d),listUnordered:i($t),paragraph:i(Sa),reference:k,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Ht),strong:i(Ki),thematicBreak:i(it)},exit:{atxHeading:l(),atxHeadingSequence:A,autolink:l(),autolinkEmail:be,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:ie,characterReference:Q,codeFenced:l(h),codeFencedFence:b,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:l(m),codeText:l(B),codeTextData:I,data:I,definition:l(),definitionDestinationString:T,definitionLabelString:E,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(P),hardBreakTrailing:l(P),htmlFlow:l(U),htmlFlowData:I,htmlText:l(z),htmlTextData:I,image:l(j),label:Z,labelText:D,lineEnding:M,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:X,resourceDestinationString:x,resourceTitleString:O,resource:W,setextHeading:l(R),setextHeadingLineSequence:N,setextHeadingText:v,strong:l(),thematicBreak:l()}};OS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let $={type:"root",children:[]};const ne={stack:[$],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:u,data:n},ce=[];let ye=-1;for(;++ye<F.length;)if(F[ye][1].type==="listOrdered"||F[ye][1].type==="listUnordered")if(F[ye][0]==="enter")ce.push(ye);else{const ft=ce.pop();ye=a(F,ft,ye)}for(ye=-1;++ye<F.length;){const ft=t[F[ye][0]];_S.call(ft,F[ye][1].type)&&ft[F[ye][1].type].call(Object.assign({sliceSerialize:F[ye][2].sliceSerialize},ne),F[ye][1])}if(ne.tokenStack.length>0){const ft=ne.tokenStack[ne.tokenStack.length-1];(ft[1]||Xh).call(ne,void 0,ft[0])}for($.position={start:qt(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:qt(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)$=t.transforms[ye]($)||$;return $}function a(F,$,ne){let ce=$-1,ye=-1,ft=!1,rn,Pt,gr,mr;for(;++ce<=ne;){const Ze=F[ce];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?ye++:ye--,mr=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(rn&&!mr&&!ye&&!gr&&(gr=ce),mr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mr=void 0}if(!ye&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||ye===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(rn){let Rn=ce;for(Pt=void 0;Rn--;){const Bt=F[Rn];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;Pt&&(F[Pt][1].type="lineEndingBlank",ft=!0),Bt[1].type="lineEnding",Pt=Rn}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}gr&&(!Pt||gr<Pt)&&(rn._spread=!0),rn.end=Object.assign({},Pt?F[Pt][1].start:Ze[1].end),F.splice(Pt||ce,0,["exit",rn,Ze[2]]),ce++,ne++}if(Ze[1].type==="listItemPrefix"){const Rn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};rn=Rn,F.splice(ce,0,["enter",Rn,Ze[2]]),ce++,ne++,gr=void 0,mr=!0}}}return F[$][1]._spread=ft,ne}function i(F,$){return ne;function ne(ce){s.call(this,F(ce),ce),$&&$.call(this,ce)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(F,$,ne){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([$,ne||void 0]),F.position={start:qt($.start),end:void 0}}function l(F){return $;function $(ne){F&&F.call(this,ne),c.call(this,ne)}}function c(F,$){const ne=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==F.type&&($?$.call(this,F,ce[0]):(ce[1]||Xh).call(this,F,ce[0]));else throw new Error("Cannot close `"+F.type+"` ("+Lr({start:F.start,end:F.end})+"): it’s not open");ne.position.end=qt(F.end)}function u(){return Ql(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(F){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function f(){const F=this.resume(),$=this.stack[this.stack.length-1];$.lang=F}function g(){const F=this.resume(),$=this.stack[this.stack.length-1];$.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function h(){const F=this.resume(),$=this.stack[this.stack.length-1];$.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const F=this.resume(),$=this.stack[this.stack.length-1];$.value=F.replace(/(\r?\n|\r)$/g,"")}function E(F){const $=this.resume(),ne=this.stack[this.stack.length-1];ne.label=$,ne.identifier=yt(this.sliceSerialize(F)).toLowerCase()}function w(){const F=this.resume(),$=this.stack[this.stack.length-1];$.title=F}function T(){const F=this.resume(),$=this.stack[this.stack.length-1];$.url=F}function A(F){const $=this.stack[this.stack.length-1];if(!$.depth){const ne=this.sliceSerialize(F).length;$.depth=ne}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function N(F){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function L(F){const ne=this.stack[this.stack.length-1].children;let ce=ne[ne.length-1];(!ce||ce.type!=="text")&&(ce=G(),ce.position={start:qt(F.start),end:void 0},ne.push(ce)),this.stack.push(ce)}function I(F){const $=this.stack.pop();$.value+=this.sliceSerialize(F),$.position.end=qt(F.end)}function M(F){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=$.children[$.children.length-1];ne.position.end=qt(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes($.type)&&(L.call(this,F),I.call(this,F))}function P(){this.data.atHardBreak=!0}function U(){const F=this.resume(),$=this.stack[this.stack.length-1];$.value=F}function z(){const F=this.resume(),$=this.stack[this.stack.length-1];$.value=F}function B(){const F=this.resume(),$=this.stack[this.stack.length-1];$.value=F}function H(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=$,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function j(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=$,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function D(F){const $=this.sliceSerialize(F),ne=this.stack[this.stack.length-2];ne.label=gD($),ne.identifier=yt($).toLowerCase()}function Z(){const F=this.stack[this.stack.length-1],$=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const ce=F.children;ne.children=ce}else ne.alt=$}function x(){const F=this.resume(),$=this.stack[this.stack.length-1];$.url=F}function O(){const F=this.resume(),$=this.stack[this.stack.length-1];$.title=F}function W(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function X(F){const $=this.resume(),ne=this.stack[this.stack.length-1];ne.label=$,ne.identifier=yt(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function ge(F){this.data.characterReferenceType=F.type}function ie(F){const $=this.sliceSerialize(F),ne=this.data.characterReferenceType;let ce;ne?(ce=SS($,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Qr($);const ye=this.stack[this.stack.length-1];ye.value+=ce}function Q(F){const $=this.stack.pop();$.position.end=qt(F.end)}function pe(F){I.call(this,F);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(F)}function be(F){I.call(this,F);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(F)}function Te(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function rt(){return{type:"inlineCode",value:""}}function Ft(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function kn(){return{type:"emphasis",children:[]}}function Ht(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function Tn(){return{type:"html",value:""}}function An(){return{type:"image",title:null,url:"",alt:null}}function pt(){return{type:"link",title:null,url:"",children:[]}}function $t(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Yi(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Sa(){return{type:"paragraph",children:[]}}function Ki(){return{type:"strong",children:[]}}function G(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function qt(e){return{line:e.line,column:e.column,offset:e.offset}}function OS(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?OS(e,r):yD(e,r)}}function yD(e,t){let n;for(n in t)if(_S.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 Xh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Lr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Lr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Lr({start:t.start,end:t.end})+") is still open")}function ED(e){const t=this;t.parser=n;function n(r){return hD(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function wD(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 SD(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -2574,5 +2518,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2574
2518
|
`))+1))}const o="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
2575
2519
|
`,...i.current()});return/^[\t ]/.test(c)&&(c=ea(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c}rv.peek=FF;function rv(e){return e.value||""}function FF(){return"<"}av.peek=PF;function av(e,t,n,r){const a=sg(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),o(),c}function PF(){return"!"}iv.peek=BF;function iv(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,i(),a==="full"||!c||c!==d?l+=s.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function BF(){return"!"}ov.peek=UF;function ov(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const o=n.unsafe[i],s=n.compilePattern(o);let l;if(o.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return a+r+a}function UF(){return"`"}function sv(e,t){const n=Ql(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))}lv.peek=zF;function lv(e,t,n,r){const a=sg(n),i=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,l;if(sv(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),s(),n.stack=u,d}s=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=o.move(" "+a),c+=o.move(n.safe(e.title,{before:c,after:a,...o.current()})),c+=o.move(a),l()),c+=o.move(")"),s(),c}function zF(e,t,n){return sv(e,n)?"<":"["}cv.peek=jF;function cv(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,i(),a==="full"||!c||c!==d?l+=s.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function jF(){return"["}function lg(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 GF(e){const t=lg(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 VF(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 uv(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 HF(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?VF(n):lg(n);const s=e.ordered?o==="."?")":".":GF(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),uv(n)===o&&u){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"){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=i,a(),c}function $F(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 WF(e,t,n,r){const a=$F(n);let i=n.bulletCurrent||lg(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(o-i.length)),s.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(d,p,f){return p?(f?"":" ".repeat(o))+d:(f?i:i+" ".repeat(o-i.length))+d}}function qF(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),a(),o}const YF=Pi(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function KF(e,t,n,r){return(e.children.some(function(o){return YF(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function XF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}dv.peek=ZF;function dv(e,t,n,r){const a=XF(n),i=n.enter("strong"),o=n.createTracker(r),s=o.move(a+a);let l=o.move(n.containerPhrasing(e,{after:a,before:s,...o.current()}));const c=l.charCodeAt(0),u=fi(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=ea(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=fi(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+ea(d));const f=o.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function ZF(e,t,n){return n.options.strong||"*"}function QF(e,t,n,r){return n.safe(e.value,r)}function JF(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 eP(e,t,n){const r=(uv(n)+(n.options.ruleSpaces?" ":"")).repeat(JF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const pv={blockquote:xF,break:xb,code:CF,definition:_F,emphasis:nv,hardBreak:xb,heading:MF,html:rv,image:av,imageReference:iv,inlineCode:ov,link:lv,linkReference:cv,list:HF,listItem:WF,paragraph:qF,root:KF,strong:dv,text:QF,thematicBreak:eP};function tP(){return{enter:{table:nP,tableData:kb,tableHeader:kb,tableRow:aP},exit:{codeText:iP,table:rP,tableData:Go,tableHeader:Go,tableRow:Go}}}function nP(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 rP(e){this.exit(e),this.data.inTable=void 0}function aP(e){this.enter({type:"tableRow",children:[]},e)}function Go(e){this.exit(e)}function kb(e){this.enter({type:"tableCell",children:[]},e)}function iP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oP(e,t){return t==="|"?t:e}function sP(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
2576
2520
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:s}};function o(f,g,b,h){return c(u(f,b,h),f.align)}function s(f,g,b,h){const m=d(f,b,h),E=c([m]);return E.slice(0,E.indexOf(`
|
|
2577
|
-
`))}function l(f,g,b,h){const m=b.enter("tableCell"),E=b.enter("phrasing"),w=b.containerPhrasing(f,{...h,before:i,after:i});return E(),m(),w}function c(f,g){return SF(f,{align:g,alignDelimiters:r,padding:n,stringLength:a})}function u(f,g,b){const h=f.children;let m=-1;const E=[],w=g.enter("table");for(;++m<h.length;)E[m]=d(h[m],g,b);return w(),E}function d(f,g,b){const h=f.children;let m=-1;const E=[],w=g.enter("tableRow");for(;++m<h.length;)E[m]=l(h[m],f,g,b);return w(),E}function p(f,g,b){let h=pv.inlineCode(f,g,b);return b.stack.includes("tableCell")&&(h=h.replace(/\|/g,"\\$&")),h}}function lP(){return{exit:{taskListCheckValueChecked:Tb,taskListCheckValueUnchecked:Tb,paragraph:uP}}}function cP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:dP}}}function Tb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uP(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 a=t.children;let i=-1,o;for(;++i<a.length;){const s=a[i];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function dP(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(o);let l=pv.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function pP(){return[H2(),dF(),mF(),tP(),lP()]}function fP(e){return{extensions:[$2(),pF(e),hF(),sP(e),cP()]}}const gP={tokenize:wP,partial:!0},fv={tokenize:SP,partial:!0},gv={tokenize:vP,partial:!0},mv={tokenize:xP,partial:!0},mP={tokenize:kP,partial:!0},hv={name:"wwwAutolink",tokenize:yP,previous:yv},bv={name:"protocolAutolink",tokenize:EP,previous:Ev},Vt={name:"emailAutolink",tokenize:bP,previous:wv},Mt={};function hP(){return{text:Mt}}let sn=48;for(;sn<123;)Mt[sn]=Vt,sn++,sn===58?sn=65:sn===91&&(sn=97);Mt[43]=Vt;Mt[45]=Vt;Mt[46]=Vt;Mt[95]=Vt;Mt[72]=[Vt,bv];Mt[104]=[Vt,bv];Mt[87]=[Vt,hv];Mt[119]=[Vt,hv];function bP(e,t,n){const r=this;let a,i;return o;function o(d){return!Ys(d)||!wv.call(r,r.previous)||cg(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Ys(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(mP,u,c)(d):d===45||d===95||Pe(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),a=!0,l}function u(d){return i&&a&&je(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function yP(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!yv.call(r,r.previous)||cg(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gP,e.attempt(fv,e.attempt(gv,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function EP(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&Ev.call(r,r.previous)&&!cg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(je(d)&&a.length<5)return a+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=a.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):n(d)}function c(d){return d===null||ui(d)||Ee(d)||Sn(d)||Di(d)?n(d):e.attempt(fv,e.attempt(gv,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function wP(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function SP(e,t,n){let r,a,i;return o;function o(c){return c===46||c===95?e.check(mv,l,s)(c):c===null||Ee(c)||Sn(c)||c!==45&&Di(c)?l(c):(i=!0,e.consume(c),o)}function s(c){return c===95?r=!0:(a=r,r=void 0),e.consume(c),o}function l(c){return a||r||!i?n(c):t(c)}}function vP(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(mv,t,i)(o):o===null||Ee(o)||Sn(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function xP(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),a):s===60||s===null||Ee(s)||Sn(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Ee(s)||Sn(s)?t(s):r(s)}function i(s){return je(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):je(s)?(e.consume(s),o):n(s)}}function kP(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return Pe(i)?n(i):t(i)}}function yv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ee(e)}function Ev(e){return!je(e)}function wv(e){return!(e===47||Ys(e))}function Ys(e){return e===43||e===45||e===46||e===95||Pe(e)}function cg(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 TP={tokenize:LP,partial:!0};function AP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:NP,continuation:{tokenize:_P},exit:OP}},text:{91:{name:"gfmFootnoteCall",tokenize:CP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RP,resolveTo:IP}}}}function RP(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const c=yt(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function IP(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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function CP(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!o||d===null||d===91||Ee(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(yt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ee(d)||(o=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function NP(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(g)}function u(g){if(o>999||g===93&&!s||g===null||g===91||Ee(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return i=yt(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ee(g)||(s=!0),o++,e.consume(g),g===92?d:u}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,u):u(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),a.includes(i)||a.push(i),de(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function _P(e,t,n){return e.check(fa,t,e.attempt(TP,t,n))}function OP(e){e.exit("gfmFootnoteDefinition")}function LP(e,t,n){const r=this;return de(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function DP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},p=[["enter",u,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&tt(p,p.length,0,Mi(f,o.slice(c+1,l),s)),tt(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",u,s]]),tt(o,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,s,l){const c=this.previous,u=this.events;let d=0;return p;function p(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const b=Zn(c);if(g===126)return d>1?l(g):(o.consume(g),d++,f);if(d<2&&!n)return l(g);const h=o.exit("strikethroughSequenceTemporary"),m=Zn(g);return h._open=!m||m===2&&!!b,h._close=!b||b===2&&!!m,s(g)}}}class MP{constructor(){this.map=[]}add(t,n,r){FP(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function FP(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function PP(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function BP(){return{flow:{null:{name:"table",tokenize:UP,resolveAll:zP}}}}function UP(e,t,n){const r=this;let a=0,i=0,o;return s;function s(I){let M=r.events.length-1;for(;M>-1;){const z=r.events[M][1].type;if(z==="lineEnding"||z==="linePrefix")M--;else break}const P=M>-1?r.events[M][1].type:null,U=P==="tableHead"||P==="tableRow"?v:l;return U===v&&r.parser.lazy[r.now().line]?n(I):U(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(o=!0,i+=1),u(I)}function u(I){return I===null?n(I):ee(I)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),f):n(I):oe(I)?de(e,u,"whitespace")(I):(i+=1,o&&(o=!1,a+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||Ee(I)?(e.exit("data"),u(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function f(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),o=!1,oe(I)?de(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?h(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),b):A(I)}function b(I){return oe(I)?de(e,h,"whitespace")(I):h(I)}function h(I){return I===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),m):I===45?(i+=1,m(I)):I===null||ee(I)?T(I):A(I)}function m(I){return I===45?(e.enter("tableDelimiterFiller"),E(I)):A(I)}function E(I){return I===45?(e.consume(I),E):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return oe(I)?de(e,T,"whitespace")(I):T(I)}function T(I){return I===124?g(I):I===null||ee(I)?!o||a!==i?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):A(I)}function A(I){return n(I)}function v(I){return e.enter("tableRow"),N(I)}function N(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),N):I===null||ee(I)?(e.exit("tableRow"),t(I)):oe(I)?de(e,N,"whitespace")(I):(e.enter("data"),R(I))}function R(I){return I===null||I===124||Ee(I)?(e.exit("data"),N(I)):(e.consume(I),I===92?L:R)}function L(I){return I===92||I===124?(e.consume(I),R):R(I)}}function zP(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,u,d;const p=new MP;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(Ab(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])),a=g.type==="tableDelimiterRow"?2:u?3:1):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],d=Pa(p,t,i,a,void 0,d),i=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],d=Pa(p,t,i,a,void 0,d)),i=o,o=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,i[1]!==0?(o[0]=o[1],d=Pa(p,t,i,a,n,d)):o[1]!==0&&(d=Pa(p,t,o,a,n,d)),a=0):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ab(p,t,l,c,u),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=PP(t.events,n))}return e}function Pa(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Dn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Dn(t.events,n[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=Dn(t.events,n[2]),u=Dn(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};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,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return a!==void 0&&(i.end=Object.assign({},Dn(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function Ab(e,t,n,r,a){const i=[],o=Dn(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Dn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const jP={name:"tasklistCheck",tokenize:VP};function GP(){return{text:{91:jP}}}function VP(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Ee(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ee(l)?t(l):oe(l)?e.check({tokenize:HP},t,n)(l):n(l)}}function HP(e,t,n){return de(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function $P(e){return wS([hP(),AP(),DP(e),BP(),GP()])}const WP={};function qP(e){const t=this,n=e||WP,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push($P(n)),i.push(pP()),o.push(fP(n))}const YP=se.create(_I),KP=se.create(LI),Sv=({isExpanded:e,onClick:t,className:n,iconClassName:r,disabled:a})=>y.jsxs(Nt,{children:[y.jsx(_t,{onClick:t,className:n,disabled:a,children:y.jsx(Ot,{mode:"wait",initial:!1,children:e?y.jsx(YP,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:J("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"collapsed"):y.jsx(KP,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:J("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"expanded")})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:e?"Collapse message":"Expand message"})})]}),Rb={'code[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"16px 20px",overflow:"auto",borderRadius:"0 0 8px 8px"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"#00c08b"},string:{color:"#00c08b"},char:{color:"#00c08b"},builtin:{color:"#00c08b"},inserted:{color:"#00c08b"},regex:{color:"#00c08b"},"attr-value":{color:"#00c08b"},"attr-value > .token.punctuation":{color:"#00c08b"},variable:{color:"#58A6FF"},operator:{color:"#58A6FF"},function:{color:"#58A6FF"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"#00c08b"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"#58A6FF"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"#00c08b"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},Ib=({children:e,className:t})=>y.jsx("div",{className:J("flex flex-col text-[1.5ch] rounded-lg","[&_*]:scrollbar [&_*]:scrollbar-w-1 [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream",t),children:e}),Cb=({children:e})=>y.jsx("div",{className:"flex justify-between bg-telnyx-gray-hover-light rounded-t-lg py-1.5 px-4",children:e}),XP=e=>y.jsx("a",{href:e.src,target:"_blank",rel:"noopener noreferrer",children:y.jsx("img",{className:"w-full my-2",alt:e.alt,src:e.src})}),ZP=e=>y.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-telnyx-blue no-underline",children:[y.jsx("span",{className:"underline",children:e.children}),y.jsx("span",{children:"↗"})]}),Nb=({children:e})=>y.jsx("p",{className:"text-black pt-2 font-bold",children:e}),QP=({children:e})=>y.jsx("p",{className:"text-base",children:e}),JP=e=>({img:XP,h1:Nb,h2:Nb,a:ZP,p:QP,code:_.memo(({inline:t,className:n,children:r,...a})=>{const i=K(h=>h.numMessagesExpanded),o=K(h=>h.setNumMessagesExpanded),s=e==="complete",[l,c]=_.useState(ht.COLLAPSED),u=_.useRef(null),d=/language-(\w+)/.exec(n||""),p=String(r).replace(/\n$/,""),f=()=>{c(ht.EXPANDED),o(i+1),document.body.style.overflow="hidden"},g=()=>{c(ht.COLLAPSED),o(i-1),document.body.style.overflow="auto"},b=i>0;return!t&&d?y.jsxs(y.Fragment,{children:[y.jsx(Ot,{children:l===ht.EXPANDED&&y.jsxs(Wl,{targetMountContainer:document.body,children:[y.jsx(se.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 h-full w-full z-[5000]",onClick:f},"expanded-code-background"),y.jsx(se.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid p-4 place-items-center",onClick:h=>h.stopPropagation(),children:y.jsx(se.div,{className:J("w-[60%] max-w-full max-h-[90%] rounded-lg overflow-hidden"),ref:u,children:y.jsxs(Ib,{className:"overflow-y-hidden",children:[y.jsxs(Cb,{children:[y.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center bg-gray-800/50 rounded-md px-1",children:d&&d[1]||"Unknown"}),s&&y.jsx(_b,{isExpanded:l===ht.EXPANDED,handleCollapse:g,handleExpand:f,textToCopy:p})]}),y.jsx("div",{className:"bg-black pl-0.5 pr-1 py-1",children:y.jsx("div",{className:J("overflow-y-auto overflow-x-hidden max-h-[60vh] pb-1","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream","[&_*]:scrollbar [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream","bg-black text-telnyx-cream"),children:y.jsx(qs,{...a,children:String(r).replace(/\n$/,""),style:Rb,language:s?d[1]:"text/plain",PreTag:"div",showLineNumbers:!0,wrapLongLines:!0})})})]})})},"expanded-code")]})}),y.jsxs(Ib,{children:[y.jsxs(Cb,{children:[y.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center",children:d&&d[1]||"Unknown"}),s&&y.jsx(_b,{isExpanded:l===ht.EXPANDED,handleExpand:b?void 0:f,handleCollapse:g,textToCopy:p})]}),y.jsx("div",{className:"bg-black pl-0.5 pr-1 pb-1 rounded-b-lg mb-4",children:y.jsx(qs,{...a,children:String(r).replace(/\n$/,""),style:Rb,language:s?d[1]:"text/plain",PreTag:"div",wrapLongLines:!0})})]})]}):y.jsx("code",{...a,className:J("bg-transparent p-1",n),children:r})})}),eB=_.memo(({children:e,state:t})=>y.jsx("div",{className:J("w-full","overflow-x-auto overflow-y-hidden","scrollbar scrollbar-h-1 scrollbar-thumb-rounded-full scrollbar-thumb-gray-800/50 scrollbar-track-transparent hover:scrollbar-thumb-gray-800/70"),children:y.jsx(BM,{components:JP(t),remarkPlugins:[qP],children:e})})),_b=({isExpanded:e,handleExpand:t,handleCollapse:n,textToCopy:r})=>y.jsxs("div",{className:"flex",children:[y.jsx($l,{textToCopy:r,className:J("bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"}),n&&t&&y.jsx(Sv,{isExpanded:e,onClick:e?n:t,className:J("text-white bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"})]}),tB=se.create(JE),nB={pressed:{scale:.8},hovered:{scale:1.1},idle:{scale:1},transition:{duration:.15}},rB=_.memo(({onClick:e,className:t,iconClassName:n})=>y.jsxs(Nt,{children:[y.jsx(_t,{onClick:e,className:J("rounded-md text-black bg-telnyx-green/30 p-1 hover:bg-telnyx-green/60 hover:cursor-pointer",t),"aria-label":"Collapse message",children:y.jsx(Ot,{children:y.jsx(tB,{initial:"idle",whileHover:"hovered",whileTap:"pressed",animate:"idle",exit:"idle",variants:nB,className:J("size-5 focus:outline-none focus:ring-0",n)},"close")})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:"Collapse message"})})]})),aB=({variant:e,textToCopy:t,onCloseClick:n})=>y.jsxs("div",{className:"flex justify-between items-center border-b-2 border-black",children:[y.jsx("h2",{className:"text-xl font-pp-formula text-stone-700",children:e==="bot"?"AI Assistant":"You"}),y.jsxs("div",{className:"flex items-center gap-1 pb-2",children:[y.jsx($l,{textToCopy:t,className:J("rounded-md p-1 hover:bg-telnyx-green/60 hover:cursor-pointer bg-telnyx-green/30 border-0","flex items-center justify-center","h-fit"),iconClassName:"size-5 text-black"}),y.jsx(rB,{onClick:n,className:J("border-0","flex items-center justify-center","h-fit")})]})]}),iB=({feedbackId:e})=>{const t=K(i=>i.apiService),[n,r]=_.useState(null),a=_.useCallback(i=>async()=>{r(i),await t.sendFeedback({messageId:e,type:i})},[r,t]);return y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsxs(Nt,{children:[y.jsx(_t,{onClick:a(Nn.POSITIVE),className:J("text-stone-600 cursor-pointer hover:text-stone-900",n===Nn.POSITIVE&&"text-telnyx-green hover:text-telnyx-green/80"),children:n===Nn.POSITIVE?y.jsx(E_,{className:"size-4"}):y.jsx(jI,{className:"size-4"})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:"Helpful"})})]}),y.jsxs(Nt,{children:[y.jsx(_t,{onClick:a(Nn.NEGATIVE),className:J("text-stone-600 cursor-pointer hover:text-stone-900",n===Nn.NEGATIVE&&"text-red-600 hover:text-red-700"),children:n===Nn.NEGATIVE?y.jsx(b_,{className:"size-4"}):y.jsx(UI,{className:"size-4"})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:"Not helpful"})})]})]})},oB=Oi(["relative w-fit p-4 max-w-[95%]","after:absolute after:content-[''] after:w-4 after:h-2 after:-bottom-0.5"],{variants:{variant:{bot:["bg-telnyx-dark-cream rounded-r-md rounded-tl-md justify-self-start","after:left-0 after:bg-telnyx-dark-cream after:-skew-y-[30deg] after:rounded-bl-sm","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4"],user:["bg-telnyx-green rounded-l-md rounded-tr-md justify-self-end","after:right-0 after:bg-telnyx-green after:skew-y-[30deg] after:rounded-br-sm"]},state:{complete:"",loading:"rounded-bl-md animate-shadow-grow border-[0.5px] border-telnyx-green/60 ring-1 ring-inset ring-telnyx-green/60 before:hidden! after:hidden! bg-white/30",streaming:"",error:["max-w-full after:hidden! rounded-md","bg-red-100/70!","text-red-600 text-justify text-sm border-2 border-red-400"]}},defaultVariants:{variant:"bot",state:"complete"}}),sB=({variant:e,state:t})=>({initial:{opacity:t==="loading"?.7:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6},animate:{opacity:1,x:0,y:0,scale:1,transition:{duration:.3}},exit:{opacity:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6,transition:{duration:.2}}}),lB=({variant:e,state:t,children:n})=>y.jsx(se.div,{initial:"initial",animate:"animate",exit:"exit",variants:sB({variant:e,state:t}),className:oB({variant:e,state:t}),children:n}),cB=Oi(["max-w-full max-h-[90vh] overflow-y-auto p-6 space-y-2","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent"],{variants:{variant:{bot:["scrollbar-thumb-telnyx-green scrollbar-track-telnyx-dark-cream","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4!"],user:["scrollbar-thumb-telnyx-dark-cream scrollbar-track-telnyx-green"]}},defaultVariants:{variant:"bot"}}),uB=Oi(["flex items-center mb-2 gap-1"],{variants:{variant:{bot:["justify-self-start"],user:["justify-self-end flex-row-reverse"]}},defaultVariants:{variant:"bot"}}),Ob=_.memo(({variant:e,children:t,state:n,handleRetry:r,isFirstMessage:a,timestamp:i,feedbackId:o})=>{const s=K(E=>E.endpoint),l=mI(i),c=K(E=>E.numMessagesExpanded),u=K(E=>E.setNumMessagesExpanded),d=K(E=>E.botState),[p,f]=_.useState(ht.COLLAPSED),g=_.useRef(null),b=_.useCallback(()=>{f(ht.EXPANDED),u(c+1),document.body.style.overflow="hidden"},[c,u,f]),h=_.useCallback(()=>{f(ht.COLLAPSED),u(c-1),document.body.style.overflow="auto"},[c,u,f]),m=()=>{if(n==="streaming"||n==="complete")return y.jsx(eB,{state:n,children:t});if(n==="error")return y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("p",{children:t}),d==="retrying"&&y.jsx(pB,{}),d==="error"&&y.jsx(dB,{onClick:r})]});if(n==="loading")return s===fe.AIDA?y.jsx(CO,{isLoaded:!1,progressMessage:t},`loading-${t}`):y.jsx("div",{className:"flex items-center gap-3",children:y.jsx(TO,{size:24,spokeWidth:2,animationDuration:4})})};return y.jsxs(y.Fragment,{children:[y.jsx(Ot,{mode:"wait",children:p===ht.EXPANDED&&y.jsxs(Wl,{targetMountContainer:document.body,children:[y.jsx(se.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 h-full w-full z-[5000]",onClick:b},"expanded-message-background"),y.jsx(se.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid place-items-center p-4",onClick:E=>E.stopPropagation(),children:y.jsx("div",{ref:g,className:J("w-[60%] max-w-full bg-transparent rounded-lg p-2",e==="bot"?"bg-telnyx-dark-cream":"bg-telnyx-green"),children:y.jsxs("div",{className:cB({variant:e}),children:[y.jsx(aB,{variant:e,textToCopy:t,onCloseClick:h}),m()]})})},"expanded-message")]})}),y.jsx(lB,{variant:e,state:n,children:m()}),y.jsxs("div",{className:uB({variant:e}),children:[y.jsx("span",{className:J("text-stone-600 text-sm",e==="bot"?"mr-1":"ml-1"),children:l}),!a&&n==="complete"&&y.jsxs(y.Fragment,{children:[y.jsx(Sv,{onClick:b,isExpanded:p===ht.EXPANDED}),y.jsx($l,{textToCopy:t}),!!o&&y.jsx(iB,{feedbackId:o})]})]})]})}),dB=({onClick:e})=>y.jsx("span",{className:"flex w-full justify-center text-sm",children:y.jsx("button",{className:J("py-1.5 px-4 shadow-sm rounded-full","text-xs text-white ","bg-red-600 hover:bg-red-700","hover:cursor-pointer hover:scale-105 transition-all duration-300 active:scale-95"),onClick:e,children:"Retry"})}),pB=()=>y.jsx("div",{className:"flex w-full justify-center text-sm",children:y.jsxs("span",{className:"text-xs text-white bg-red-600 rounded-full p-1.5 flex items-center gap-1",children:["Retrying",y.jsx(ZE,{className:"size-4 animate-spin"})]})}),fB=e=>y.jsx("svg",{viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:e.ref,...e,children:y.jsx("path",{d:"M0 68.5714C0 30.5714 30.5714 0 68.5714 0H91.4286C129.429 0 160 30.5714 160 68.5714V160H68.5714C30.5714 160 0 129.429 0 91.4286V68.5714Z",fill:"black"})}),ve={TOP_LEFT:"top-left",TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left"},we=ve,ue={INSIDE:"inside",OUTSIDE:"outside"},gB={[we.TOP_LEFT]:{[ue.INSIDE]:ve.TOP_LEFT,[ue.OUTSIDE]:ve.BOTTOM_RIGHT},[we.TOP]:{[ue.INSIDE]:ve.TOP,[ue.OUTSIDE]:ve.BOTTOM},[we.TOP_RIGHT]:{[ue.INSIDE]:ve.TOP_RIGHT,[ue.OUTSIDE]:ve.BOTTOM_LEFT},[we.RIGHT]:{[ue.INSIDE]:ve.RIGHT,[ue.OUTSIDE]:ve.LEFT},[we.BOTTOM_RIGHT]:{[ue.INSIDE]:ve.BOTTOM_RIGHT,[ue.OUTSIDE]:ve.TOP_LEFT},[we.BOTTOM]:{[ue.INSIDE]:ve.BOTTOM,[ue.OUTSIDE]:ve.TOP},[we.BOTTOM_LEFT]:{[ue.INSIDE]:ve.BOTTOM_LEFT,[ue.OUTSIDE]:ve.TOP_RIGHT},[we.LEFT]:{[ue.INSIDE]:ve.LEFT,[ue.OUTSIDE]:ve.RIGHT}},Pr={CUSTOM:"custom",DEFAULT:"default"},mB={[ut.OPEN]:({numMessagesExpanded:e,position:t,isCustomMounted:n})=>{const r=n?0:-28,a=n?0:-28,[i,o]=Lb(t,r,a);return{opacity:1,clipPath:`circle(${e===0?768:4320}px at calc(${i}) calc(${o}))`,transition:{type:"spring",stiffness:30,restDelta:5}}},[ut.CLOSED]:({position:e,isCustomMounted:t})=>{const n=t?0:16,r=t?0:-28,a=t?0:-28,[i,o]=Lb(e,r,a);return{clipPath:`circle(${n}px at calc(${i}) calc(${o}))`,transition:{delay:.1,type:"spring",stiffness:900,damping:160}}}};function Lb(e,t=0,n=0){const r=t>0?"+":"-",a=n>0?"+":"-",i=Math.abs(t),o=Math.abs(n);switch(e){case ve.TOP_LEFT:return[`0% ${r} ${i}px`,`0% ${a} ${o}px`];case ve.TOP:return[`50% ${r} ${i}px`,`0% ${a} ${o}px`];case ve.TOP_RIGHT:return[`100% ${r} ${i}px`,`0% ${a} ${o}px`];case ve.RIGHT:return[`100% ${r} ${i}px`,`50% ${a} ${o}px`];case ve.BOTTOM_RIGHT:return[`100% ${r} ${i}px`,`100% ${a} ${o}px`];case ve.BOTTOM:return[`50% ${r} ${i}px`,`100% ${a} ${o}px`];case ve.BOTTOM_LEFT:return[`0% ${r} ${i}px`,`100% ${a} ${o}px`];case ve.LEFT:return[`0% ${r} ${i}px`,`50% ${a} ${o}px`]}}const hB=Oi("rounded-xl bg-black shadow-lg",{variants:{mountType:{[Pr.CUSTOM]:"absolute",[Pr.DEFAULT]:"fixed bottom-4! right-4!"},mountPositionAndDirection:{[`${we.TOP_LEFT}-${ue.INSIDE}`]:"top-0 left-0",[`${we.TOP_LEFT}-${ue.OUTSIDE}`]:"bottom-full right-full",[`${we.TOP}-${ue.INSIDE}`]:"top-0 left-1/2 -translate-x-1/2",[`${we.TOP}-${ue.OUTSIDE}`]:"bottom-full left-1/2 -translate-x-1/2",[`${we.TOP_RIGHT}-${ue.INSIDE}`]:"top-0 right-0",[`${we.TOP_RIGHT}-${ue.OUTSIDE}`]:"bottom-full left-full",[`${we.RIGHT}-${ue.INSIDE}`]:"top-1/2 -translate-y-1/2 right-0 ",[`${we.RIGHT}-${ue.OUTSIDE}`]:"top-1/2 -translate-y-1/2 left-full",[`${we.BOTTOM_RIGHT}-${ue.INSIDE}`]:"bottom-0 right-0",[`${we.BOTTOM_RIGHT}-${ue.OUTSIDE}`]:"top-full left-full",[`${we.BOTTOM}-${ue.INSIDE}`]:"bottom-0 left-1/2 -translate-x-1/2",[`${we.BOTTOM}-${ue.OUTSIDE}`]:"top-full left-1/2 -translate-x-1/2",[`${we.BOTTOM_LEFT}-${ue.INSIDE}`]:"bottom-0 left-0",[`${we.BOTTOM_LEFT}-${ue.OUTSIDE}`]:"top-full right-full",[`${we.LEFT}-${ue.INSIDE}`]:"top-1/2 -translate-y-1/2 left-0",[`${we.LEFT}-${ue.OUTSIDE}`]:"top-1/2 -translate-y-1/2 right-full"}},defaultVariants:{mountPositionAndDirection:`${we.BOTTOM_RIGHT}-${ue.INSIDE}`,mountType:Pr.DEFAULT}}),bB={[Ve.INITIAL]:{height:"78%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px"},[Ve.USER_HAS_TYPED]:{height:"94%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},yB={[Ve.INITIAL]:{height:"22%"},[Ve.USER_HAS_TYPED]:{height:"6%"}},EB=({chatAPIUrl:e=$e.CHAT_API_URL,flowAPIUrl:t=$e.FLOW_API_URL,flowApiKey:n,feedbackAPIUrl:r=$e.FEEDBACK_API_URL,user:a,onHelpAction:i,open:o,setOpen:s,placeholders:l=$e.DEFAULT_PLACEHOLDERS,mountPosition:c=we.BOTTOM_RIGHT,mountDirection:u=ue.INSIDE,offsetX:d=0,offsetY:p=0,icon:f=fB})=>{const g=K(G=>G.endpoint),b=K(G=>G.setUser),h=K(G=>G.setOnHelpAction),m=K(G=>G.setChatAPIUrl),E=K(G=>G.setFlowAPIUrl),w=K(G=>G.setFlowApiKey),T=K(G=>G.setFeedbackAPIUrl),A=K(G=>G.setPlaceholders),v=K(G=>G.question),N=K(G=>G.setQuestion),R=K(G=>G.messages),L=K(G=>G.dispatchMessage),I=K(G=>G.widgetVisualState),M=K(G=>G.chatVisualState),P=K(G=>G.setChatVisualState),U=K(G=>G.numMessagesExpanded),z=K(G=>G.setSetCustomOpen),B=K(G=>G.openWidget),H=K(G=>G.closeWidget),j=I===ut.OPEN,D=s?Pr.CUSTOM:Pr.DEFAULT,Z=`${c}-${u}`,x=gB[c][u],O=!!s,W=K(G=>G.botState),k=K(G=>G.setBotState),X=K(G=>G.numRetries),ge=K(G=>G.setNumRetries),ie=K(G=>G.retryTimeoutId),Q=K(G=>G.setRetryTimeoutId),pe=K(G=>G.chatStartTimestamp),be=hs[g].firstMessage,{chat:Te,lastMessage:Ae}=vI(),[rt,Ft]=_.useState(!0),kn=_.useRef(null),Ht=_.useRef(null),at=_.useRef(null),Tn=xI(at),An=_.useRef(`telnyx-widget-fonts-${Math.random().toString(36).substring(2,9)}`);_.useEffect(()=>{const G=An.current;if(G){if(!document.getElementById(G)){const it=document.createElement("style");it.id=G,it.textContent=kI,document.head.appendChild(it)}return()=>{const it=document.getElementById(G);it&&it.remove()}}},[An.current]),_.useEffect(()=>{if(!a){console.error("User info is required. Please provide a user object.");return}if(!a.id){console.error("User ID is required.");return}b(a)},[a,b]),_.useEffect(()=>{l.length>0&&A(l)},[l,A]),_.useEffect(()=>{i!==void 0&&h(i)},[i,h]),_.useEffect(()=>{e&&m(e)},[e,m]),_.useEffect(()=>{t&&E(t)},[t,E]),_.useEffect(()=>{w(n||null)},[n,w]),_.useEffect(()=>{r&&T(r)},[r,T]),_.useEffect(()=>{o!==void 0&&(o?B():H())},[o,B,H]),_.useEffect(()=>{s!==void 0&&z(s)},[s,z]),_.useEffect(()=>{var G;j&&((G=Ht.current)==null||G.focus())},[j]);const pt=_.useCallback(()=>{const G=R[R.length-2];if(G.type==="user"&&G.message.length>0){N(G.message),k("retrying");const it=setTimeout(async()=>{try{L({type:me.DELETE_LAST_MESSAGE_PAIR,payload:null}),ge(X+1),await Te(G.message)}catch(F){console.error("[Retry Logic] Chat failed during retry:",F)}},$e.RETRY_INTERVAL);Q(it)}},[R,Te,X,L]);_.useEffect(()=>{W==="error"&&(ie||(X<$e.MAX_RETRIES?pt():X>=$e.MAX_RETRIES&&console.error("[Retry Logic] Max retries reached, stopping retry attempts")))},[W,X,ie,pt]),_.useEffect(()=>{const G=at.current;G&&rt&&(Ae==null?void 0:Ae.message.length)>0&&(G.scrollTop=G.scrollHeight)},[Ae==null?void 0:Ae.message.length,rt]);const $t=_.useCallback(()=>{const G=Ht.current;G&&(G.style.height="auto",G.style.height=`${G.scrollHeight}px`)},[]),Yi=G=>{$t(),P(Ve.USER_HAS_TYPED),N(G.target.value)};_.useEffect(()=>{R.length===0&&requestAnimationFrame($t)},[R.length,$t]);const Sa=async()=>{N(""),requestAnimationFrame($t),await Te(v);const G=at.current;G&&G.scrollTo({top:G.scrollHeight,behavior:"smooth"})},Ki=()=>{const G=at.current;if(!G)return;const it=Math.abs(G.scrollHeight-G.clientHeight-G.scrollTop)<=5;Ft(it)};return y.jsx(Wl,{ref:kn,children:y.jsx(Bw,{delayDuration:75,skipDelayDuration:0,children:y.jsxs(Ot,{children:[y.jsxs(se.div,{initial:!1,animate:I,variants:mB,custom:{numMessagesExpanded:U,position:x,isCustomMounted:O},className:J(hB({mountType:D,mountPositionAndDirection:Z})),style:{height:$e.WIDGET_HEIGHT,width:$e.WIDGET_WIDTH,translateX:d,translateY:p},children:[y.jsx(se.div,{initial:!1,animate:M,className:"px-4 pt-4 bg-black rounded-t-xl",variants:yB,children:y.jsx(vO,{className:"flex flex-col justify-between h-full pb-4",children:y.jsx(m_,{resetChatCustomHandler:$t})})}),y.jsxs(se.div,{initial:!1,animate:M,className:J("flex flex-col justify-between bg-telnyx-cream rounded-b-xl rounded-t-3xl p-4 pb-1.5","relative overflow-hidden"),variants:bB,children:[Tn&&y.jsxs(y.Fragment,{children:[y.jsx(Eh,{containerRef:at,direction:"up"}),y.jsx(Eh,{containerRef:at,direction:"down"})]}),y.jsxs("div",{ref:at,className:J("grid grid-cols-1 gap-2 content-start h-full overflow-y-auto overflow-x-hidden py-2 px-1 relative","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream"),onScroll:Ki,children:[y.jsx(Ob,{variant:"bot",isFirstMessage:!0,state:"complete",timestamp:pe,children:be},"bot-initial"),R.map(G=>y.jsx(Ob,{variant:G.type,timestamp:G.timestamp,state:G.state,feedbackId:G.feedback_id,handleRetry:pt,children:G.message},G.id))]}),y.jsx(wO,{ref:Ht,question:v,handleInput:Yi,handleSendMessage:Sa})]})]},"widget-container"),!O&&y.jsx(O_,{question:v,handleSendMessage:Sa,triggerIcon:f},"chat-trigger-button")]})})})};exports.ChatWidget=EB;exports.Tooltip=Nt;exports.TooltipContent=vt;exports.TooltipProvider=Bw;exports.TooltipTrigger=_t;
|
|
2521
|
+
`))}function l(f,g,b,h){const m=b.enter("tableCell"),E=b.enter("phrasing"),w=b.containerPhrasing(f,{...h,before:i,after:i});return E(),m(),w}function c(f,g){return SF(f,{align:g,alignDelimiters:r,padding:n,stringLength:a})}function u(f,g,b){const h=f.children;let m=-1;const E=[],w=g.enter("table");for(;++m<h.length;)E[m]=d(h[m],g,b);return w(),E}function d(f,g,b){const h=f.children;let m=-1;const E=[],w=g.enter("tableRow");for(;++m<h.length;)E[m]=l(h[m],f,g,b);return w(),E}function p(f,g,b){let h=pv.inlineCode(f,g,b);return b.stack.includes("tableCell")&&(h=h.replace(/\|/g,"\\$&")),h}}function lP(){return{exit:{taskListCheckValueChecked:Tb,taskListCheckValueUnchecked:Tb,paragraph:uP}}}function cP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:dP}}}function Tb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function uP(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 a=t.children;let i=-1,o;for(;++i<a.length;){const s=a[i];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function dP(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(o);let l=pv.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function pP(){return[H2(),dF(),mF(),tP(),lP()]}function fP(e){return{extensions:[$2(),pF(e),hF(),sP(e),cP()]}}const gP={tokenize:wP,partial:!0},fv={tokenize:SP,partial:!0},gv={tokenize:vP,partial:!0},mv={tokenize:xP,partial:!0},mP={tokenize:kP,partial:!0},hv={name:"wwwAutolink",tokenize:yP,previous:yv},bv={name:"protocolAutolink",tokenize:EP,previous:Ev},Vt={name:"emailAutolink",tokenize:bP,previous:wv},Mt={};function hP(){return{text:Mt}}let sn=48;for(;sn<123;)Mt[sn]=Vt,sn++,sn===58?sn=65:sn===91&&(sn=97);Mt[43]=Vt;Mt[45]=Vt;Mt[46]=Vt;Mt[95]=Vt;Mt[72]=[Vt,bv];Mt[104]=[Vt,bv];Mt[87]=[Vt,hv];Mt[119]=[Vt,hv];function bP(e,t,n){const r=this;let a,i;return o;function o(d){return!Ys(d)||!wv.call(r,r.previous)||cg(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Ys(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(mP,u,c)(d):d===45||d===95||Pe(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),a=!0,l}function u(d){return i&&a&&je(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function yP(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!yv.call(r,r.previous)||cg(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gP,e.attempt(fv,e.attempt(gv,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function EP(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&Ev.call(r,r.previous)&&!cg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(je(d)&&a.length<5)return a+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=a.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):n(d)}function c(d){return d===null||ui(d)||Ee(d)||Sn(d)||Di(d)?n(d):e.attempt(fv,e.attempt(gv,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function wP(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function SP(e,t,n){let r,a,i;return o;function o(c){return c===46||c===95?e.check(mv,l,s)(c):c===null||Ee(c)||Sn(c)||c!==45&&Di(c)?l(c):(i=!0,e.consume(c),o)}function s(c){return c===95?r=!0:(a=r,r=void 0),e.consume(c),o}function l(c){return a||r||!i?n(c):t(c)}}function vP(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(mv,t,i)(o):o===null||Ee(o)||Sn(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function xP(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),a):s===60||s===null||Ee(s)||Sn(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Ee(s)||Sn(s)?t(s):r(s)}function i(s){return je(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):je(s)?(e.consume(s),o):n(s)}}function kP(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return Pe(i)?n(i):t(i)}}function yv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ee(e)}function Ev(e){return!je(e)}function wv(e){return!(e===47||Ys(e))}function Ys(e){return e===43||e===45||e===46||e===95||Pe(e)}function cg(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 TP={tokenize:LP,partial:!0};function AP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:NP,continuation:{tokenize:_P},exit:OP}},text:{91:{name:"gfmFootnoteCall",tokenize:CP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RP,resolveTo:IP}}}}function RP(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const c=yt(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function IP(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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function CP(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!o||d===null||d===91||Ee(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(yt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ee(d)||(o=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function NP(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(g)}function u(g){if(o>999||g===93&&!s||g===null||g===91||Ee(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return i=yt(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ee(g)||(s=!0),o++,e.consume(g),g===92?d:u}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,u):u(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),a.includes(i)||a.push(i),de(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function _P(e,t,n){return e.check(fa,t,e.attempt(TP,t,n))}function OP(e){e.exit("gfmFootnoteDefinition")}function LP(e,t,n){const r=this;return de(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function DP(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},p=[["enter",u,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&tt(p,p.length,0,Mi(f,o.slice(c+1,l),s)),tt(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",u,s]]),tt(o,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,s,l){const c=this.previous,u=this.events;let d=0;return p;function p(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const b=Zn(c);if(g===126)return d>1?l(g):(o.consume(g),d++,f);if(d<2&&!n)return l(g);const h=o.exit("strikethroughSequenceTemporary"),m=Zn(g);return h._open=!m||m===2&&!!b,h._close=!b||b===2&&!!m,s(g)}}}class MP{constructor(){this.map=[]}add(t,n,r){FP(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function FP(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function PP(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function BP(){return{flow:{null:{name:"table",tokenize:UP,resolveAll:zP}}}}function UP(e,t,n){const r=this;let a=0,i=0,o;return s;function s(I){let M=r.events.length-1;for(;M>-1;){const z=r.events[M][1].type;if(z==="lineEnding"||z==="linePrefix")M--;else break}const P=M>-1?r.events[M][1].type:null,U=P==="tableHead"||P==="tableRow"?v:l;return U===v&&r.parser.lazy[r.now().line]?n(I):U(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(o=!0,i+=1),u(I)}function u(I){return I===null?n(I):ee(I)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),f):n(I):oe(I)?de(e,u,"whitespace")(I):(i+=1,o&&(o=!1,a+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||Ee(I)?(e.exit("data"),u(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function f(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),o=!1,oe(I)?de(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?h(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),b):A(I)}function b(I){return oe(I)?de(e,h,"whitespace")(I):h(I)}function h(I){return I===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),m):I===45?(i+=1,m(I)):I===null||ee(I)?T(I):A(I)}function m(I){return I===45?(e.enter("tableDelimiterFiller"),E(I)):A(I)}function E(I){return I===45?(e.consume(I),E):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return oe(I)?de(e,T,"whitespace")(I):T(I)}function T(I){return I===124?g(I):I===null||ee(I)?!o||a!==i?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):A(I)}function A(I){return n(I)}function v(I){return e.enter("tableRow"),N(I)}function N(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),N):I===null||ee(I)?(e.exit("tableRow"),t(I)):oe(I)?de(e,N,"whitespace")(I):(e.enter("data"),R(I))}function R(I){return I===null||I===124||Ee(I)?(e.exit("data"),N(I)):(e.consume(I),I===92?L:R)}function L(I){return I===92||I===124?(e.consume(I),R):R(I)}}function zP(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,u,d;const p=new MP;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(Ab(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])),a=g.type==="tableDelimiterRow"?2:u?3:1):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],d=Pa(p,t,i,a,void 0,d),i=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],d=Pa(p,t,i,a,void 0,d)),i=o,o=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,i[1]!==0?(o[0]=o[1],d=Pa(p,t,i,a,n,d)):o[1]!==0&&(d=Pa(p,t,o,a,n,d)),a=0):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Ab(p,t,l,c,u),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=PP(t.events,n))}return e}function Pa(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Dn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Dn(t.events,n[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=Dn(t.events,n[2]),u=Dn(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};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,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return a!==void 0&&(i.end=Object.assign({},Dn(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function Ab(e,t,n,r,a){const i=[],o=Dn(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Dn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const jP={name:"tasklistCheck",tokenize:VP};function GP(){return{text:{91:jP}}}function VP(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Ee(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return ee(l)?t(l):oe(l)?e.check({tokenize:HP},t,n)(l):n(l)}}function HP(e,t,n){return de(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function $P(e){return wS([hP(),AP(),DP(e),BP(),GP()])}const WP={};function qP(e){const t=this,n=e||WP,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push($P(n)),i.push(pP()),o.push(fP(n))}const YP=se.create(_I),KP=se.create(LI),Sv=({isExpanded:e,onClick:t,className:n,iconClassName:r,disabled:a})=>y.jsxs(Nt,{children:[y.jsx(_t,{onClick:t,className:n,disabled:a,children:y.jsx(Ot,{mode:"wait",initial:!1,children:e?y.jsx(YP,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:J("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"collapsed"):y.jsx(KP,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:J("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"expanded")})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:e?"Collapse message":"Expand message"})})]}),Rb={'code[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"16px 20px",overflow:"auto",borderRadius:"0 0 8px 8px"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"#00c08b"},string:{color:"#00c08b"},char:{color:"#00c08b"},builtin:{color:"#00c08b"},inserted:{color:"#00c08b"},regex:{color:"#00c08b"},"attr-value":{color:"#00c08b"},"attr-value > .token.punctuation":{color:"#00c08b"},variable:{color:"#58A6FF"},operator:{color:"#58A6FF"},function:{color:"#58A6FF"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"#00c08b"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"#58A6FF"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"#00c08b"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},Ib=({children:e,className:t})=>y.jsx("div",{className:J("flex flex-col text-[1.5ch] rounded-lg","[&_*]:scrollbar [&_*]:scrollbar-w-1 [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream",t),children:e}),Cb=({children:e})=>y.jsx("div",{className:"flex justify-between bg-telnyx-gray-hover-light rounded-t-lg py-1.5 px-4",children:e}),XP=e=>y.jsx("a",{href:e.src,target:"_blank",rel:"noopener noreferrer",children:y.jsx("img",{className:"w-full my-2",alt:e.alt,src:e.src})}),ZP=e=>y.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-telnyx-blue no-underline",children:[y.jsx("span",{className:"underline",children:e.children}),y.jsx("span",{children:"↗"})]}),Nb=({children:e})=>y.jsx("p",{className:"text-black pt-2 font-bold",children:e}),QP=({children:e})=>y.jsx("p",{className:"text-base",children:e}),JP=e=>({img:XP,h1:Nb,h2:Nb,a:ZP,p:QP,code:_.memo(({inline:t,className:n,children:r,...a})=>{const i=K(h=>h.numMessagesExpanded),o=K(h=>h.setNumMessagesExpanded),s=e==="complete",[l,c]=_.useState(ht.COLLAPSED),u=_.useRef(null),d=/language-(\w+)/.exec(n||""),p=String(r).replace(/\n$/,""),f=()=>{c(ht.EXPANDED),o(i+1),document.body.style.overflow="hidden"},g=()=>{c(ht.COLLAPSED),o(i-1),document.body.style.overflow="auto"},b=i>0;return!t&&d?y.jsxs(y.Fragment,{children:[y.jsx(Ot,{children:l===ht.EXPANDED&&y.jsxs(Wl,{targetMountContainer:document.body,children:[y.jsx(se.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 h-full w-full z-[5000]",onClick:f},"expanded-code-background"),y.jsx(se.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid p-4 place-items-center",onClick:h=>h.stopPropagation(),children:y.jsx(se.div,{className:J("w-[60%] max-w-full max-h-[90%] rounded-lg overflow-hidden"),ref:u,children:y.jsxs(Ib,{className:"overflow-y-hidden",children:[y.jsxs(Cb,{children:[y.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center bg-gray-800/50 rounded-md px-1",children:d&&d[1]||"Unknown"}),s&&y.jsx(_b,{isExpanded:l===ht.EXPANDED,handleCollapse:g,handleExpand:f,textToCopy:p})]}),y.jsx("div",{className:"bg-black pl-0.5 pr-1 py-1",children:y.jsx("div",{className:J("overflow-y-auto overflow-x-hidden max-h-[60vh] pb-1","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream","[&_*]:scrollbar [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream","bg-black text-telnyx-cream"),children:y.jsx(qs,{...a,children:String(r).replace(/\n$/,""),style:Rb,language:s?d[1]:"text/plain",PreTag:"div",showLineNumbers:!0,wrapLongLines:!0})})})]})})},"expanded-code")]})}),y.jsxs(Ib,{children:[y.jsxs(Cb,{children:[y.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center",children:d&&d[1]||"Unknown"}),s&&y.jsx(_b,{isExpanded:l===ht.EXPANDED,handleExpand:b?void 0:f,handleCollapse:g,textToCopy:p})]}),y.jsx("div",{className:"bg-black pl-0.5 pr-1 pb-1 rounded-b-lg mb-4",children:y.jsx(qs,{...a,children:String(r).replace(/\n$/,""),style:Rb,language:s?d[1]:"text/plain",PreTag:"div",wrapLongLines:!0})})]})]}):y.jsx("code",{...a,className:J("bg-transparent p-1",n),children:r})})}),eB=_.memo(({children:e,state:t})=>y.jsx("div",{className:J("w-full","overflow-x-auto overflow-y-hidden","scrollbar scrollbar-h-1 scrollbar-thumb-rounded-full scrollbar-thumb-gray-800/50 scrollbar-track-transparent hover:scrollbar-thumb-gray-800/70"),children:y.jsx(BM,{components:JP(t),remarkPlugins:[qP],children:e})})),_b=({isExpanded:e,handleExpand:t,handleCollapse:n,textToCopy:r})=>y.jsxs("div",{className:"flex",children:[y.jsx($l,{textToCopy:r,className:J("bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"}),n&&t&&y.jsx(Sv,{isExpanded:e,onClick:e?n:t,className:J("text-white bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"})]}),tB=se.create(JE),nB={pressed:{scale:.8},hovered:{scale:1.1},idle:{scale:1},transition:{duration:.15}},rB=_.memo(({onClick:e,className:t,iconClassName:n})=>y.jsxs(Nt,{children:[y.jsx(_t,{onClick:e,className:J("rounded-md text-black bg-telnyx-green/30 p-1 hover:bg-telnyx-green/60 hover:cursor-pointer",t),"aria-label":"Collapse message",children:y.jsx(Ot,{children:y.jsx(tB,{initial:"idle",whileHover:"hovered",whileTap:"pressed",animate:"idle",exit:"idle",variants:nB,className:J("size-5 focus:outline-none focus:ring-0",n)},"close")})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:"Collapse message"})})]})),aB=({variant:e,textToCopy:t,onCloseClick:n})=>y.jsxs("div",{className:"flex justify-between items-center border-b-2 border-black",children:[y.jsx("h2",{className:"text-xl font-pp-formula text-stone-700",children:e==="bot"?"AI Assistant":"You"}),y.jsxs("div",{className:"flex items-center gap-1 pb-2",children:[y.jsx($l,{textToCopy:t,className:J("rounded-md p-1 hover:bg-telnyx-green/60 hover:cursor-pointer bg-telnyx-green/30 border-0","flex items-center justify-center","h-fit"),iconClassName:"size-5 text-black"}),y.jsx(rB,{onClick:n,className:J("border-0","flex items-center justify-center","h-fit")})]})]}),iB=({feedbackId:e})=>{const t=K(i=>i.apiService),[n,r]=_.useState(null),a=_.useCallback(i=>async()=>{r(i),await t.sendFeedback({messageId:e,type:i})},[r,t]);return y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsxs(Nt,{children:[y.jsx(_t,{onClick:a(Nn.POSITIVE),className:J("text-stone-600 cursor-pointer hover:text-stone-900",n===Nn.POSITIVE&&"text-telnyx-green hover:text-telnyx-green/80"),children:n===Nn.POSITIVE?y.jsx(E_,{className:"size-4"}):y.jsx(jI,{className:"size-4"})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:"Helpful"})})]}),y.jsxs(Nt,{children:[y.jsx(_t,{onClick:a(Nn.NEGATIVE),className:J("text-stone-600 cursor-pointer hover:text-stone-900",n===Nn.NEGATIVE&&"text-red-600 hover:text-red-700"),children:n===Nn.NEGATIVE?y.jsx(b_,{className:"size-4"}):y.jsx(UI,{className:"size-4"})}),y.jsx(vt,{side:"bottom",children:y.jsx("p",{children:"Not helpful"})})]})]})},oB=Oi(["relative w-fit p-4 max-w-[95%]","after:absolute after:content-[''] after:w-4 after:h-2 after:-bottom-0.5"],{variants:{variant:{bot:["bg-telnyx-dark-cream text-stone-800 rounded-r-md rounded-tl-md justify-self-start","after:left-0 after:bg-telnyx-dark-cream after:-skew-y-[30deg] after:rounded-bl-sm","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4"],user:["bg-telnyx-green rounded-l-md rounded-tr-md justify-self-end","after:right-0 after:bg-telnyx-green after:skew-y-[30deg] after:rounded-br-sm"]},state:{complete:"",loading:"rounded-bl-md animate-shadow-grow border-[0.5px] border-telnyx-green/60 ring-1 ring-inset ring-telnyx-green/60 before:hidden! after:hidden! bg-white/30",streaming:"",error:["max-w-full after:hidden! rounded-md","bg-red-100/70!","text-red-600 text-justify text-sm border-2 border-red-400"]}},defaultVariants:{variant:"bot",state:"complete"}}),sB=({variant:e,state:t})=>({initial:{opacity:t==="loading"?.7:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6},animate:{opacity:1,x:0,y:0,scale:1,transition:{duration:.3}},exit:{opacity:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6,transition:{duration:.2}}}),lB=({variant:e,state:t,children:n})=>y.jsx(se.div,{initial:"initial",animate:"animate",exit:"exit",variants:sB({variant:e,state:t}),className:oB({variant:e,state:t}),children:n}),cB=Oi(["max-w-full max-h-[90vh] overflow-y-auto p-6 space-y-2","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent"],{variants:{variant:{bot:["scrollbar-thumb-telnyx-green scrollbar-track-telnyx-dark-cream","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4!"],user:["scrollbar-thumb-telnyx-dark-cream scrollbar-track-telnyx-green"]}},defaultVariants:{variant:"bot"}}),uB=Oi(["flex items-center mb-2 gap-1"],{variants:{variant:{bot:["justify-self-start"],user:["justify-self-end flex-row-reverse"]}},defaultVariants:{variant:"bot"}}),Ob=_.memo(({variant:e,children:t,state:n,handleRetry:r,isFirstMessage:a,timestamp:i,feedbackId:o})=>{const s=K(E=>E.endpoint),l=mI(i),c=K(E=>E.numMessagesExpanded),u=K(E=>E.setNumMessagesExpanded),d=K(E=>E.botState),[p,f]=_.useState(ht.COLLAPSED),g=_.useRef(null),b=_.useCallback(()=>{f(ht.EXPANDED),u(c+1),document.body.style.overflow="hidden"},[c,u,f]),h=_.useCallback(()=>{f(ht.COLLAPSED),u(c-1),document.body.style.overflow="auto"},[c,u,f]),m=()=>{if(n==="streaming"||n==="complete")return y.jsx(eB,{state:n,children:t});if(n==="error")return y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("p",{children:t}),d==="retrying"&&y.jsx(pB,{}),d==="error"&&y.jsx(dB,{onClick:r})]});if(n==="loading")return s===fe.AIDA?y.jsx(CO,{isLoaded:!1,progressMessage:t},`loading-${t}`):y.jsx("div",{className:"flex items-center gap-3",children:y.jsx(TO,{size:24,spokeWidth:2,animationDuration:4})})};return y.jsxs(y.Fragment,{children:[y.jsx(Ot,{mode:"wait",children:p===ht.EXPANDED&&y.jsxs(Wl,{targetMountContainer:document.body,children:[y.jsx(se.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 h-full w-full z-[5000]",onClick:b},"expanded-message-background"),y.jsx(se.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid place-items-center p-4",onClick:E=>E.stopPropagation(),children:y.jsx("div",{ref:g,className:J("w-[60%] max-w-full bg-transparent rounded-lg p-2",e==="bot"?"bg-telnyx-dark-cream":"bg-telnyx-green"),children:y.jsxs("div",{className:cB({variant:e}),children:[y.jsx(aB,{variant:e,textToCopy:t,onCloseClick:h}),m()]})})},"expanded-message")]})}),y.jsx(lB,{variant:e,state:n,children:m()}),y.jsxs("div",{className:uB({variant:e}),children:[y.jsx("span",{className:J("text-stone-600 text-sm",e==="bot"?"mr-1":"ml-1"),children:l}),!a&&n==="complete"&&y.jsxs(y.Fragment,{children:[y.jsx(Sv,{onClick:b,isExpanded:p===ht.EXPANDED}),y.jsx($l,{textToCopy:t}),!!o&&y.jsx(iB,{feedbackId:o})]})]})]})}),dB=({onClick:e})=>y.jsx("span",{className:"flex w-full justify-center text-sm",children:y.jsx("button",{className:J("py-1.5 px-4 shadow-sm rounded-full","text-xs text-white ","bg-red-600 hover:bg-red-700","hover:cursor-pointer hover:scale-105 transition-all duration-300 active:scale-95"),onClick:e,children:"Retry"})}),pB=()=>y.jsx("div",{className:"flex w-full justify-center text-sm",children:y.jsxs("span",{className:"text-xs text-white bg-red-600 rounded-full p-1.5 flex items-center gap-1",children:["Retrying",y.jsx(ZE,{className:"size-4 animate-spin"})]})}),fB=e=>y.jsx("svg",{viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:e.ref,...e,children:y.jsx("path",{d:"M0 68.5714C0 30.5714 30.5714 0 68.5714 0H91.4286C129.429 0 160 30.5714 160 68.5714V160H68.5714C30.5714 160 0 129.429 0 91.4286V68.5714Z",fill:"black"})}),ve={TOP_LEFT:"top-left",TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left"},we=ve,ue={INSIDE:"inside",OUTSIDE:"outside"},gB={[we.TOP_LEFT]:{[ue.INSIDE]:ve.TOP_LEFT,[ue.OUTSIDE]:ve.BOTTOM_RIGHT},[we.TOP]:{[ue.INSIDE]:ve.TOP,[ue.OUTSIDE]:ve.BOTTOM},[we.TOP_RIGHT]:{[ue.INSIDE]:ve.TOP_RIGHT,[ue.OUTSIDE]:ve.BOTTOM_LEFT},[we.RIGHT]:{[ue.INSIDE]:ve.RIGHT,[ue.OUTSIDE]:ve.LEFT},[we.BOTTOM_RIGHT]:{[ue.INSIDE]:ve.BOTTOM_RIGHT,[ue.OUTSIDE]:ve.TOP_LEFT},[we.BOTTOM]:{[ue.INSIDE]:ve.BOTTOM,[ue.OUTSIDE]:ve.TOP},[we.BOTTOM_LEFT]:{[ue.INSIDE]:ve.BOTTOM_LEFT,[ue.OUTSIDE]:ve.TOP_RIGHT},[we.LEFT]:{[ue.INSIDE]:ve.LEFT,[ue.OUTSIDE]:ve.RIGHT}},Pr={CUSTOM:"custom",DEFAULT:"default"},mB={[ut.OPEN]:({numMessagesExpanded:e,position:t,isCustomMounted:n})=>{const r=n?0:-28,a=n?0:-28,[i,o]=Lb(t,r,a);return{opacity:1,clipPath:`circle(${e===0?768:4320}px at calc(${i}) calc(${o}))`,transition:{type:"spring",stiffness:30,restDelta:5}}},[ut.CLOSED]:({position:e,isCustomMounted:t})=>{const n=t?0:16,r=t?0:-28,a=t?0:-28,[i,o]=Lb(e,r,a);return{clipPath:`circle(${n}px at calc(${i}) calc(${o}))`,transition:{delay:.1,type:"spring",stiffness:900,damping:160}}}};function Lb(e,t=0,n=0){const r=t>0?"+":"-",a=n>0?"+":"-",i=Math.abs(t),o=Math.abs(n);switch(e){case ve.TOP_LEFT:return[`0% ${r} ${i}px`,`0% ${a} ${o}px`];case ve.TOP:return[`50% ${r} ${i}px`,`0% ${a} ${o}px`];case ve.TOP_RIGHT:return[`100% ${r} ${i}px`,`0% ${a} ${o}px`];case ve.RIGHT:return[`100% ${r} ${i}px`,`50% ${a} ${o}px`];case ve.BOTTOM_RIGHT:return[`100% ${r} ${i}px`,`100% ${a} ${o}px`];case ve.BOTTOM:return[`50% ${r} ${i}px`,`100% ${a} ${o}px`];case ve.BOTTOM_LEFT:return[`0% ${r} ${i}px`,`100% ${a} ${o}px`];case ve.LEFT:return[`0% ${r} ${i}px`,`50% ${a} ${o}px`]}}const hB=Oi("rounded-xl bg-black shadow-lg",{variants:{mountType:{[Pr.CUSTOM]:"absolute",[Pr.DEFAULT]:"fixed bottom-4! right-4!"},mountPositionAndDirection:{[`${we.TOP_LEFT}-${ue.INSIDE}`]:"top-0 left-0",[`${we.TOP_LEFT}-${ue.OUTSIDE}`]:"bottom-full right-full",[`${we.TOP}-${ue.INSIDE}`]:"top-0 left-1/2 -translate-x-1/2",[`${we.TOP}-${ue.OUTSIDE}`]:"bottom-full left-1/2 -translate-x-1/2",[`${we.TOP_RIGHT}-${ue.INSIDE}`]:"top-0 right-0",[`${we.TOP_RIGHT}-${ue.OUTSIDE}`]:"bottom-full left-full",[`${we.RIGHT}-${ue.INSIDE}`]:"top-1/2 -translate-y-1/2 right-0 ",[`${we.RIGHT}-${ue.OUTSIDE}`]:"top-1/2 -translate-y-1/2 left-full",[`${we.BOTTOM_RIGHT}-${ue.INSIDE}`]:"bottom-0 right-0",[`${we.BOTTOM_RIGHT}-${ue.OUTSIDE}`]:"top-full left-full",[`${we.BOTTOM}-${ue.INSIDE}`]:"bottom-0 left-1/2 -translate-x-1/2",[`${we.BOTTOM}-${ue.OUTSIDE}`]:"top-full left-1/2 -translate-x-1/2",[`${we.BOTTOM_LEFT}-${ue.INSIDE}`]:"bottom-0 left-0",[`${we.BOTTOM_LEFT}-${ue.OUTSIDE}`]:"top-full right-full",[`${we.LEFT}-${ue.INSIDE}`]:"top-1/2 -translate-y-1/2 left-0",[`${we.LEFT}-${ue.OUTSIDE}`]:"top-1/2 -translate-y-1/2 right-full"}},defaultVariants:{mountPositionAndDirection:`${we.BOTTOM_RIGHT}-${ue.INSIDE}`,mountType:Pr.DEFAULT}}),bB={[Ve.INITIAL]:{height:"78%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px"},[Ve.USER_HAS_TYPED]:{height:"94%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},yB={[Ve.INITIAL]:{height:"22%"},[Ve.USER_HAS_TYPED]:{height:"6%"}},EB=({chatAPIUrl:e=$e.CHAT_API_URL,flowAPIUrl:t=$e.FLOW_API_URL,flowApiKey:n,feedbackAPIUrl:r=$e.FEEDBACK_API_URL,user:a,onHelpAction:i,open:o,setOpen:s,placeholders:l=$e.DEFAULT_PLACEHOLDERS,mountPosition:c=we.BOTTOM_RIGHT,mountDirection:u=ue.INSIDE,offsetX:d=0,offsetY:p=0,icon:f=fB})=>{const g=K(G=>G.endpoint),b=K(G=>G.setUser),h=K(G=>G.setOnHelpAction),m=K(G=>G.setChatAPIUrl),E=K(G=>G.setFlowAPIUrl),w=K(G=>G.setFlowApiKey),T=K(G=>G.setFeedbackAPIUrl),A=K(G=>G.setPlaceholders),v=K(G=>G.question),N=K(G=>G.setQuestion),R=K(G=>G.messages),L=K(G=>G.dispatchMessage),I=K(G=>G.widgetVisualState),M=K(G=>G.chatVisualState),P=K(G=>G.setChatVisualState),U=K(G=>G.numMessagesExpanded),z=K(G=>G.setSetCustomOpen),B=K(G=>G.openWidget),H=K(G=>G.closeWidget),j=I===ut.OPEN,D=s?Pr.CUSTOM:Pr.DEFAULT,Z=`${c}-${u}`,x=gB[c][u],O=!!s,W=K(G=>G.botState),k=K(G=>G.setBotState),X=K(G=>G.numRetries),ge=K(G=>G.setNumRetries),ie=K(G=>G.retryTimeoutId),Q=K(G=>G.setRetryTimeoutId),pe=K(G=>G.chatStartTimestamp),be=hs[g].firstMessage,{chat:Te,lastMessage:Ae}=vI(),[rt,Ft]=_.useState(!0),kn=_.useRef(null),Ht=_.useRef(null),at=_.useRef(null),Tn=xI(at),An=_.useRef(`telnyx-widget-fonts-${Math.random().toString(36).substring(2,9)}`);_.useEffect(()=>{const G=An.current;if(G){if(!document.getElementById(G)){const it=document.createElement("style");it.id=G,it.textContent=kI,document.head.appendChild(it)}return()=>{const it=document.getElementById(G);it&&it.remove()}}},[An.current]),_.useEffect(()=>{if(!a){console.error("User info is required. Please provide a user object.");return}if(!a.id){console.error("User ID is required.");return}b(a)},[a,b]),_.useEffect(()=>{l.length>0&&A(l)},[l,A]),_.useEffect(()=>{i!==void 0&&h(i)},[i,h]),_.useEffect(()=>{e&&m(e)},[e,m]),_.useEffect(()=>{t&&E(t)},[t,E]),_.useEffect(()=>{w(n||null)},[n,w]),_.useEffect(()=>{r&&T(r)},[r,T]),_.useEffect(()=>{o!==void 0&&(o?B():H())},[o,B,H]),_.useEffect(()=>{s!==void 0&&z(s)},[s,z]),_.useEffect(()=>{var G;j&&((G=Ht.current)==null||G.focus())},[j]);const pt=_.useCallback(()=>{const G=R[R.length-2];if(G.type==="user"&&G.message.length>0){N(G.message),k("retrying");const it=setTimeout(async()=>{try{L({type:me.DELETE_LAST_MESSAGE_PAIR,payload:null}),ge(X+1),await Te(G.message)}catch(F){console.error("[Retry Logic] Chat failed during retry:",F)}},$e.RETRY_INTERVAL);Q(it)}},[R,Te,X,L]);_.useEffect(()=>{W==="error"&&(ie||(X<$e.MAX_RETRIES?pt():X>=$e.MAX_RETRIES&&console.error("[Retry Logic] Max retries reached, stopping retry attempts")))},[W,X,ie,pt]),_.useEffect(()=>{const G=at.current;G&&rt&&(Ae==null?void 0:Ae.message.length)>0&&(G.scrollTop=G.scrollHeight)},[Ae==null?void 0:Ae.message.length,rt]);const $t=_.useCallback(()=>{const G=Ht.current;G&&(G.style.height="auto",G.style.height=`${G.scrollHeight}px`)},[]),Yi=G=>{$t(),P(Ve.USER_HAS_TYPED),N(G.target.value)};_.useEffect(()=>{R.length===0&&requestAnimationFrame($t)},[R.length,$t]);const Sa=async()=>{N(""),requestAnimationFrame($t),await Te(v);const G=at.current;G&&G.scrollTo({top:G.scrollHeight,behavior:"smooth"})},Ki=()=>{const G=at.current;if(!G)return;const it=Math.abs(G.scrollHeight-G.clientHeight-G.scrollTop)<=5;Ft(it)};return y.jsx(Wl,{ref:kn,children:y.jsx(Bw,{delayDuration:75,skipDelayDuration:0,children:y.jsxs(Ot,{children:[y.jsxs(se.div,{initial:!1,animate:I,variants:mB,custom:{numMessagesExpanded:U,position:x,isCustomMounted:O},className:J(hB({mountType:D,mountPositionAndDirection:Z})),style:{height:$e.WIDGET_HEIGHT,width:$e.WIDGET_WIDTH,translateX:d,translateY:p},children:[y.jsx(se.div,{initial:!1,animate:M,className:"px-4 pt-4 bg-black rounded-t-xl",variants:yB,children:y.jsx(vO,{className:"flex flex-col justify-between h-full pb-4",children:y.jsx(m_,{resetChatCustomHandler:$t})})}),y.jsxs(se.div,{initial:!1,animate:M,className:J("flex flex-col justify-between bg-telnyx-cream rounded-b-xl rounded-t-3xl p-4 pb-1.5","relative overflow-hidden"),variants:bB,children:[Tn&&y.jsxs(y.Fragment,{children:[y.jsx(Eh,{containerRef:at,direction:"up"}),y.jsx(Eh,{containerRef:at,direction:"down"})]}),y.jsxs("div",{ref:at,className:J("grid grid-cols-1 gap-2 content-start h-full overflow-y-auto overflow-x-hidden py-2 px-1 relative","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream"),onScroll:Ki,children:[y.jsx(Ob,{variant:"bot",isFirstMessage:!0,state:"complete",timestamp:pe,children:be},"bot-initial"),R.map(G=>y.jsx(Ob,{variant:G.type,timestamp:G.timestamp,state:G.state,feedbackId:G.feedback_id,handleRetry:pt,children:G.message},G.id))]}),y.jsx(wO,{ref:Ht,question:v,handleInput:Yi,handleSendMessage:Sa})]})]},"widget-container"),!O&&y.jsx(O_,{question:v,handleSendMessage:Sa,triggerIcon:f},"chat-trigger-button")]})})})};exports.ChatWidget=EB;exports.Tooltip=Nt;exports.TooltipContent=vt;exports.TooltipProvider=Bw;exports.TooltipTrigger=_t;
|
|
2578
2522
|
//# sourceMappingURL=index.cjs.map
|