@snf/access-qa-bot 2.6.0-debug.1 → 2.6.0-debug.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/access-qa-bot.js
CHANGED
|
@@ -5,5 +5,5 @@ import*as e from"react";import t,{forwardRef as n,createContext as r,useContext
|
|
|
5
5
|
* Copyright(c) 2015 Andreas Lubbe
|
|
6
6
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
7
7
|
* MIT Licensed
|
|
8
|
-
*/var gn,mn;const yn=hn(function(){if(mn)return gn;mn=1;var e=/["'&<>]/;return gn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,A="",i=0,a=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}a!==i&&(A+=n.substring(a,i)),a=i+1,A+=o}return a!==i?A+n.substring(a,i):A}}());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vn=/(url|image|image-set)\(/i;class wn extends fn{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(vn)&&delete t[e]})),t}}const xn=/^<(!doctype|(html|head|body)(\s|>))/i,En=/^(aria-|data-|\w+:)/iu,Pn=/{{{(\w+)\/?}}}/;function kn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}class Bn{constructor(e,t={},n=[],r=[]){var o;if(bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),"production"!==process.env.NODE_ENV&&e&&"string"!=typeof e)throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new wn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:ln),this.banned=new Set(sn),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t),t)}applyNodeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t),t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,A=0,i=null;return this.matchers.forEach((e=>{const a=e.asTag().toLowerCase(),s=this.getTagConfig(a);if(r[e.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,s))return;let l="";for(;o&&(i=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=i,p=e.propName+String(A);t>0&&(l+=o.slice(0,t)),c?(l+=u?`{{{${p}/}}}`:`{{{${p}}}}${s}{{{/${p}}}}`,this.keyIndex+=1,A+=1,n[p]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):l+=s,e.greedy?(o=l+o.slice(t+a),l=""):o=o.slice(t+(a||s.length))}e.greedy||(o=l+o)})),0===A?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||kn)();if(!n)return;const r=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",o="body"===r||"fragment"===r?n.body:n.createElement(r);if(e.match(xn)){if("production"!==process.env.NODE_ENV)throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?yn(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes&&([...e.attributes].forEach((o=>{const{name:A,value:i}=o,a=A.toLowerCase(),s=cn[a]||cn[A];if(!this.isSafe(e)||!a.match(En)&&(!t&&(!s||2===s)||a.startsWith("on")||i.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l="style"===a?this.extractStyleAttribute(e):i;4===s?l=!0:3===s?l=Number.parseFloat(String(l)):5!==s&&(l=String(l)),n[un[a]||a]=this.applyAttributeFilters(a,l),r+=1})),0!==r)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach((n=>{const r=e.style[n];("string"==typeof r||"number"==typeof r)&&(t[n.replace(/-([a-z])/g,((e,t)=>String(t).toUpperCase()))]=r)})),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return an[e]?{...t,...an[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:A,transform:i,transformOnlyAllowList:a}=this.props;let s=[],l="";return[...e.childNodes].forEach((e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),d=this.getTagConfig(u);l&&(s.push(l),l="");const p=this.applyNodeFilters(u,e);if(!p)return;let f;if(i&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;f=this.parseNode(p,d);const n=i(p,f,d);if(null===n)return;if(typeof n<"u")return void s.push(t.cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!A&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(p,d.tagName?d:n)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(p),n={tagName:u};e&&(n.attributes=e),d.void&&(n.selfClose=d.void),s.push(t.createElement(pn,{...n,key:this.keyIndex},null!==(c=f)&&void 0!==c?c:this.parseNode(p,d)))}}else if(3===e.nodeType){const t=r&&!o?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?s=[...s,...t]:l+=t}})),l&&s.push(l),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(Pn);){const[e,A]=o,i=o.index,a=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[A])throw new Error(`Token "${A}" found but no matching element to replace with.`);i>0&&(n.push(r.slice(0,i)),r=r.slice(i));const{children:s,matcher:l,props:c}=t[A];let u;if(a)u=e.length,n.push(l.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${A}}}}`));if("production"!==process.env.NODE_ENV&&!o)throw new Error(`Closing token missing for interpolated element "${A}".`);u=o.index+o[0].length,n.push(l.createElement(this.replaceTokens(r.slice(e.length,o.index),t),c))}r=r.slice(u)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}}function Dn(e){var n;const{attributes:r,className:o,containerTagName:A,content:i,emptyContent:a,parsedContent:s,tagName:l,noWrap:c}=e,u=null!==(n=A??l)&&void 0!==n?n:"span",d="fragment"===u||c;let p;if(s)p=s;else{const t=new Bn(i??"",e).parse();t.length>0&&(p=t)}return p||(p=a),d?t.createElement(t.Fragment,null,p):t.createElement(pn,{attributes:r,className:o,tagName:u},p)}function Cn(e){const{attributes:n,className:r,content:o="",disableFilters:A=!1,disableMatchers:i=!1,emptyContent:a=null,filters:s=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:p=!1,...f}=e,h=i?[]:l,g=A?[]:s,m=u?[u]:[],y=c?[c]:[];h.forEach((e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&y.push(e.onAfterParse.bind(e))}));const b=m.reduce(((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r}),o??""),v=new Bn(b,f,h,g),w=y.reduce(((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&!Array.isArray(r))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return r}),v.parse());return t.createElement(Dn,{attributes:n,className:r,containerTagName:e.containerTagName,emptyContent:a,noWrap:p,parsedContent:0===w.length?void 0:w,tagName:d})}const Sn=({children:e})=>h(Cn,{content:"string"==typeof e?e:""}),In={autoConfig:!0},Tn=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderHtml)?void 0:r.map((e=>e.toUpperCase())).includes(n))??!1)},Qn=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const A=e[o];"<"===A?r?(t.push(n),n=A):(r=!0,n=A):">"===A?(n+=A,t.push(n),n="",r=!1):r?n+=A:t.push(A)}return""!==n&&t.push(n),t},Mn=e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:A}=rn(),i={...e,...In},a=i.htmlComponent?i.htmlComponent:Sn;s((()=>{var e,t;if(A){const A=[...n];for(let n=0;n<A.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=A[n];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(A)}}),[A]);const l=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&Tn(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=Qn),e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};tn(K.PRE_INJECT_MESSAGE,l),tn(K.CHUNK_STREAM_MESSAGE,l),tn(K.START_STREAM_MESSAGE,l),tn(K.START_SIMULATE_STREAM_MESSAGE,l),tn(K.START_SPEAK_AUDIO,(async e=>{Tn(e,t(),"BOT")&&(e.data.textToRead=(e=>typeof window.DOMParser<"u"?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e.replace(/<\/?[^>]+(>|$)/g,""))(e.data.textToRead))}));const c={name:"@rcb-plugins/html-renderer"};return null!=i&&i.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ln=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nn={};function Hn(e,t){return(Nn.jsx?Ln:On).test(e)}const Rn=/[ \t\n\f\r]/g;function _n(e){return""===e.replace(Rn,"")}class Fn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Un(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Fn(n,r,t)}function zn(e){return e.toLowerCase()}Fn.prototype.property={},Fn.prototype.normal={},Fn.prototype.space=null;class jn{constructor(e,t){this.property=e,this.attribute=t}}jn.prototype.space=null,jn.prototype.boolean=!1,jn.prototype.booleanish=!1,jn.prototype.overloadedBoolean=!1,jn.prototype.number=!1,jn.prototype.commaSeparated=!1,jn.prototype.spaceSeparated=!1,jn.prototype.commaOrSpaceSeparated=!1,jn.prototype.mustUseProperty=!1,jn.prototype.defined=!1;let Gn=0;const Yn=Zn(),qn=Zn(),Wn=Zn(),Vn=Zn(),Xn=Zn(),Kn=Zn(),Jn=Zn();function Zn(){return 2**++Gn}const $n=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yn,booleanish:qn,commaOrSpaceSeparated:Jn,commaSeparated:Kn,number:Vn,overloadedBoolean:Wn,spaceSeparated:Xn},Symbol.toStringTag,{value:"Module"})),er=Object.keys($n);class tr extends jn{constructor(e,t,n,r){let o=-1;if(super(e,t),nr(this,"space",r),"number"==typeof n)for(;++o<er.length;){const e=er[o];nr(this,er[o],(n&$n[e])===$n[e])}}}function nr(e,t,n){n&&(e[t]=n)}tr.prototype.defined=!0;const rr={}.hasOwnProperty;function or(e){const t={},n={};let r;for(r in e.properties)if(rr.call(e.properties,r)){const o=e.properties[r],A=new tr(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(A.mustUseProperty=!0),t[r]=A,n[zn(r)]=r,n[zn(A.attribute)]=r}return new Fn(t,n,e.space)}const Ar=or({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ir=or({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ar(e,t){return t in e?e[t]:t}function sr(e,t){return ar(e,t.toLowerCase())}const lr=or({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:sr,properties:{xmlns:null,xmlnsXLink:null}}),cr=or({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:qn,ariaAutoComplete:null,ariaBusy:qn,ariaChecked:qn,ariaColCount:Vn,ariaColIndex:Vn,ariaColSpan:Vn,ariaControls:Xn,ariaCurrent:null,ariaDescribedBy:Xn,ariaDetails:null,ariaDisabled:qn,ariaDropEffect:Xn,ariaErrorMessage:null,ariaExpanded:qn,ariaFlowTo:Xn,ariaGrabbed:qn,ariaHasPopup:null,ariaHidden:qn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xn,ariaLevel:Vn,ariaLive:null,ariaModal:qn,ariaMultiLine:qn,ariaMultiSelectable:qn,ariaOrientation:null,ariaOwns:Xn,ariaPlaceholder:null,ariaPosInSet:Vn,ariaPressed:qn,ariaReadOnly:qn,ariaRelevant:null,ariaRequired:qn,ariaRoleDescription:Xn,ariaRowCount:Vn,ariaRowIndex:Vn,ariaRowSpan:Vn,ariaSelected:qn,ariaSetSize:Vn,ariaSort:null,ariaValueMax:Vn,ariaValueMin:Vn,ariaValueNow:Vn,ariaValueText:null,role:null}}),ur=or({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:sr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kn,acceptCharset:Xn,accessKey:Xn,action:null,allow:null,allowFullScreen:Yn,allowPaymentRequest:Yn,allowUserMedia:Yn,alt:null,as:null,async:Yn,autoCapitalize:null,autoComplete:Xn,autoFocus:Yn,autoPlay:Yn,blocking:Xn,capture:null,charSet:null,checked:Yn,cite:null,className:Xn,cols:Vn,colSpan:null,content:null,contentEditable:qn,controls:Yn,controlsList:Xn,coords:Vn|Kn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yn,defer:Yn,dir:null,dirName:null,disabled:Yn,download:Wn,draggable:qn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yn,formTarget:null,headers:Xn,height:Vn,hidden:Yn,high:Vn,href:null,hrefLang:null,htmlFor:Xn,httpEquiv:Xn,id:null,imageSizes:null,imageSrcSet:null,inert:Yn,inputMode:null,integrity:null,is:null,isMap:Yn,itemId:null,itemProp:Xn,itemRef:Xn,itemScope:Yn,itemType:Xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yn,low:Vn,manifest:null,max:null,maxLength:Vn,media:null,method:null,min:null,minLength:Vn,multiple:Yn,muted:Yn,name:null,nonce:null,noModule:Yn,noValidate:Yn,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:Yn,optimum:Vn,pattern:null,ping:Xn,placeholder:null,playsInline:Yn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yn,referrerPolicy:null,rel:Xn,required:Yn,reversed:Yn,rows:Vn,rowSpan:Vn,sandbox:Xn,scope:null,scoped:Yn,seamless:Yn,selected:Yn,shadowRootClonable:Yn,shadowRootDelegatesFocus:Yn,shadowRootMode:null,shape:null,size:Vn,sizes:null,slot:null,span:Vn,spellCheck:qn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Vn,step:null,style:null,tabIndex:Vn,target:null,title:null,translate:null,type:null,typeMustMatch:Yn,useMap:null,value:qn,width:Vn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xn,axis:null,background:null,bgColor:null,border:Vn,borderColor:null,bottomMargin:Vn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yn,declare:Yn,event:null,face:null,frame:null,frameBorder:null,hSpace:Vn,leftMargin:Vn,link:null,longDesc:null,lowSrc:null,marginHeight:Vn,marginWidth:Vn,noResize:Yn,noHref:Yn,noShade:Yn,noWrap:Yn,object:null,profile:null,prompt:null,rev:null,rightMargin:Vn,rules:null,scheme:null,scrolling:qn,standby:null,summary:null,text:null,topMargin:Vn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Vn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Yn,disableRemotePlayback:Yn,prefix:null,property:null,results:Vn,security:null,unselectable:null}}),dr=or({space:"svg",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"},transform:ar,properties:{about:Jn,accentHeight:Vn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Vn,amplitude:Vn,arabicForm:null,ascent:Vn,attributeName:null,attributeType:null,azimuth:Vn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Vn,by:null,calcMode:null,capHeight:Vn,className:Xn,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:Vn,diffuseConstant:Vn,direction:null,display:null,dur:null,divisor:Vn,dominantBaseline:null,download:Yn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Vn,enableBackground:null,end:null,event:null,exponent:Vn,externalResourcesRequired:null,fill:null,fillOpacity:Vn,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:Kn,g2:Kn,glyphName:Kn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Vn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Vn,horizOriginX:Vn,horizOriginY:Vn,id:null,ideographic:Vn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Vn,k:Vn,k1:Vn,k2:Vn,k3:Vn,k4:Vn,kernelMatrix:Jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Vn,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:Vn,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:Vn,overlineThickness:Vn,paintOrder:null,panose1:null,path:null,pathLength:Vn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Vn,pointsAtY:Vn,pointsAtZ:Vn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jn,rev:Jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jn,requiredFeatures:Jn,requiredFonts:Jn,requiredFormats:Jn,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:Vn,specularExponent:Vn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Vn,strikethroughThickness:Vn,string:null,stroke:null,strokeDashArray:Jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Vn,strokeOpacity:Vn,strokeWidth:null,style:null,surfaceScale:Vn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jn,tabIndex:Vn,tableValues:null,target:null,targetX:Vn,targetY:Vn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Vn,underlineThickness:Vn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Vn,values:null,vAlphabetic:Vn,vMathematical:Vn,vectorEffect:null,vHanging:Vn,vIdeographic:Vn,version:null,vertAdvY:Vn,vertOriginX:Vn,vertOriginY:Vn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Vn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pr=/^data[-\w.:]+$/i,fr=/-[a-z]/g,hr=/[A-Z]/g;function gr(e){return"-"+e.toLowerCase()}function mr(e){return e.charAt(1).toUpperCase()}const yr={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"},br=Un([ir,Ar,lr,cr,ur],"html"),vr=Un([ir,Ar,lr,cr,dr],"svg");function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xr,Er,Pr,kr={};var Br=function(){if(Pr)return kr;Pr=1;var e=kr&&kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0}),kr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),A="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;A?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(Er)return xr;Er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,A=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function l(e){return e?e.replace(a,s):s}return xr=function(a,c){if("string"!=typeof a)throw new TypeError("First argument must be a string");if(!a)return[];c=c||{};var u=1,d=1;function p(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:u,column:d};return function(t){return t.position=new h(e),y(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=a,!c.silent)throw t}function m(e){var t=e.exec(a);if(t){var n=t[0];return p(n),a=a.slice(n.length),t}}function y(){m(n)}function b(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var e=f();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var t=2;s!=a.charAt(t)&&("*"!=a.charAt(t)||"/"!=a.charAt(t+1));)++t;if(t+=2,s===a.charAt(t-1))return g("End of comment missing");var n=a.slice(2,t-2);return d+=2,p(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function w(){var t=f(),n=m(r);if(n){if(v(),!m(o))return g("property missing ':'");var a=m(A),c=t({type:"declaration",property:l(n[0].replace(e,s)),value:a?l(a[0].replace(e,s)):s});return m(i),c}}return h.prototype.content=a,y(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()},xr}());return kr}();const Dr=wr(Br),Cr=Dr.default||Dr,Sr=Tr("end"),Ir=Tr("start");function Tr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Qr(e){return e&&"object"==typeof e?"position"in e||"type"in e?Or(e.position):"start"in e||"end"in e?Or(e):"line"in e||"column"in e?Mr(e):"":""}function Mr(e){return Lr(e&&e.line)+":"+Lr(e&&e.column)}function Or(e){return Mr(e&&e.start)+"-"+Mr(e&&e.end)}function Lr(e){return e&&"number"==typeof e?e:1}class Nr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},A=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(A=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=i?i.line:void 0,this.name=Qr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=A&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Nr.prototype.file="",Nr.prototype.name="",Nr.prototype.reason="",Nr.prototype.message="",Nr.prototype.stack="",Nr.prototype.column=void 0,Nr.prototype.line=void 0,Nr.prototype.ancestors=void 0,Nr.prototype.cause=void 0,Nr.prototype.fatal=void 0,Nr.prototype.place=void 0,Nr.prototype.ruleId=void 0,Nr.prototype.source=void 0;const Hr={}.hasOwnProperty,Rr=new Map,_r=/[A-Z]/g,Fr=/-([a-z])/g,Ur=new Set(["table","tbody","thead","tfoot","tr"]),zr=new Set(["td","th"]),jr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,A){const i=Array.isArray(o.children),a=Ir(n);return t(r,o,A,i,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,A){const i=Array.isArray(o.children)?n:t;return A?i(r,o,A):i(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?vr:br,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},A=Yr(o,e,void 0);return A&&"string"!=typeof A?A:o.create(e,o.Fragment,{children:A||void 0},void 0)}function Yr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=vr,e.schema=o),e.ancestors.push(t);const A=Kr(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Hr.call(t.properties,o)){const A=Xr(e,o,t.properties[o]);if(A){const[o,i]=A;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&zr.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Vr(e,t);return Ur.has(t.tagName)&&(a=a.filter((function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&_n(e.value):_n(e)}(e)}))),qr(e,i,A,t),Wr(i,a),e.ancestors.pop(),e.schema=r,e.create(t,A,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Jr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=vr,e.schema=o),e.ancestors.push(t);const A=null===t.name?e.Fragment:Kr(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const A=o.properties[0];A.type,Object.assign(n,e.evaluater.evaluateExpression(A.argument))}else Jr(e,t.position);else{const o=r.name;let A;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,A=e.evaluater.evaluateExpression(t.expression)}else Jr(e,t.position);else A=null===r.value||r.value;n[o]=A}return n}(e,t),a=Vr(e,t);return qr(e,i,A,t),Wr(i,a),e.ancestors.pop(),e.schema=r,e.create(t,A,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Wr(r,Vr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function qr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Vr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Rr;for(;++r<t.children.length;){const A=t.children[r];let i;if(e.passKeys){const e="element"===A.type?A.tagName:"mdxJsxFlowElement"===A.type||"mdxJsxTextElement"===A.type?A.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const a=Yr(e,A,i);void 0!==a&&n.push(a)}return n}function Xr(e,t,n){const r=function(e,t){const n=zn(t);let r=t,o=jn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&pr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(fr,mr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!fr.test(e)){let n=e.replace(hr,gr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=tr}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{Cr(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Nr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=jr+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(Fr,$r)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Hr.call(e,n)&&(t[Zr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?yr[r.property]||r.property:r.attribute,n]}}function Kr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Hn(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:!(!o||"Literal"!==t.type),optional:!1}:t}r=n}else r=Hn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Hr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jr(e)}function Jr(e,t){const n=new Nr("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=jr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Zr(e){let t=e.replace(_r,eo);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function $r(e,t){return t.toUpperCase()}function eo(e){return"-"+e.toLowerCase()}const to={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"]},no={};function ro(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return oo(e.children,t,n)}return Array.isArray(e)?oo(e,t,n):""}function oo(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ro(e[o],t,n);return r.join("")}const Ao=document.createElement("i");function io(e){const t="&"+e+";";Ao.innerHTML=t;const n=Ao.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function ao(e,t,n,r){const o=e.length;let A,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)A=Array.from(r),A.unshift(t,n),e.splice(...A);else for(n&&e.splice(t,n);i<r.length;)A=r.slice(i,i+1e4),A.unshift(t,0),e.splice(...A),i+=1e4,t+=1e4}function so(e,t){return e.length>0?(ao(e,e.length,0,t),e):t}const lo={}.hasOwnProperty;function co(e){const t={};let n=-1;for(;++n<e.length;)uo(t,e[n]);return t}function uo(e,t){let n;for(n in t){const r=(lo.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let A;if(o)for(A in o){lo.call(r,A)||(r[A]=[]);const e=o[A];po(r[A],Array.isArray(e)?e:e?[e]:[])}}}function po(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ao(e,0,0,r)}function fo(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function ho(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const go=Co(/[A-Za-z]/),mo=Co(/[\dA-Za-z]/),yo=Co(/[#-'*+\--9=?A-Z^-~]/);function bo(e){return null!==e&&(e<32||127===e)}const vo=Co(/\d/),wo=Co(/[\dA-Fa-f]/),xo=Co(/[!-/:-@[-`{-~]/);function Eo(e){return null!==e&&e<-2}function Po(e){return null!==e&&(e<0||32===e)}function ko(e){return-2===e||-1===e||32===e}const Bo=Co(new RegExp("\\p{P}|\\p{S}","u")),Do=Co(/\s/);function Co(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function So(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const A=e.charCodeAt(n);let i="";if(37===A&&mo(e.charCodeAt(n+1))&&mo(e.charCodeAt(n+2)))o=2;else if(A<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(A))||(i=String.fromCharCode(A));else if(A>55295&&A<57344){const t=e.charCodeAt(n+1);A<56320&&t>56319&&t<57344?(i=String.fromCharCode(A,t),o=1):i="�"}else i=String.fromCharCode(A);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Io(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let A=0;return function(r){return ko(r)?(e.enter(n),i(r)):t(r)};function i(r){return ko(r)&&A++<o?(e.consume(r),i):(e.exit(n),t(r))}}const To={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Io(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Eo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Qo={tokenize:function(e){const t=this,n=[];let r,o,A,i=0;return a;function a(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,s,l)(r)}return l(r)}function s(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let o,A=n;for(;A--;)if("exit"===t.events[A][0]&&"chunkFlow"===t.events[A][1].type){o=t.events[A][1].end;break}m(i);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return ao(t.events,A+1,0,t.events.slice(n)),t.events.length=a,l(e)}return a(e)}function l(o){if(i===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return f(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mo,c,u)(o)}function c(e){return r&&y(),m(i),d(e)}function u(e){return t.parser.lazy[t.now().line]=i!==n.length,A=t.now().offset,f(e)}function d(n){return t.containerState={},e.attempt(Mo,p,f)(n)}function p(e){return i++,n.push([t.currentConstruct,t.containerState]),d(e)}function f(n){return null===n?(r&&y(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):Eo(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<A&&(!r.events[e][1].end||r.events[e][1].end.offset>A))return;const n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(i),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;ao(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Mo={tokenize:function(e,t,n){return Io(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Oo(e){return null===e||Po(e)||Do(e)?1:Bo(e)?2:void 0}function Lo(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const A=e[o].resolveAll;A&&!r.includes(A)&&(t=A(t,n),r.push(A))}return t}const No={name:"attention",resolveAll:function(e,t){let n,r,o,A,i,a,s,l,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};Ho(u,-a),Ho(d,a),A={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},i={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...A.start},end:{...i.end}},e[n][1].end={...A.start},e[c][1].start={...i.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=so(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=so(s,[["enter",r,t],["enter",A,t],["exit",A,t],["enter",o,t]]),s=so(s,Lo(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=so(s,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,s=so(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,ao(e,n-1,c-n+3,s),c=n+s.length-l-2;break}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Oo(r);let A;return function(t){return A=t,e.enter("attentionSequence"),i(t)};function i(a){if(a===A)return e.consume(a),i;const s=e.exit("attentionSequence"),l=Oo(a),c=!l||2===l&&o||n.includes(a),u=!o||2===o&&l||n.includes(r);return s._open=!!(42===A?c:c&&(o||!u)),s._close=!!(42===A?u:u&&(l||!c)),t(a)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ro={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return go(t)?(e.consume(t),A):64===t?n(t):s(t)}function A(e){return 43===e||45===e||46===e||mo(e)?(r=1,i(e)):s(e)}function i(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||mo(t))&&r++<32?(e.consume(t),i):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||bo(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),l):yo(t)?(e.consume(t),s):n(t)}function l(e){return mo(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,l):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||mo(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const _o={partial:!0,tokenize:function(e,t,n){return function(t){return ko(t)?Io(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Eo(e)?t(e):n(e)}}};const Fo={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return ko(t)?Io(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(Fo,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return ko(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Uo={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return xo(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const zo={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,A,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,A=mo,l(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,A=wo,l):(e.enter("characterReferenceValue"),o=7,A=vo,l(t))}function l(a){if(59===a&&i){const o=e.exit("characterReferenceValue");return A!==mo||io(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return A(a)&&i++<o?(e.consume(a),l):n(a)}}};const jo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Go={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),ko(t)?Io(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===A?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===A?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),ko(t)?Io(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Eo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let A,i=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,A=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===A?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),ko(t)?Io(e,l,"whitespace")(t):l(t))}function l(n){return null===n||Eo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(jo,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):ko(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Io(e,u,"whitespace")(t)):96===t&&t===A?n(t):(e.consume(t),c)}function u(t){return null===t||Eo(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===A?n(t):(e.consume(t),d)}function p(t){return e.attempt(o,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return i>0&&ko(t)?Io(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||Eo(t)?e.check(jo,p,y)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function y(n){return e.exit("codeFenced"),t(n)}}};const Yo={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Io(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?A(e):n(e)}function A(t){return null===t?a(t):Eo(t)?e.attempt(qo,A,a)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),A(t)):(e.consume(t),i)}function a(n){return e.exit("codeIndented"),t(n)}}},qo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Io(e,A,"linePrefix",5)(t)}function A(e){const A=r.events[r.events.length-1];return A&&"linePrefix"===A[1].type&&A[2].sliceSerialize(A[1],!0).length>=4?t(e):Eo(e)?o(e):n(e)}}};const Wo={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,A=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),A++,i):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,l(t)):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Eo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function l(n){return 96===n?(e.consume(n),r++,l):r===A?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Vo{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Xo(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Xo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xo(this.left,t.reverse())}}}function Xo(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 Ko(e){const t={};let n,r,o,A,i,a,s,l=-1;const c=new Vo(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(n=c.get(l),l&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(l-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Jo(c,l)),l=t[l],s=!0);else if(n[1]._container){for(o=l,r=void 0;o--;)if(A=c.get(o),"lineEnding"===A[1].type||"lineEndingBlank"===A[1].type)"enter"===A[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),A[1].type="lineEnding",r=o);else if("linePrefix"!==A[1].type)break;r&&(n[1].end={...c.get(r)[1].start},i=c.slice(r,l),i.unshift(n),c.splice(r,l-r+1,i))}}return ao(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function Jo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const A=[],i=n._tokenizer||r.parser[n.contentType](n.start),a=i.events,s=[],l={};let c,u,d=-1,p=n,f=0,h=0;const g=[h];for(;p;){for(;e.get(++o)[1]!==p;);A.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),u&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=p,p=p.next}for(p=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=A.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)l[f+s[d][0]]=f+s[d][1],f+=s[d][1]-s[d][0]-1;return l}const Zo={resolve:function(e){return Ko(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Eo(t)?e.check($o,A,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function A(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},$o={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Io(e,o,"linePrefix")};function o(o){if(null===o||Eo(o))return n(o);const A=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&A&&"linePrefix"===A[1].type&&A[2].sliceSerialize(A[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function eA(e,t,n,r,o,A,i,a,s){const l=s||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(A),e.consume(t),e.exit(A),u):null===t||32===t||41===t||bo(t)?n(t):(e.enter(r),e.enter(i),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function u(n){return 62===n?(e.enter(A),e.consume(n),e.exit(A),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||Eo(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function f(o){return c||null!==o&&41!==o&&!Po(o)?c<l&&40===o?(e.consume(o),c++,f):41===o?(e.consume(o),c--,f):null===o||32===o||40===o||bo(o)?n(o):(e.consume(o),92===o?h:f):(e.exit("chunkString"),e.exit(a),e.exit(i),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function tA(e,t,n,r,o,A){const i=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(A),l};function l(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):93===u?(e.exit(A),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):Eo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Eo(t)||s++>999?(e.exit("chunkString"),l(t)):(e.consume(t),a||(a=!ko(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function nA(e,t,n,r,o,A){let i;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,a):n(t)};function a(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(A),s(n))}function s(t){return t===i?(e.exit(A),a(i)):null===t?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Io(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===i||null===t||Eo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:l)}function c(t){return t===i||92===t?(e.consume(t),l):l(t)}}function rA(e,t){let n;return function r(o){return Eo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ko(o)?Io(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const oA={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return tA.call(r,e,A,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function A(t){return o=ho(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return Po(t)?rA(e,a)(t):a(t)}function a(t){return eA(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(AA,l,l)(t)}function l(t){return ko(t)?Io(e,c,"whitespace")(t):c(t)}function c(A){return null===A||Eo(A)?(e.exit("definition"),r.parser.defined.push(o),t(A)):n(A)}}},AA={partial:!0,tokenize:function(e,t,n){return function(t){return Po(t)?rA(e,r)(t):n(t)};function r(t){return nA(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return ko(t)?Io(e,A,"whitespace")(t):A(t)}function A(e){return null===e||Eo(e)?t(e):n(e)}}};const iA={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Eo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const aA={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,A=3;return"whitespace"===e[A][1].type&&(A+=2),o-2>A&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(A===o-1||o-4>A&&"whitespace"===e[o-2][1].type)&&(o-=A+1===o?2:4),o>A&&(n={type:"atxHeadingText",start:e[A][1].start,end:e[o][1].end},r={type:"chunkText",start:e[A][1].start,end:e[o][1].end,contentType:"text"},ao(e,A,o-A+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Po(t)?(e.exit("atxHeadingSequence"),A(t)):n(t)}function A(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Eo(n)?(e.exit("atxHeading"),t(n)):ko(n)?Io(e,A,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),A(t))}function a(t){return null===t||35===t||Po(t)?(e.exit("atxHeadingText"),A(t)):(e.consume(t),a)}}};const sA=["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"],lA=["pre","script","style","textarea"],cA={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,A,i,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),A=!0,p):63===a?(e.consume(a),o=3,r.interrupt?t:O):go(a)?(e.consume(a),i=String.fromCharCode(a),f):n(a)}function c(A){return 45===A?(e.consume(A),o=2,u):91===A?(e.consume(A),o=5,a=0,d):go(A)?(e.consume(A),o=4,r.interrupt?t:O):n(A)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const A="CDATA[";return o===A.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:B:d):n(o)}function p(t){return go(t)?(e.consume(t),i=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||Po(a)){const s=47===a,l=i.toLowerCase();return s||A||!lA.includes(l)?sA.includes(i.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):B(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):A?g(a):m(a)):(o=1,r.interrupt?t(a):B(a))}return 45===a||mo(a)?(e.consume(a),i+=String.fromCharCode(a),f):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:B):n(o)}function g(t){return ko(t)?(e.consume(t),g):P(t)}function m(t){return 47===t?(e.consume(t),P):58===t||95===t||go(t)?(e.consume(t),y):ko(t)?(e.consume(t),m):P(t)}function y(t){return 45===t||46===t||58===t||95===t||mo(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),v):ko(t)?(e.consume(t),b):m(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):ko(t)?(e.consume(t),v):x(t)}function w(t){return t===s?(e.consume(t),s=null,E):null===t||Eo(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Po(t)?b(t):(e.consume(t),x)}function E(e){return 47===e||62===e||ko(e)?m(e):n(e)}function P(t){return 62===t?(e.consume(t),k):n(t)}function k(t){return null===t||Eo(t)?B(t):ko(t)?(e.consume(t),k):n(t)}function B(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!Eo(t)||6!==o&&7!==o?null===t||Eo(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),B):(e.exit("htmlFlowData"),e.check(uA,N,D)(t))}function D(t){return e.check(dA,C,N)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),S}function S(t){return null===t||Eo(t)?D(t):(e.enter("htmlFlowData"),B(t))}function I(t){return 45===t?(e.consume(t),O):B(t)}function T(t){return 47===t?(e.consume(t),i="",Q):B(t)}function Q(t){if(62===t){const n=i.toLowerCase();return lA.includes(n)?(e.consume(t),L):B(t)}return go(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),Q):B(t)}function M(t){return 93===t?(e.consume(t),O):B(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):B(t)}function L(t){return null===t||Eo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},uA={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(_o,t,n)}}},dA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const pA={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,A,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),v):63===t?(e.consume(t),y):go(t)?(e.consume(t),E):n(t)}function s(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),A=0,p):go(t)?(e.consume(t),m):n(t)}function l(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):Eo(t)?(i=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(A++)?(e.consume(t),6===A?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),h):Eo(t)?(i=f,Q(t)):(e.consume(t),f)}function h(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):f(t)}function m(t){return null===t||62===t?T(t):Eo(t)?(i=m,Q(t)):(e.consume(t),m)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):Eo(t)?(i=y,Q(t)):(e.consume(t),y)}function b(e){return 62===e?T(e):y(e)}function v(t){return go(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||mo(t)?(e.consume(t),w):x(t)}function x(t){return Eo(t)?(i=x,Q(t)):ko(t)?(e.consume(t),x):T(t)}function E(t){return 45===t||mo(t)?(e.consume(t),E):47===t||62===t||Po(t)?P(t):n(t)}function P(t){return 47===t?(e.consume(t),T):58===t||95===t||go(t)?(e.consume(t),k):Eo(t)?(i=P,Q(t)):ko(t)?(e.consume(t),P):T(t)}function k(t){return 45===t||46===t||58===t||95===t||mo(t)?(e.consume(t),k):B(t)}function B(t){return 61===t?(e.consume(t),D):Eo(t)?(i=B,Q(t)):ko(t)?(e.consume(t),B):P(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,C):Eo(t)?(i=D,Q(t)):ko(t)?(e.consume(t),D):(e.consume(t),S)}function C(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):Eo(t)?(i=C,Q(t)):(e.consume(t),C)}function S(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Po(t)?P(t):(e.consume(t),S)}function I(e){return 47===e||62===e||Po(e)?P(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return ko(t)?Io(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),i(t)}}};const fA={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&ao(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,A,i=e.length,a=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=i);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return A=[["enter",s,t],["enter",l,t]],A=so(A,e.slice(r+1,r+a+3)),A=so(A,[["enter",c,t]]),A=so(A,Lo(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),A=so(A,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),A=so(A,e.slice(o+1)),A=so(A,[["exit",s,t]]),ao(e,r,e.length,A),e},tokenize:function(e,t,n){const r=this;let o,A,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){return o?o._inactive?c(t):(A=r.parser.defined.includes(ho(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(hA,l,A?l:c)(t):91===t?e.attempt(gA,l,A?s:c)(t):A?l(t):c(t)}function s(t){return e.attempt(mA,l,c)(t)}function l(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},hA={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Po(t)?rA(e,o)(t):o(t)}function o(t){return 41===t?l(t):eA(e,A,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function A(t){return Po(t)?rA(e,a)(t):l(t)}function i(e){return n(e)}function a(t){return 34===t||39===t||40===t?nA(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function s(t){return Po(t)?rA(e,l)(t):l(t)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},gA={tokenize:function(e,t,n){const r=this;return function(t){return tA.call(r,e,o,A,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(ho(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function A(e){return n(e)}}},mA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const yA={name:"labelStartImage",resolveAll:fA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),A):n(t)}function A(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const bA={name:"labelStartLink",resolveAll:fA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const vA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Io(e,t,"linePrefix")}}};const wA={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,A(e)}(t)};function A(A){return A===r?(e.enter("thematicBreakSequence"),i(A)):o>=3&&(null===A||Eo(A))?(e.exit("thematicBreak"),t(A)):n(A)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),ko(t)?Io(e,A,"whitespace")(t):A(t))}}};const xA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_o,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Io(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!ko(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(PA,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Io(e,e.attempt(xA,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let A=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:vo(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(wA,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return vo(t)&&++i<10?(e.consume(t),a):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(_o,r.interrupt?n:l,e.attempt(EA,u,c))}function l(e){return r.containerState.initialBlankLine=!0,A++,u(e)}function c(t){return ko(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=A+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},EA={partial:!0,tokenize:function(e,t,n){const r=this;return Io(e,(function(e){const o=r.events[r.events.length-1];return!ko(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},PA={partial:!0,tokenize:function(e,t,n){const r=this;return Io(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const kA={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,A=e.length;for(;A--;)if("enter"===e[A][0]){if("content"===e[A][1].type){n=A;break}"paragraph"===e[A][1].type&&(r=A)}else"content"===e[A][1].type&&e.splice(A,1),!o&&"definition"===e[A][1].type&&(o=A);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i,e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){i="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!i?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),A(t)}(t))};function A(t){return t===o?(e.consume(t),A):(e.exit("setextHeadingLineSequence"),ko(t)?Io(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Eo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const BA={tokenize:function(e){const t=this,n=e.attempt(_o,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Io(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Zo,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const DA={resolveAll:TA()},CA=IA("string"),SA=IA("text");function IA(e){return{resolveAll:TA("text"===e?QA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,A,i);return A;function A(e){return s(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function TA(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function QA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let A,i=o.length,a=-1,s=0;for(;i--;){const e=o[i];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)A=!0,s++;else if(-1!==e){i++;break}}if(s){const o={type:n===e.length||A||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const MA={42:xA,43:xA,45:xA,48:xA,49:xA,50:xA,51:xA,52:xA,53:xA,54:xA,55:xA,56:xA,57:xA,62:Fo},OA={91:oA},LA={[-2]:Yo,[-1]:Yo,32:Yo},NA={35:aA,42:wA,45:[kA,wA],60:cA,61:kA,95:wA,96:Go,126:Go},HA={38:zo,92:Uo},RA={[-5]:vA,[-4]:vA,[-3]:vA,33:yA,38:zo,42:No,60:[Ro,pA],91:bA,92:[iA,Uo],93:fA,95:No,96:Wo},_A={null:[No,DA]},FA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:OA,disable:{null:[]},document:MA,flow:NA,flowInitial:LA,insideSpan:_A,string:HA,text:RA},Symbol.toStringTag,{value:"Module"}));function UA(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},A=[];let i=[],a=[];const s={attempt:h((function(e,t){g(e,t.from)})),check:h(f),consume:function(e){Eo(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),l.events.push(["enter",n,l]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),l.events.push(["exit",t,l]),t},interrupt:h(f,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,m()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const A=e[n];let i;if("string"==typeof A)i=A;else switch(A){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(A)}o=-2===A,r.push(i)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return i=so(i,e),function(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}(),null!==i[i.length-1]?[]:(g(t,0),l.events=Lo(A,l.events,l),l.events)}};let c=t.tokenize.call(l,s);return t.resolveAll&&A.push(t),l;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,A=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,A)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}A>0&&i.push(e[o].slice(0,A))}return i}(i,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:A}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:A}}function p(e){c=c(e)}function f(e,t){t.restore()}function h(e,t){return function(n,o,A){let i,c,u,p;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function f(e){return i=e,c=0,0===e.length?A:h(e[c])}function h(e){return function(n){return p=function(){const e=d(),t=l.previous,n=l.currentConstruct,o=l.events.length,A=Array.from(a);return{from:o,restore:i};function i(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=o,a=A,m()}}(),u=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?y():e.tokenize.call(t?Object.assign(Object.create(l),t):l,s,g,y)(n)}}function g(t){return e(u,p),o}function y(e){return p.restore(),++c<i.length?h(i[c]):A}}}function g(e,t){e.resolveAll&&!A.includes(e)&&A.push(e),e.resolve&&ao(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const zA=/[\0\t\n\r]/g;const jA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function GA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return fo(n.slice(t?2:1),t?16:10)}return io(n)||e}const YA={}.hasOwnProperty;function qA(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:A(te),autolinkProtocol:k,autolinkEmail:k,atxHeading:A(J),blockQuote:A(q),characterEscape:k,characterReference:k,codeFenced:A(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:A(W,i),codeText:A(V,i),codeTextData:k,data:k,codeFlowValue:k,definition:A(X),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:A(K),hardBreakEscape:A(Z),hardBreakTrailing:A(Z),htmlFlow:A($,i),htmlFlowData:k,htmlText:A($,i),htmlTextData:k,image:A(ee),label:i,link:A(te),listItem:A(re),listItemValue:d,listOrdered:A(ne,u),listUnordered:A(ne),paragraph:A(oe),reference:_,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:A(J),strong:A(Ae),thematicBreak:A(ae)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:Y,autolinkProtocol:G,blockQuote:s(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:z,characterReference:j,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:B,codeIndented:s(m),codeText:s(T),codeTextData:B,data:B,definition:s(),definitionDestinationString:v,definitionLabelString:y,definitionTitleString:b,emphasis:s(),hardBreakEscape:s(C),hardBreakTrailing:s(C),htmlFlow:s(S),htmlFlowData:B,htmlText:s(I),htmlTextData:B,image:s(M),label:L,labelText:O,lineEnding:D,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:F,resourceDestinationString:N,resourceTitleString:H,resource:R,setextHeading:s(P),setextHeadingLineSequence:E,setextHeadingText:x,strong:s(),thematicBreak:s()}};VA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const A={stack:[r],tokenStack:[],config:t,enter:a,exit:l,buffer:i,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];YA.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},A),e[u][1])}if(A.tokenStack.length>0){const e=A.tokenStack[A.tokenStack.length-1];(e[1]||KA).call(A,void 0,e[0])}for(r.position={start:WA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:WA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,A,i,a=t-1,s=-1,l=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!i&&!s&&!A&&(A=a),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=a;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}A&&(!o||A<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,A=void 0,i=!0}}}return e[t][1]._spread=l,n}function A(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:WA(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Qr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||KA).call(this,e,r[0])),n.position.end=WA(e.end)}function c(){return function(e){const t=no;return ro(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.includeHtml)}(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ho(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function v(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function k(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=ie(),n.position={start:WA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function B(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=WA(e.end)}function D(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=WA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(k.call(this,e),B.call(this,e))}function C(){this.data.atHardBreak=!0}function S(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(jA,GA)}(t),n.identifier=ho(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function H(){const e=this.resume();this.stack[this.stack.length-1].title=e}function R(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ho(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function U(e){this.data.characterReferenceType=e.type}function z(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=fo(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=io(t);this.stack[this.stack.length-1].value+=r}function j(e){this.stack.pop().position.end=WA(e.end)}function G(e){B.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Y(e){B.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function V(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function Ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Ko(e););return e}(function(e){const t={constructs:co([FA,...(e||{}).extensions||[]]),content:n(To),defined:[],document:n(Qo),flow:n(BA),lazy:{},string:n(CA),text:n(SA)};return t;function n(e){return function(n){return UA(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,A,i){const a=[];let s,l,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(A||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(zA.lastIndex=c,s=zA.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),a.push(-2);t++<l;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return i&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function WA(e){return{line:e.line,column:e.column,offset:e.offset}}function VA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?VA(e,r):XA(e,r)}}function XA(e,t){let n;for(n in t)if(YA.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 KA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qr({start:t.start,end:t.end})+") is still open")}function JA(e){const t=this;t.parser=function(n){return qA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZA(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),A=o[0];A&&"text"===A.type?A.value="["+A.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function $A(e){return e.spread??e.children.length>1}const ei=9,ti=32;function ni(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const A=[];for(;r;)A.push(ri(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return A.push(ri(t.slice(o),o>0,!1)),A.join("")}function ri(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;t===ei||t===ti;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;t===ei||t===ti;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const oi={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=So(r.toLowerCase()),A=e.footnoteOrder.indexOf(r);let i,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=A+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZA(e,t);const o={src:So(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const A={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,A),e.applyData(t,A)},image:function(e,t){const n={src:So(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZA(e,t);const o={href:So(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const A={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,A),e.applyData(t,A)},link:function(e,t){const n={href:So(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=$A(n[r])}return t}(n):$A(t),A={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),A.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&i.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:A,children:i};return e.patch(t,l),e.applyData(t,l)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const A={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,A),e.applyData(t,A)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},A=Ir(t.children[1]),i=Sr(t.children[t.children.length-1]);A&&i&&(r.position={start:A,end:i}),o.push(r)}const A={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,A),e.applyData(t,A)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",A=n&&"table"===n.type?n.align:void 0,i=A?A.length:t.children.length;let a=-1;const s=[];for(;++a<i;){const n=t.children[a],r={},i=A?A[a]:void 0;i&&(r.align=i);let l={type:"element",tagName:o,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),s.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:ni(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Ai,yaml:Ai,definition:Ai,footnoteDefinition:Ai};function Ai(){}const ii="object"==typeof self?self:globalThis,ai=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[A,i]=t[o];switch(A){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new ii[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new ii[A](i),o)};return r})(new Map,e)(0),si="",{toString:li}={},{keys:ci}=Object,ui=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=li.call(e).slice(8,-1);switch(n){case"Array":return[1,si];case"Object":return[2,si];case"Date":return[3,si];case"RegExp":return[4,si];case"Map":return[5,si];case"Set":return[6,si];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},di=([e,t])=>0===e&&("function"===t||"symbol"===t),pi=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},A=r=>{if(n.has(r))return n.get(r);let[i,a]=ui(r);switch(i){case 0:{let t=r;switch(a){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([i,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([i,e],r);for(const t of r)e.push(A(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return A(r.toJSON());const n=[],s=o([i,n],r);for(const t of ci(r))(e||!di(ui(r[t])))&&n.push([A(t),A(r[t])]);return s}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!di(ui(n))&&!di(ui(o)))&&t.push([A(n),A(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)(e||!di(ui(n)))&&t.push(A(n));return n}}const{message:s}=r;return o([i,{name:a,message:s}],r)};return A})(!(t||n),!!t,new Map,r)(e),r},fi="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ai(pi(e,t)):structuredClone(e):(e,t)=>ai(pi(e,t));function hi(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gi(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const mi=function(e){if(null==e)return bi;if("function"==typeof e)return yi(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mi(e[n]);return yi(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return yi(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return yi(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function yi(e){return function(t,n,r){return!(!function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)||!e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function bi(){return!0}const vi=[],wi=!0,xi=!1,Ei="skip";function Pi(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const A=mi(o),i=r?-1:1;!function e(o,a,s){const l=o&&"object"==typeof o?o:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,u,d=vi;if((!t||A(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[wi,e]:null==e?vi:[e]}(n(o,s)),d[0]===xi))return d;if("children"in o&&o.children){const t=o;if(t.children&&d[0]!==Ei)for(c=(r?t.children.length:-1)+i,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(l=e(n,c,u)(),l[0]===xi)return l;c="number"==typeof l[1]?l[1]:c+i}}return d}}(e,void 0,[])()}function ki(e,t,n,r){let o,A,i;"function"==typeof t?(A=void 0,i=t,o=n):(A=t,i=n,o=r),Pi(e,A,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),o)}const Bi={}.hasOwnProperty,Di={};function Ci(e,t){const n=t||Di,r=new Map,o=new Map,A=new Map,i={...oi,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=Mi(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Mi(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Ii,definitionById:r,footnoteById:o,footnoteCounts:A,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=a.handlers[n];if(Bi.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=fi(n);return r.children=a.all(e),r}return fi(e)}return(a.options.unknownHandler||Ti)(a,e,t)},options:n,patch:Si,wrap:Qi};return ki(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),a}function Si(e,t){e.position&&(t.position=function(e){const t=Ir(e),n=Sr(e);if(t&&n)return{start:t,end:n}}(e))}function Ii(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,fi(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Ti(e,t){const n=t.data||{},r=!("value"in t)||Bi.call(n,"hProperties")||Bi.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Qi(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Mi(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Oi(e,t){const n=Ci(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||hi,r=e.options.footnoteBackLabel||gi,o=e.options.footnoteLabel||"Footnotes",A=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const A=e.all(o),i=String(o.identifier).toUpperCase(),l=So(i.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(i);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=A[A.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...u)}else A.push(...u);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(A,!0)};e.patch(o,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:A,properties:{...fi(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),A=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&A.children.push({type:"text",value:"\n"},o),A}function Li(e,t){return e&&"run"in e?async function(n,r){const o=Oi(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Oi(n,{file:r,...e||t})}}function Ni(e){if(e)throw e}var Hi,Ri;var _i=function(){if(Ri)return Hi;Ri=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},A=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),A=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!A)return!1;for(r in n);return typeof r>"u"||e.call(n,r)},i=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Hi=function e(){var t,n,r,s,l,c,u=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(f&&s&&(A(s)||(l=o(s)))?(l?(l=!1,c=r&&o(r)?r:[]):c=r&&A(r)?r:{},i(u,{name:n,newValue:e(f,c,s)})):typeof s<"u"&&i(u,{name:n,newValue:s}));return u},Hi}();const Fi=wr(_i);function Ui(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zi(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(A,...i){const a=e[++n];let s=-1;if(A)r(A);else{for(;++s<t.length;)(null===i[s]||void 0===i[s])&&(i[s]=t[s]);t=i,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(A,o):i instanceof Error?o(i):A(i))}function o(e,...r){n||(n=!0,t(e,...r))}function A(e){o(null,e)}}(a,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ji={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Gi(e);let n,r=0,o=-1,A=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;A--;)if(47===e.codePointAt(A)){if(n){r=A+1;break}}else o<0&&(n=!0,o=A+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,a=t.length-1;for(;A--;)if(47===e.codePointAt(A)){if(n){r=A+1;break}}else i<0&&(n=!0,i=A+1),a>-1&&(e.codePointAt(A)===t.codePointAt(a--)?a<0&&(o=A):(a=-1,o=i));return r===o?o=i:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Gi(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Gi(e);let t,n=e.length,r=-1,o=0,A=-1,i=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?A<0?A=n:1!==i&&(i=1):A>-1&&(i=-1);else if(t){o=n+1;break}}return A<0||r<0||0===i||1===i&&A===r-1&&A===o+1?"":e.slice(A,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Gi(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Gi(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",A=0,i=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(i!==s-1&&1!==a)if(i!==s-1&&2===a){if(o.length<2||2!==A||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",A=0):(o=o.slice(0,r),A=o.length-1-o.lastIndexOf("/")),i=s,a=0;continue}}else if(o.length>0){o="",A=0,i=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",A=2)}else o.length>0?o+="/"+e.slice(i+1,s):o=e.slice(i+1,s),A=s-i-1;i=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function Gi(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Yi={cwd:function(){return"/"}};function qi(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Wi(e){if("string"==typeof e)e=new URL(e);else if(!qi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Vi=["history","path","basename","stem","extname","dirname"];class Xi{constructor(e){let t;var n;t=e?qi(e)?{path:e}:"string"==typeof e||(n=e)&&"object"==typeof n&&"byteLength"in n&&"byteOffset"in n?{value:e}:e:{},this.cwd="cwd"in t?"":Yi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Vi.length;){const e=Vi[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Vi.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?ji.basename(this.path):void 0}set basename(e){Ji(e,"basename"),Ki(e,"basename"),this.path=ji.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ji.dirname(this.path):void 0}set dirname(e){Zi(this.basename,"dirname"),this.path=ji.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ji.extname(this.path):void 0}set extname(e){if(Ki(e,"extname"),Zi(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ji.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){qi(e)&&(e=Wi(e)),Ji(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ji.basename(this.path,this.extname):void 0}set stem(e){Ji(e,"stem"),Ki(e,"stem"),this.path=ji.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Nr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Ki(e,t){if(e&&e.includes(ji.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ji.sep+"`")}function Ji(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Zi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const $i=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ea={}.hasOwnProperty;class ta extends $i{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zi()}copy(){const e=new ta;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Fi(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Aa("data",this.frozen),this.namespace[e]=t,this):ea.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Aa("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=sa(e),n=this.parser||this.Parser;return ra("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ra("process",this.parser||this.Parser),oa("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const A=sa(e),i=n.parse(A);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,A,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,A=n.stringify(o,r);var i;"string"==typeof(i=A)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=A:r.result=A,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),ra("processSync",this.parser||this.Parser),oa("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Ni(e),t=r})),aa("processSync","process",n),t}run(e,t,n){ia(e),this.freeze();const r=this.transformers;return!n&&"function"==typeof t&&(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,A){const i=sa(t);r.run(e,i,(function(t,r,i){const a=r||e;t?A(t):o?o(a):n(void 0,a,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Ni(e),n=t,r=!0})),aa("runSync","run",r),n}stringify(e,t){this.freeze();const n=sa(t),r=this.compiler||this.Compiler;return oa("stringify",r),ia(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Aa("use",this.frozen),null!=e)if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):A(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else A(e)}}function A(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=Fi(!0,r.settings,e.settings))}function i(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...A]=t;const i=n[o][1];Ui(i)&&Ui(r)&&(r=Fi(!0,i,r)),n[o]=[e,r,...A]}}}}const na=(new ta).freeze();function ra(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function oa(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Aa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ia(e){if(!Ui(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function aa(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sa(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Xi(e)}const la=[],ca={allowDangerousHtml:!0},ua=/^(https?|ircs?|mailto|xmpp)$/i,da=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function pa(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,A=e.components,i=e.disallowedElements,a=e.rehypePlugins||la,s=e.remarkPlugins||la,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ca}:ca,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||fa,p=na().use(JA).use(s).use(Li,l).use(a),f=new Xi;"string"==typeof r&&(f.value=r);for(const t of da)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const y=p.parse(f);let b=p.runSync(y,f);return o&&(b={type:"element",tagName:"div",properties:{className:o},children:"root"===b.type?b.children:[b]}),ki(b,(function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return c?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in to)if(Object.hasOwn(to,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=to[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let A=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!A&&n&&"number"==typeof r&&(A=!n(e,r,o)),A&&o&&"number"==typeof r)return u&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),Gr(b,{Fragment:m,components:A,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0})}function fa(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||ua.test(e.slice(0,t))?e:""}const ha=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(pa,{components:{p:({...e})=>h("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>h("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>h("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>h("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?h("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):h("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:h("code",{children:t})}),blockquote:({...e})=>h("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),ga={autoConfig:!0},ma=e=>()=>(e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:A}=rn(),i={...e,...ga},a=i.markdownComponent?i.markdownComponent:ha;s((()=>{var e,t;if(A){const A=[...n];for(let n=0;n<A.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=A[n];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(A)}}),[A]);const l=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();((e,t,n)=>{var r;if("string"!=typeof e.data.message.content||!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderMarkdown)?void 0:r.map((e=>e.toUpperCase())).includes(n))??!1)})(e,t(),r)&&(e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};tn(K.PRE_INJECT_MESSAGE,l),tn(K.CHUNK_STREAM_MESSAGE,l),tn(K.START_STREAM_MESSAGE,l),tn(K.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return null!=i&&i.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),ya={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},ba=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const A=o[n];return"function"==typeof A?A:void 0},va=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=ct();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=$t(),{styles:r,updateStyles:o,replaceStyles:A}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=jt();return{styles:e,replaceStyles:t,updateStyles:n}})(),l=(e=>({...ya,...e,promptBaseColors:{...ya.promptBaseColors},promptHoveredColors:{...ya.promptHoveredColors},textAreaHighlightColors:{...ya.textAreaHighlightColors}}))(e),[c,u]=a(0),d=i({});tn(K.USER_SUBMIT_TEXT,(e=>{const A=e,i=ba(A,n(),"validateTextInput");if(!i)return;const a=i(A.data.inputText);if(null!=a&&a.success||e.preventDefault(),!a.promptContent)return;0===c&&(d.current=structuredClone(r));const s=((e,t)=>{const n=e.promptType??"info";let r={};return t.advancedStyles&&(r=t.advancedStyles[n]),t.promptBaseColors&&(r.toastPromptStyle={color:t.promptBaseColors[n],borderColor:t.promptBaseColors[n]}),t.promptHoveredColors&&(r.toastPromptHoveredStyle={color:t.promptHoveredColors[n],borderColor:t.promptHoveredColors[n]}),t.textAreaHighlightColors&&(e.highlightTextArea??!0)&&(r.chatInputAreaStyle={boxShadow:`${t.textAreaHighlightColors[n]} 0px 0px 5px`}),r})(a,l);o(s),t(a.promptContent,a.promptDuration??3e3),u((e=>e+1))})),tn(K.USER_UPLOAD_FILE,(e=>{var r,o;const A=e,i=null==(o=null==(r=A.data)?void 0:r.files)?void 0:o[0];if(!i)return console.error("No file uploaded."),void e.preventDefault();const a=ba(A,n(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(i);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&t(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)})),tn(K.DISMISS_TOAST,(()=>{u((e=>e-1))})),s((()=>{0===c&&setTimeout((()=>{A(d.current)}))}),[c,A]);const p={name:"@rcb-plugins/input-validator"};return l.autoConfig&&(p.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),p},wa=[];for(let e=0;e<256;++e)wa.push((e+256).toString(16).slice(1));let xa;const Ea=new Uint8Array(16);var Pa={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ka(e,t,n){if(Pa.randomUUID&&!e)return Pa.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!xa){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");xa=crypto.getRandomValues.bind(crypto)}return xa(Ea)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(wa[e[t+0]]+wa[e[t+1]]+wa[e[t+2]]+wa[e[t+3]]+"-"+wa[e[t+4]]+wa[e[t+5]]+"-"+wa[e[t+6]]+wa[e[t+7]]+"-"+wa[e[t+8]]+wa[e[t+9]]+"-"+wa[e[t+10]]+wa[e[t+11]]+wa[e[t+12]]+wa[e[t+13]]+wa[e[t+14]]+wa[e[t+15]]).toLowerCase()}(r)}const Ba={LOGIN_URL:"/login",WELCOME_MESSAGE:"Hello! What can I help you with?",WELCOME_MESSAGE_LOGGED_OUT:"To ask questions, please log in.",WELCOME_MESSAGE_LOGIN_TRANSITION:"Welcome! You are now logged in. What can I help you with?",WELCOME_MESSAGE_LOGOUT_TRANSITION:"You have been logged out.",API_ENDPOINT:"https://access-ai.ccs.uky.edu/api/query",netlifyBaseUrl:"undefined"!=typeof process&&process.env?process.env.REACT_APP_NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",ERRORS:{API_UNAVAILABLE:"Unable to contact the Q&A Bot. Please try again later."},BEHAVIOR:{SHOW_RATING_AFTER_FAILED_QUERY:!0},THEME:{PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",FONT_FAMILY:"Arial, sans-serif"},CHATBOT:{TITLE:"ACCESS Q&A",AVATAR_URL:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",TOOLTIP_TEXT:"Ask me about ACCESS! 😊"}},Da=(e,t)=>t||Ba.WELCOME_MESSAGE,Ca=t.forwardRef((({embedded:e,isBotLoggedIn:t,currentOpen:n},r)=>{const o=en(),A=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=re();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),a=i(n),l=i(!1);return(e=>{const t=i(e),{injectMessage:n}=en();s((()=>{const r=t.current!==e,o=!t.current&&e;r&&n(o?Ba.WELCOME_MESSAGE_LOGIN_TRANSITION:Ba.WELCOME_MESSAGE_LOGOUT_TRANSITION,"bot"),t.current=e}),[e,n])})(t),s((()=>{!e&&A&&A.toggleChatWindow&&(a.current===n||l.current||A&&A.toggleChatWindow&&(A.toggleChatWindow(n),a.current=n),l.current=!1)}),[n,e,A]),s((()=>{const e=()=>{l.current=!0};r&&(r.current||(r.current={}),r.current._markAsUserInteraction=e)})),p(r,(()=>({addMessage:e=>{o&&o.injectMessage&&o.injectMessage(e)}})),[o]),null}));Ca.displayName="BotController";const Sa=r(),Ia=({children:e})=>{const[n,r]=a({}),[o,A]=a({}),i={ticketForm:n,feedbackForm:o,updateTicketForm:e=>{r((t=>({...t,...e})))},updateFeedbackForm:e=>{A((t=>({...t,...e})))},resetTicketForm:()=>{r({})},resetFeedbackForm:()=>{A({})},setTicketForm:r,setFeedbackForm:A};return t.createElement(Sa.Provider,{value:i},e)},Ta=()=>{const e=o(Sa);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e},Qa=({width:e=24,height:n=24,color:r="currentColor",children:o,...A})=>t.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:e,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},A),o),Ma=e=>t.createElement(Qa,e,t.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),Oa=()=>{const{restartFlow:e}=$t(),{resetTicketForm:n,resetFeedbackForm:r}=Ta();return t.createElement("button",{onClick:()=>{n(),r(),e()},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"#107180",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:e=>{e.target.style.backgroundColor="#0d5f6b"},onMouseLeave:e=>{e.target.style.backgroundColor="#107180"}},t.createElement(Ma,{width:16,height:16}),"New Chat")},La=()=>t.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"#1a5b6e",marginRight:"5px"},role:"img","aria-label":"User logged in",title:"User logged in"},t.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},t.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),t.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Na=({loginUrl:e,className:n="",style:r,isHeaderButton:o=!1})=>{const A=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:"0.8",transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid #107180",color:"#107180",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return t.createElement(t.Fragment,null,o&&t.createElement("style",null,"\n .rcb-chat-header-container .qa-bot-header-login-button:hover {\n background-color: #0000001a !important;\n opacity: 1 !important;\n }\n "),t.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:{...A,...r}},"Log In"))},Ha=(e,t,n)=>{const r=()=>{try{const e=localStorage.getItem("rcb-history");if(!e)return null;const t=JSON.parse(e);if(!Array.isArray(t))return null;let n=null,r=null;for(const e of t)if("USER"===e.sender){const t=new Date(e.timestamp).getTime();(!r||t>r)&&(r=t,n=e)}return n?n.id:null}catch(e){return console.warn("Error parsing chat history:",e),null}};return A((async o=>{const{userInput:A}=o,i=r();i&&n(i);const a={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":i};try{const e={method:"POST",headers:a,body:JSON.stringify({query:A})},t=await fetch(Ba.API_ENDPOINT,e),n=(await t.json()).response;return await o.streamMessage(n),!0}catch(e){return await o.injectMessage(Ba.ERRORS.API_UNAVAILABLE),!1}}),[e,n,r,t])},Ra=()=>(s((()=>{const e=e=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(e.key))return;const n=document.activeElement;if(n&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"true"===n.contentEditable||n.classList.contains("rcb-chat-input-textarea")))return;const r=document.querySelector(".rcb-chat-window");if(!r)return;const o=Array.from(r.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter((e=>null!==e.offsetParent));if(o.length>0){const t=o[o.length-1].querySelector(".rcb-checkbox-container");if(t&&null!==t.offsetParent){const n=Array.from(t.querySelectorAll(".rcb-checkbox-row-container")),r=t.querySelector(".rcb-checkbox-next-button");if(n.length>0){const t=[...n];return r&&t.push(r),void((e,t)=>{e.preventDefault();let n=-1;for(let e=0;e<t.length;e++)if(t[e]===document.activeElement||t[e].contains(document.activeElement)){n=e;break}-1===n&&(n=0);let r=n;switch(e.key){case"ArrowDown":case"ArrowRight":r=n<t.length-1?n+1:0;break;case"ArrowUp":case"ArrowLeft":r=n>0?n-1:t.length-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;case"Enter":case" ":{const e=t[n],r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void e.dispatchEvent(r)}default:return}t[r].focus(),t[r].setAttribute("tabindex","0"),t[r].classList.add("keyboard-focused"),t.forEach(((e,t)=>{t!==r&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}))})(e,t)}}}let A=[];if(o.length>0){const e=o[o.length-1],t=Array.from(e.querySelectorAll(".rcb-options-container")).filter((e=>null!==e.offsetParent));if(t.length>0){const e=t[t.length-1];A=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===A.length)return;const i=A.findIndex((e=>e===document.activeElement));switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=i<A.length-1?i+1:0,A[t].setAttribute("tabindex","0"),A.forEach(((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[t].classList.add("keyboard-focused"),A[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=i>0?i-1:A.length-1,A[t].setAttribute("tabindex","0"),A.forEach(((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[t].classList.add("keyboard-focused"),A[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&A.includes(document.activeElement)){const e=document.activeElement;if(e.classList.contains("rcb-checkbox-row-container")||e.closest(".rcb-checkbox-row-container")){const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.querySelector(".rcb-checkbox-label"),o=r?r.textContent:e.textContent||"checkbox",A=e.querySelector(".rcb-checkbox-mark"),i=A&&A.style.backgroundColor?"checked":"unchecked";t(`${o} ${i}`)}else{const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.textContent||e.innerText;t(`Selected: ${r}`)}}break;case"Home":e.preventDefault(),A.length>0&&(A[0].setAttribute("tabindex","0"),A.forEach(((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[0].classList.add("keyboard-focused"),A[0].focus());break;case"End":if(e.preventDefault(),A.length>0){const e=A.length-1;A[e].setAttribute("tabindex","0"),A.forEach(((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))})),A[e].classList.add("keyboard-focused"),A[e].focus()}}},t=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout((()=>{document.body.contains(t)&&document.body.removeChild(t)}),1e3)},n=(e=null)=>{let n=e;if(n||(n=document.querySelector(".rcb-chat-window"),n||(n=document.querySelector('[class*="rcb-chat"]')),n||(n=document.querySelector(".qa-bot"))),!n)return;const r=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter((e=>null!==e.offsetParent));if(0===r.length)return;const o=r[r.length-1],A=Array.from(o.querySelectorAll(".rcb-options-container")).filter((e=>null!==e.offsetParent));let i=[];if(A.length>0){const e=A[A.length-1];i=Array.from(e.querySelectorAll(".rcb-options"))}if(0===i.length){let e=o.querySelector(".rcb-checkbox-container");if(!e&&n&&(e=n.querySelector(".rcb-checkbox-container")),e&&null!==e.offsetParent){const t=Array.from(e.querySelectorAll(".rcb-checkbox-row-container")).filter((e=>null!==e.offsetParent&&"none"!==e.style.display));if(t.length>0){const n=e.querySelector(".rcb-checkbox-next-button"),r=[...t];if(n&&null!==n.offsetParent&&r.push(n),r.forEach(((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")})),t.length>1){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()));const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}return void setTimeout((()=>{r[0]&&null!==r[0].offsetParent&&r[0].focus()}),150)}}}if(i.length>0){if(i.forEach(((e,t)=>{const n=0===t?"0":"-1";e.setAttribute("tabindex",n),e.setAttribute("role","option"),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",i.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")})),i.length>1){const e=A.length>0?A[A.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()));const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}}else{const e=A.length>0?A[A.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()))}}setTimeout((()=>{i[0]&&null!==i[0].offsetParent&&(i[0].focus(),i.length>1&&t(`${i.length} options available. Use arrow keys to navigate.`))}),200)}},r=new MutationObserver((e=>{e.forEach((e=>{if("childList"===e.type){const t=Array.from(e.addedNodes),r=t.some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-options-container")||e.classList?.contains("rcb-options")||e.querySelector?.(".rcb-options-container")||e.querySelector?.(".rcb-options")))),o=t.some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-checkbox-container")||e.querySelector?.(".rcb-checkbox-container"))));if(r||o){let t=e.target;for(;t&&!t.classList?.contains("qa-bot")&&!t.classList?.contains("rcb-chat-window");)t=t.parentElement;(t||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach((e=>{e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused")})),setTimeout((()=>n(t)),100)}}}))}));r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval((()=>{document.querySelectorAll(".qa-bot").forEach((e=>{const t=e.querySelectorAll(".rcb-options-container .rcb-options").length>0,r=e.querySelectorAll(".rcb-checkbox-row-container").length>0;if(t){const t=e.querySelectorAll(".rcb-options[tabindex]").length;e.querySelectorAll(".rcb-options").length>t&&n(e)}if(r){const t=e.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;e.querySelectorAll(".rcb-checkbox-row-container").length>t&&n(e)}}))}),1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}}),[]),null),_a=({fetchAndStreamResponse:e,sessionId:t,currentQueryId:n,apiKey:r})=>({go_ahead_and_ask:{message:"Please type your question.",path:"qa_loop"},qa_loop:{message:async t=>{try{return await e(t),"Was this helpful?"}catch(e){return console.error("Error in bot flow:",e),(e=>(console.error("Bot error:",e),e&&e.error||Error,Ba.ERRORS.API_UNAVAILABLE))(e)}},renderMarkdown:["BOT"],options:["👍 Yes","👎 No"],chatDisabled:!1,function:async e=>{if(("👍 Yes"===e.userInput||"👎 No"===e.userInput)&&r&&t){const o="👍 Yes"===e.userInput,A={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":r,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o?1:0};try{await fetch(`${Ba.API_ENDPOINT}/rating`,{method:"POST",headers:A})}catch(e){console.error("Error sending feedback:",e)}}},path:e=>"👍 Yes"===e.userInput?"qa_positive_feedback":"👎 No"===e.userInput?"qa_negative_feedback":"qa_loop"},qa_positive_feedback:{message:"Thank you for your feedback! It helps us improve this tool.",transition:{duration:1e3},path:"go_ahead_and_ask"},qa_negative_feedback:{message:"Sorry that wasn't useful. Would you like to open a help ticket for assistance?",options:["Open a help ticket","Ask another question"],chatDisabled:!0,path:e=>"Open a help ticket"===e.userInput?"help_ticket":"qa_continue"},qa_continue:{message:"Ask another question, but remember that each question must stand alone.",path:"qa_loop"}}),Fa=e=>t.createElement(Qa,e,t.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.createElement("polyline",{points:"17 8 12 3 7 8"}),t.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Ua=({onFileUpload:e})=>{const[n,r]=a(!1),[o,A]=a([]),[s,l]=a(null),c=i(null),{captureScreenshot:u,isCapturing:d,isScreenCaptureAvailable:p}=(()=>{const[e,t]=a(!1),n=()=>"undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",logicalSurface:!0,width:{ideal:1920},height:{ideal:1080}},audio:!1}),n=document.createElement("video");n.srcObject=e,await new Promise((e=>{n.onloadedmetadata=()=>{n.play(),e()}}));const r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight,r.getContext("2d").drawImage(n,0,0,r.width,r.height);const o=await new Promise((e=>r.toBlob(e,"image/png"))),A=(new Date).toISOString().replace(/[:.]/g,"-"),i=new File([o],`screenshot-${A}.png`,{type:"image/png"});return e.getTracks().forEach((e=>e.stop())),t(!1),i}catch(e){throw console.error("Error capturing screenshot:",e),t(!1),e}},isCapturing:e,isScreenCaptureAvailable:n()}})(),f=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout((()=>document.body.removeChild(t)),1e3)},h=t=>{if(!t||!t.length||0===t.length)return void console.warn("FileUploadComponent: No valid files provided to handleFiles");let n;try{n=Array.from(t)}catch(e){return console.error("FileUploadComponent: Error converting files to array:",e),void f("Error processing selected files. Please try again.")}const r=[...o,...n];A(r);const i=n.length,a=n.map((e=>e.name)).join(", ");f(`${i} file${i>1?"s":""} selected: ${a}`),setTimeout((()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)}),100),e&&e(r)},g=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?r(!0):"dragleave"===e.type&&r(!1)},m=()=>{try{c.current&&c.current.click()}catch(e){console.error("FileUploadComponent: Error in handleButtonClick:",e),f("Error opening file selection dialog. Please try again.")}},y=()=>{l(null)};return t.createElement("div",{className:"file-upload-container",style:{padding:"16px",margin:"8px 0"}},p&&t.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},t.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await u();h([e]),f("Screenshot captured successfully")}catch(e){f("Error capturing screenshot. Please try again.")}})()},disabled:d,"aria-describedby":"screenshot-help","aria-label":d?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:d?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),t.createElement("circle",{cx:"12",cy:"13",r:"4"})),d?"Taking screenshot...":"Take screenshot..."),t.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),t.createElement("div",{className:"file-upload-dropzone "+(n?"active":""),onDragEnter:g,onDragLeave:g,onDragOver:g,onDrop:e=>{e.preventDefault(),e.stopPropagation(),r(!1);try{e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&h(e.dataTransfer.files)}catch(e){console.error("FileUploadComponent: Error in handleDrop:",e),f("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:n?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},t.createElement("input",{ref:c,type:"file",className:"file-input",onChange:e=>{try{e.target&&e.target.files&&e.target.files.length>0&&h(e.target.files)}catch(e){console.error("FileUploadComponent: Error in handleFileSelect:",e),f("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:"image/*,application/pdf,text/*,.doc,.docx"}),t.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},t.createElement(Fa,null),t.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),t.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. Accepted: Images, PDFs, Text files (Max 10MB each)")),o.length>0&&t.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},t.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),o.map(((n,r)=>t.createElement("span",{key:r,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),(e=>{l(e)})(n)}},t.createElement("span",{onClick:t=>{t.stopPropagation(),(t=>{const n=o.filter(((e,n)=>n!==t));A(n),e&&e(n)})(r)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${n.name}`},"×"),n.name," (",(n.size/1024).toFixed(1)," KB)")))))),(()=>{if(!s)return null;const e=s.type.startsWith("image/"),n=s.type.startsWith("text/"),r="application/pdf"===s.type;return t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:y},t.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:y,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),t.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},s.name),e&&t.createElement("img",{src:URL.createObjectURL(s),alt:s.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&t.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(s)),r&&t.createElement("iframe",{src:URL.createObjectURL(s),style:{width:"100%",height:"70vh",border:"none"},title:s.name}),!e&&!n&&!r&&t.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())},za=async(e,t="support",n=[])=>{const r=17,o={support:r,general_help:r,feedback:r,loginAccess:30,loginProvider:31,security:26},A={serviceDeskId:"security"===t?3:2,requestTypeId:o[t]||o.support,requestFieldValues:{...e}};if(n&&n.length>0){const e=await Promise.all(n.map((async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const n=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:n})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)})))));A.attachments=e}return A},ja=async(e,t)=>{const n=Ba.netlifyBaseUrl.replace("/.netlify/functions/","").replace("/.netlify/functions","");let r;r="create-support-ticket"===t?`${n}/api/v1/tickets`:"create-security-incident"===t?`${n}/api/v1/security-incidents`:`${Ba.netlifyBaseUrl}/${t}`;try{const t=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e="";try{const n=await t.text();console.error("| ❌ Post data to proxy failed:",t.status,n);try{const t=JSON.parse(n);e=t.message||t.error||n}catch{e=n}}catch{e=`HTTP ${t.status} ${t.statusText}`}return 403===t.status?e="The ticket service is temporarily unavailable. Please try again later or contact support directly.":404===t.status?e="Ticket service not found. Please try again later.":500===t.status?e="Server error. Please try again later.":401===t.status&&(e="Authentication error with the ticket service. Please contact support."),{success:!1,status:t.status,error:e}}return{success:!0,data:await t.json()}}catch(e){return console.error("| ❌ Post data to proxy exception:",e),{success:!1,error:e.message}}},Ga=(e,n)=>t.createElement(Ua,{onFileUpload:t=>e({...n||{},uploadedFiles:t})}),Ya=e=>{let t=null;return{submitTicket:async(n,r,o=[])=>{try{const A=await za(n,r,o),i=await ja(A,"create-support-ticket");i.success?(t={success:!0,ticketKey:i.data.data.ticketKey,ticketUrl:i.data.data.ticketUrl},e((e=>({...e,ticketKey:i.data.data.ticketKey,ticketUrl:i.data.data.ticketUrl})))):(console.error(`| ❌ ${r} ticket creation failed:`,i),t={success:!1,error:i.error||"Unknown error"},e((e=>({...e,submissionError:i.error||"Unknown error"}))))}catch(n){console.error(`| ❌ Error sending ${r} data to proxy:`,n),t={success:!1,error:n.message},e((e=>({...e,submissionError:n.message})))}},getSubmissionResult:()=>t}},qa=(e,t="ticket")=>e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`Your ${t} has been submitted successfully.\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`We apologize, but there was an error submitting your ${t}: ${e.error||"Unknown error"}\n\nPlease try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.\n\nPlease try again or contact our support team directly.`,Wa=e=>e&&e.length>0?`\nAttachments: ${e.length} file(s) attached`:"";let Va=null;const Xa=()=>{if(!Va)return console.warn("Form context not available, returning empty form"),{};const e=Va.ticketForm;return e&&"object"==typeof e?e:{}},Ka=(e={})=>{const t=Xa()||{},n=e&&"object"==typeof e?e:{};return{...t,email:n.email||t.email,name:n.name||t.name,accessId:n.accessId||t.accessId}},Ja=()=>e=>(e&&""!==e.trim()||setTimeout((()=>{const e=document.querySelector(".rcb-chat-input-textarea");if(e){e.value="Not provided";const t=new Event("input",{bubbles:!0});e.dispatchEvent(t),setTimeout((()=>{const e=document.querySelector('.rcb-send-button, .rcb-chat-send-button, [aria-label*="send"], button[type="submit"]');if(e){const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}}),200)}}),100),{success:!0}),Za=e=>e&&""!==e.trim()?e:"Not provided",$a=e=>{const t=e?.trim()||"";return t?(e=>!(!e||"string"!=typeof e)&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.trim()))(t)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address (e.g., user@example.com).",promptDuration:3e3,promptType:"error",highlightTextArea:!0}:{success:!1,promptContent:"Please enter an email address.",promptDuration:3e3,promptType:"error",highlightTextArea:!0}},es=({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const r=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Ya(t);return{access_help:{message:"If you're having trouble logging into the ACCESS website, here are some common issues:\n\n• Make sure you're using a supported browser (Chrome, Firefox, Safari)\n• Clear your browser cookies and cache\n• Check if you're using the correct identity provider\n\nWould you like to submit a help ticket for ACCESS login issues?",options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,path:e=>"Yes, let's create a ticket"===e.userInput?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:e=>{const r=Xa(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,identityProvider:e.userInput})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,browser:e.userInput})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"access_login_upload":(()=>{const e=Ka(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"})()},access_login_upload:{message:"Please upload your screenshot.",component:Ga(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Xa();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ka(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:e=>$a(e),function:e=>{const n=Xa();t({...n,email:e.userInput})},path:()=>{const e=Ka(n);return e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:e=>{const n=Xa();t({...n,name:e.userInput})},path:()=>Ka(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Ja(),function:e=>{const n=Xa();t({...n,accessId:Za(e.userInput)})},path:"access_login_summary"},access_login_summary:{message:e=>{const t=Xa(),r=Ka(n),o=Wa(t.uploadedFiles);let A=r.accessId;return"access_login_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"access_login_accessid"!==e.prevPath||(A=e.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nIdentity Provider: ${t.identityProvider||"Not provided"}\nBrowser: ${t.browser||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT","USER"],function:async e=>{if("Submit Ticket"===e.userInput){const e=Xa(),t=Ka(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",description:e.description||"",identityProvider:e.identityProvider||"",browser:e.browser||""};await r(o,"loginAccess",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"access_login_success":"start"},access_login_success:{message:()=>qa(o(),"ACCESS login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),o=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Ya(t);return{affiliated_help:{message:'If you\'re having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:\n\n• Ensure your allocation is active\n• Confirm you have the correct username for that resource\n• Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance\n\nWould you like to submit a help ticket for resource provider login issues?',options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:e=>"Yes, let's create a ticket"===e.userInput?"affiliated_login_resource":"start"},affiliated_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,resource:e.userInput})},path:"affiliated_login_userid"},affiliated_login_userid:{message:"What is your user ID at the resource?",function:e=>{const n=Xa();t({...n,userIdResource:e.userInput})},path:"affiliated_login_description"},affiliated_login_description:{message:"Please describe the issue you're having logging in.",function:e=>{const r=Xa(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"affiliated_login_attachment"},affiliated_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"affiliated_login_upload":(()=>{const e=Ka(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"})()},affiliated_login_upload:{message:"Please upload your screenshot.",component:Ga(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Xa();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ka(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"}},affiliated_login_email:{message:"What is your email?",validateTextInput:e=>$a(e),function:e=>{const n=Xa();t({...n,email:e.userInput})},path:()=>{const e=Ka(n);return e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name"}},affiliated_login_name:{message:"What is your name?",function:e=>{const n=Xa();t({...n,name:e.userInput})},path:()=>Ka(n).accessId?"affiliated_login_summary":"affiliated_login_accessid"},affiliated_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Ja(),function:e=>{const n=Xa();t({...n,accessId:Za(e.userInput)})},path:"affiliated_login_summary"},affiliated_login_summary:{message:e=>{const t=Xa(),r=Ka(n),o=Wa(t.uploadedFiles);let A=r.accessId;return"affiliated_login_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"affiliated_login_accessid"!==e.prevPath||(A=e.userInput),`Thank you for providing your resource login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nResource: ${t.resource||"Not provided"}\nResource User ID: ${t.userIdResource||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Xa(),t=Ka(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",accessResource:e.resource||"",description:e.description||"",userIdAtResource:e.userIdResource||""};await r(o,"loginProvider",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"affiliated_login_success":"start"},affiliated_login_success:{message:()=>qa(o(),"resource login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),A=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Ya(t);return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:e=>{const r=Xa(),o={...r,summary:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,category:e.userInput})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:e=>{const n=Xa();t({...n,description:e.userInput})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:Ga(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Xa();t({...e,uploadConfirmed:!0})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,involvesResource:e.userInput.toLowerCase()})},path:e=>"Yes"===e.userInput?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,resourceDetails:e.userInput})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:Ja(),function:e=>{const n=Xa();t({...n,userIdAtResource:Za(e.userInput)})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],min:0,max:5},chatDisabled:!0,function:e=>{const n=Xa();t({...n,keywords:e.userInput})},path:e=>e.userInput&&e.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:e=>{const n=Xa(),r=n.keywords||[],o=e.userInput,A=Array.isArray(r)?[...r]:r.split(",").map((e=>e.trim())),i=A.filter((e=>"I don't see a relevant keyword"!==e)),a=Array.isArray(i)&&i.length>0?[...i,o].join(", "):o;t({...n,keywords:a,suggestedKeyword:o})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,priority:e.userInput.toLowerCase()})},path:()=>n.email?n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"},general_help_email:{message:"What is your email address?",validateTextInput:e=>$a(e),function:e=>{const n=Xa();t({...n,email:e.userInput})},path:()=>n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"},general_help_name:{message:"What is your name?",function:e=>{const n=Xa();t({...n,name:e.userInput})},path:()=>n.accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",required:!1,function:e=>{const n=Xa();t({...n,accessId:e.userInput||""})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:e=>{const t=Xa(),r=Ka(n),o=Wa(t.uploadedFiles);let A=r.accessId;"general_help_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"general_help_accessid"!==e.prevPath||(A=e.userInput);let i="";return"yes"===t.involvesResource&&(i=`\nResource: ${t.resourceDetails||"Not specified"}`,t.userIdAtResource&&(i+=`\nUser ID at Resource: ${t.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nIssue Summary: ${t.summary||"Not provided"}\nCategory: ${t.category||"Not provided"}\nPriority: ${t.priority||"Not provided"}\nKeywords: ${t.keywords||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${i}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Xa(),t=Ka(n),o={email:t.email||"",summary:e.summary||"General Support Ticket",description:e.description||"",priority:e.priority||"medium",accessId:t.accessId||"",name:t.name||"",issueType:e.category||"",hasResourceProblem:"yes"===e.involvesResource?"Yes":"No",userIdAtResource:e.userIdAtResource||"",resourceName:e.resourceDetails||"",keywords:e.keywords||"",noRelevantKeyword:e.suggestedKeyword?"checked":"",suggestedKeyword:e.suggestedKeyword||""};await r(o,"support",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"general_help_success":"start"},general_help_success:{message:()=>qa(o(),"support ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],chatDisabled:!0,function:n=>{t({...e||{},ticketType:n.userInput})},path:e=>"Logging into ACCESS website"===e.userInput?"access_help":"Logging into a resource"===e.userInput?"affiliated_help":"Another question"===e.userInput?"general_help_summary_subject":"help_ticket"},...r,...o,...A}},ts=({setTicketForm:e=()=>{},userInfo:n={}})=>{let r=null,o=null;return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:t=>{const r=Xa()||{},o={...r,summary:t.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};e(o)},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],chatDisabled:!0,function:t=>{const n=Xa()||{};e({...n,priority:t.userInput})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:t=>{const n=Xa()||{};e({...n,description:t.userInput})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],chatDisabled:!0,function:t=>{const n=Xa()||{};e({...n,wantsAttachment:t.userInput})},path:e=>"Yes"===e.userInput?"security_upload":"security_contact_info"},security_upload:{message:"Please upload your files.",component:t.createElement(Ua,{onFileUpload:t=>{const n=Xa()||{};e({...n,uploadedFiles:t})}}),options:["Continue"],chatDisabled:!0,function:()=>{const t=Xa()||{};e({...t,uploadConfirmed:!0})},path:"security_contact_info"},security_contact_info:{message:()=>{const e=Ka(n);return e.name&&e.email&&e.accessId?`I have your contact information:\n\nName: ${e.name}\nEmail: ${e.email}\nACCESS ID: ${e.accessId}\n\nIs this correct?`:"I need your contact information. What is your name?"},options:e=>{if(!e)return[];const t=Ka(n);return t.name&&t.email&&t.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:e=>{if(!e)return!1;const t=Ka(n);return t.name&&t.email&&t.accessId},function:t=>{if(!t)return;const n=Xa()||{};if(!n.name){const r={...n,name:t.userInput};e(r)}},path:e=>{if(!e)return"security_summary";const t=Ka(n);return"Yes, that's correct"===e.userInput?"security_summary":"Let me update it"===e.userInput?"security_name":t.name&&t.email?t.accessId?"security_summary":"security_accessid":"security_email"}},security_name:{message:"What is your name?",function:t=>{const n=Xa()||{};e({...n,name:t.userInput})},path:"security_email"},security_email:{message:"What is your email address?",function:t=>{const n=Xa()||{};e({...n,email:t.userInput})},path:"security_accessid"},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Ja(),function:t=>{const n=Za(t.userInput);r=n;const o=Xa()||{};e({...o,accessId:n})},path:"security_summary"},security_summary:{message:()=>{const e=Xa()||{},t=Ka(n),o={...e,name:t.name||e.name,email:t.email||e.email,accessId:r||t.accessId||e.accessId};let A="";e.uploadedFiles&&e.uploadedFiles.length>0&&(A=`\nAttachments: ${e.uploadedFiles.length} file(s) attached`);const i=o.accessId||"Not provided";return`Here's a summary of your security incident report:\n\nSummary: ${o.summary||"Not provided"}\nPriority: ${o.priority||"Not provided"}\nName: ${o.name||"Not provided"}\nEmail: ${o.email||"Not provided"}\nACCESS ID: ${i}\nDescription: ${o.description||"Not provided"}${A}\n\nWould you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],chatDisabled:!0,function:async t=>{if("Submit Security Report"===t.userInput){const t=Xa()||{},A=Ka(n),i={...t,name:A.name||t.name,email:A.email||t.email,accessId:r||A.accessId||t.accessId},a={summary:i.summary||"",priority:i.priority||"",description:i.description||"",name:i.name||"",email:i.email||"",accessId:i.accessId||""};try{const n=await(async(e,t=[])=>{try{const n=await za(e,"security",t);return await ja(n,"create-security-incident")}catch(e){return console.error("| ❌ Security incident submission failed:",e),{success:!1,error:e.message}}})(a,t.uploadedFiles||[]);n.success?(o={success:!0,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl},e((e=>({...e,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl,submissionResult:o})))):(o={success:!1,error:n.error},e((e=>({...e,submissionError:n.error}))))}catch(t){o={success:!1,error:t.message},e((e=>({...e,submissionError:t.message})))}}},path:e=>"Submit Security Report"===e.userInput?"security_success":"start"},security_success:{message:()=>(e=>e&&!e.success?`We apologize, but there was an error submitting your security incident report: ${e.error}\n\nPlease try again or contact our cybersecurity team directly.`:e&&e.success&&e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`:(e&&e.success,"Your security incident report has been submitted successfully.\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure."))((Xa()||{}).submissionResult||o),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}};function ns({welcomeMessage:e,isBotLoggedIn:n,loginUrl:r,handleQuery:o,hasQueryError:A,sessionId:i,currentQueryId:a,ticketForm:s={},setTicketForm:l=()=>{},formContext:c,apiKey:u,userInfo:d={}}){c&&(e=>{Va=e})(c);const p=(({welcome:e,setTicketForm:t=()=>{},setFeedbackForm:n=()=>{}})=>({start:{message:e,options:["Ask a question about ACCESS","Open a Help Ticket","Report a security issue"],chatDisabled:!0,path:e=>"Ask a question about ACCESS"===e.userInput?"go_ahead_and_ask":"Open a Help Ticket"===e.userInput?(t({}),"help_ticket"):"Report a security issue"===e.userInput?(t({}),"security_incident"):"start"}}))({welcome:Da(0,e),setTicketForm:l});return{...p||{},...(n?_a({fetchAndStreamResponse:o,sessionId:i,currentQueryId:a,apiKey:u}):{go_ahead_and_ask:{message:"To ask questions, you need to log in first.",component:t.createElement(Na,{loginUrl:r}),options:["Back to Main Menu"],chatDisabled:!0,path:e=>"Back to Main Menu"===e.userInput?"start":"go_ahead_and_ask"}})||{},...es({ticketForm:s,setTicketForm:l,userInfo:d})||{},...ts({ticketForm:s,setTicketForm:l,userInfo:d})||{},...n&&{loop:{message:async e=>{await o(e)},renderMarkdown:["BOT"],path:()=>A?"start":"loop"}}}}var rs="2.6.0-debug.1";"true"===localStorage.getItem("QaBotDebug")&&console.info("%c🤖 ACCESS QA Bot | v".concat(rs," | react-chatbotify v2.2.0 [").concat((new Date).toISOString().slice(0,10),"]"),"background: #107180; color: white; padding: 8px; border-radius: 3px; font-weight: bold;");const os=()=>{for(let e=0;e<localStorage.length;e++){const t=localStorage.key(e);if(t&&t.startsWith("qa_bot_session_")){const e=localStorage.getItem(t);if(e)return e}}const e="qa_bot_session_".concat(ka());return localStorage.setItem(e,e),e},As=t.forwardRef(((e,n)=>{const{apiKey:r,open:o=!1,onOpenChange:A,embedded:c=!1,isLoggedIn:u,loginUrl:d=Ba.LOGIN_URL,ringEffect:p=!1,welcome:f,userEmail:h,userName:g,accessId:m}=e,y=r||("undefined"!=typeof process&&process.env?process.env.REACT_APP_API_KEY:null),[b,v]=a(void 0!==u&&u),x=i(os()).current,[E,P]=a(null),{ticketForm:k,feedbackForm:B,updateTicketForm:D,updateFeedbackForm:C,resetTicketForm:S,resetFeedbackForm:I}=Ta();s((()=>{void 0!==u&&v(u)}),[u]),s((()=>{if(!c&&A){const e=e=>{n&&n.current&&n.current._markAsUserInteraction&&n.current._markAsUserInteraction();const t=e.data.newState;A(t)};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}}),[c,A,n]);const T=Da(0,f),Q=i(null),M=((e,t={})=>l((()=>{const n=(t,n)=>{if(e.current){const n=getComputedStyle(e.current).getPropertyValue(t);if(n&&""!==n.trim())return n.trim();if(e.current.parentElement){const n=getComputedStyle(e.current.parentElement).getPropertyValue(t);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:n("--primary-color",t.primaryColor||Ba.THEME.PRIMARY_COLOR),secondaryColor:n("--secondary-color",t.secondaryColor||Ba.THEME.SECONDARY_COLOR),fontFamily:n("--font-family",t.fontFamily||Ba.THEME.FONT_FAMILY)}}),[e,t]))(Q),O=(({themeColors:e,embedded:n,defaultOpen:r,isLoggedIn:o,loginUrl:A})=>{const i=o,a=sessionStorage.getItem("qa_bot_tooltip_shown")?"NEVER":"START";return l((()=>({general:{...e,embedded:n,primaryColor:e.primaryColor,fontFamily:"Arial, sans-serif",secondaryColor:e.secondaryColor},header:{title:t.createElement("div",{key:"header-title"},t.createElement("h1",{className:"sr-only"},Ba.CHATBOT.TITLE),t.createElement("span",{"aria-hidden":"true"},Ba.CHATBOT.TITLE)),avatar:Ba.CHATBOT.AVATAR_URL,buttons:[i?t.createElement(La,{key:"user-icon"}):t.createElement(Na,{key:"login-button",loginUrl:A,isHeaderButton:!0}),w.CLOSE_CHAT_BUTTON]},chatWindow:{defaultOpen:!!n||r},chatInput:{enabledPlaceholderText:"Type your question here...",disabledPlaceholderText:"",disabled:!1,allowNewline:!0,sendButtonStyle:{display:"flex"},characterLimit:1e3,sendButtonAriaLabel:"Send message",showCharacterCount:!1,ariaLabel:"Chat input area",ariaDescribedBy:"chat-input-help"},chatHistory:{disabled:!1},botBubble:{simulateStream:!0,streamSpeed:10,allowNewline:!0,dangerouslySetInnerHTML:!0,renderHtml:!0,ariaLabel:"Bot response",role:"log"},chatButton:{icon:Ba.CHATBOT.AVATAR_URL},tooltip:{text:Ba.CHATBOT.TOOLTIP_TEXT,mode:a},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0},notification:{disabled:!0},footer:{text:t.createElement("div",{key:"footer-text"},t.createElement("a",{href:"https://support.access-ci.org/tools/access-qa-tool"},"About this tool"),"."),buttons:[t.createElement(Oa,{key:"new-chat-button"})]},event:{rcbToggleChatWindow:!0}})),[e,n,r,i,a,A])})({themeColors:M,embedded:c,defaultOpen:o,isLoggedIn:b,loginUrl:d}),L=Ha(y,x,P),N=l((()=>({ticketForm:k||{},feedbackForm:B||{},updateTicketForm:D,updateFeedbackForm:C,resetTicketForm:S,resetFeedbackForm:I})),[k,B,D,C,S,I]),H=[()=>Mn(_),ma(),()=>va(R)];var R,_;const F=l((()=>ns({welcomeMessage:T,isBotLoggedIn:b,loginUrl:d,handleQuery:L,sessionId:x,currentQueryId:E,ticketForm:k,setTicketForm:D,formContext:N,apiKey:y,userInfo:{email:h||null,name:g||null,accessId:m||null}})),[T,b,d,L,x,E,k,B,D,C,N,y,h,g,m]);return((e,t)=>{s((()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))}),[e,t])})(b,Q),((e,t)=>{s((()=>{if(!e||!t.current)return;const n=setTimeout((()=>{const e=t.current?.querySelector(".rcb-tooltip-show");e&&e.classList.add("phone-ring")}),500);return()=>{clearTimeout(n)}}),[e,t])})(p,Q),s((()=>{const e=()=>{const e=document.querySelector(".rcb-chat-window");if(!e)return;const t=e.querySelector(".rcb-send-button");t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("data-keyboard-enabled")||(t.setAttribute("data-keyboard-enabled","true"),t.addEventListener("keydown",(e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const n=t&&Object.keys(t).find((e=>e.startsWith("__reactProps")));if(n){const r=t[n],o=r?.onMouseDown;if(o&&"function"==typeof o)return void o(e)}const r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(r)}}))))},t=setInterval(e,1e3);return e(),()=>clearInterval(t)}),[]),Ra(),s((()=>{const e=()=>{sessionStorage.setItem("qa_bot_tooltip_shown","true")};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}),[]),t.createElement("div",{className:"qa-bot ".concat(c?"embedded-qa-bot":""),ref:Q,role:"region","aria-label":"Ask ACCESS tool"},t.createElement(Wt,null,t.createElement("main",{role:"main","aria-label":"Chat interface"},t.createElement(Ca,{ref:n,embedded:c,isBotLoggedIn:b,currentOpen:o}),t.createElement(Jt,{key:"chatbot-".concat(x,"-").concat(b),settings:O,flow:F,plugins:H}),t.createElement("div",{"aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region"}),t.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."),t.createElement("div",{id:"keyboard-help",className:"sr-only"},"Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs."))))}));As.displayName="QABotInternal";const is=t.forwardRef(((e,n)=>t.createElement(Ia,null,t.createElement(As,b({},e,{ref:n})))));is.displayName="QABot";v('.rcb-toggle-icon{background-color:initial!important;background-position:calc(50% - 1px) calc(50% + 2px);background-repeat:no-repeat;background-size:62%!important}.rcb-chat-window{max-height:600px;max-width:100%;width:550px!important}.rcb-chat-window .rcb-bot-avatar{background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:0}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:#107180}.rcb-chat-window .rcb-bot-message a{color:#fff;text-decoration:none}.rcb-chat-window .rcb-bot-message a:hover{text-decoration:underline}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-tooltip-show.phone-ring{animation:phone-ring 3s ease-out!important;z-index:10000!important}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:#107180!important;border-color:#107180!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:#107180!important;outline:none!important}.rcb-options:active{background-color:#107180!important;border-color:#107180!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:#107180!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=access-qa-tool]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}',{insertAt:"top"});const as=t.forwardRef(((e,n)=>{const[r,o]=t.useState(e.isLoggedIn||!1),[A,i]=t.useState(e.defaultOpen||!1),a=t.useRef();return t.useImperativeHandle(n,(()=>({addMessage:e=>{a.current&&a.current.addMessage(e)},setBotIsLoggedIn:e=>{o(e)},openChat:()=>{!e.embedded&&a.current&&i(!0)},closeChat:()=>{!e.embedded&&a.current&&i(!1)},toggleChat:()=>{!e.embedded&&a.current&&i((e=>!e))}})),[e.embedded]),t.createElement(is,{ref:a,apiKey:e.apiKey,embedded:e.embedded,isLoggedIn:r,open:!!e.embedded||A,onOpenChange:e.embedded?void 0:i,loginUrl:e.loginUrl,ringEffect:e.ringEffect,welcome:e.welcome,userEmail:e.userEmail,userName:e.userName,accessId:e.accessId})}));function ss(e){if(!(e.target&&e.target instanceof HTMLElement))return void console.error("QA Bot: A valid target DOM element is required");const n=f.createRoot(e.target),r={current:null};return n.render(t.createElement(t.StrictMode,null,t.createElement(as,{ref:e=>{r.current=e},apiKey:e.apiKey,defaultOpen:e.defaultOpen,embedded:e.embedded,isLoggedIn:e.isLoggedIn,loginUrl:e.loginUrl,ringEffect:e.ringEffect,welcome:e.welcome,userEmail:e.userEmail,userName:e.userName,accessId:e.accessId}))),{addMessage:e=>{var t;return null===(t=r.current)||void 0===t?void 0:t.addMessage(e)},setBotIsLoggedIn:e=>{var t;return null===(t=r.current)||void 0===t?void 0:t.setBotIsLoggedIn(e)},openChat:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{r.current=null,n.unmount()}}}as.displayName="ProgrammaticQABot";export{is as QABot,ss as default,ss as qaBot};
|
|
8
|
+
*/var gn,mn;const yn=hn(function(){if(mn)return gn;mn=1;var e=/["'&<>]/;return gn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,A="",i=0,a=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}a!==i&&(A+=n.substring(a,i)),a=i+1,A+=o}return a!==i?A+n.substring(a,i):A}}());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const vn=/(url|image|image-set)\(/i;class wn extends fn{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(vn)&&delete t[e]})),t}}const xn=/^<(!doctype|(html|head|body)(\s|>))/i,En=/^(aria-|data-|\w+:)/iu,Pn=/{{{(\w+)\/?}}}/;function kn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}class Bn{constructor(e,t={},n=[],r=[]){var o;if(bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),"production"!==process.env.NODE_ENV&&e&&"string"!=typeof e)throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new wn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:ln),this.banned=new Set(sn),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t),t)}applyNodeFilters(e,t){return this.filters.reduce(((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t),t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,A=0,i=null;return this.matchers.forEach((e=>{const a=e.asTag().toLowerCase(),s=this.getTagConfig(a);if(r[e.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,s))return;let l="";for(;o&&(i=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=i,p=e.propName+String(A);t>0&&(l+=o.slice(0,t)),c?(l+=u?`{{{${p}/}}}`:`{{{${p}}}}${s}{{{/${p}}}}`,this.keyIndex+=1,A+=1,n[p]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):l+=s,e.greedy?(o=l+o.slice(t+a),l=""):o=o.slice(t+(a||s.length))}e.greedy||(o=l+o)})),0===A?e:this.replaceTokens(o,n)}canRenderChild(e,t){return!(!e.tagName||!t.tagName||e.void)&&(e.children.length>0?e.children.includes(t.tagName):!(e.invalid.length>0&&e.invalid.includes(t.tagName))&&(t.parent.length>0?t.parent.includes(e.tagName):!(!e.self&&e.tagName===t.tagName)&&!!(e&&e.content&t.type)))}convertLineBreaks(e){const{noHtml:t,disableLineBreaks:n}=this.props;if(t||n||e.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return e;let r=e.replace(/\r\n/g,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||kn)();if(!n)return;const r=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",o="body"===r||"fragment"===r?n.body:n.createElement(r);if(e.match(xn)){if("production"!==process.env.NODE_ENV)throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?yn(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes&&([...e.attributes].forEach((o=>{const{name:A,value:i}=o,a=A.toLowerCase(),s=cn[a]||cn[A];if(!this.isSafe(e)||!a.match(En)&&(!t&&(!s||2===s)||a.startsWith("on")||i.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l="style"===a?this.extractStyleAttribute(e):i;4===s?l=!0:3===s?l=Number.parseFloat(String(l)):5!==s&&(l=String(l)),n[un[a]||a]=this.applyAttributeFilters(a,l),r+=1})),0!==r)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach((n=>{const r=e.style[n];("string"==typeof r||"number"==typeof r)&&(t[n.replace(/-([a-z])/g,((e,t)=>String(t).toUpperCase()))]=r)})),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return an[e]?{...t,...an[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}return!0}isTagAllowed(e){return!this.banned.has(e)&&!this.blocked.has(e)&&(this.props.allowElements||this.allowed.has(e))}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(e,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:A,transform:i,transformOnlyAllowList:a}=this.props;let s=[],l="";return[...e.childNodes].forEach((e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),d=this.getTagConfig(u);l&&(s.push(l),l="");const p=this.applyNodeFilters(u,e);if(!p)return;let f;if(i&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;f=this.parseNode(p,d);const n=i(p,f,d);if(null===n)return;if(typeof n<"u")return void s.push(t.cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!A&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(p,d.tagName?d:n)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(p),n={tagName:u};e&&(n.attributes=e),d.void&&(n.selfClose=d.void),s.push(t.createElement(pn,{...n,key:this.keyIndex},null!==(c=f)&&void 0!==c?c:this.parseNode(p,d)))}}else if(3===e.nodeType){const t=r&&!o?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?s=[...s,...t]:l+=t}})),l&&s.push(l),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(Pn);){const[e,A]=o,i=o.index,a=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[A])throw new Error(`Token "${A}" found but no matching element to replace with.`);i>0&&(n.push(r.slice(0,i)),r=r.slice(i));const{children:s,matcher:l,props:c}=t[A];let u;if(a)u=e.length,n.push(l.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${A}}}}`));if("production"!==process.env.NODE_ENV&&!o)throw new Error(`Closing token missing for interpolated element "${A}".`);u=o.index+o[0].length,n.push(l.createElement(this.replaceTokens(r.slice(e.length,o.index),t),c))}r=r.slice(u)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}}function Dn(e){var n;const{attributes:r,className:o,containerTagName:A,content:i,emptyContent:a,parsedContent:s,tagName:l,noWrap:c}=e,u=null!==(n=A??l)&&void 0!==n?n:"span",d="fragment"===u||c;let p;if(s)p=s;else{const t=new Bn(i??"",e).parse();t.length>0&&(p=t)}return p||(p=a),d?t.createElement(t.Fragment,null,p):t.createElement(pn,{attributes:r,className:o,tagName:u},p)}function Cn(e){const{attributes:n,className:r,content:o="",disableFilters:A=!1,disableMatchers:i=!1,emptyContent:a=null,filters:s=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:p=!1,...f}=e,h=i?[]:l,g=A?[]:s,m=u?[u]:[],y=c?[c]:[];h.forEach((e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&y.push(e.onAfterParse.bind(e))}));const b=m.reduce(((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r}),o??""),v=new Bn(b,f,h,g),w=y.reduce(((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&!Array.isArray(r))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return r}),v.parse());return t.createElement(Dn,{attributes:n,className:r,containerTagName:e.containerTagName,emptyContent:a,noWrap:p,parsedContent:0===w.length?void 0:w,tagName:d})}const Sn=({children:e})=>h(Cn,{content:"string"==typeof e?e:""}),In={autoConfig:!0},Tn=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderHtml)?void 0:r.map((e=>e.toUpperCase())).includes(n))??!1)},Qn=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const A=e[o];"<"===A?r?(t.push(n),n=A):(r=!0,n=A):">"===A?(n+=A,t.push(n),n="",r=!1):r?n+=A:t.push(A)}return""!==n&&t.push(n),t},Mn=e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:A}=rn(),i={...e,...In},a=i.htmlComponent?i.htmlComponent:Sn;s((()=>{var e,t;if(A){const A=[...n];for(let n=0;n<A.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=A[n];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(A)}}),[A]);const l=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&Tn(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=Qn),e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};tn(K.PRE_INJECT_MESSAGE,l),tn(K.CHUNK_STREAM_MESSAGE,l),tn(K.START_STREAM_MESSAGE,l),tn(K.START_SIMULATE_STREAM_MESSAGE,l),tn(K.START_SPEAK_AUDIO,(async e=>{Tn(e,t(),"BOT")&&(e.data.textToRead=(e=>typeof window.DOMParser<"u"?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e.replace(/<\/?[^>]+(>|$)/g,""))(e.data.textToRead))}));const c={name:"@rcb-plugins/html-renderer"};return null!=i&&i.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ln=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nn={};function Hn(e,t){return(Nn.jsx?Ln:On).test(e)}const Rn=/[ \t\n\f\r]/g;function _n(e){return""===e.replace(Rn,"")}class Fn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Un(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new Fn(n,r,t)}function zn(e){return e.toLowerCase()}Fn.prototype.property={},Fn.prototype.normal={},Fn.prototype.space=null;class jn{constructor(e,t){this.property=e,this.attribute=t}}jn.prototype.space=null,jn.prototype.boolean=!1,jn.prototype.booleanish=!1,jn.prototype.overloadedBoolean=!1,jn.prototype.number=!1,jn.prototype.commaSeparated=!1,jn.prototype.spaceSeparated=!1,jn.prototype.commaOrSpaceSeparated=!1,jn.prototype.mustUseProperty=!1,jn.prototype.defined=!1;let Gn=0;const Yn=Zn(),qn=Zn(),Wn=Zn(),Vn=Zn(),Xn=Zn(),Kn=Zn(),Jn=Zn();function Zn(){return 2**++Gn}const $n=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yn,booleanish:qn,commaOrSpaceSeparated:Jn,commaSeparated:Kn,number:Vn,overloadedBoolean:Wn,spaceSeparated:Xn},Symbol.toStringTag,{value:"Module"})),er=Object.keys($n);class tr extends jn{constructor(e,t,n,r){let o=-1;if(super(e,t),nr(this,"space",r),"number"==typeof n)for(;++o<er.length;){const e=er[o];nr(this,er[o],(n&$n[e])===$n[e])}}}function nr(e,t,n){n&&(e[t]=n)}tr.prototype.defined=!0;const rr={}.hasOwnProperty;function or(e){const t={},n={};let r;for(r in e.properties)if(rr.call(e.properties,r)){const o=e.properties[r],A=new tr(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(A.mustUseProperty=!0),t[r]=A,n[zn(r)]=r,n[zn(A.attribute)]=r}return new Fn(t,n,e.space)}const Ar=or({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ir=or({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ar(e,t){return t in e?e[t]:t}function sr(e,t){return ar(e,t.toLowerCase())}const lr=or({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:sr,properties:{xmlns:null,xmlnsXLink:null}}),cr=or({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:qn,ariaAutoComplete:null,ariaBusy:qn,ariaChecked:qn,ariaColCount:Vn,ariaColIndex:Vn,ariaColSpan:Vn,ariaControls:Xn,ariaCurrent:null,ariaDescribedBy:Xn,ariaDetails:null,ariaDisabled:qn,ariaDropEffect:Xn,ariaErrorMessage:null,ariaExpanded:qn,ariaFlowTo:Xn,ariaGrabbed:qn,ariaHasPopup:null,ariaHidden:qn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xn,ariaLevel:Vn,ariaLive:null,ariaModal:qn,ariaMultiLine:qn,ariaMultiSelectable:qn,ariaOrientation:null,ariaOwns:Xn,ariaPlaceholder:null,ariaPosInSet:Vn,ariaPressed:qn,ariaReadOnly:qn,ariaRelevant:null,ariaRequired:qn,ariaRoleDescription:Xn,ariaRowCount:Vn,ariaRowIndex:Vn,ariaRowSpan:Vn,ariaSelected:qn,ariaSetSize:Vn,ariaSort:null,ariaValueMax:Vn,ariaValueMin:Vn,ariaValueNow:Vn,ariaValueText:null,role:null}}),ur=or({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:sr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kn,acceptCharset:Xn,accessKey:Xn,action:null,allow:null,allowFullScreen:Yn,allowPaymentRequest:Yn,allowUserMedia:Yn,alt:null,as:null,async:Yn,autoCapitalize:null,autoComplete:Xn,autoFocus:Yn,autoPlay:Yn,blocking:Xn,capture:null,charSet:null,checked:Yn,cite:null,className:Xn,cols:Vn,colSpan:null,content:null,contentEditable:qn,controls:Yn,controlsList:Xn,coords:Vn|Kn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yn,defer:Yn,dir:null,dirName:null,disabled:Yn,download:Wn,draggable:qn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yn,formTarget:null,headers:Xn,height:Vn,hidden:Yn,high:Vn,href:null,hrefLang:null,htmlFor:Xn,httpEquiv:Xn,id:null,imageSizes:null,imageSrcSet:null,inert:Yn,inputMode:null,integrity:null,is:null,isMap:Yn,itemId:null,itemProp:Xn,itemRef:Xn,itemScope:Yn,itemType:Xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yn,low:Vn,manifest:null,max:null,maxLength:Vn,media:null,method:null,min:null,minLength:Vn,multiple:Yn,muted:Yn,name:null,nonce:null,noModule:Yn,noValidate:Yn,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:Yn,optimum:Vn,pattern:null,ping:Xn,placeholder:null,playsInline:Yn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yn,referrerPolicy:null,rel:Xn,required:Yn,reversed:Yn,rows:Vn,rowSpan:Vn,sandbox:Xn,scope:null,scoped:Yn,seamless:Yn,selected:Yn,shadowRootClonable:Yn,shadowRootDelegatesFocus:Yn,shadowRootMode:null,shape:null,size:Vn,sizes:null,slot:null,span:Vn,spellCheck:qn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Vn,step:null,style:null,tabIndex:Vn,target:null,title:null,translate:null,type:null,typeMustMatch:Yn,useMap:null,value:qn,width:Vn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xn,axis:null,background:null,bgColor:null,border:Vn,borderColor:null,bottomMargin:Vn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yn,declare:Yn,event:null,face:null,frame:null,frameBorder:null,hSpace:Vn,leftMargin:Vn,link:null,longDesc:null,lowSrc:null,marginHeight:Vn,marginWidth:Vn,noResize:Yn,noHref:Yn,noShade:Yn,noWrap:Yn,object:null,profile:null,prompt:null,rev:null,rightMargin:Vn,rules:null,scheme:null,scrolling:qn,standby:null,summary:null,text:null,topMargin:Vn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Vn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Yn,disableRemotePlayback:Yn,prefix:null,property:null,results:Vn,security:null,unselectable:null}}),dr=or({space:"svg",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"},transform:ar,properties:{about:Jn,accentHeight:Vn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Vn,amplitude:Vn,arabicForm:null,ascent:Vn,attributeName:null,attributeType:null,azimuth:Vn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Vn,by:null,calcMode:null,capHeight:Vn,className:Xn,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:Vn,diffuseConstant:Vn,direction:null,display:null,dur:null,divisor:Vn,dominantBaseline:null,download:Yn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Vn,enableBackground:null,end:null,event:null,exponent:Vn,externalResourcesRequired:null,fill:null,fillOpacity:Vn,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:Kn,g2:Kn,glyphName:Kn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Vn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Vn,horizOriginX:Vn,horizOriginY:Vn,id:null,ideographic:Vn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Vn,k:Vn,k1:Vn,k2:Vn,k3:Vn,k4:Vn,kernelMatrix:Jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Vn,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:Vn,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:Vn,overlineThickness:Vn,paintOrder:null,panose1:null,path:null,pathLength:Vn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Vn,pointsAtY:Vn,pointsAtZ:Vn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jn,rev:Jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jn,requiredFeatures:Jn,requiredFonts:Jn,requiredFormats:Jn,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:Vn,specularExponent:Vn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Vn,strikethroughThickness:Vn,string:null,stroke:null,strokeDashArray:Jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Vn,strokeOpacity:Vn,strokeWidth:null,style:null,surfaceScale:Vn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jn,tabIndex:Vn,tableValues:null,target:null,targetX:Vn,targetY:Vn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Vn,underlineThickness:Vn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Vn,values:null,vAlphabetic:Vn,vMathematical:Vn,vectorEffect:null,vHanging:Vn,vIdeographic:Vn,version:null,vertAdvY:Vn,vertOriginX:Vn,vertOriginY:Vn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Vn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pr=/^data[-\w.:]+$/i,fr=/-[a-z]/g,hr=/[A-Z]/g;function gr(e){return"-"+e.toLowerCase()}function mr(e){return e.charAt(1).toUpperCase()}const yr={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"},br=Un([ir,Ar,lr,cr,ur],"html"),vr=Un([ir,Ar,lr,cr,dr],"svg");function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xr,Er,Pr,kr={};var Br=function(){if(Pr)return kr;Pr=1;var e=kr&&kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0}),kr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),A="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;A?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(Er)return xr;Er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,A=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function l(e){return e?e.replace(a,s):s}return xr=function(a,c){if("string"!=typeof a)throw new TypeError("First argument must be a string");if(!a)return[];c=c||{};var u=1,d=1;function p(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:u,column:d};return function(t){return t.position=new h(e),y(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=a,!c.silent)throw t}function m(e){var t=e.exec(a);if(t){var n=t[0];return p(n),a=a.slice(n.length),t}}function y(){m(n)}function b(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var e=f();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var t=2;s!=a.charAt(t)&&("*"!=a.charAt(t)||"/"!=a.charAt(t+1));)++t;if(t+=2,s===a.charAt(t-1))return g("End of comment missing");var n=a.slice(2,t-2);return d+=2,p(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function w(){var t=f(),n=m(r);if(n){if(v(),!m(o))return g("property missing ':'");var a=m(A),c=t({type:"declaration",property:l(n[0].replace(e,s)),value:a?l(a[0].replace(e,s)):s});return m(i),c}}return h.prototype.content=a,y(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()},xr}());return kr}();const Dr=wr(Br),Cr=Dr.default||Dr,Sr=Tr("end"),Ir=Tr("start");function Tr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Qr(e){return e&&"object"==typeof e?"position"in e||"type"in e?Or(e.position):"start"in e||"end"in e?Or(e):"line"in e||"column"in e?Mr(e):"":""}function Mr(e){return Lr(e&&e.line)+":"+Lr(e&&e.column)}function Or(e){return Mr(e&&e.start)+"-"+Mr(e&&e.end)}function Lr(e){return e&&"number"==typeof e?e:1}class Nr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},A=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(A=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const i=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=i?i.line:void 0,this.name=Qr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=A&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Nr.prototype.file="",Nr.prototype.name="",Nr.prototype.reason="",Nr.prototype.message="",Nr.prototype.stack="",Nr.prototype.column=void 0,Nr.prototype.line=void 0,Nr.prototype.ancestors=void 0,Nr.prototype.cause=void 0,Nr.prototype.fatal=void 0,Nr.prototype.place=void 0,Nr.prototype.ruleId=void 0,Nr.prototype.source=void 0;const Hr={}.hasOwnProperty,Rr=new Map,_r=/[A-Z]/g,Fr=/-([a-z])/g,Ur=new Set(["table","tbody","thead","tfoot","tr"]),zr=new Set(["td","th"]),jr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,A){const i=Array.isArray(o.children),a=Ir(n);return t(r,o,A,i,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,A){const i=Array.isArray(o.children)?n:t;return A?i(r,o,A):i(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?vr:br,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},A=Yr(o,e,void 0);return A&&"string"!=typeof A?A:o.create(e,o.Fragment,{children:A||void 0},void 0)}function Yr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=vr,e.schema=o),e.ancestors.push(t);const A=Kr(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Hr.call(t.properties,o)){const A=Xr(e,o,t.properties[o]);if(A){const[o,i]=A;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&zr.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Vr(e,t);return Ur.has(t.tagName)&&(a=a.filter((function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&_n(e.value):_n(e)}(e)}))),qr(e,i,A,t),Wr(i,a),e.ancestors.pop(),e.schema=r,e.create(t,A,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Jr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=vr,e.schema=o),e.ancestors.push(t);const A=null===t.name?e.Fragment:Kr(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const A=o.properties[0];A.type,Object.assign(n,e.evaluater.evaluateExpression(A.argument))}else Jr(e,t.position);else{const o=r.name;let A;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,A=e.evaluater.evaluateExpression(t.expression)}else Jr(e,t.position);else A=null===r.value||r.value;n[o]=A}return n}(e,t),a=Vr(e,t);return qr(e,i,A,t),Wr(i,a),e.ancestors.pop(),e.schema=r,e.create(t,A,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Wr(r,Vr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function qr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Vr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Rr;for(;++r<t.children.length;){const A=t.children[r];let i;if(e.passKeys){const e="element"===A.type?A.tagName:"mdxJsxFlowElement"===A.type||"mdxJsxTextElement"===A.type?A.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const a=Yr(e,A,i);void 0!==a&&n.push(a)}return n}function Xr(e,t,n){const r=function(e,t){const n=zn(t);let r=t,o=jn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&pr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(fr,mr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!fr.test(e)){let n=e.replace(hr,gr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=tr}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{Cr(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Nr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=jr+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(Fr,$r)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Hr.call(e,n)&&(t[Zr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?yr[r.property]||r.property:r.attribute,n]}}function Kr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Hn(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:!(!o||"Literal"!==t.type),optional:!1}:t}r=n}else r=Hn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Hr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jr(e)}function Jr(e,t){const n=new Nr("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=jr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Zr(e){let t=e.replace(_r,eo);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function $r(e,t){return t.toUpperCase()}function eo(e){return"-"+e.toLowerCase()}const to={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"]},no={};function ro(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return oo(e.children,t,n)}return Array.isArray(e)?oo(e,t,n):""}function oo(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ro(e[o],t,n);return r.join("")}const Ao=document.createElement("i");function io(e){const t="&"+e+";";Ao.innerHTML=t;const n=Ao.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function ao(e,t,n,r){const o=e.length;let A,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)A=Array.from(r),A.unshift(t,n),e.splice(...A);else for(n&&e.splice(t,n);i<r.length;)A=r.slice(i,i+1e4),A.unshift(t,0),e.splice(...A),i+=1e4,t+=1e4}function so(e,t){return e.length>0?(ao(e,e.length,0,t),e):t}const lo={}.hasOwnProperty;function co(e){const t={};let n=-1;for(;++n<e.length;)uo(t,e[n]);return t}function uo(e,t){let n;for(n in t){const r=(lo.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let A;if(o)for(A in o){lo.call(r,A)||(r[A]=[]);const e=o[A];po(r[A],Array.isArray(e)?e:e?[e]:[])}}}function po(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ao(e,0,0,r)}function fo(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function ho(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const go=Co(/[A-Za-z]/),mo=Co(/[\dA-Za-z]/),yo=Co(/[#-'*+\--9=?A-Z^-~]/);function bo(e){return null!==e&&(e<32||127===e)}const vo=Co(/\d/),wo=Co(/[\dA-Fa-f]/),xo=Co(/[!-/:-@[-`{-~]/);function Eo(e){return null!==e&&e<-2}function Po(e){return null!==e&&(e<0||32===e)}function ko(e){return-2===e||-1===e||32===e}const Bo=Co(new RegExp("\\p{P}|\\p{S}","u")),Do=Co(/\s/);function Co(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function So(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const A=e.charCodeAt(n);let i="";if(37===A&&mo(e.charCodeAt(n+1))&&mo(e.charCodeAt(n+2)))o=2;else if(A<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(A))||(i=String.fromCharCode(A));else if(A>55295&&A<57344){const t=e.charCodeAt(n+1);A<56320&&t>56319&&t<57344?(i=String.fromCharCode(A,t),o=1):i="�"}else i=String.fromCharCode(A);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Io(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let A=0;return function(r){return ko(r)?(e.enter(n),i(r)):t(r)};function i(r){return ko(r)&&A++<o?(e.consume(r),i):(e.exit(n),t(r))}}const To={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Io(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Eo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Qo={tokenize:function(e){const t=this,n=[];let r,o,A,i=0;return a;function a(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,s,l)(r)}return l(r)}function s(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let o,A=n;for(;A--;)if("exit"===t.events[A][0]&&"chunkFlow"===t.events[A][1].type){o=t.events[A][1].end;break}m(i);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return ao(t.events,A+1,0,t.events.slice(n)),t.events.length=a,l(e)}return a(e)}function l(o){if(i===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return f(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mo,c,u)(o)}function c(e){return r&&y(),m(i),d(e)}function u(e){return t.parser.lazy[t.now().line]=i!==n.length,A=t.now().offset,f(e)}function d(n){return t.containerState={},e.attempt(Mo,p,f)(n)}function p(e){return i++,n.push([t.currentConstruct,t.containerState]),d(e)}function f(n){return null===n?(r&&y(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):Eo(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<A&&(!r.events[e][1].end||r.events[e][1].end.offset>A))return;const n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(i),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;ao(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Mo={tokenize:function(e,t,n){return Io(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Oo(e){return null===e||Po(e)||Do(e)?1:Bo(e)?2:void 0}function Lo(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const A=e[o].resolveAll;A&&!r.includes(A)&&(t=A(t,n),r.push(A))}return t}const No={name:"attention",resolveAll:function(e,t){let n,r,o,A,i,a,s,l,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;a=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;const u={...e[n][1].end},d={...e[c][1].start};Ho(u,-a),Ho(d,a),A={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},i={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},o={type:a>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:a>1?"strong":"emphasis",start:{...A.start},end:{...i.end}},e[n][1].end={...A.start},e[c][1].start={...i.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=so(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=so(s,[["enter",r,t],["enter",A,t],["exit",A,t],["enter",o,t]]),s=so(s,Lo(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=so(s,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,s=so(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,ao(e,n-1,c-n+3,s),c=n+s.length-l-2;break}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Oo(r);let A;return function(t){return A=t,e.enter("attentionSequence"),i(t)};function i(a){if(a===A)return e.consume(a),i;const s=e.exit("attentionSequence"),l=Oo(a),c=!l||2===l&&o||n.includes(a),u=!o||2===o&&l||n.includes(r);return s._open=!!(42===A?c:c&&(o||!u)),s._close=!!(42===A?u:u&&(l||!c)),t(a)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ro={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return go(t)?(e.consume(t),A):64===t?n(t):s(t)}function A(e){return 43===e||45===e||46===e||mo(e)?(r=1,i(e)):s(e)}function i(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||mo(t))&&r++<32?(e.consume(t),i):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||bo(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),l):yo(t)?(e.consume(t),s):n(t)}function l(e){return mo(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,l):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||mo(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const _o={partial:!0,tokenize:function(e,t,n){return function(t){return ko(t)?Io(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Eo(e)?t(e):n(e)}}};const Fo={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return ko(t)?Io(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(Fo,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return ko(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Uo={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return xo(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const zo={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,A,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,A=mo,l(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,A=wo,l):(e.enter("characterReferenceValue"),o=7,A=vo,l(t))}function l(a){if(59===a&&i){const o=e.exit("characterReferenceValue");return A!==mo||io(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return A(a)&&i++<o?(e.consume(a),l):n(a)}}};const jo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Go={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),ko(t)?Io(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===A?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===A?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),ko(t)?Io(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Eo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let A,i=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,A=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===A?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),ko(t)?Io(e,l,"whitespace")(t):l(t))}function l(n){return null===n||Eo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(jo,p,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):ko(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Io(e,u,"whitespace")(t)):96===t&&t===A?n(t):(e.consume(t),c)}function u(t){return null===t||Eo(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===A?n(t):(e.consume(t),d)}function p(t){return e.attempt(o,y,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return i>0&&ko(t)?Io(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||Eo(t)?e.check(jo,p,y)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function y(n){return e.exit("codeFenced"),t(n)}}};const Yo={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Io(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?A(e):n(e)}function A(t){return null===t?a(t):Eo(t)?e.attempt(qo,A,a)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),A(t)):(e.consume(t),i)}function a(n){return e.exit("codeIndented"),t(n)}}},qo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Io(e,A,"linePrefix",5)(t)}function A(e){const A=r.events[r.events.length-1];return A&&"linePrefix"===A[1].type&&A[2].sliceSerialize(A[1],!0).length>=4?t(e):Eo(e)?o(e):n(e)}}};const Wo={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,A=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),A++,i):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,l(t)):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Eo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function l(n){return 96===n?(e.consume(n),r++,l):r===A?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Vo{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Xo(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Xo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xo(this.left,t.reverse())}}}function Xo(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 Ko(e){const t={};let n,r,o,A,i,a,s,l=-1;const c=new Vo(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(n=c.get(l),l&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(l-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Jo(c,l)),l=t[l],s=!0);else if(n[1]._container){for(o=l,r=void 0;o--;)if(A=c.get(o),"lineEnding"===A[1].type||"lineEndingBlank"===A[1].type)"enter"===A[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),A[1].type="lineEnding",r=o);else if("linePrefix"!==A[1].type)break;r&&(n[1].end={...c.get(r)[1].start},i=c.slice(r,l),i.unshift(n),c.splice(r,l-r+1,i))}}return ao(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function Jo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const A=[],i=n._tokenizer||r.parser[n.contentType](n.start),a=i.events,s=[],l={};let c,u,d=-1,p=n,f=0,h=0;const g=[h];for(;p;){for(;e.get(++o)[1]!==p;);A.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),u&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=p,p=p.next}for(p=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=A.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)l[f+s[d][0]]=f+s[d][1],f+=s[d][1]-s[d][0]-1;return l}const Zo={resolve:function(e){return Ko(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Eo(t)?e.check($o,A,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function A(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},$o={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Io(e,o,"linePrefix")};function o(o){if(null===o||Eo(o))return n(o);const A=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&A&&"linePrefix"===A[1].type&&A[2].sliceSerialize(A[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function eA(e,t,n,r,o,A,i,a,s){const l=s||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(A),e.consume(t),e.exit(A),u):null===t||32===t||41===t||bo(t)?n(t):(e.enter(r),e.enter(i),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function u(n){return 62===n?(e.enter(A),e.consume(n),e.exit(A),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||Eo(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function f(o){return c||null!==o&&41!==o&&!Po(o)?c<l&&40===o?(e.consume(o),c++,f):41===o?(e.consume(o),c--,f):null===o||32===o||40===o||bo(o)?n(o):(e.consume(o),92===o?h:f):(e.exit("chunkString"),e.exit(a),e.exit(i),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function tA(e,t,n,r,o,A){const i=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(A),l};function l(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):93===u?(e.exit(A),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):Eo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Eo(t)||s++>999?(e.exit("chunkString"),l(t)):(e.consume(t),a||(a=!ko(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function nA(e,t,n,r,o,A){let i;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,a):n(t)};function a(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(A),s(n))}function s(t){return t===i?(e.exit(A),a(i)):null===t?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Io(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===i||null===t||Eo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:l)}function c(t){return t===i||92===t?(e.consume(t),l):l(t)}}function rA(e,t){let n;return function r(o){return Eo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ko(o)?Io(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const oA={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return tA.call(r,e,A,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function A(t){return o=ho(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return Po(t)?rA(e,a)(t):a(t)}function a(t){return eA(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(AA,l,l)(t)}function l(t){return ko(t)?Io(e,c,"whitespace")(t):c(t)}function c(A){return null===A||Eo(A)?(e.exit("definition"),r.parser.defined.push(o),t(A)):n(A)}}},AA={partial:!0,tokenize:function(e,t,n){return function(t){return Po(t)?rA(e,r)(t):n(t)};function r(t){return nA(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return ko(t)?Io(e,A,"whitespace")(t):A(t)}function A(e){return null===e||Eo(e)?t(e):n(e)}}};const iA={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Eo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const aA={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,A=3;return"whitespace"===e[A][1].type&&(A+=2),o-2>A&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(A===o-1||o-4>A&&"whitespace"===e[o-2][1].type)&&(o-=A+1===o?2:4),o>A&&(n={type:"atxHeadingText",start:e[A][1].start,end:e[o][1].end},r={type:"chunkText",start:e[A][1].start,end:e[o][1].end,contentType:"text"},ao(e,A,o-A+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Po(t)?(e.exit("atxHeadingSequence"),A(t)):n(t)}function A(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Eo(n)?(e.exit("atxHeading"),t(n)):ko(n)?Io(e,A,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),A(t))}function a(t){return null===t||35===t||Po(t)?(e.exit("atxHeadingText"),A(t)):(e.consume(t),a)}}};const sA=["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"],lA=["pre","script","style","textarea"],cA={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){const r=this;let o,A,i,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),A=!0,p):63===a?(e.consume(a),o=3,r.interrupt?t:O):go(a)?(e.consume(a),i=String.fromCharCode(a),f):n(a)}function c(A){return 45===A?(e.consume(A),o=2,u):91===A?(e.consume(A),o=5,a=0,d):go(A)?(e.consume(A),o=4,r.interrupt?t:O):n(A)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const A="CDATA[";return o===A.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:B:d):n(o)}function p(t){return go(t)?(e.consume(t),i=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||Po(a)){const s=47===a,l=i.toLowerCase();return s||A||!lA.includes(l)?sA.includes(i.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):B(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):A?g(a):m(a)):(o=1,r.interrupt?t(a):B(a))}return 45===a||mo(a)?(e.consume(a),i+=String.fromCharCode(a),f):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:B):n(o)}function g(t){return ko(t)?(e.consume(t),g):P(t)}function m(t){return 47===t?(e.consume(t),P):58===t||95===t||go(t)?(e.consume(t),y):ko(t)?(e.consume(t),m):P(t)}function y(t){return 45===t||46===t||58===t||95===t||mo(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),v):ko(t)?(e.consume(t),b):m(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):ko(t)?(e.consume(t),v):x(t)}function w(t){return t===s?(e.consume(t),s=null,E):null===t||Eo(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Po(t)?b(t):(e.consume(t),x)}function E(e){return 47===e||62===e||ko(e)?m(e):n(e)}function P(t){return 62===t?(e.consume(t),k):n(t)}function k(t){return null===t||Eo(t)?B(t):ko(t)?(e.consume(t),k):n(t)}function B(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!Eo(t)||6!==o&&7!==o?null===t||Eo(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),B):(e.exit("htmlFlowData"),e.check(uA,N,D)(t))}function D(t){return e.check(dA,C,N)(t)}function C(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),S}function S(t){return null===t||Eo(t)?D(t):(e.enter("htmlFlowData"),B(t))}function I(t){return 45===t?(e.consume(t),O):B(t)}function T(t){return 47===t?(e.consume(t),i="",Q):B(t)}function Q(t){if(62===t){const n=i.toLowerCase();return lA.includes(n)?(e.consume(t),L):B(t)}return go(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),Q):B(t)}function M(t){return 93===t?(e.consume(t),O):B(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):B(t)}function L(t){return null===t||Eo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},uA={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(_o,t,n)}}},dA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const pA={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,A,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),v):63===t?(e.consume(t),y):go(t)?(e.consume(t),E):n(t)}function s(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),A=0,p):go(t)?(e.consume(t),m):n(t)}function l(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):Eo(t)?(i=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(A++)?(e.consume(t),6===A?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),h):Eo(t)?(i=f,Q(t)):(e.consume(t),f)}function h(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):f(t)}function m(t){return null===t||62===t?T(t):Eo(t)?(i=m,Q(t)):(e.consume(t),m)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):Eo(t)?(i=y,Q(t)):(e.consume(t),y)}function b(e){return 62===e?T(e):y(e)}function v(t){return go(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||mo(t)?(e.consume(t),w):x(t)}function x(t){return Eo(t)?(i=x,Q(t)):ko(t)?(e.consume(t),x):T(t)}function E(t){return 45===t||mo(t)?(e.consume(t),E):47===t||62===t||Po(t)?P(t):n(t)}function P(t){return 47===t?(e.consume(t),T):58===t||95===t||go(t)?(e.consume(t),k):Eo(t)?(i=P,Q(t)):ko(t)?(e.consume(t),P):T(t)}function k(t){return 45===t||46===t||58===t||95===t||mo(t)?(e.consume(t),k):B(t)}function B(t){return 61===t?(e.consume(t),D):Eo(t)?(i=B,Q(t)):ko(t)?(e.consume(t),B):P(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,C):Eo(t)?(i=D,Q(t)):ko(t)?(e.consume(t),D):(e.consume(t),S)}function C(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):Eo(t)?(i=C,Q(t)):(e.consume(t),C)}function S(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Po(t)?P(t):(e.consume(t),S)}function I(e){return 47===e||62===e||Po(e)?P(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return ko(t)?Io(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),i(t)}}};const fA={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&ao(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,A,i=e.length,a=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=i);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[r+a+2][1].end},end:{...e[o-2][1].start}};return A=[["enter",s,t],["enter",l,t]],A=so(A,e.slice(r+1,r+a+3)),A=so(A,[["enter",c,t]]),A=so(A,Lo(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),A=so(A,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),A=so(A,e.slice(o+1)),A=so(A,[["exit",s,t]]),ao(e,r,e.length,A),e},tokenize:function(e,t,n){const r=this;let o,A,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){return o?o._inactive?c(t):(A=r.parser.defined.includes(ho(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(hA,l,A?l:c)(t):91===t?e.attempt(gA,l,A?s:c)(t):A?l(t):c(t)}function s(t){return e.attempt(mA,l,c)(t)}function l(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},hA={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Po(t)?rA(e,o)(t):o(t)}function o(t){return 41===t?l(t):eA(e,A,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function A(t){return Po(t)?rA(e,a)(t):l(t)}function i(e){return n(e)}function a(t){return 34===t||39===t||40===t?nA(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function s(t){return Po(t)?rA(e,l)(t):l(t)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},gA={tokenize:function(e,t,n){const r=this;return function(t){return tA.call(r,e,o,A,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(ho(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function A(e){return n(e)}}},mA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const yA={name:"labelStartImage",resolveAll:fA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),A):n(t)}function A(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const bA={name:"labelStartLink",resolveAll:fA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const vA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Io(e,t,"linePrefix")}}};const wA={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,A(e)}(t)};function A(A){return A===r?(e.enter("thematicBreakSequence"),i(A)):o>=3&&(null===A||Eo(A))?(e.exit("thematicBreak"),t(A)):n(A)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),ko(t)?Io(e,A,"whitespace")(t):A(t))}}};const xA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_o,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Io(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!ko(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(PA,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Io(e,e.attempt(xA,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let A=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:vo(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(wA,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return vo(t)&&++i<10?(e.consume(t),a):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(_o,r.interrupt?n:l,e.attempt(EA,u,c))}function l(e){return r.containerState.initialBlankLine=!0,A++,u(e)}function c(t){return ko(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=A+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},EA={partial:!0,tokenize:function(e,t,n){const r=this;return Io(e,(function(e){const o=r.events[r.events.length-1];return!ko(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},PA={partial:!0,tokenize:function(e,t,n){const r=this;return Io(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const kA={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,A=e.length;for(;A--;)if("enter"===e[A][0]){if("content"===e[A][1].type){n=A;break}"paragraph"===e[A][1].type&&(r=A)}else"content"===e[A][1].type&&e.splice(A,1),!o&&"definition"===e[A][1].type&&(o=A);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i,e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){i="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!i?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),A(t)}(t))};function A(t){return t===o?(e.consume(t),A):(e.exit("setextHeadingLineSequence"),ko(t)?Io(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Eo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const BA={tokenize:function(e){const t=this,n=e.attempt(_o,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Io(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Zo,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const DA={resolveAll:TA()},CA=IA("string"),SA=IA("text");function IA(e){return{resolveAll:TA("text"===e?QA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,A,i);return A;function A(e){return s(e)?o(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function TA(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function QA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let A,i=o.length,a=-1,s=0;for(;i--;){const e=o[i];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)A=!0,s++;else if(-1!==e){i++;break}}if(s){const o={type:n===e.length||A||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const MA={42:xA,43:xA,45:xA,48:xA,49:xA,50:xA,51:xA,52:xA,53:xA,54:xA,55:xA,56:xA,57:xA,62:Fo},OA={91:oA},LA={[-2]:Yo,[-1]:Yo,32:Yo},NA={35:aA,42:wA,45:[kA,wA],60:cA,61:kA,95:wA,96:Go,126:Go},HA={38:zo,92:Uo},RA={[-5]:vA,[-4]:vA,[-3]:vA,33:yA,38:zo,42:No,60:[Ro,pA],91:bA,92:[iA,Uo],93:fA,95:No,96:Wo},_A={null:[No,DA]},FA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:OA,disable:{null:[]},document:MA,flow:NA,flowInitial:LA,insideSpan:_A,string:HA,text:RA},Symbol.toStringTag,{value:"Module"}));function UA(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},A=[];let i=[],a=[];const s={attempt:h((function(e,t){g(e,t.from)})),check:h(f),consume:function(e){Eo(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),l.events.push(["enter",n,l]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),l.events.push(["exit",t,l]),t},interrupt:h(f,{interrupt:!0})},l={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,m()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const A=e[n];let i;if("string"==typeof A)i=A;else switch(A){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&o)continue;i=" ";break;default:i=String.fromCharCode(A)}o=-2===A,r.push(i)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return i=so(i,e),function(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}(),null!==i[i.length-1]?[]:(g(t,0),l.events=Lo(A,l.events,l),l.events)}};let c=t.tokenize.call(l,s);return t.resolveAll&&A.push(t),l;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,A=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,A)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}A>0&&i.push(e[o].slice(0,A))}return i}(i,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:A}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:A}}function p(e){c=c(e)}function f(e,t){t.restore()}function h(e,t){return function(n,o,A){let i,c,u,p;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function f(e){return i=e,c=0,0===e.length?A:h(e[c])}function h(e){return function(n){return p=function(){const e=d(),t=l.previous,n=l.currentConstruct,o=l.events.length,A=Array.from(a);return{from:o,restore:i};function i(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=o,a=A,m()}}(),u=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?y():e.tokenize.call(t?Object.assign(Object.create(l),t):l,s,g,y)(n)}}function g(t){return e(u,p),o}function y(e){return p.restore(),++c<i.length?h(i[c]):A}}}function g(e,t){e.resolveAll&&!A.includes(e)&&A.push(e),e.resolve&&ao(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const zA=/[\0\t\n\r]/g;const jA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function GA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return fo(n.slice(t?2:1),t?16:10)}return io(n)||e}const YA={}.hasOwnProperty;function qA(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:A(te),autolinkProtocol:k,autolinkEmail:k,atxHeading:A(J),blockQuote:A(q),characterEscape:k,characterReference:k,codeFenced:A(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:A(W,i),codeText:A(V,i),codeTextData:k,data:k,codeFlowValue:k,definition:A(X),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:A(K),hardBreakEscape:A(Z),hardBreakTrailing:A(Z),htmlFlow:A($,i),htmlFlowData:k,htmlText:A($,i),htmlTextData:k,image:A(ee),label:i,link:A(te),listItem:A(re),listItemValue:d,listOrdered:A(ne,u),listUnordered:A(ne),paragraph:A(oe),reference:_,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:A(J),strong:A(Ae),thematicBreak:A(ae)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:Y,autolinkProtocol:G,blockQuote:s(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:z,characterReference:j,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:B,codeIndented:s(m),codeText:s(T),codeTextData:B,data:B,definition:s(),definitionDestinationString:v,definitionLabelString:y,definitionTitleString:b,emphasis:s(),hardBreakEscape:s(C),hardBreakTrailing:s(C),htmlFlow:s(S),htmlFlowData:B,htmlText:s(I),htmlTextData:B,image:s(M),label:L,labelText:O,lineEnding:D,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:F,resourceDestinationString:N,resourceTitleString:H,resource:R,setextHeading:s(P),setextHeadingLineSequence:E,setextHeadingText:x,strong:s(),thematicBreak:s()}};VA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const A={stack:[r],tokenStack:[],config:t,enter:a,exit:l,buffer:i,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];YA.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},A),e[u][1])}if(A.tokenStack.length>0){const e=A.tokenStack[A.tokenStack.length-1];(e[1]||KA).call(A,void 0,e[0])}for(r.position={start:WA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:WA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,A,i,a=t-1,s=-1,l=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!i&&!s&&!A&&(A=a),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=a;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}A&&(!o||A<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,A=void 0,i=!0}}}return e[t][1]._spread=l,n}function A(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:WA(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Qr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||KA).call(this,e,r[0])),n.position.end=WA(e.end)}function c(){return function(e){const t=no;return ro(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.includeHtml)}(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ho(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function v(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function k(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=ie(),n.position={start:WA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function B(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=WA(e.end)}function D(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=WA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(k.call(this,e),B.call(this,e))}function C(){this.data.atHardBreak=!0}function S(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(jA,GA)}(t),n.identifier=ho(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function H(){const e=this.resume();this.stack[this.stack.length-1].title=e}function R(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ho(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function U(e){this.data.characterReferenceType=e.type}function z(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=fo(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=io(t);this.stack[this.stack.length-1].value+=r}function j(e){this.stack.pop().position.end=WA(e.end)}function G(e){B.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Y(e){B.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function V(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function Ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Ko(e););return e}(function(e){const t={constructs:co([FA,...(e||{}).extensions||[]]),content:n(To),defined:[],document:n(Qo),flow:n(BA),lazy:{},string:n(CA),text:n(SA)};return t;function n(e){return function(n){return UA(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,A,i){const a=[];let s,l,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(A||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(zA.lastIndex=c,s=zA.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(l=4*Math.ceil(t/4),a.push(-2);t++<l;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return i&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function WA(e){return{line:e.line,column:e.column,offset:e.offset}}function VA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?VA(e,r):XA(e,r)}}function XA(e,t){let n;for(n in t)if(YA.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 KA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qr({start:t.start,end:t.end})+") is still open")}function JA(e){const t=this;t.parser=function(n){return qA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZA(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),A=o[0];A&&"text"===A.type?A.value="["+A.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function $A(e){return e.spread??e.children.length>1}const ei=9,ti=32;function ni(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const A=[];for(;r;)A.push(ri(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return A.push(ri(t.slice(o),o>0,!1)),A.join("")}function ri(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;t===ei||t===ti;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;t===ei||t===ti;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const oi={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=So(r.toLowerCase()),A=e.footnoteOrder.indexOf(r);let i,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=A+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZA(e,t);const o={src:So(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const A={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,A),e.applyData(t,A)},image:function(e,t){const n={src:So(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZA(e,t);const o={href:So(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const A={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,A),e.applyData(t,A)},link:function(e,t){const n={href:So(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=$A(n[r])}return t}(n):$A(t),A={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),A.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&i.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:A,children:i};return e.patch(t,l),e.applyData(t,l)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const A={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,A),e.applyData(t,A)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},A=Ir(t.children[1]),i=Sr(t.children[t.children.length-1]);A&&i&&(r.position={start:A,end:i}),o.push(r)}const A={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,A),e.applyData(t,A)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",A=n&&"table"===n.type?n.align:void 0,i=A?A.length:t.children.length;let a=-1;const s=[];for(;++a<i;){const n=t.children[a],r={},i=A?A[a]:void 0;i&&(r.align=i);let l={type:"element",tagName:o,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),s.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:ni(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Ai,yaml:Ai,definition:Ai,footnoteDefinition:Ai};function Ai(){}const ii="object"==typeof self?self:globalThis,ai=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[A,i]=t[o];switch(A){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new ii[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new ii[A](i),o)};return r})(new Map,e)(0),si="",{toString:li}={},{keys:ci}=Object,ui=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=li.call(e).slice(8,-1);switch(n){case"Array":return[1,si];case"Object":return[2,si];case"Date":return[3,si];case"RegExp":return[4,si];case"Map":return[5,si];case"Set":return[6,si];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},di=([e,t])=>0===e&&("function"===t||"symbol"===t),pi=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},A=r=>{if(n.has(r))return n.get(r);let[i,a]=ui(r);switch(i){case 0:{let t=r;switch(a){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([i,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([i,e],r);for(const t of r)e.push(A(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return A(r.toJSON());const n=[],s=o([i,n],r);for(const t of ci(r))(e||!di(ui(r[t])))&&n.push([A(t),A(r[t])]);return s}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!di(ui(n))&&!di(ui(o)))&&t.push([A(n),A(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)(e||!di(ui(n)))&&t.push(A(n));return n}}const{message:s}=r;return o([i,{name:a,message:s}],r)};return A})(!(t||n),!!t,new Map,r)(e),r},fi="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ai(pi(e,t)):structuredClone(e):(e,t)=>ai(pi(e,t));function hi(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gi(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const mi=function(e){if(null==e)return bi;if("function"==typeof e)return yi(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mi(e[n]);return yi(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return yi(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return yi(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function yi(e){return function(t,n,r){return!(!function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)||!e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function bi(){return!0}const vi=[],wi=!0,xi=!1,Ei="skip";function Pi(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const A=mi(o),i=r?-1:1;!function e(o,a,s){const l=o&&"object"==typeof o?o:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,u,d=vi;if((!t||A(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[wi,e]:null==e?vi:[e]}(n(o,s)),d[0]===xi))return d;if("children"in o&&o.children){const t=o;if(t.children&&d[0]!==Ei)for(c=(r?t.children.length:-1)+i,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(l=e(n,c,u)(),l[0]===xi)return l;c="number"==typeof l[1]?l[1]:c+i}}return d}}(e,void 0,[])()}function ki(e,t,n,r){let o,A,i;"function"==typeof t?(A=void 0,i=t,o=n):(A=t,i=n,o=r),Pi(e,A,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),o)}const Bi={}.hasOwnProperty,Di={};function Ci(e,t){const n=t||Di,r=new Map,o=new Map,A=new Map,i={...oi,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=Mi(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Mi(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Ii,definitionById:r,footnoteById:o,footnoteCounts:A,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=a.handlers[n];if(Bi.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=fi(n);return r.children=a.all(e),r}return fi(e)}return(a.options.unknownHandler||Ti)(a,e,t)},options:n,patch:Si,wrap:Qi};return ki(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),a}function Si(e,t){e.position&&(t.position=function(e){const t=Ir(e),n=Sr(e);if(t&&n)return{start:t,end:n}}(e))}function Ii(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,fi(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Ti(e,t){const n=t.data||{},r=!("value"in t)||Bi.call(n,"hProperties")||Bi.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Qi(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Mi(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Oi(e,t){const n=Ci(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||hi,r=e.options.footnoteBackLabel||gi,o=e.options.footnoteLabel||"Footnotes",A=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const A=e.all(o),i=String(o.identifier).toUpperCase(),l=So(i.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(i);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=A[A.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...u)}else A.push(...u);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(A,!0)};e.patch(o,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:A,properties:{...fi(i),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),A=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&A.children.push({type:"text",value:"\n"},o),A}function Li(e,t){return e&&"run"in e?async function(n,r){const o=Oi(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Oi(n,{file:r,...e||t})}}function Ni(e){if(e)throw e}var Hi,Ri;var _i=function(){if(Ri)return Hi;Ri=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},A=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),A=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!A)return!1;for(r in n);return typeof r>"u"||e.call(n,r)},i=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Hi=function e(){var t,n,r,s,l,c,u=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(f&&s&&(A(s)||(l=o(s)))?(l?(l=!1,c=r&&o(r)?r:[]):c=r&&A(r)?r:{},i(u,{name:n,newValue:e(f,c,s)})):typeof s<"u"&&i(u,{name:n,newValue:s}));return u},Hi}();const Fi=wr(_i);function Ui(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zi(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(A,...i){const a=e[++n];let s=-1;if(A)r(A);else{for(;++s<t.length;)(null===i[s]||void 0===i[s])&&(i[s]=t[s]);t=i,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(A,o):i instanceof Error?o(i):A(i))}function o(e,...r){n||(n=!0,t(e,...r))}function A(e){o(null,e)}}(a,o)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ji={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Gi(e);let n,r=0,o=-1,A=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;A--;)if(47===e.codePointAt(A)){if(n){r=A+1;break}}else o<0&&(n=!0,o=A+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,a=t.length-1;for(;A--;)if(47===e.codePointAt(A)){if(n){r=A+1;break}}else i<0&&(n=!0,i=A+1),a>-1&&(e.codePointAt(A)===t.codePointAt(a--)?a<0&&(o=A):(a=-1,o=i));return r===o?o=i:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Gi(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Gi(e);let t,n=e.length,r=-1,o=0,A=-1,i=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?A<0?A=n:1!==i&&(i=1):A>-1&&(i=-1);else if(t){o=n+1;break}}return A<0||r<0||0===i||1===i&&A===r-1&&A===o+1?"":e.slice(A,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Gi(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Gi(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",A=0,i=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(i!==s-1&&1!==a)if(i!==s-1&&2===a){if(o.length<2||2!==A||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",A=0):(o=o.slice(0,r),A=o.length-1-o.lastIndexOf("/")),i=s,a=0;continue}}else if(o.length>0){o="",A=0,i=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",A=2)}else o.length>0?o+="/"+e.slice(i+1,s):o=e.slice(i+1,s),A=s-i-1;i=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function Gi(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Yi={cwd:function(){return"/"}};function qi(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Wi(e){if("string"==typeof e)e=new URL(e);else if(!qi(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Vi=["history","path","basename","stem","extname","dirname"];class Xi{constructor(e){let t;var n;t=e?qi(e)?{path:e}:"string"==typeof e||(n=e)&&"object"==typeof n&&"byteLength"in n&&"byteOffset"in n?{value:e}:e:{},this.cwd="cwd"in t?"":Yi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Vi.length;){const e=Vi[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Vi.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?ji.basename(this.path):void 0}set basename(e){Ji(e,"basename"),Ki(e,"basename"),this.path=ji.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ji.dirname(this.path):void 0}set dirname(e){Zi(this.basename,"dirname"),this.path=ji.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ji.extname(this.path):void 0}set extname(e){if(Ki(e,"extname"),Zi(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ji.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){qi(e)&&(e=Wi(e)),Ji(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ji.basename(this.path,this.extname):void 0}set stem(e){Ji(e,"stem"),Ki(e,"stem"),this.path=ji.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Nr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Ki(e,t){if(e&&e.includes(ji.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ji.sep+"`")}function Ji(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Zi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const $i=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ea={}.hasOwnProperty;class ta extends $i{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zi()}copy(){const e=new ta;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Fi(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Aa("data",this.frozen),this.namespace[e]=t,this):ea.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Aa("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=sa(e),n=this.parser||this.Parser;return ra("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ra("process",this.parser||this.Parser),oa("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const A=sa(e),i=n.parse(A);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,A,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,A=n.stringify(o,r);var i;"string"==typeof(i=A)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=A:r.result=A,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),ra("processSync",this.parser||this.Parser),oa("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Ni(e),t=r})),aa("processSync","process",n),t}run(e,t,n){ia(e),this.freeze();const r=this.transformers;return!n&&"function"==typeof t&&(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,A){const i=sa(t);r.run(e,i,(function(t,r,i){const a=r||e;t?A(t):o?o(a):n(void 0,a,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Ni(e),n=t,r=!0})),aa("runSync","run",r),n}stringify(e,t){this.freeze();const n=sa(t),r=this.compiler||this.Compiler;return oa("stringify",r),ia(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Aa("use",this.frozen),null!=e)if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):A(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else A(e)}}function A(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=Fi(!0,r.settings,e.settings))}function i(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...A]=t;const i=n[o][1];Ui(i)&&Ui(r)&&(r=Fi(!0,i,r)),n[o]=[e,r,...A]}}}}const na=(new ta).freeze();function ra(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function oa(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Aa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ia(e){if(!Ui(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function aa(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sa(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Xi(e)}const la=[],ca={allowDangerousHtml:!0},ua=/^(https?|ircs?|mailto|xmpp)$/i,da=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function pa(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,A=e.components,i=e.disallowedElements,a=e.rehypePlugins||la,s=e.remarkPlugins||la,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ca}:ca,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||fa,p=na().use(JA).use(s).use(Li,l).use(a),f=new Xi;"string"==typeof r&&(f.value=r);for(const t of da)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const y=p.parse(f);let b=p.runSync(y,f);return o&&(b={type:"element",tagName:"div",properties:{className:o},children:"root"===b.type?b.children:[b]}),ki(b,(function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return c?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in to)if(Object.hasOwn(to,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=to[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let A=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!A&&n&&"number"==typeof r&&(A=!n(e,r,o)),A&&o&&"number"==typeof r)return u&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),Gr(b,{Fragment:m,components:A,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0})}function fa(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||ua.test(e.slice(0,t))?e:""}const ha=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(pa,{components:{p:({...e})=>h("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>h("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>h("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>h("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?h("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):h("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:h("code",{children:t})}),blockquote:({...e})=>h("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),ga={autoConfig:!0},ma=e=>()=>(e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:A}=rn(),i={...e,...ga},a=i.markdownComponent?i.markdownComponent:ha;s((()=>{var e,t;if(A){const A=[...n];for(let n=0;n<A.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=A[n];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(A)}}),[A]);const l=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();((e,t,n)=>{var r;if("string"!=typeof e.data.message.content||!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderMarkdown)?void 0:r.map((e=>e.toUpperCase())).includes(n))??!1)})(e,t(),r)&&(e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};tn(K.PRE_INJECT_MESSAGE,l),tn(K.CHUNK_STREAM_MESSAGE,l),tn(K.START_STREAM_MESSAGE,l),tn(K.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return null!=i&&i.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),ya={autoConfig:!0,promptBaseColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"},promptHoveredColors:{info:"#0056b3",warning:"#d39e00",error:"#c82333",success:"#218838"},textAreaHighlightColors:{info:"#007bff",warning:"#ffc107",error:"#dc3545",success:"#28a745"}},ba=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const A=o[n];return"function"==typeof A?A:void 0},va=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=ct();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=$t(),{styles:r,updateStyles:o,replaceStyles:A}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=jt();return{styles:e,replaceStyles:t,updateStyles:n}})(),l=(e=>({...ya,...e,promptBaseColors:{...ya.promptBaseColors},promptHoveredColors:{...ya.promptHoveredColors},textAreaHighlightColors:{...ya.textAreaHighlightColors}}))(e),[c,u]=a(0),d=i({});tn(K.USER_SUBMIT_TEXT,(e=>{const A=e,i=ba(A,n(),"validateTextInput");if(!i)return;const a=i(A.data.inputText);if(null!=a&&a.success||e.preventDefault(),!a.promptContent)return;0===c&&(d.current=structuredClone(r));const s=((e,t)=>{const n=e.promptType??"info";let r={};return t.advancedStyles&&(r=t.advancedStyles[n]),t.promptBaseColors&&(r.toastPromptStyle={color:t.promptBaseColors[n],borderColor:t.promptBaseColors[n]}),t.promptHoveredColors&&(r.toastPromptHoveredStyle={color:t.promptHoveredColors[n],borderColor:t.promptHoveredColors[n]}),t.textAreaHighlightColors&&(e.highlightTextArea??!0)&&(r.chatInputAreaStyle={boxShadow:`${t.textAreaHighlightColors[n]} 0px 0px 5px`}),r})(a,l);o(s),t(a.promptContent,a.promptDuration??3e3),u((e=>e+1))})),tn(K.USER_UPLOAD_FILE,(e=>{var r,o;const A=e,i=null==(o=null==(r=A.data)?void 0:r.files)?void 0:o[0];if(!i)return console.error("No file uploaded."),void e.preventDefault();const a=ba(A,n(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(i);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&t(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)})),tn(K.DISMISS_TOAST,(()=>{u((e=>e-1))})),s((()=>{0===c&&setTimeout((()=>{A(d.current)}))}),[c,A]);const p={name:"@rcb-plugins/input-validator"};return l.autoConfig&&(p.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),p},wa=[];for(let e=0;e<256;++e)wa.push((e+256).toString(16).slice(1));let xa;const Ea=new Uint8Array(16);var Pa={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ka(e,t,n){if(Pa.randomUUID&&!e)return Pa.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!xa){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");xa=crypto.getRandomValues.bind(crypto)}return xa(Ea)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(wa[e[t+0]]+wa[e[t+1]]+wa[e[t+2]]+wa[e[t+3]]+"-"+wa[e[t+4]]+wa[e[t+5]]+"-"+wa[e[t+6]]+wa[e[t+7]]+"-"+wa[e[t+8]]+wa[e[t+9]]+"-"+wa[e[t+10]]+wa[e[t+11]]+wa[e[t+12]]+wa[e[t+13]]+wa[e[t+14]]+wa[e[t+15]]).toLowerCase()}(r)}const Ba={LOGIN_URL:"/login",WELCOME_MESSAGE:"Hello! What can I help you with?",WELCOME_MESSAGE_LOGGED_OUT:"To ask questions, please log in.",WELCOME_MESSAGE_LOGIN_TRANSITION:"Welcome! You are now logged in. What can I help you with?",WELCOME_MESSAGE_LOGOUT_TRANSITION:"You have been logged out.",API_ENDPOINT:"https://access-ai.ccs.uky.edu/api/query",netlifyBaseUrl:"undefined"!=typeof process&&process.env?process.env.REACT_APP_NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",ERRORS:{API_UNAVAILABLE:"Unable to contact the Q&A Bot. Please try again later."},BEHAVIOR:{SHOW_RATING_AFTER_FAILED_QUERY:!0},THEME:{PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",FONT_FAMILY:"Arial, sans-serif"},CHATBOT:{TITLE:"ACCESS Q&A",AVATAR_URL:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",TOOLTIP_TEXT:"Ask me about ACCESS! 😊"}},Da=(e,t)=>t||Ba.WELCOME_MESSAGE,Ca=t.forwardRef((({embedded:e,isBotLoggedIn:t,currentOpen:n},r)=>{const o=en(),A=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=re();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),a=i(null),l=i(!1);return(e=>{const t=i(e),{injectMessage:n}=en();s((()=>{const r=t.current!==e,o=!t.current&&e;r&&n(o?Ba.WELCOME_MESSAGE_LOGIN_TRANSITION:Ba.WELCOME_MESSAGE_LOGOUT_TRANSITION,"bot"),t.current=e}),[e,n])})(t),s((()=>{!e&&A&&A.toggleChatWindow&&(a.current===n||l.current||(setTimeout((()=>{A&&A.toggleChatWindow&&A.toggleChatWindow(n)}),0),a.current=n),l.current=!1)}),[n,e,A]),s((()=>{const e=()=>{l.current=!0};r&&(r.current||(r.current={}),r.current._markAsUserInteraction=e)})),p(r,(()=>({addMessage:e=>{o&&o.injectMessage&&o.injectMessage(e)}})),[o]),null}));Ca.displayName="BotController";const Sa=r(),Ia=({children:e})=>{const[n,r]=a({}),[o,A]=a({}),i={ticketForm:n,feedbackForm:o,updateTicketForm:e=>{r((t=>({...t,...e})))},updateFeedbackForm:e=>{A((t=>({...t,...e})))},resetTicketForm:()=>{r({})},resetFeedbackForm:()=>{A({})},setTicketForm:r,setFeedbackForm:A};return t.createElement(Sa.Provider,{value:i},e)},Ta=()=>{const e=o(Sa);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e},Qa=({width:e=24,height:n=24,color:r="currentColor",children:o,...A})=>t.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",width:e,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},A),o),Ma=e=>t.createElement(Qa,e,t.createElement("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})),Oa=()=>{const{restartFlow:e}=$t(),{resetTicketForm:n,resetFeedbackForm:r}=Ta();return t.createElement("button",{onClick:()=>{n(),r(),e()},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"#107180",border:"none",color:"#ffffff",fontSize:"14px",cursor:"pointer",padding:"8px 12px",borderRadius:"4px",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"6px",fontWeight:"500"},onMouseEnter:e=>{e.target.style.backgroundColor="#0d5f6b"},onMouseLeave:e=>{e.target.style.backgroundColor="#107180"}},t.createElement(Ma,{width:16,height:16}),"New Chat")},La=()=>t.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"#1a5b6e",marginRight:"5px"},role:"img","aria-label":"User logged in",title:"User logged in"},t.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},t.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),t.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Na=({loginUrl:e,className:n="",style:r,isHeaderButton:o=!1})=>{const A=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:"0.8",transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid #107180",color:"#107180",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return t.createElement(t.Fragment,null,o&&t.createElement("style",null,"\n .rcb-chat-header-container .qa-bot-header-login-button:hover {\n background-color: #0000001a !important;\n opacity: 1 !important;\n }\n "),t.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:{...A,...r}},"Log In"))},Ha=(e,t,n)=>{const r=()=>{try{const e=localStorage.getItem("rcb-history");if(!e)return null;const t=JSON.parse(e);if(!Array.isArray(t))return null;let n=null,r=null;for(const e of t)if("USER"===e.sender){const t=new Date(e.timestamp).getTime();(!r||t>r)&&(r=t,n=e)}return n?n.id:null}catch(e){return console.warn("Error parsing chat history:",e),null}};return A((async o=>{const{userInput:A}=o,i=r();i&&n(i);const a={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":i};try{const e={method:"POST",headers:a,body:JSON.stringify({query:A})},t=await fetch(Ba.API_ENDPOINT,e),n=(await t.json()).response;return await o.streamMessage(n),!0}catch(e){return await o.injectMessage(Ba.ERRORS.API_UNAVAILABLE),!1}}),[e,n,r,t])},Ra=()=>(s((()=>{const e=e=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(e.key))return;const n=document.activeElement;if(n&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"true"===n.contentEditable||n.classList.contains("rcb-chat-input-textarea")))return;const r=document.querySelector(".rcb-chat-window");if(!r)return;const o=Array.from(r.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter((e=>null!==e.offsetParent));if(o.length>0){const t=o[o.length-1].querySelector(".rcb-checkbox-container");if(t&&null!==t.offsetParent){const n=Array.from(t.querySelectorAll(".rcb-checkbox-row-container")),r=t.querySelector(".rcb-checkbox-next-button");if(n.length>0){const t=[...n];return r&&t.push(r),void((e,t)=>{e.preventDefault();let n=-1;for(let e=0;e<t.length;e++)if(t[e]===document.activeElement||t[e].contains(document.activeElement)){n=e;break}-1===n&&(n=0);let r=n;switch(e.key){case"ArrowDown":case"ArrowRight":r=n<t.length-1?n+1:0;break;case"ArrowUp":case"ArrowLeft":r=n>0?n-1:t.length-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;case"Enter":case" ":{const e=t[n],r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void e.dispatchEvent(r)}default:return}t[r].focus(),t[r].setAttribute("tabindex","0"),t[r].classList.add("keyboard-focused"),t.forEach(((e,t)=>{t!==r&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}))})(e,t)}}}let A=[];if(o.length>0){const e=o[o.length-1],t=Array.from(e.querySelectorAll(".rcb-options-container")).filter((e=>null!==e.offsetParent));if(t.length>0){const e=t[t.length-1];A=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===A.length)return;const i=A.findIndex((e=>e===document.activeElement));switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=i<A.length-1?i+1:0,A[t].setAttribute("tabindex","0"),A.forEach(((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[t].classList.add("keyboard-focused"),A[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=i>0?i-1:A.length-1,A[t].setAttribute("tabindex","0"),A.forEach(((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[t].classList.add("keyboard-focused"),A[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&A.includes(document.activeElement)){const e=document.activeElement;if(e.classList.contains("rcb-checkbox-row-container")||e.closest(".rcb-checkbox-row-container")){const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.querySelector(".rcb-checkbox-label"),o=r?r.textContent:e.textContent||"checkbox",A=e.querySelector(".rcb-checkbox-mark"),i=A&&A.style.backgroundColor?"checked":"unchecked";t(`${o} ${i}`)}else{const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.textContent||e.innerText;t(`Selected: ${r}`)}}break;case"Home":e.preventDefault(),A.length>0&&(A[0].setAttribute("tabindex","0"),A.forEach(((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[0].classList.add("keyboard-focused"),A[0].focus());break;case"End":if(e.preventDefault(),A.length>0){const e=A.length-1;A[e].setAttribute("tabindex","0"),A.forEach(((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))})),A[e].classList.add("keyboard-focused"),A[e].focus()}}},t=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout((()=>{document.body.contains(t)&&document.body.removeChild(t)}),1e3)},n=(e=null)=>{let n=e;if(n||(n=document.querySelector(".rcb-chat-window"),n||(n=document.querySelector('[class*="rcb-chat"]')),n||(n=document.querySelector(".qa-bot"))),!n)return;const r=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter((e=>null!==e.offsetParent));if(0===r.length)return;const o=r[r.length-1],A=Array.from(o.querySelectorAll(".rcb-options-container")).filter((e=>null!==e.offsetParent));let i=[];if(A.length>0){const e=A[A.length-1];i=Array.from(e.querySelectorAll(".rcb-options"))}if(0===i.length){let e=o.querySelector(".rcb-checkbox-container");if(!e&&n&&(e=n.querySelector(".rcb-checkbox-container")),e&&null!==e.offsetParent){const t=Array.from(e.querySelectorAll(".rcb-checkbox-row-container")).filter((e=>null!==e.offsetParent&&"none"!==e.style.display));if(t.length>0){const n=e.querySelector(".rcb-checkbox-next-button"),r=[...t];if(n&&null!==n.offsetParent&&r.push(n),r.forEach(((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")})),t.length>1){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()));const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}return void setTimeout((()=>{r[0]&&null!==r[0].offsetParent&&r[0].focus()}),150)}}}if(i.length>0){if(i.forEach(((e,t)=>{const n=0===t?"0":"-1";e.setAttribute("tabindex",n),e.setAttribute("role","option"),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",i.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")})),i.length>1){const e=A.length>0?A[A.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()));const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}}else{const e=A.length>0?A[A.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()))}}setTimeout((()=>{i[0]&&null!==i[0].offsetParent&&(i[0].focus(),i.length>1&&t(`${i.length} options available. Use arrow keys to navigate.`))}),200)}},r=new MutationObserver((e=>{e.forEach((e=>{if("childList"===e.type){const t=Array.from(e.addedNodes),r=t.some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-options-container")||e.classList?.contains("rcb-options")||e.querySelector?.(".rcb-options-container")||e.querySelector?.(".rcb-options")))),o=t.some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-checkbox-container")||e.querySelector?.(".rcb-checkbox-container"))));if(r||o){let t=e.target;for(;t&&!t.classList?.contains("qa-bot")&&!t.classList?.contains("rcb-chat-window");)t=t.parentElement;(t||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach((e=>{e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused")})),setTimeout((()=>n(t)),100)}}}))}));r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval((()=>{document.querySelectorAll(".qa-bot").forEach((e=>{const t=e.querySelectorAll(".rcb-options-container .rcb-options").length>0,r=e.querySelectorAll(".rcb-checkbox-row-container").length>0;if(t){const t=e.querySelectorAll(".rcb-options[tabindex]").length;e.querySelectorAll(".rcb-options").length>t&&n(e)}if(r){const t=e.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;e.querySelectorAll(".rcb-checkbox-row-container").length>t&&n(e)}}))}),1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}}),[]),null),_a=({fetchAndStreamResponse:e,sessionId:t,currentQueryId:n,apiKey:r})=>({go_ahead_and_ask:{message:"Please type your question.",path:"qa_loop"},qa_loop:{message:async t=>{try{return await e(t),"Was this helpful?"}catch(e){return console.error("Error in bot flow:",e),(e=>(console.error("Bot error:",e),e&&e.error||Error,Ba.ERRORS.API_UNAVAILABLE))(e)}},renderMarkdown:["BOT"],options:["👍 Yes","👎 No"],chatDisabled:!1,function:async e=>{if(("👍 Yes"===e.userInput||"👎 No"===e.userInput)&&r&&t){const o="👍 Yes"===e.userInput,A={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":r,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o?1:0};try{await fetch(`${Ba.API_ENDPOINT}/rating`,{method:"POST",headers:A})}catch(e){console.error("Error sending feedback:",e)}}},path:e=>"👍 Yes"===e.userInput?"qa_positive_feedback":"👎 No"===e.userInput?"qa_negative_feedback":"qa_loop"},qa_positive_feedback:{message:"Thank you for your feedback! It helps us improve this tool.",transition:{duration:1e3},path:"go_ahead_and_ask"},qa_negative_feedback:{message:"Sorry that wasn't useful. Would you like to open a help ticket for assistance?",options:["Open a help ticket","Ask another question"],chatDisabled:!0,path:e=>"Open a help ticket"===e.userInput?"help_ticket":"qa_continue"},qa_continue:{message:"Ask another question, but remember that each question must stand alone.",path:"qa_loop"}}),Fa=e=>t.createElement(Qa,e,t.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.createElement("polyline",{points:"17 8 12 3 7 8"}),t.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Ua=({onFileUpload:e})=>{const[n,r]=a(!1),[o,A]=a([]),[s,l]=a(null),c=i(null),{captureScreenshot:u,isCapturing:d,isScreenCaptureAvailable:p}=(()=>{const[e,t]=a(!1),n=()=>"undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",logicalSurface:!0,width:{ideal:1920},height:{ideal:1080}},audio:!1}),n=document.createElement("video");n.srcObject=e,await new Promise((e=>{n.onloadedmetadata=()=>{n.play(),e()}}));const r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight,r.getContext("2d").drawImage(n,0,0,r.width,r.height);const o=await new Promise((e=>r.toBlob(e,"image/png"))),A=(new Date).toISOString().replace(/[:.]/g,"-"),i=new File([o],`screenshot-${A}.png`,{type:"image/png"});return e.getTracks().forEach((e=>e.stop())),t(!1),i}catch(e){throw console.error("Error capturing screenshot:",e),t(!1),e}},isCapturing:e,isScreenCaptureAvailable:n()}})(),f=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout((()=>document.body.removeChild(t)),1e3)},h=t=>{if(!t||!t.length||0===t.length)return void console.warn("FileUploadComponent: No valid files provided to handleFiles");let n;try{n=Array.from(t)}catch(e){return console.error("FileUploadComponent: Error converting files to array:",e),void f("Error processing selected files. Please try again.")}const r=[...o,...n];A(r);const i=n.length,a=n.map((e=>e.name)).join(", ");f(`${i} file${i>1?"s":""} selected: ${a}`),setTimeout((()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)}),100),e&&e(r)},g=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?r(!0):"dragleave"===e.type&&r(!1)},m=()=>{try{c.current&&c.current.click()}catch(e){console.error("FileUploadComponent: Error in handleButtonClick:",e),f("Error opening file selection dialog. Please try again.")}},y=()=>{l(null)};return t.createElement("div",{className:"file-upload-container",style:{padding:"16px",margin:"8px 0"}},p&&t.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},t.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await u();h([e]),f("Screenshot captured successfully")}catch(e){f("Error capturing screenshot. Please try again.")}})()},disabled:d,"aria-describedby":"screenshot-help","aria-label":d?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:d?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},t.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),t.createElement("circle",{cx:"12",cy:"13",r:"4"})),d?"Taking screenshot...":"Take screenshot..."),t.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),t.createElement("div",{className:"file-upload-dropzone "+(n?"active":""),onDragEnter:g,onDragLeave:g,onDragOver:g,onDrop:e=>{e.preventDefault(),e.stopPropagation(),r(!1);try{e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&h(e.dataTransfer.files)}catch(e){console.error("FileUploadComponent: Error in handleDrop:",e),f("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:n?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},t.createElement("input",{ref:c,type:"file",className:"file-input",onChange:e=>{try{e.target&&e.target.files&&e.target.files.length>0&&h(e.target.files)}catch(e){console.error("FileUploadComponent: Error in handleFileSelect:",e),f("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:"image/*,application/pdf,text/*,.doc,.docx"}),t.createElement("div",{className:"upload-content",onClick:m,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},t.createElement(Fa,null),t.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),t.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. Accepted: Images, PDFs, Text files (Max 10MB each)")),o.length>0&&t.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},t.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),o.map(((n,r)=>t.createElement("span",{key:r,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),(e=>{l(e)})(n)}},t.createElement("span",{onClick:t=>{t.stopPropagation(),(t=>{const n=o.filter(((e,n)=>n!==t));A(n),e&&e(n)})(r)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${n.name}`},"×"),n.name," (",(n.size/1024).toFixed(1)," KB)")))))),(()=>{if(!s)return null;const e=s.type.startsWith("image/"),n=s.type.startsWith("text/"),r="application/pdf"===s.type;return t.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:y},t.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:y,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),t.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},s.name),e&&t.createElement("img",{src:URL.createObjectURL(s),alt:s.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&t.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(s)),r&&t.createElement("iframe",{src:URL.createObjectURL(s),style:{width:"100%",height:"70vh",border:"none"},title:s.name}),!e&&!n&&!r&&t.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())},za=async(e,t="support",n=[])=>{const r=17,o={support:r,general_help:r,feedback:r,loginAccess:30,loginProvider:31,security:26},A={serviceDeskId:"security"===t?3:2,requestTypeId:o[t]||o.support,requestFieldValues:{...e}};if(n&&n.length>0){const e=await Promise.all(n.map((async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const n=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:n})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)})))));A.attachments=e}return A},ja=async(e,t)=>{const n=Ba.netlifyBaseUrl.replace("/.netlify/functions/","").replace("/.netlify/functions","");let r;r="create-support-ticket"===t?`${n}/api/v1/tickets`:"create-security-incident"===t?`${n}/api/v1/security-incidents`:`${Ba.netlifyBaseUrl}/${t}`;try{const t=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e="";try{const n=await t.text();console.error("| ❌ Post data to proxy failed:",t.status,n);try{const t=JSON.parse(n);e=t.message||t.error||n}catch{e=n}}catch{e=`HTTP ${t.status} ${t.statusText}`}return 403===t.status?e="The ticket service is temporarily unavailable. Please try again later or contact support directly.":404===t.status?e="Ticket service not found. Please try again later.":500===t.status?e="Server error. Please try again later.":401===t.status&&(e="Authentication error with the ticket service. Please contact support."),{success:!1,status:t.status,error:e}}return{success:!0,data:await t.json()}}catch(e){return console.error("| ❌ Post data to proxy exception:",e),{success:!1,error:e.message}}},Ga=(e,n)=>t.createElement(Ua,{onFileUpload:t=>e({...n||{},uploadedFiles:t})}),Ya=e=>{let t=null;return{submitTicket:async(n,r,o=[])=>{try{const A=await za(n,r,o),i=await ja(A,"create-support-ticket");i.success?(t={success:!0,ticketKey:i.data.data.ticketKey,ticketUrl:i.data.data.ticketUrl},e((e=>({...e,ticketKey:i.data.data.ticketKey,ticketUrl:i.data.data.ticketUrl})))):(console.error(`| ❌ ${r} ticket creation failed:`,i),t={success:!1,error:i.error||"Unknown error"},e((e=>({...e,submissionError:i.error||"Unknown error"}))))}catch(n){console.error(`| ❌ Error sending ${r} data to proxy:`,n),t={success:!1,error:n.message},e((e=>({...e,submissionError:n.message})))}},getSubmissionResult:()=>t}},qa=(e,t="ticket")=>e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`Your ${t} has been submitted successfully.\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`We apologize, but there was an error submitting your ${t}: ${e.error||"Unknown error"}\n\nPlease try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.\n\nPlease try again or contact our support team directly.`,Wa=e=>e&&e.length>0?`\nAttachments: ${e.length} file(s) attached`:"";let Va=null;const Xa=()=>{if(!Va)return console.warn("Form context not available, returning empty form"),{};const e=Va.ticketForm;return e&&"object"==typeof e?e:{}},Ka=(e={})=>{const t=Xa()||{},n=e&&"object"==typeof e?e:{};return{...t,email:n.email||t.email,name:n.name||t.name,accessId:n.accessId||t.accessId}},Ja=()=>e=>(e&&""!==e.trim()||setTimeout((()=>{const e=document.querySelector(".rcb-chat-input-textarea");if(e){e.value="Not provided";const t=new Event("input",{bubbles:!0});e.dispatchEvent(t),setTimeout((()=>{const e=document.querySelector('.rcb-send-button, .rcb-chat-send-button, [aria-label*="send"], button[type="submit"]');if(e){const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}}),200)}}),100),{success:!0}),Za=e=>e&&""!==e.trim()?e:"Not provided",$a=e=>{const t=e?.trim()||"";return t?(e=>!(!e||"string"!=typeof e)&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.trim()))(t)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address (e.g., user@example.com).",promptDuration:3e3,promptType:"error",highlightTextArea:!0}:{success:!1,promptContent:"Please enter an email address.",promptDuration:3e3,promptType:"error",highlightTextArea:!0}},es=({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const r=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Ya(t);return{access_help:{message:"If you're having trouble logging into the ACCESS website, here are some common issues:\n\n• Make sure you're using a supported browser (Chrome, Firefox, Safari)\n• Clear your browser cookies and cache\n• Check if you're using the correct identity provider\n\nWould you like to submit a help ticket for ACCESS login issues?",options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,path:e=>"Yes, let's create a ticket"===e.userInput?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:e=>{const r=Xa(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,identityProvider:e.userInput})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,browser:e.userInput})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"access_login_upload":(()=>{const e=Ka(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"})()},access_login_upload:{message:"Please upload your screenshot.",component:Ga(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Xa();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ka(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:e=>$a(e),function:e=>{const n=Xa();t({...n,email:e.userInput})},path:()=>{const e=Ka(n);return e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:e=>{const n=Xa();t({...n,name:e.userInput})},path:()=>Ka(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Ja(),function:e=>{const n=Xa();t({...n,accessId:Za(e.userInput)})},path:"access_login_summary"},access_login_summary:{message:e=>{const t=Xa(),r=Ka(n),o=Wa(t.uploadedFiles);let A=r.accessId;return"access_login_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"access_login_accessid"!==e.prevPath||(A=e.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nIdentity Provider: ${t.identityProvider||"Not provided"}\nBrowser: ${t.browser||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT","USER"],function:async e=>{if("Submit Ticket"===e.userInput){const e=Xa(),t=Ka(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",description:e.description||"",identityProvider:e.identityProvider||"",browser:e.browser||""};await r(o,"loginAccess",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"access_login_success":"start"},access_login_success:{message:()=>qa(o(),"ACCESS login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),o=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Ya(t);return{affiliated_help:{message:'If you\'re having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:\n\n• Ensure your allocation is active\n• Confirm you have the correct username for that resource\n• Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance\n\nWould you like to submit a help ticket for resource provider login issues?',options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:e=>"Yes, let's create a ticket"===e.userInput?"affiliated_login_resource":"start"},affiliated_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,resource:e.userInput})},path:"affiliated_login_userid"},affiliated_login_userid:{message:"What is your user ID at the resource?",function:e=>{const n=Xa();t({...n,userIdResource:e.userInput})},path:"affiliated_login_description"},affiliated_login_description:{message:"Please describe the issue you're having logging in.",function:e=>{const r=Xa(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"affiliated_login_attachment"},affiliated_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"affiliated_login_upload":(()=>{const e=Ka(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"})()},affiliated_login_upload:{message:"Please upload your screenshot.",component:Ga(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Xa();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ka(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"}},affiliated_login_email:{message:"What is your email?",validateTextInput:e=>$a(e),function:e=>{const n=Xa();t({...n,email:e.userInput})},path:()=>{const e=Ka(n);return e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name"}},affiliated_login_name:{message:"What is your name?",function:e=>{const n=Xa();t({...n,name:e.userInput})},path:()=>Ka(n).accessId?"affiliated_login_summary":"affiliated_login_accessid"},affiliated_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Ja(),function:e=>{const n=Xa();t({...n,accessId:Za(e.userInput)})},path:"affiliated_login_summary"},affiliated_login_summary:{message:e=>{const t=Xa(),r=Ka(n),o=Wa(t.uploadedFiles);let A=r.accessId;return"affiliated_login_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"affiliated_login_accessid"!==e.prevPath||(A=e.userInput),`Thank you for providing your resource login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nResource: ${t.resource||"Not provided"}\nResource User ID: ${t.userIdResource||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Xa(),t=Ka(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",accessResource:e.resource||"",description:e.description||"",userIdAtResource:e.userIdResource||""};await r(o,"loginProvider",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"affiliated_login_success":"start"},affiliated_login_success:{message:()=>qa(o(),"resource login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),A=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Ya(t);return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:e=>{const r=Xa(),o={...r,summary:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,category:e.userInput})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:e=>{const n=Xa();t({...n,description:e.userInput})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:Ga(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Xa();t({...e,uploadConfirmed:!0})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,involvesResource:e.userInput.toLowerCase()})},path:e=>"Yes"===e.userInput?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,resourceDetails:e.userInput})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:Ja(),function:e=>{const n=Xa();t({...n,userIdAtResource:Za(e.userInput)})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],min:0,max:5},chatDisabled:!0,function:e=>{const n=Xa();t({...n,keywords:e.userInput})},path:e=>e.userInput&&e.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:e=>{const n=Xa(),r=n.keywords||[],o=e.userInput,A=Array.isArray(r)?[...r]:r.split(",").map((e=>e.trim())),i=A.filter((e=>"I don't see a relevant keyword"!==e)),a=Array.isArray(i)&&i.length>0?[...i,o].join(", "):o;t({...n,keywords:a,suggestedKeyword:o})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],chatDisabled:!0,function:e=>{const n=Xa();t({...n,priority:e.userInput.toLowerCase()})},path:()=>n.email?n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"},general_help_email:{message:"What is your email address?",validateTextInput:e=>$a(e),function:e=>{const n=Xa();t({...n,email:e.userInput})},path:()=>n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"},general_help_name:{message:"What is your name?",function:e=>{const n=Xa();t({...n,name:e.userInput})},path:()=>n.accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",required:!1,function:e=>{const n=Xa();t({...n,accessId:e.userInput||""})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:e=>{const t=Xa(),r=Ka(n),o=Wa(t.uploadedFiles);let A=r.accessId;"general_help_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"general_help_accessid"!==e.prevPath||(A=e.userInput);let i="";return"yes"===t.involvesResource&&(i=`\nResource: ${t.resourceDetails||"Not specified"}`,t.userIdAtResource&&(i+=`\nUser ID at Resource: ${t.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nIssue Summary: ${t.summary||"Not provided"}\nCategory: ${t.category||"Not provided"}\nPriority: ${t.priority||"Not provided"}\nKeywords: ${t.keywords||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${i}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Xa(),t=Ka(n),o={email:t.email||"",summary:e.summary||"General Support Ticket",description:e.description||"",priority:e.priority||"medium",accessId:t.accessId||"",name:t.name||"",issueType:e.category||"",hasResourceProblem:"yes"===e.involvesResource?"Yes":"No",userIdAtResource:e.userIdAtResource||"",resourceName:e.resourceDetails||"",keywords:e.keywords||"",noRelevantKeyword:e.suggestedKeyword?"checked":"",suggestedKeyword:e.suggestedKeyword||""};await r(o,"support",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"general_help_success":"start"},general_help_success:{message:()=>qa(o(),"support ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],chatDisabled:!0,function:n=>{t({...e||{},ticketType:n.userInput})},path:e=>"Logging into ACCESS website"===e.userInput?"access_help":"Logging into a resource"===e.userInput?"affiliated_help":"Another question"===e.userInput?"general_help_summary_subject":"help_ticket"},...r,...o,...A}},ts=({setTicketForm:e=()=>{},userInfo:n={}})=>{let r=null,o=null;return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:t=>{const r=Xa()||{},o={...r,summary:t.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};e(o)},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],chatDisabled:!0,function:t=>{const n=Xa()||{};e({...n,priority:t.userInput})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:t=>{const n=Xa()||{};e({...n,description:t.userInput})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],chatDisabled:!0,function:t=>{const n=Xa()||{};e({...n,wantsAttachment:t.userInput})},path:e=>"Yes"===e.userInput?"security_upload":"security_contact_info"},security_upload:{message:"Please upload your files.",component:t.createElement(Ua,{onFileUpload:t=>{const n=Xa()||{};e({...n,uploadedFiles:t})}}),options:["Continue"],chatDisabled:!0,function:()=>{const t=Xa()||{};e({...t,uploadConfirmed:!0})},path:"security_contact_info"},security_contact_info:{message:()=>{const e=Ka(n);return e.name&&e.email&&e.accessId?`I have your contact information:\n\nName: ${e.name}\nEmail: ${e.email}\nACCESS ID: ${e.accessId}\n\nIs this correct?`:"I need your contact information. What is your name?"},options:e=>{if(!e)return[];const t=Ka(n);return t.name&&t.email&&t.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:e=>{if(!e)return!1;const t=Ka(n);return t.name&&t.email&&t.accessId},function:t=>{if(!t)return;const n=Xa()||{};if(!n.name){const r={...n,name:t.userInput};e(r)}},path:e=>{if(!e)return"security_summary";const t=Ka(n);return"Yes, that's correct"===e.userInput?"security_summary":"Let me update it"===e.userInput?"security_name":t.name&&t.email?t.accessId?"security_summary":"security_accessid":"security_email"}},security_name:{message:"What is your name?",function:t=>{const n=Xa()||{};e({...n,name:t.userInput})},path:"security_email"},security_email:{message:"What is your email address?",function:t=>{const n=Xa()||{};e({...n,email:t.userInput})},path:"security_accessid"},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:Ja(),function:t=>{const n=Za(t.userInput);r=n;const o=Xa()||{};e({...o,accessId:n})},path:"security_summary"},security_summary:{message:()=>{const e=Xa()||{},t=Ka(n),o={...e,name:t.name||e.name,email:t.email||e.email,accessId:r||t.accessId||e.accessId};let A="";e.uploadedFiles&&e.uploadedFiles.length>0&&(A=`\nAttachments: ${e.uploadedFiles.length} file(s) attached`);const i=o.accessId||"Not provided";return`Here's a summary of your security incident report:\n\nSummary: ${o.summary||"Not provided"}\nPriority: ${o.priority||"Not provided"}\nName: ${o.name||"Not provided"}\nEmail: ${o.email||"Not provided"}\nACCESS ID: ${i}\nDescription: ${o.description||"Not provided"}${A}\n\nWould you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],chatDisabled:!0,function:async t=>{if("Submit Security Report"===t.userInput){const t=Xa()||{},A=Ka(n),i={...t,name:A.name||t.name,email:A.email||t.email,accessId:r||A.accessId||t.accessId},a={summary:i.summary||"",priority:i.priority||"",description:i.description||"",name:i.name||"",email:i.email||"",accessId:i.accessId||""};try{const n=await(async(e,t=[])=>{try{const n=await za(e,"security",t);return await ja(n,"create-security-incident")}catch(e){return console.error("| ❌ Security incident submission failed:",e),{success:!1,error:e.message}}})(a,t.uploadedFiles||[]);n.success?(o={success:!0,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl},e((e=>({...e,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl,submissionResult:o})))):(o={success:!1,error:n.error},e((e=>({...e,submissionError:n.error}))))}catch(t){o={success:!1,error:t.message},e((e=>({...e,submissionError:t.message})))}}},path:e=>"Submit Security Report"===e.userInput?"security_success":"start"},security_success:{message:()=>(e=>e&&!e.success?`We apologize, but there was an error submitting your security incident report: ${e.error}\n\nPlease try again or contact our cybersecurity team directly.`:e&&e.success&&e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`:(e&&e.success,"Your security incident report has been submitted successfully.\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure."))((Xa()||{}).submissionResult||o),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}};function ns({welcomeMessage:e,isBotLoggedIn:n,loginUrl:r,handleQuery:o,hasQueryError:A,sessionId:i,currentQueryId:a,ticketForm:s={},setTicketForm:l=()=>{},formContext:c,apiKey:u,userInfo:d={}}){c&&(e=>{Va=e})(c);const p=(({welcome:e,setTicketForm:t=()=>{},setFeedbackForm:n=()=>{}})=>({start:{message:e,options:["Ask a question about ACCESS","Open a Help Ticket","Report a security issue"],chatDisabled:!0,path:e=>"Ask a question about ACCESS"===e.userInput?"go_ahead_and_ask":"Open a Help Ticket"===e.userInput?(t({}),"help_ticket"):"Report a security issue"===e.userInput?(t({}),"security_incident"):"start"}}))({welcome:Da(0,e),setTicketForm:l});return{...p||{},...(n?_a({fetchAndStreamResponse:o,sessionId:i,currentQueryId:a,apiKey:u}):{go_ahead_and_ask:{message:"To ask questions, you need to log in first.",component:t.createElement(Na,{loginUrl:r}),options:["Back to Main Menu"],chatDisabled:!0,path:e=>"Back to Main Menu"===e.userInput?"start":"go_ahead_and_ask"}})||{},...es({ticketForm:s,setTicketForm:l,userInfo:d})||{},...ts({ticketForm:s,setTicketForm:l,userInfo:d})||{},...n&&{loop:{message:async e=>{await o(e)},renderMarkdown:["BOT"],path:()=>A?"start":"loop"}}}}var rs="2.6.0-debug.2";"true"===localStorage.getItem("QaBotDebug")&&console.info(`%c🤖 ACCESS QA Bot | v${rs} | react-chatbotify v2.2.0 [${(new Date).toISOString().slice(0,10)}]`,"background: #107180; color: white; padding: 8px; border-radius: 3px; font-weight: bold;");const os=()=>{for(let e=0;e<localStorage.length;e++){const t=localStorage.key(e);if(t&&t.startsWith("qa_bot_session_")){const e=localStorage.getItem(t);if(e)return e}}const e=`qa_bot_session_${ka()}`;return localStorage.setItem(e,e),e},As=t.forwardRef(((e,n)=>{const{apiKey:r,open:o=!1,onOpenChange:A,embedded:c=!1,isLoggedIn:u,loginUrl:d=Ba.LOGIN_URL,ringEffect:p=!1,welcome:f,userEmail:h,userName:g,accessId:m}=e,y=r||("undefined"!=typeof process&&process.env?process.env.REACT_APP_API_KEY:null),[b,v]=a(void 0!==u&&u),x=i(os()).current,[E,P]=a(null),{ticketForm:k,feedbackForm:B,updateTicketForm:D,updateFeedbackForm:C,resetTicketForm:S,resetFeedbackForm:I}=Ta();s((()=>{void 0!==u&&v(u)}),[u]),s((()=>{if(!c&&A){const e=e=>{n&&n.current&&n.current._markAsUserInteraction&&n.current._markAsUserInteraction();const t=e.data.newState;A(t)};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}}),[c,A,n]);const T=Da(0,f),Q=i(null),M=((e,t={})=>l((()=>{const n=(t,n)=>{if(e.current){const n=getComputedStyle(e.current).getPropertyValue(t);if(n&&""!==n.trim())return n.trim();if(e.current.parentElement){const n=getComputedStyle(e.current.parentElement).getPropertyValue(t);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:n("--primary-color",t.primaryColor||Ba.THEME.PRIMARY_COLOR),secondaryColor:n("--secondary-color",t.secondaryColor||Ba.THEME.SECONDARY_COLOR),fontFamily:n("--font-family",t.fontFamily||Ba.THEME.FONT_FAMILY)}}),[e,t]))(Q),O=(({themeColors:e,embedded:n,defaultOpen:r,isLoggedIn:o,loginUrl:A})=>{const i=o,a=sessionStorage.getItem("qa_bot_tooltip_shown")?"NEVER":"START";return l((()=>({general:{...e,embedded:n,primaryColor:e.primaryColor,fontFamily:"Arial, sans-serif",secondaryColor:e.secondaryColor},header:{title:t.createElement("div",{key:"header-title"},t.createElement("h1",{className:"sr-only"},Ba.CHATBOT.TITLE),t.createElement("span",{"aria-hidden":"true"},Ba.CHATBOT.TITLE)),avatar:Ba.CHATBOT.AVATAR_URL,buttons:[i?t.createElement(La,{key:"user-icon"}):t.createElement(Na,{key:"login-button",loginUrl:A,isHeaderButton:!0}),w.CLOSE_CHAT_BUTTON]},chatWindow:{defaultOpen:!!n},chatInput:{enabledPlaceholderText:"Type your question here...",disabledPlaceholderText:"",disabled:!1,allowNewline:!0,sendButtonStyle:{display:"flex"},characterLimit:1e3,sendButtonAriaLabel:"Send message",showCharacterCount:!1,ariaLabel:"Chat input area",ariaDescribedBy:"chat-input-help"},chatHistory:{disabled:!1},botBubble:{simulateStream:!0,streamSpeed:10,allowNewline:!0,dangerouslySetInnerHTML:!0,renderHtml:!0,ariaLabel:"Bot response",role:"log"},chatButton:{icon:Ba.CHATBOT.AVATAR_URL},tooltip:{text:Ba.CHATBOT.TOOLTIP_TEXT,mode:a},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0},notification:{disabled:!0},footer:{text:t.createElement("div",{key:"footer-text"},t.createElement("a",{href:"https://support.access-ci.org/tools/access-qa-tool"},"About this tool"),"."),buttons:[t.createElement(Oa,{key:"new-chat-button"})]},event:{rcbToggleChatWindow:!0}})),[e,n,r,i,a,A])})({themeColors:M,embedded:c,defaultOpen:!1,isLoggedIn:b,loginUrl:d}),L=Ha(y,x,P),N=l((()=>({ticketForm:k||{},feedbackForm:B||{},updateTicketForm:D,updateFeedbackForm:C,resetTicketForm:S,resetFeedbackForm:I})),[k,B,D,C,S,I]),H=[()=>Mn(_),ma(),()=>va(R)];var R,_;const F=l((()=>ns({welcomeMessage:T,isBotLoggedIn:b,loginUrl:d,handleQuery:L,sessionId:x,currentQueryId:E,ticketForm:k,setTicketForm:D,formContext:N,apiKey:y,userInfo:{email:h||null,name:g||null,accessId:m||null}})),[T,b,d,L,x,E,k,B,D,C,N,y,h,g,m]);return((e,t)=>{s((()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))}),[e,t])})(b,Q),((e,t)=>{s((()=>{if(!e||!t.current)return;const n=setTimeout((()=>{const e=t.current?.querySelector(".rcb-tooltip-show");e&&e.classList.add("phone-ring")}),500);return()=>{clearTimeout(n)}}),[e,t])})(p,Q),s((()=>{const e=()=>{const e=document.querySelector(".rcb-chat-window");if(!e)return;const t=e.querySelector(".rcb-send-button");t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("data-keyboard-enabled")||(t.setAttribute("data-keyboard-enabled","true"),t.addEventListener("keydown",(e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const n=t&&Object.keys(t).find((e=>e.startsWith("__reactProps")));if(n){const r=t[n],o=r?.onMouseDown;if(o&&"function"==typeof o)return void o(e)}const r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(r)}}))))},t=setInterval(e,1e3);return e(),()=>clearInterval(t)}),[]),Ra(),s((()=>{const e=()=>{sessionStorage.setItem("qa_bot_tooltip_shown","true")};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}),[]),t.createElement("div",{className:"qa-bot "+(c?"embedded-qa-bot":""),ref:Q,role:"region","aria-label":"Ask ACCESS tool"},t.createElement(Wt,null,t.createElement("main",{role:"main","aria-label":"Chat interface"},t.createElement(Ca,{ref:n,embedded:c,isBotLoggedIn:b,currentOpen:o}),t.createElement(Jt,{key:`chatbot-${x}-${b}`,settings:O,flow:F,plugins:H}),t.createElement("div",{"aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region"}),t.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."),t.createElement("div",{id:"keyboard-help",className:"sr-only"},"Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs."))))}));As.displayName="QABotInternal";const is=t.forwardRef(((e,n)=>t.createElement(Ia,null,t.createElement(As,b({},e,{ref:n})))));is.displayName="QABot";v('.rcb-toggle-icon{background-color:initial!important;background-position:calc(50% - 1px) calc(50% + 2px);background-repeat:no-repeat;background-size:62%!important}.rcb-chat-window{max-height:600px;max-width:100%;width:550px!important}.rcb-chat-window .rcb-bot-avatar{background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:0}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:#107180}.rcb-chat-window .rcb-bot-message a{color:#fff;text-decoration:none}.rcb-chat-window .rcb-bot-message a:hover{text-decoration:underline}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-tooltip-show.phone-ring{animation:phone-ring 3s ease-out!important;z-index:10000!important}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:#107180!important;border-color:#107180!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:#107180!important;outline:none!important}.rcb-options:active{background-color:#107180!important;border-color:#107180!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:#107180!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=access-qa-tool]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}',{insertAt:"top"});const as=t.forwardRef(((e,n)=>{const[r,o]=t.useState(e.isLoggedIn||!1),[A,i]=t.useState(e.defaultOpen||!1),a=t.useRef();return t.useImperativeHandle(n,(()=>({addMessage:e=>{a.current&&a.current.addMessage(e)},setBotIsLoggedIn:e=>{o(e)},openChat:()=>{!e.embedded&&a.current&&i(!0)},closeChat:()=>{!e.embedded&&a.current&&i(!1)},toggleChat:()=>{!e.embedded&&a.current&&i((e=>!e))}})),[e.embedded]),t.createElement(is,{ref:a,apiKey:e.apiKey,embedded:e.embedded,isLoggedIn:r,open:!!e.embedded||A,onOpenChange:e.embedded?void 0:i,loginUrl:e.loginUrl,ringEffect:e.ringEffect,welcome:e.welcome,userEmail:e.userEmail,userName:e.userName,accessId:e.accessId})}));function ss(e){if(!(e.target&&e.target instanceof HTMLElement))return void console.error("QA Bot: A valid target DOM element is required");const n=f.createRoot(e.target),r={current:null};return n.render(t.createElement(t.StrictMode,null,t.createElement(as,{ref:e=>{r.current=e},apiKey:e.apiKey,defaultOpen:e.defaultOpen,embedded:e.embedded,isLoggedIn:e.isLoggedIn,loginUrl:e.loginUrl,ringEffect:e.ringEffect,welcome:e.welcome,userEmail:e.userEmail,userName:e.userName,accessId:e.accessId}))),{addMessage:e=>{var t;return null===(t=r.current)||void 0===t?void 0:t.addMessage(e)},setBotIsLoggedIn:e=>{var t;return null===(t=r.current)||void 0===t?void 0:t.setBotIsLoggedIn(e)},openChat:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{r.current=null,n.unmount()}}}as.displayName="ProgrammaticQABot";export{is as QABot,ss as default,ss as qaBot};
|
|
9
9
|
//# sourceMappingURL=access-qa-bot.js.map
|