@inkeep/agents-ui-js-cloud 0.0.0-dev-20260513213554 → 0.0.0-dev-20260514122955

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.
Files changed (2) hide show
  1. package/dist/embed.js +1 -1
  2. package/package.json +3 -3
package/dist/embed.js CHANGED
@@ -67,7 +67,7 @@ var BV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const WG={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown",chatHistory:"LuHistory",chatHistoryPanel:"LuPanelLeft",backToChat:"LuArrowLeft",fileUpload:"LuPaperclip",filePdf:"FaRegFilePdf",fileText:"PiFileText",fileMarkdown:"PiFileMarkdown",fileHtml:"PiFileHtml",fileCsv:"PiFileCsv",fileLog:"PiFileLog",fileJson:"PiFileJson",file:"PiFile",fileSql:"PiFileSql",filePy:"PiFilePy"};function YG({iconKey:e,...t}){var n;const r=WG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=oR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return og.jsx(qG,{"data-icon":e,iconSettings:i,...t})}const ZG=X.createContext(void 0),KG=({children:e})=>{const[t,n]=X.useState(null),r=X.useCallback((e=>{n(e)}),[]),a=X.useCallback((()=>{n(null)}),[]),o=X.useMemo((()=>({imagePreview:t,openImagePreview:r,closeImagePreview:a})),[t,r,a]);return og.jsx(ZG.Provider,{value:o,children:e})},XG=()=>{const e=X.useContext(ZG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},QG=X.createContext(void 0),JG=({children:e,message:t})=>og.jsx(QG.Provider,{value:{message:t},children:e}),eq=()=>{const e=X.useContext(QG);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var tq=(e,t=[])=>({parts:(...n)=>{if(rq(t))return tq(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>tq(e,[...t,...n]),omit:(...n)=>tq(e,t.filter((e=>!n.includes(e)))),rename:e=>tq(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${nq(e)}"][data-part="${nq(n)}"]`,`& [data-scope="${nq(e)}"][data-part="${nq(n)}"]`].join(", "),attrs:{"data-scope":nq(e),"data-part":nq(n)}}})),{})}),nq=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),rq=e=>0===e.length,aq=tq("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),oq=Object.defineProperty,iq=(e,t,n)=>((e,t,n)=>t in e?oq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),sq=e=>"object"==typeof e&&null!==e,lq=e=>e?"":void 0,cq=e=>sq(e)&&1===e.nodeType&&"string"==typeof e.nodeName,uq=e=>sq(e)&&void 0!==e.nodeType,dq=e=>uq(e)&&11===e.nodeType&&"host"in e;function pq(e,t){var n;if(!e||!t)return!1;if(!cq(e)||!uq(t))return!1;if(cq(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&dq(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fq(e){var t;return dq(e)?fq(e.host):(e=>sq(e)&&9===e.nodeType)(e)?e.defaultView??window:cq(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function hq(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}var mq=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},gq=class e{constructor(){iq(this,"id",null),iq(this,"fn_cleanup"),iq(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};var yq={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},bq=e=>e.isDirectory,vq=e=>e.isFile,kq=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),xq=(e,t="")=>new Promise((n=>{const r=[],a=()=>{e.readEntries((e=>{if(0===e.length)return void n(Promise.all(r).then((e=>e.flat())));const o=e.map((e=>e?bq(e)?xq(e.createReader(),`${t}${e.name}`):vq(e)?new Promise((n=>{e.file((e=>{n(kq(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var wq=e=>function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}(e)||function(e){return/^.*\.[\w]+$/.test(e)}(e);var Eq=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,_q=e=>null!=e;var Sq=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap((e=>{const[t,n]=e.split("_");return t.split(",").map((e=>[e,n]))})));function Tq(e,t){if(e&&t){const n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;const r=e.name||"",a=(e.type||function(e){const t=e.split(".").pop();return t&&Sq.get(t)||null}(r)||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):a===t}))}return!0}var Cq=function(e){const t=new Map;return function(n,r){const a=n+(r?Object.entries(r).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(t.has(a))return t.get(a);let o=new e(n,r);return t.set(a,o),o}}(Intl.NumberFormat);var Aq=["","kilo","mega","giga","tera"],Iq=["","kilo","mega","giga","tera","peta"],Nq=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(0===e)return"0 B";const{unitSystem:r="decimal",precision:a=3,unit:o="byte",unitDisplay:i="short"}=n,s="binary"===r?1024:1e3,l="bit"===o?Aq:Iq,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const p=parseFloat(u.toPrecision(a));return function(e,t,n={}){return Cq(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function Oq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(Oq(t)):e.concat(t)),[])}var Rq=e=>String.fromCharCode(e+(e>25?39:97));var Pq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Rq(t%52)+n;return Rq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function Lq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var Dq=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},Mq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},Fq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},jq=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemDeleteTrigger)?void 0:r.call(n,t))??`file:${e.id}:item-delete:${t}`},zq=e=>Pq(`${e.name}-${e.size}`),Bq=e=>e.getById(Fq(e));function Hq(e){const t=hq(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function Uq(e,t,n=[],r=[]){const{prop:a,computed:o}=e,i=[],s=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach((e=>{var t;const[r,c]=function(e,t){const n="application/x-moz-file"===e.type||Tq(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(_q(e.size))if(_q(t)&&_q(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(_q(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(_q(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>Eq(t,e)))||i.some((t=>Eq(t,e))),f=null==(t=a("validate"))?void 0:t(e,l),h=!f||0===f.length;if(r&&u&&h&&!p)i.push(e);else{const t=[c,d];p&&t.push("FILE_EXISTS"),h||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}})),function(e,t,n){const{prop:r,computed:a}=e;return!(!a("multiple")&&t>1||(a("multiple")||t+n.length!==2)&&t+n.length>r("maxFiles"))}(e,i.length,n)||(i.forEach((e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})})),i.splice(0)),{acceptedFiles:i,rejectedFiles:s}}var $q="accepted";function Vq(e,t){if(!e||"file"===e.getAttribute("type"))return!1;const n=e.closest("button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]");return n!=t&&pq(t,n)}function Gq(e,t){const{state:n,send:r,prop:a,computed:o,scope:i,context:s}=e,l=!!a("disabled"),c=!!a("readOnly"),u=!!a("required"),d=a("allowDrop"),p=a("translations"),f=n.matches("dragging"),h=n.matches("focused")&&!l,m=s.get("acceptedFiles"),g=a("maxFiles");return{dragging:f,focused:h,disabled:l,readOnly:c,transforming:s.get("transforming"),maxFilesReached:m.length>=g,remainingFiles:Math.max(0,g-m.length),openFilePicker(){l||c||r({type:"OPEN"})},deleteFile(e,t=$q){l||c||r({type:"FILE.DELETE",file:e,itemType:t})},acceptedFiles:m,rejectedFiles:s.get("rejectedFiles"),setFiles(e){l||c||r({type:"FILES.SET",files:e,count:e.length})},clearRejectedFiles(){l||c||r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){l||c||r({type:"FILES.CLEAR"})},getFileSize:e=>Nq(e.size,a("locale")),createFileUrl(e,t){const n=i.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(l||c)return!1;const t=Array.from((null==e?void 0:e.items)??[]).reduce(((e,t)=>{if("file"!==t.kind)return e;const n=t.getAsFile();return n?[...e,n]:e}),[]);return!!t.length&&(r({type:"FILE.SELECT",files:t}),!0)},getRootProps:()=>t.element({...aq.root.attrs,dir:a("dir"),id:Dq(i),"data-disabled":lq(l),"data-readonly":lq(c),"data-dragging":lq(f)}),getDropzoneProps:(e={})=>t.element({...aq.dropzone.attrs,dir:a("dir"),id:Mq(i),tabIndex:l||c||e.disableClick?void 0:0,role:e.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l||c||void 0,"data-invalid":lq(a("invalid")),"data-disabled":lq(l),"data-readonly":lq(c),"data-dragging":lq(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=hq(t);pq(t.currentTarget,n)&&(Vq(n,t.currentTarget)||e.disableClick||"Enter"!==t.key&&" "!==t.key||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(t){if(l||c)return;if(t.defaultPrevented)return;if(e.disableClick)return;const n=hq(t);pq(t.currentTarget,n)&&(Vq(n,t.currentTarget)||("label"===t.currentTarget.localName&&t.preventDefault(),r({type:"DROPZONE.CLICK"})))},onDragOver(e){if(l||c)return;if(!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch{}if(!Hq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(pq(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;Hq(e)&&(t=e.dataTransfer.items,n=a("directory"),Promise.all(Array.from(t).filter((e=>"file"===e.kind)).map((e=>{const t=(e=>"function"==typeof e.getAsEntry?e.getAsEntry():"function"==typeof e.webkitGetAsEntry?e.webkitGetAsEntry():null)(e);if(!t)return null;if(bq(t)&&n)return xq(t.createReader(),`${t.name}`);if(vq(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?kq(t,""):null)}return vq(t)?new Promise((e=>{t.file((t=>{e(kq(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:Oq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...aq.trigger.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.trigger)??`file:${e.id}:trigger`),disabled:l||c,"data-disabled":lq(l),"data-readonly":lq(c),"data-invalid":lq(a("invalid")),type:"button",onClick(e){l||c||(pq((e=>e.getById(Mq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:Fq(i),tabIndex:-1,disabled:l||c,type:"file",required:a("required"),capture:a("capture"),name:a("name"),accept:o("acceptAttr"),webkitdirectory:a("directory")?"":void 0,multiple:o("multiple")||a("maxFiles")>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=""},onInput(e){if(l||c)return;const{files:t}=e.currentTarget;r({type:"FILE.SELECT",files:t?Array.from(t):[]})},style:yq}),getItemGroupProps(e={}){const{type:n=$q}=e;return t.element({...aq.itemGroup.attrs,dir:a("dir"),"data-disabled":lq(l),"data-type":n})},getItemProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.item.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.itemName.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.itemName)?void 0:u.call(c,s))??`file:${o.id}:item-name:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.itemSizeText)?void 0:u.call(c,s))??`file:${o.id}:item-size:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.itemPreview.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.itemPreview)?void 0:u.call(c,s))??`file:${o.id}:item-preview:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=$q}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...aq.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":lq(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=$q}=e;return t.button({...aq.itemDeleteTrigger.attrs,dir:a("dir"),id:jq(i,zq(o)),type:"button",disabled:l||c,"data-disabled":lq(l),"data-readonly":lq(c),"data-type":s,"aria-label":null==(n=p.deleteFile)?void 0:n.call(p,o),onClick(){l||c||r({type:"FILE.DELETE",file:o,itemType:s})}})},getLabelProps(){return t.label({...aq.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:Fq(i),"data-disabled":lq(l),"data-required":lq(u)});var e,n},getClearTriggerProps:()=>t.button({...aq.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":lq(l),"data-readonly":lq(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var qq=new WeakMap,Wq=new WeakMap;function Yq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Lq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){!function(e,t){if(null==e)throw new Error(t())}(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||Lq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=(l=t,(s=e)?`${s}.${l}`:l);r(a,n)}var s,l}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}var Zq,Kq=(Zq={props:({props:e})=>({minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:n})=>({acceptedFiles:t((()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>Eq(e,t[n]))),hash:e=>e.map((e=>`${e.name}-${e.size}`)).join(","),onChange(t){var r,a;const o=n();null==(r=e("onFileAccept"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:t,rejectedFiles:o.get("rejectedFiles")})}}))),rejectedFiles:t((()=>({defaultValue:[],isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>Eq(e.file,t[n].file))),onChange(t){var r,a;const o=n();null==(r=e("onFileReject"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:t})}}))),transforming:t((()=>({defaultValue:!1})))}),computed:{acceptAttr:({prop:e})=>function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(wq).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(wq).join(",")}(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],(()=>{n(["syncInputElement"])}))},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop"))return;if(!e("allowDrop"))return;if(e("disabled"))return;const n=t.getDoc();return((...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))})(mq(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),mq(n,"drop",(e=>{var n;pq((n=t).getById(Dq(n)),hq(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=Bq(e);if(!n)return;!function(e,t){const n=fq(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach((e=>{r.items.add(e)})),e.files=r.files}}catch{}}(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))}))},openFilePicker({scope:e}){!function(e){const t=gq.create();t.request(e),t.cleanup}((()=>{var t;null==(t=Bq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=Uq(e,r.files);n.set("acceptedFiles",t("multiple")?a:a.length>0?[a[0]]:[]),n.set("rejectedFiles",o)},setEventFiles(e){const{computed:t,context:n,event:r,prop:a}=e,o=n.get("acceptedFiles"),i=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=Uq(e,r.files,o,i),c=e=>t("multiple")?(n.set("acceptedFiles",(t=>[...t,...e])),void n.set("rejectedFiles",l)):e.length?(n.set("acceptedFiles",[e[0]]),void n.set("rejectedFiles",l)):void(l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))),u=a("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch((e=>{!function(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}(`[zag-js/file-upload] error transforming files\n${e}`)})).finally((()=>{n.set("transforming",!1)}))):c(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){const n=e.get("rejectedFiles").filter((e=>!Eq(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!Eq(e,t.file)));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}},function(e){const t=qq.get(e);if(t)return t;const{index:n,idIndex:r}=Yq(e);qq.set(e,n),Wq.set(e,r)}(Zq),Zq);var Xq=(e,...t)=>e.filter((e=>!t.includes(e))),Qq=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Xq(e,t):((e,...t)=>e.concat(t))(e,t),Jq=e=>"Array"===(null==e?void 0:e.constructor.name),eW=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof(null==e?void 0:e.isEqual)&&"function"==typeof(null==t?void 0:t.isEqual))return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Jq(e)&&Jq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!eW(e[n],t[n]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let a=0;a<r;a++){if(!Reflect.has(e,n[a]))return!1}for(let a=0;a<r;a++){const r=n[a];if(!eW(e[r],t[r]))return!1}return!0},tW=e=>null!=e&&"object"==typeof e,nW=e=>tW(e)&&!(e=>Array.isArray(e))(e),rW=e=>"function"==typeof e,aW=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),oW=Function.prototype.toString,iW=oW.call(Object),sW=e=>{if(!tW(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||lW(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=aW(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&oW.call(n)==iW},lW=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e),cW=e=>e(),uW=()=>{},dW=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function pW(e,t,...n){var r;if(e in t){const r=t[e];return rW(r)?r(...n):r}const a=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw null==(r=Error.captureStackTrace)||r.call(Error,a,pW),a}function fW(e){if(!sW(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const r of t){const t=e[r];void 0!==t&&(n[r]=fW(t))}return n}function hW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function mW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function gW(e,t){if(null==e)throw new Error(t())}var yW=".",bW=new WeakMap,vW=new WeakMap;function kW(e){return e.join(yW)}function xW(e){return e.startsWith("#")}function wW(e,t){return e?`${e}${yW}${t}`:t}function EW(e){const t=bW.get(e);if(t)return t;const{index:n,idIndex:r}=function(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&mW(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){gW(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||mW(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=wW(e,t);r(a,n)}}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}(e);return bW.set(e,n),vW.set(e,r),n}function _W(e){return e?String(e).split(yW).filter(Boolean):[]}function SW(e,t){if(!t)return[];const n=EW(e),r=_W(t),a=[],o=[];for(const i of r){o.push(i);const e=kW(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function TW(e,t){const n=EW(e),r=_W(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=kW(a);if(!n.has(e))return t}let o=kW(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${yW}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function CW(e,t){return EW(e).has(t)}function AW(e,t,n){const r=String(t);if(xW(r)){const t=function(e){return xW(e)?e.slice(1):e}(r),n=function(e,t){var n;return EW(e),null==(n=vW.get(e))?void 0:n.get(t)}(e,t);return gW(n,(()=>`[zag-js] Unknown state id: "${t}"`)),TW(e,n)}if(function(e){return e.startsWith(yW)}(r)&&n){return TW(e,wW(n,r.slice(1)))}if(!function(e){return e.includes(yW)}(r)&&n){const t=_W(n);for(let n=t.length-1;n>=1;n--){const a=wW(t.slice(0,n).join(yW),r);if(CW(e,a))return TW(e,a)}if(CW(e,r))return TW(e,r)}return TW(e,r)}function IW(e){return EW(e),e}var NW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(NW||{}),OW="__init__",RW=Object.defineProperty,PW=(e,t,n)=>((e,t,n)=>t in e?RW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function LW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var DW=()=>{},MW=e=>"object"==typeof e&&null!==e,FW=e=>e?"":void 0,jW=e=>e?"true":void 0,zW=e=>MW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,BW=e=>MW(e)&&9===e.nodeType,HW=e=>zW(e)?e.localName||"":"#document";var UW=e=>MW(e)&&void 0!==e.nodeType,$W=e=>UW(e)&&11===e.nodeType&&"host"in e,VW=e=>zW(e)&&"input"===e.localName;function GW(e){if(!e)return!1;return KW(e.getRootNode())===e}var qW=/(textarea|select)/;function WW(e,t){var n;if(!e||!t)return!1;if(!zW(e)||!UW(t))return!1;if(zW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&$W(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function YW(e){return BW(e)?e:(e=>MW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function ZW(e){var t;return $W(e)?ZW(e.host):BW(e)?e.defaultView??window:zW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function KW(e){let t=e.activeElement;for(;null==t?void 0:t.shadowRoot;){const e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function XW(e){if("html"===HW(e))return e;const t=e.assignedSlot||e.parentNode||$W(e)&&e.host||YW(e).documentElement;return $W(t)?t.host:t}function QW(e){let t;try{if(t=e.getRootNode({composed:!0}),BW(t)||$W(t))return t}catch{}return e.ownerDocument??document}var JW=new WeakMap;function eY(e){return JW.has(e)||JW.set(e,ZW(e).getComputedStyle(e)),JW.get(e)}var tY=new Set(["menu","listbox","dialog","grid","tree","region"]),nY=e=>tY.has(e),rY=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function aY(e,t){const n=new Set,r=QW(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=rY(i);for(const o of e){if(!o||n.has(o))continue;n.add(o);const e=r.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");if(n&&nY(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function oY(e){const t=new Set;return function(e,t){const n=QW(e),r=new Set,a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=rY(i);for(const o of e){if(!o||r.has(o))continue;r.add(o);const e=n.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");n&&tY.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function iY(e){if(!e.id)return!1;const t=QW(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`,a=t.querySelector(r);return Boolean(a&&function(e){const t=e.getAttribute("role");return Boolean(t&&tY.has(t))}(e))}var sY=()=>"undefined"!=typeof document;var lY=e=>sY()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),cY=e=>sY()&&e.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((({brand:e,version:t})=>`${e}/${t}`)).join(" "):navigator.userAgent}()),uY=()=>sY()&&!!navigator.maxTouchPoints,dY=()=>lY(/^iPhone/i)||lY(/^iPad/i)||pY()&&navigator.maxTouchPoints>1,pY=()=>lY(/^Mac/i);function fY(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}function hY(e){const t=e.currentTarget;if(!t)return!1;if(!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=1===e.button,r=(a=e,pY()?a.metaKey:a.ctrlKey);var a;return n||r}function mY(e){return!(""!==e.pointerType||!e.isTrusted)||(cY(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var gY=e=>0===e.button,yY=e=>2===e.button||pY()&&e.ctrlKey&&0===e.button,bY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},vY={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function kY(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=bY[a]??a;return"rtl"===n&&"horizontal"===r&&a in vY&&(a=vY[a]),a}var xY=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},wY=e=>zW(e)&&"IFRAME"===e.tagName,EY=/^(audio|video|details)$/;function _Y(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function SY(e){if(!function(e){return VW(e)&&"radio"===e.type}(e)||!e.name)return!0;if(e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter((t=>t.form===e.form&&NY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function TY(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;const n=t(e);return(!0===n?e.shadowRoot:n)||null}function CY(e,t,n){const r=[...e],a=[...e],o=new Set,i=new Map;e.forEach(((e,t)=>i.set(e,t)));let s=0;for(;s<a.length;){const e=a[s++];if(!e||o.has(e))continue;o.add(e);const l=TY(e,t);if(l){const t=Array.from(l.querySelectorAll(AY)).filter(n),o=i.get(e);if(void 0!==o){const e=o+1;r.splice(e,0,...t),t.forEach(((t,n)=>{i.set(t,e+n)}));for(let n=e+t.length;n<r.length;n++)i.set(r[n],n)}else{const e=r.length;r.push(...t),t.forEach(((t,n)=>{i.set(t,e+n)}))}a.push(...t)}}return r}var AY="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",IY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(AY));(1==n||"if-empty"==n&&0===a.length)&&zW(e)&&NY(e)&&a.unshift(e);const o=[];for(const i of a)if(NY(i))if(wY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...IY(e,{getShadowRoot:r}))}else o.push(i);return r?CY(o,r,NY):o};function NY(e){return!(!zW(e)||e.closest("[inert]"))&&(e.matches(AY)&&(!!zW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function OY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(AY));n&&RY(e)&&a.unshift(e);const o=[];for(const i of a)if(RY(i))if(wY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...OY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=CY(o,r,RY);return!e.length&&n?a:e}return!o.length&&n?a:o}function RY(e){return!!(zW(e)&&e.tabIndex>0)||!(!NY(e)||(e=>_Y(e)<0)(e))&&SY(e)}function PY(e){return e.tabIndex<0&&(EY.test(e.localName)||function(e){if(null==e||!zW(e))return!1;try{return VW(e)&&null!=e.selectionStart||qW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(_Y(t)))?0:e.tabIndex;var t}var LY=class e{constructor(){PW(this,"id",null),PW(this,"fn_cleanup"),PW(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function DY(e){const t=LY.create();return t.request(e),t.cleanup}function MY(e){const t=new Set;function n(e){const n=globalThis.requestAnimationFrame(e);t.add((()=>globalThis.cancelAnimationFrame(n)))}return n((()=>n(e))),function(){t.forEach((e=>e()))}}function FY(e,t){const{defer:n}=t,r=n?DY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(function(e,t){if(!e)return;const{attributes:n,callback:r}=t,a=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&r(t)}));return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function jY(e){const t=()=>{const t=ZW(e);e.dispatchEvent(new t.MouseEvent("click"))};cY(/Firefox/i)?function(e,t,n){const r=DY((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function zY(e){const t=XW(e);return["html","body","#document"].includes(HW(t))?YW(t).body:zW(t)&&UY(t)?t:zY(t)}var BY=/auto|scroll|overlay|hidden|clip/,HY=new Set(["inline","contents"]);function UY(e){const t=ZW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return BY.test(n+a+r)&&!HY.has(o)}function $Y(e,t){const{rootEl:n,...r}=t||{};e&&n&&UY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function VY(e,t){if(!e)return DW;const n=Object.keys(t).reduce(((t,n)=>(t[n]=e.style.getPropertyValue(n),t)),{});return r=n,a=t,Object.keys(r).every((e=>r[e]===a[e]))?DW:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function GY(e,t){const{timeout:n,rootNode:r}=t,a=ZW(r),o=YW(r),i=new a.AbortController;return function(e,t,n){const{signal:r}=t;return[new Promise(((t,a)=>{const o=setTimeout((()=>{a(new Error(`Timeout of ${n}ms exceeded`))}),n);r.addEventListener("abort",(()=>{clearTimeout(o),a(new DOMException("Promise aborted","AbortError"))})),e.then((e=>{r.aborted||(clearTimeout(o),t(e))})).catch((e=>{r.aborted||(clearTimeout(o),a(e))}))})),()=>t.abort()]}(new Promise((t=>{const n=e();if(n)return void t(n);const r=new a.MutationObserver((()=>{const n=e();n&&n.isConnected&&(r.disconnect(),t(n))}));r.observe(o.body,{childList:!0,subtree:!0})})),i,n)}var qY=void 0!==globalThis.document?X.useLayoutEffect:X.useEffect;function WY(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=X.useState(t),[a,o]=X.useState(r),i=void 0!==e().value,s=X.useRef(a);s.current=i?e().value:a;const l=X.useRef(s.current);qY((()=>{l.current=s.current}),[a,e().value]);return{initial:r,ref:s,get:function(){return i?e().value:a},set(t){(e().sync?ue.flushSync:cW)((()=>(t=>{var r,a;const s=l.current,c=rW(t)?t(s):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:s}),i||o(c),n(c,s)||null==(a=(r=e()).onChange)||a.call(r,c,s)})(t)))},invoke(t,n){var r,a;null==(a=(r=e()).onChange)||a.call(r,t,n)},hash(t){var n,r;return(null==(r=(n=e()).hash)?void 0:r.call(n,t))??String(t)}}}WY.cleanup=e=>{X.useEffect((()=>e),[])},WY.ref=e=>{const t=X.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var YY=(e,t)=>{const n=X.useRef(!1),r=X.useRef(!1);X.useEffect((()=>{if(n.current&&r.current)return t();r.current=!0}),[...(e??[]).map((e=>"function"==typeof e?e():e))]),X.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])};function ZY(e,t={}){var n,r,a,o;const i=X.useMemo((()=>{const{id:e,ids:n,getRootNode:r}=t;return function(e){const t=()=>{var t;return(null==(t=e.getRootNode)?void 0:t.call(e))??document},n=()=>YW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>KW(t()),isActiveElement:GW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=KY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:fW(t),scope:i}))??t),c=KY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:WY,scope:i,flush:XY,getContext:()=>u,getComputed:()=>E,getRefs:()=>y,getEvent:()=>m()})),u={get(e){var t;return null==(t=c.current)?void 0:t[e].ref.current},set(e,t){var n;null==(n=c.current)||n[e].set(t)},initial(e){var t;return null==(t=c.current)?void 0:t[e].initial},hash(e){var t,n;const r=null==(t=c.current)?void 0:t[e].get();return null==(n=c.current)?void 0:n[e].hash(r)}},d=X.useRef(new Map),p=X.useRef(null),f=X.useRef(null),h=X.useRef({type:""}),m=()=>({...h.current,current:()=>h.current,previous:()=>f.current}),g=()=>({..._,matches:(...e)=>e.some((e=>function(e,t){return!!e&&(e===t||e.startsWith(`${t}${yW}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return SW(e,t).some((e=>{var t;return null==(t=e.state.tags)?void 0:t.includes(n)}))}(e,_.ref.current,t)}),y=function(e){const t=X.useRef(e);return{get:e=>t.current[e],set(e,n){t.current[e]=n}}}((null==(a=e.refs)?void 0:a.call(e,{prop:l,context:u}))??{}),b=()=>({state:g(),context:u,event:m(),prop:l,send:A,action:v,guard:k,track:YY,refs:y,computed:E,flush:XY,scope:i,choose:w}),v=t=>{const n=rW(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.actions)?void 0:r[t];return a||hW(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),a}));for(const e of r)null==e||e(b())},k=t=>{var n,r;return rW(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=rW(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.effects)?void 0:r[t];return a||hW(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),a})),a=[];for(const e of r){const t=null==e?void 0:e(b());t&&a.push(t)}return()=>a.forEach((e=>null==e?void 0:e()))},w=e=>{return(t=e,null==t?[]:Array.isArray(t)?t:[t]).find((e=>{let t=!e.guard;return(e=>"string"==typeof e)(e.guard)?t=!!k(e.guard):rW(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{gW(e.computed,(()=>"[zag-js] No computed object found on machine"));return(0,e.computed[t])({context:u,event:m(),prop:l,refs:y,scope:i,computed:E})},_=WY((()=>({defaultValue:AW(e,e.initialState({prop:l})),onChange(t,n){var r,a;const{exiting:o,entering:i}=function(e,t,n,r){var a,o,i,s;const l=t?SW(e,t):[],c=SW(e,n);let u=0;for(;u<l.length&&u<c.length&&(null==(a=l[u])?void 0:a.path)===(null==(o=c[u])?void 0:o.path);)u+=1;let d=l.slice(u).reverse(),p=c.slice(u);const f=(null==(i=l.at(-1))?void 0:i.path)===(null==(s=c.at(-1))?void 0:s.path);return r&&f&&(d=l.slice().reverse(),p=c),{exiting:d,entering:p}}(e,n,t,null==(r=p.current)?void 0:r.reenter);if(o.forEach((e=>{const t=d.current.get(e.path);null==t||t(),d.current.delete(e.path)})),o.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.exit)})),v(null==(a=p.current)?void 0:a.actions),i.forEach((e=>{var t;const n=x(null==(t=e.state)?void 0:t.effects);n&&d.current.set(e.path,n)})),n===OW){v(e.entry);const t=x(e.effects);t&&d.current.set(OW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=X.useRef(void 0),T=X.useRef(NW.NotStarted);qY((()=>{queueMicrotask((()=>{const e=T.current===NW.Started;T.current=NW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():OW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=NW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=NW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==NW.Started)return;f.current=h.current,h.current=t;let n=C();const{transitions:r,source:a}=function(e,t,n){var r,a;const o=SW(e,t);for(let s=o.length-1;s>=0;s--){const e=null==(r=o[s])?void 0:r.state.on,t=null==e?void 0:e[n];if(t)return{transitions:t,source:null==(a=o[s])?void 0:a.path}}const i=e.on;return{transitions:null==i?void 0:i[n],source:void 0}}(e,n,t.type),o=w(r);if(!o)return;p.current=o;const i=AW(e,o.target??n,a);s("transition",t.type,o.target||n,`(${o.actions})`);i!==n?ue.flushSync((()=>_.set(i))):o.reenter?_.invoke(n,n):v(o.actions??[])}))};return null==(o=e.watch)||o.call(e,b()),{state:g(),send:A,context:u,prop:l,scope:i,refs:y,computed:E,event:m(),getStatus:()=>T.current}}function KY(e){const t=X.useRef(e);return t.current=e,t}function XY(e){queueMicrotask((()=>{ue.flushSync((()=>e()))}))}var QY,JY=(QY=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>QY({style:e}).style:QY}));const eZ=X.createContext(null);function tZ({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=X.useId(),u=qO(),d=Gq(ZY(Kq,{id:c,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,getRootNode:()=>{var e;return(null==(e=null==u?void 0:u.shadowHost)?void 0:e.shadowRoot)??document},onFileAccept:i,onFileChange:s,onFileReject:l}),JY);return og.jsx(eZ.Provider,{value:d,children:e})}function nZ(){const e=X.useContext(eZ);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function rZ(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const aZ={"application/pdf":"filePdf","text/plain":"fileText","text/markdown":"fileMarkdown","text/html":"fileHtml","text/csv":"fileCsv","text/x-log":"fileLog","application/json":"fileJson","text/x-sql":"fileSql","application/x-sql":"fileSql","text/x-script.python":"filePy","text/x-python":"filePy","text/x-python-script":"filePy"};function oZ(e){return e.startsWith("image/")}const iZ={"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/webp":[".webp"],"application/pdf":[".pdf"],"text/plain":[".txt",".text",".bat",".cfg",".conf",".def",".dic",".in",".list"],"text/x-log":[".log"],"text/markdown":[".md",".markdown"],"text/html":[".html",".htm"],"text/csv":[".csv"],"text/xml":[".xml"],"text/css":[".css"],"application/json":[".json"],"application/yaml":[".yaml",".yml"],"application/x-yaml":[".yaml",".yml"],"text/x-yaml":[".yaml",".yml"],"application/toml":[".toml"],"application/x-toml":[".toml"],"application/graphql":[".graphql",".gql"],"application/x-graphql":[".graphql",".gql"],"text/x-graphql":[".graphql",".gql"],"application/x-ndjson":[".ndjson"],"application/json5":[".json5"],"application/x-json5":[".json5"],"application/javascript":[".js",".mjs"],"text/javascript":[".js",".mjs"],"application/typescript":[".ts"],"text/x-typescript":[".ts"],"text/jsx":[".jsx"],"text/tsx":[".tsx"],"text/x-sh":[".sh"],"text/x-bash":[".bash"],"application/x-bash":[".bash"],"text/x-zsh":[".zsh"],"text/x-shellscript":[".sh",".ksh"],"application/x-powershell":[".ps1"],"text/vbscript":[".vbs"],"text/x-awk":[".awk"],"application/x-awk":[".awk"],"text/x-c":[".c",".h"],"text/x-c++":[".cpp",".cc",".cxx",".hh"],"text/x-csharp":[".cs"],"text/x-objectivec":[".m"],"text/x-objectivec++":[".mm"],"text/x-java":[".java"],"text/x-scala":[".scala"],"application/x-scala":[".scala"],"text/x-kotlin":[".kt"],"text/x-groovy":[".groovy"],"text/x-clojure":[".clj"],"text/x-go":[".go"],"text/x-golang":[".go"],"text/x-rust":[".rs"],"application/x-rust":[".rs"],"text/x-swift":[".swift"],"text/x-dart":[".dart"],"text/x-python":[".py"],"text/x-script.python":[".py"],"text/x-python-script":[".py"],"text/x-ruby":[".rb"],"text/x-perl":[".pl"],"text/x-lua":[".lua"],"text/x-r":[".r"],"text/x-R":[".r"],"text/x-julia":[".jl"],"text/x-elixir":[".ex"],"text/x-erlang":[".erl"],"text/x-haskell":[".hs"],"text/x-lisp":[".lisp"],"text/x-php":[".php"],"application/x-php":[".php"],"application/x-httpd-php":[".php"],"application/x-httpd-php-source":[".php"],"text/x-tex":[".tex"],"text/x-rst":[".rst"],"text/x-handlebars":[".hbs"],"text/x-mustache":[".mustache"],"text/x-ejs":[".ejs"],"text/x-jinja2":[".jinja",".jinja2"],"text/x-liquid":[".liquid"],"text/x-erb":[".erb"],"text/x-twig":[".twig"],"text/x-pug":[".pug"],"text/x-jade":[".jade"],"text/x-tmpl":[".tmpl"],"text/x-astro":[".astro"],"text/x-sass":[".sass"],"text/x-scss":[".scss"],"text/x-less":[".less"],"text/x-sql":[".sql"],"application/x-sql":[".sql"],"text/x-makefile":[".makefile",".mk"],"text/x-cmake":[".cmake"],"text/x-dockerfile":[".dockerfile"],"text/x-gradle":[".gradle"],"text/x-ini":[".ini"],"text/x-properties":[".properties"],"text/x-protobuf":[".proto"],"application/x-protobuf":[".proto"],"text/x-hcl":[".hcl"],"text/x-terraform":[".tf"],"application/x-terraform":[".tf"],"text/x-diff":[".diff"],"text/x-patch":[".patch"],"application/x-patch":[".patch"],"text/x-asm":[".asm",".s"],"message/rfc822":[".eml",".mht",".mhtml",".mime",".nws"],"text/srt":[".srt"],"application/x-subrip":[".srt"],"text/x-subrip":[".srt"],"text/vtt":[".vtt"],"text/x-vcard":[".vcf"],"text/calendar":[".ics",".ifb"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.oasis.opendocument.text":[".odt"],"application/vnd.oasis.opendocument.spreadsheet":[".ods"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/vnd.apple.pages":[".pages"],"application/vnd.apple.numbers":[".numbers"],"application/vnd.apple.keynote":[".key"],"application/x-iwork-pages-sffpages":[".pages"],"application/x-iwork-numbers-sffnumbers":[".numbers"],"application/x-iwork-keynote-sffkey":[".key"]},sZ=new Set(Object.keys(iZ)),lZ=10485760,cZ=Object.entries(iZ).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function uZ(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=cZ[n];return r?new File([e],e.name,{type:r}):e}const dZ=NV("div",{_id:"aiChatMessage__Files"}),pZ=({children:e,...t})=>{const{message:n}=eq();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return sZ.has(t??"")}));return r.length?og.jsx(dZ,{...t,children:e(r)}):null},fZ=NV("button",{_id:"aiChatMessage__File"}),hZ=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=XG(),[i,s]=X.useState(!0),l=X.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return og.jsx(MZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:og.jsx(fZ,{type:"button","aria-label":oZ(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":mV(i),onClick:rZ(r,(()=>{if(oZ(n??""))o({url:e,name:t??"file"});else if(e)if(e.startsWith("data:")){const n=document.createElement("a");n.href=e,n.download=t??"file",n.click()}else window.open(e,"_blank","noopener,noreferrer")})),...a})})},mZ=NV("div",{_id:"aiChatInput__Fieldset"}),gZ=e=>{const t=nZ();return og.jsx(mZ,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":mV(t.dragging),...e})},yZ=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=TJ();return og.jsx(tZ,{accept:iZ,maxFiles:10,maxFileSize:lZ,preventDocumentDrop:!0,acceptedFiles:t,onFileAccept:e=>n(e.files),onFileReject:e=>{const t=function(e){var t;if(!e.length)return null;const n=t=>e.some((e=>e.errors.includes(t)));if(n("TOO_MANY_FILES"))return{title:"Attachment limit reached",message:"You can only attach up to 10 files per message."};if(n("FILE_INVALID_TYPE"))return{title:"Unsupported file type",message:"Supported formats include images, PDFs, text, code, and document files."};if(n("FILE_TOO_LARGE"))return{title:"File too large",message:"Files must be smaller than 10MB."};if(n("FILE_EXISTS"))return{title:"File already exists",message:`The file "${(null==(t=e.find((e=>e.errors.includes("FILE_EXISTS"))))?void 0:t.file.name)??"file"}" is already attached to this message.`};return{title:"File rejected",message:"This file could not be added."}}(e.files);t&&r(t)},children:og.jsx(gZ,{...e})})},bZ=NV("div",{_id:"aiChatInput__DropZone"}),vZ=NV("div",{_id:"aiChatInput__Notification"}),kZ=e=>{const{inputNotification:t}=TJ();return t?og.jsx(vZ,{role:"alert",...e}):null},xZ=NV("p",{_id:"aiChatInput__NotificationTitle"}),wZ=({children:e,...t})=>{const{inputNotification:n}=TJ();return(null==n?void 0:n.title)?og.jsxs(xZ,{...t,children:[e,n.title]}):null},EZ=NV("p",{_id:"aiChatInput__NotificationMessage"}),_Z=e=>{const{inputNotification:t}=TJ();return og.jsx(EZ,{...e,children:null==t?void 0:t.message})},SZ=NV("button",{_id:"aiChatInput__NotificationClose"}),TZ=({onClick:e,...t})=>{const{clearInputNotification:n}=TJ();return og.jsx(SZ,{type:"button","aria-label":"Dismiss",onClick:rZ(e,n),...t})},CZ=NV("div",{_id:"aiChatInput__NotificationContent"}),AZ=NV("div",{_id:"aiChatInput__NotificationHeader"}),IZ=NV(YG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),NZ=NV("button",{_id:"aiChatInput__FileUploadButton"}),OZ=e=>{const{aiChatSettings:t}=oR(),n=nZ(),{onClick:r,...a}=e;return og.jsx(NZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:rZ(r,(()=>n.openFilePicker())),...a})},RZ=NV("input",{_id:"aiChatInput__FileInput"}),PZ=e=>{const t=nZ();return og.jsx(RZ,{...e,...t.getHiddenInputProps()})},LZ=NV("div",{_id:"aiChatInput__FileList"}),DZ=({children:e,...t})=>{const n=nZ().acceptedFiles;return n.length?og.jsx(LZ,{...t,children:e(n)}):null},MZ=Q.createContext(null);function FZ(){const e=Q.useContext(MZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const jZ=NV("div",{_id:"aiChatInput__FileItem"}),zZ=({file:e,...t})=>{const n=nZ(),[r,a]=X.useState(void 0),[o,i]=X.useState(!0);X.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return og.jsx(MZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:og.jsx(jZ,{"data-loading":mV(o),...t})})},BZ=NV("button",{_id:"aiChatInput__FilePreviewTrigger"}),HZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=FZ(),{openImagePreview:a}=XG();return og.jsx(BZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:rZ(e,(()=>{n&&a({url:n,name:r.name})})),...t})},UZ=NV("span",{_id:"aiChatInput__FileContent"}),$Z=e=>og.jsx(UZ,{...e}),VZ=NV("img",{_id:"aiChatInput__FileThumbnail"}),GZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=FZ();return og.jsx(VZ,{src:n,alt:r.name,onLoad:rZ(e,(()=>a(!1))),...t})},qZ=({className:e})=>{const{file:t}=FZ(),n=aZ[uZ(t).type]??"file";return og.jsx(YG,{iconKey:n,className:e})},WZ=NV("span",{_id:"aiChatInput__FileName"}),YZ=e=>{const{file:t}=FZ();return og.jsx(WZ,{...e,children:t.name})},ZZ=NV("button",{_id:"aiChatInput__FileRemove"}),KZ=NV(YG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),XZ=({onClick:e,...t})=>{const{onRemove:n}=FZ();return og.jsx(ZZ,{type:"button","aria-label":"Remove file",onClick:rZ(e,n),...t})},QZ=e=>{const[t,n]=X.useState(!1);return X.useEffect((()=>{const t=window.matchMedia(e);n(t.matches);const r=e=>n(e.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}),[e]),t},JZ=()=>{};function eK(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const tK=new Map;function nK(e="id"){const t=(tK.get(e)||0)+1;return tK.set(e,t),`${e}${t}`}function rK(e){const t=Number(e.code)||Number(e.statusCode);if(t&&!Number.isNaN(t))return t;try{const t=Number(JSON.parse(e.message??"").status);return t&&!Number.isNaN(t)?t:null}catch{return null}}const aK="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",oK="Please try again.",iK=()=>{const{baseSettings:e,aiChatSettings:t}=oR(),[n="",r]=fR({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),{logEvent:a}=lR(),{setConversationId:o,emitToParent:i}=function(){const e=qO(),t=null==e?void 0:e.shadowHost,n=X.useRef("");return{setConversationId:X.useCallback((e=>{n.current=e}),[]),emitToParent:X.useCallback(((e,r)=>{if(!t)return void console.warn("useStreamingEvents: No host element available for parent event emission");const a=new CustomEvent(`ikp-${e}`,{detail:{...r,conversationId:n.current,timestamp:Date.now()},bubbles:!0,composed:!0});t.dispatchEvent(a)}),[t])}}(),s=X.useRef(n);X.useEffect((()=>{const e=s.current;s.current=n,e!==n&&a({eventName:"chat_conversation_changed",properties:{conversationId:n,previousConversationId:e}})}),[n,a]);const[l,c]=X.useState(""),{shouldBypassCaptcha:u,filters:d,userProperties:p,analyticsProperties:f}=e,{authToken:h,isAuthenticated:m,isAuthConfigured:g,refreshAuthToken:y,sessionToken:b,refreshSession:v,getCaptchaHeader:k,invalidateCaptcha:x,effectiveAuthToken:w,applicableRefreshSession:E}=FR(),{onInputMessageChange:_,filters:S,baseUrl:T,agentUrl:C,context:A,headers:I,appId:N,apiKey:O,files:R}=t,P=X.useRef(k);P.current=k;const L=C||`${T}/run/api/chat`,{loadConversation:D}=(({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o})=>{const{fetchWithAuth:i}=NR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??JZ,refreshSession:o});return{loadConversation:X.useCallback((async(t,r)=>{var a;if(!e||!n)return null;try{const n=`${e}/run/v1/conversations/${t}`,o=await i(n,{signal:r});if(!o.ok)throw new Error(`Failed to load conversation: ${o.status}`);return(null==(a=(await o.json()).data)?void 0:a.messages)??[]}catch($Ie){return $Ie instanceof Error&&"AbortError"===$Ie.name||console.error("[useConversationLoader]",$Ie),null}}),[e,n,i])}})({baseUrl:T,appId:N,authToken:w,getCaptchaHeader:k,invalidateCaptcha:x,refreshSession:E}),[M,F]=X.useState(!1),j=X.useRef(null);j.current=b;const z=X.useRef(null);z.current=h;const B=X.useRef(void 0);B.current=p&&Object.keys(p).length>0?p:void 0;const H=X.useRef(void 0);H.current=f&&Object.keys(f).length>0?f:void 0;const U=X.useRef(0),$=X.useRef(null),V=X.useRef(null),G=X.useRef(void 0),q=(null==R?void 0:R.map((e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`)).join("\n"))??"";X.useEffect((()=>{G.current=(null==R?void 0:R.length)?R:void 0}),[q]);const W=X.useRef(I);W.current=I;const Y=X.useRef(void 0);Y.current=d||S?JSON.stringify({...d,...S}):void 0;const[Z,K]=X.useState([]),Q=X.useMemo((()=>new n$({api:L,headers:()=>{const e=O??z.current??j.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":(new Date).toISOString(),"x-inkeep-invocation-type":"chat_widget",...N?{"x-inkeep-app-id":N}:{},...e?{Authorization:`Bearer ${e}`}:{},...Y.current?{"inkeep-filters":Y.current}:{},...W.current}},prepareSendMessagesRequest:async e=>{const t=await P.current(),n=e.messages[e.messages.length-1];return n||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:n?[n]:[],trigger:e.trigger,messageId:e.messageId,...B.current?{userProperties:B.current}:{},...H.current?{properties:H.current}:{}},headers:{...e.headers,...t}}},body:{requestContext:A}})),[L,A,N,O]),{messages:J,sendMessage:ee,addToolApprovalResponse:te,status:ne,setMessages:re,stop:ae,error:oe}=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=X.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const a={...n,onToolCall:e=>{var t,n;return null==(n=(t=r.current).onToolCall)?void 0:n.call(t,e)},onData:e=>{var t,n;return null==(n=(t=r.current).onData)?void 0:n.call(t,e)},onFinish:e=>{var t,n;return null==(n=(t=r.current).onFinish)?void 0:n.call(t,e)},onError:e=>{var t,n;return null==(n=(t=r.current).onError)?void 0:n.call(t,e)},sendAutomaticallyWhen:e=>{var t,n,a;return null!=(a=null==(n=(t=r.current).sendAutomaticallyWhen)?void 0:n.call(t,e))&&a}},o=X.useRef("chat"in n?n.chat:new O$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new O$(a));const i=X.useCallback((t=>o.current["~registerMessagesCallback"](t,e)),[e,o.current.id]),s=X.useSyncExternalStore(i,(()=>o.current.messages),(()=>o.current.messages)),l=X.useSyncExternalStore(o.current["~registerStatusCallback"],(()=>o.current.status),(()=>o.current.status)),c=X.useSyncExternalStore(o.current["~registerErrorCallback"],(()=>o.current.error),(()=>o.current.error)),u=X.useCallback((e=>{"function"==typeof e&&(e=e(o.current.messages)),o.current.messages=e}),[o]);return X.useEffect((()=>{t&&o.current.resumeStream()}),[t,o]),{id:o.current.id,messages:s,setMessages:u,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:l,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}({transport:Q,onData(e){i(e.type,e.data)},async onFinish({message:e}){i("completion",{conversationId:n}),await a({eventName:"assistant_message_received",properties:{conversationId:n,messageId:e.id}}),a({eventName:"assistant_answer_displayed",properties:{conversationId:n,messageId:e.id}})},onError(t){var r,o;console.error("onError",{code:t.code,message:t.message});const i=u||O?null:function(e){const t=rK(e),n=CR(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":null}(t);if(null!==i&&U.current<1){U.current++;const e=V.current,t=$.current;return void(async()=>{if("session"===i&&g){const e=await y();if(!e)throw new Error("Auth token refresh failed");z.current=e}else if("session"===i){const e=await v();e&&(j.current=e)}else x();e?te(e):t&&(re((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r})),ee({id:t.messageId,parts:[...t.content?[{type:"text",text:t.content}]:[],...t.files??[]]},{body:t.body}))})().catch((()=>{U.current=0,x(),re((e=>{const t=[...e],n=t[t.length-1];if(!n)return t;const r=aK;return"user"===n.role?t.push({id:eK(16),role:"assistant",parts:[{type:"text",text:r}]}):n.parts=[{type:"text",text:r}],t}))}))}U.current=0,null!==i&&x();const s=function(e){const t=rK(e);return 400===t||429===t}(t),l=(t=>{var n,r;switch(rK(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??oK}catch{return(null==(r=t.message)?void 0:r.trim())||oK}case 401:return g?"Authentication failed. Please try again.":aK;case 403:return`There seems to be a configuration error. Please contact ${e.organizationDisplayName??"Administrator"}`;case 429:return"You're sending requests too quickly. Please wait a moment and try again.";default:return aK}})(t);if(a({eventName:"chat_error",properties:{conversationId:n,messageId:null==(r=J.at(-1))?void 0:r.id,error:t.message}}),s){xe({title:"Request failed",message:l},8e3),re((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r}));const e=null==(o=$.current)?void 0:o.content;return e&&c(e),void(ve.current=t)}re((e=>{const t=[...e],n=t[t.length-1];return n&&("user"===n.role?t.push({id:eK(16),role:"assistant",parts:[{type:"text",text:l}]}):n.parts=[{type:"text",text:l}]),t}))}}),ie=X.useRef(m);X.useEffect((()=>{const e=ie.current;ie.current=m,e!==m&&(ae(),be(null),re([]),r(""),c(""),K([]),x())}),[m,ae,re,r,x]);const se="submitted"===ne,le="streaming"===ne,ce=X.useMemo((()=>{var e,t;const n=[...J??[]].reverse().find((e=>"assistant"===e.role));if(!n)return!1;const r=null==(e=n.parts)?void 0:e.at(-1);return!!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.type&&t.type.startsWith("tool-")})(r)&&("output-available"===r.state&&(!!(null==(t=r.approval)?void 0:t.id)&&!le))}),[J,le]),[ue,de]=X.useState(!1),pe=le||ce&&!ue,fe=se||pe,he=0===J.length,me=!l.trim()&&0===Z.length||fe,ge=QZ("(max-width: 768px)"),[ye,be]=X.useState(null),ve=X.useRef(null);X.useEffect((()=>{if(oe){if(ve.current===oe)return void(ve.current=null);be(oe)}}),[oe]);const{inputNotification:ke,showInputNotification:xe,clearInputNotification:we}=function(){const[e,t]=X.useState(null),n=X.useRef(null),r=X.useCallback(((e,r=5e3)=>{n.current&&clearTimeout(n.current),t(e),n.current=setTimeout((()=>t(null)),r)}),[]),a=X.useCallback((()=>{n.current&&clearTimeout(n.current),t(null)}),[]);return X.useEffect((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{inputNotification:e,showInputNotification:r,clearInputNotification:a}}(),Ee=X.useRef(null);X.useEffect((()=>{null==_||_(l)}),[l]);const _e=async(e=l)=>{if(me&&(!e||0===e.trim().length)&&0===Z.length)return;const t=Z;K([]),c(""),U.current=0,V.current=null,de(!1);let i=n;i||(i=`conv_${eK(16)}`,r(i));const s=eK(21);o(i),await a({eventName:"user_message_submitted",properties:{conversationId:i,messageId:s}});const u=G.current;G.current=void 0;let d=[];if(t.length>0)try{d=await Promise.all(t.map((e=>{const t=uZ(e);return new Promise(((e,n)=>{const r=new FileReader;r.onload=()=>{"string"==typeof r.result?e({type:"file",url:r.result,mediaType:t.type,filename:t.name}):n(new Error(`Failed to read file "${t.name}"`))},r.onerror=()=>n(new Error(`Failed to read file "${t.name}"`)),r.readAsDataURL(t)}))})))}catch(h){return void xe({title:"Failed to attach files",message:"Could not read one or more files. Please try again."})}const p=d.length||(null==u?void 0:u.length)?[...d,...u??[]]:void 0,f=[...e.trim()?[{type:"text",text:e}]:[],...p??[]];$.current={content:e,messageId:s,body:{conversationId:i},files:p},ee({id:s,parts:f},{body:{conversationId:i}})},Se=X.useCallback((e=>{U.current=0,V.current=e,de(!1),te(e)}),[te]),Te=X.useCallback((()=>{de(!0),ae().then((()=>{i("aborted",{conversationId:n})}))}),[ae,n,i]),Ce=()=>{be(null),re([]),r(""),x(),G.current=(null==R?void 0:R.length)?R:void 0,a({eventName:"chat_clear_button_clicked",properties:{conversationId:n}})},Ae=X.useCallback(((e,t)=>{be(null),re(t),r(e),x(),G.current=void 0}),[re,r,x]),Ie=X.useCallback((async(e,t)=>{Te(),Ae(e,[]),F(!0);try{const n=await D(e,t);if(null===n)return!1;const r=n[n.length-1],a="user"===(null==r?void 0:r.role)?[...n,{id:eK(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:n;return Ae(e,a),!0}finally{(null==t?void 0:t.aborted)||F(!1)}}),[Ae,D,Te]);(({conversationId:e,effectiveAuthToken:t,loadAndRestoreSession:n,onLoadFailed:r})=>{const a=X.useRef(null),o=X.useRef(n);o.current=n;const i=X.useRef(r);i.current=r,X.useEffect((()=>{if(!e||!t)return;if(a.current===e)return;a.current=e;const n=new AbortController,r=t=>{var n;a.current=null,console.error("[useInitialConversation] failed to load conversation:",e,t),null==(n=i.current)||n.call(i)};return(async()=>{try{await o.current(e,n.signal)||n.signal.aborted||r()}catch($Ie){n.signal.aborted||r($Ie)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:w,loadAndRestoreSession:Ie,onLoadFailed:()=>Ae("",[])});const{openForm:Ne}=pL(),Oe=o0();return X.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:_e,updateInputMessage(e){c(e)},clearChat:Ce,openForm:e=>{null==Oe||Oe.setView("chat"),Ne(e,void 0)},focusInput:()=>{var e;null==(e=Ee.current)||e.focus()}}))),{messages:J,sendMessage:ee,addToolApprovalResponse:Se,isLoading:se,isStreaming:pe,isBusy:fe,error:ye,setError:be,isSubmitDisabled:me,input:l,handleInputChange:e=>c(e.target.value),handleInputKeyDown:e=>{"Enter"!==e.key||e.shiftKey||me||e.nativeEvent.isComposing||(e.preventDefault(),_e())},handleSubmit:_e,stop:Te,clear:Ce,inputRef:Ee,isMobile:ge,files:Z,setFiles:K,isNewChat:he,conversationId:n,restoreSession:Ae,loadAndRestoreSession:Ie,isSessionLoading:M,authToken:m?h:b,refreshSession:m?y:v,getCaptchaHeader:k,invalidateCaptcha:x,inputNotification:ke,showInputNotification:xe,clearInputNotification:we}},sK=()=>{};const lK=X.createContext(void 0);function cK(){const{baseSettings:e,aiChatSettings:t}=oR(),[n,r]=X.useState(null),[a,o]=X.useState({}),{conversationId:i,messages:s,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}=TJ(),{analyticsProperties:p}=e,{logEvent:f}=lR(),{submitFeedback:h}=function({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o}){const{fetchWithAuth:i}=NR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??sK,refreshSession:o});return{submitFeedback:X.useCallback((async({conversationId:t,messageId:r,type:a,details:o})=>{if(!e||!n)return;const s=`${e}/run/v1/feedback`,l=await i(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,messageId:r,type:a,details:o})});if(!l.ok)throw new Error(`Feedback submission failed: ${l.status}`);return l.json()}),[e,n,i])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}),m=X.useCallback((async(t,n,r)=>{o((e=>({...e,[t]:{type:n,messageId:t,details:r}}))),e.onFeedback?e.onFeedback({type:n,messageId:t,details:r,properties:p}).catch((e=>console.warn("[feedback] onFeedback error:",e))):h({conversationId:i,messageId:t,type:n,details:r}).catch((e=>console.warn("[feedback] submitFeedbackToApi error:",e)));const a=s.findIndex((e=>e.id===t)),l=s[a],c={conversationId:i,question:vV(s[a-1]),answer:vV(l),messageId:t,details:r};f({eventName:"positive"===n?"assistant_positive_feedback_submitted":"assistant_negative_feedback_submitted",properties:c}),"negative"===n&&f({eventName:"user_escalation_indicated",properties:{escalationType:"downvote",conversationId:i,messageId:t}})}),[s,i,p,e,f,h]);return{feedback:a,currentFeedback:n,setCurrentFeedback:r,submitPositiveFeedback:X.useCallback((async e=>{m(e,"positive")}),[m]),submitNegativeFeedback:X.useCallback((async(e,t)=>{m(e,"negative",t)}),[m])}}const uK=({children:e})=>{const t=cK();return og.jsx(lK.Provider,{value:t,children:e})},dK=()=>{const e=X.useContext(lK);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function pK(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function fK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function hK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=fK(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():fK(e[t],null)}}}}function mK(...e){return X.useCallback(hK(...e),e)}function gK(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},yK(r,...t)]}function yK(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var bK=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(xK);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(vK,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(vK,{...r,ref:t,children:n})}));bK.displayName="Slot";var vK=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n);return X.cloneElement(n,{...wK(r,n.props),ref:t?hK(t,e):e})}return X.Children.count(n)>1?X.Children.only(null):null}));vK.displayName="SlotClone";var kK=({children:e})=>og.jsx(og.Fragment,{children:e});function xK(e){return X.isValidElement(e)&&e.type===kK}function wK(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}var EK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?bK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function _K(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function SK(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var TK,CK="dismissableLayer.update",AK="dismissableLayer.pointerDownOutside",IK="dismissableLayer.focusOutside",NK=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),OK=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(NK),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=mK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){PK(AK,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){PK(IK,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return SK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(TK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),RK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=TK)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),RK())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(CK,e),()=>document.removeEventListener(CK,e)}),[]),og.jsx(EK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:pK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:pK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:pK(e.onPointerDownCapture,x.onPointerDownCapture)})}));OK.displayName="DismissableLayer";function RK(){const e=new CustomEvent(CK);document.dispatchEvent(e)}function PK(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(NK),r=X.useRef(null),a=mK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(EK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var LK=Boolean(null==globalThis?void 0:globalThis.document)?X.useLayoutEffect:()=>{},DK=J["useId".toString()]||(()=>{}),MK=0;function FK(e){const[t,n]=X.useState(DK());return LK((()=>{n((e=>e??String(MK++)))}),[e]),e||(t?`radix-${t}`:"")}const jK=["top","right","bottom","left"],zK=Math.min,BK=Math.max,HK=Math.round,UK=Math.floor,$K=e=>({x:e,y:e}),VK={left:"right",right:"left",bottom:"top",top:"bottom"};function GK(e,t,n){return BK(e,zK(t,n))}function qK(e,t){return"function"==typeof e?e(t):e}function WK(e){return e.split("-")[0]}function YK(e){return e.split("-")[1]}function ZK(e){return"x"===e?"y":"x"}function KK(e){return"y"===e?"height":"width"}function XK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function QK(e){return ZK(XK(e))}function JK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const eX=["left","right"],tX=["right","left"],nX=["top","bottom"],rX=["bottom","top"];function aX(e,t,n,r){const a=YK(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?tX:eX:t?eX:tX;case"left":case"right":return t?nX:rX;default:return[]}}(WK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(JK)))),o}function oX(e){const t=WK(e);return VK[t]+e.slice(t.length)}function iX(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function sX(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function lX(e,t,n){let{reference:r,floating:a}=e;const o=XK(t),i=QK(t),s=KK(i),l=WK(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch(YK(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function cX(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=qK(t,e),h=iX(f),m=s[p?"floating"===d?"reference":"floating":d],g=sX(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},k=sX(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-k.top+h.top)/v.y,bottom:(k.bottom-g.bottom+h.bottom)/v.y,left:(g.left-k.left+h.left)/v.x,right:(k.right-g.right+h.right)/v.x}}function uX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dX(e){return jK.some((t=>e[t]>=0))}const pX=new Set(["left","top"]);function fX(){return"undefined"!=typeof window}function hX(e){return yX(e)?(e.nodeName||"").toLowerCase():"#document"}function mX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function gX(e){var t;return null==(t=(yX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function yX(e){return!!fX()&&(e instanceof Node||e instanceof mX(e).Node)}function bX(e){return!!fX()&&(e instanceof Element||e instanceof mX(e).Element)}function vX(e){return!!fX()&&(e instanceof HTMLElement||e instanceof mX(e).HTMLElement)}function kX(e){return!(!fX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof mX(e).ShadowRoot)}function xX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=OX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function wX(e){return/^(table|td|th)$/.test(hX(e))}function EX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const _X=/transform|translate|scale|rotate|perspective|filter/,SX=/paint|layout|strict|content/,TX=e=>!!e&&"none"!==e;let CX;function AX(e){const t=bX(e)?OX(e):e;return TX(t.transform)||TX(t.translate)||TX(t.scale)||TX(t.rotate)||TX(t.perspective)||!IX()&&(TX(t.backdropFilter)||TX(t.filter))||_X.test(t.willChange||"")||SX.test(t.contain||"")}function IX(){return null==CX&&(CX="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),CX}function NX(e){return/^(html|body|#document)$/.test(hX(e))}function OX(e){return mX(e).getComputedStyle(e)}function RX(e){return bX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function PX(e){if("html"===hX(e))return e;const t=e.assignedSlot||e.parentNode||kX(e)&&e.host||gX(e);return kX(t)?t.host:t}function LX(e){const t=PX(e);return NX(t)?e.ownerDocument?e.ownerDocument.body:e.body:vX(t)&&xX(t)?t:LX(t)}function DX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=LX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=mX(a);if(o){const e=MX(i);return t.concat(i,i.visualViewport||[],xX(a)?a:[],e&&n?DX(e):[])}return t.concat(a,DX(a,[],n))}function MX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FX(e){const t=OX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=vX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=HK(n)!==o||HK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function jX(e){return bX(e)?e:e.contextElement}function zX(e){const t=jX(e);if(!vX(t))return $K(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=FX(t);let i=(o?HK(n.width):n.width)/r,s=(o?HK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const BX=$K(0);function HX(e){const t=mX(e);return IX()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:BX}function UX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=jX(e);let i=$K(1);t&&(r?bX(r)&&(i=zX(r)):i=zX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==mX(e))&&t}(o,n,r)?HX(o):$K(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=mX(o),t=r&&bX(r)?mX(r):r;let n=e,a=MX(n);for(;a&&r&&t!==n;){const e=zX(a),t=a.getBoundingClientRect(),r=OX(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=mX(a),a=MX(n)}}return sX({width:u,height:d,x:l,y:c})}function $X(e,t){const n=RX(e).scrollLeft;return t?t.left+n:UX(gX(e)).left+n}function VX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-$X(e,n),y:n.top+t.scrollTop}}function GX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=mX(e),r=gX(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=IX();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=$X(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=gX(e),n=RX(e),r=e.ownerDocument.body,a=BK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=BK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+$X(e);const s=-n.scrollTop;return"rtl"===OX(r).direction&&(i+=BK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(gX(e));else if(bX(t))r=function(e,t){const n=UX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=vX(e)?zX(e):$K(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=HX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return sX(r)}function qX(e,t){const n=PX(e);return!(n===t||!bX(n)||NX(n))&&("fixed"===OX(n).position||qX(n,t))}function WX(e,t,n){const r=vX(t),a=gX(t),o="fixed"===n,i=UX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=$K(0);function c(){l.x=$X(a)}if(r||!r&&!o)if(("body"!==hX(t)||xX(a))&&(s=RX(t)),r){const e=UX(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?$K(0):VX(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function YX(e){return"static"===OX(e).position}function ZX(e,t){if(!vX(e)||"fixed"===OX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return gX(e)===n&&(n=n.ownerDocument.body),n}function KX(e,t){const n=mX(e);if(EX(e))return n;if(!vX(e)){let t=PX(e);for(;t&&!NX(t);){if(bX(t)&&!YX(t))return t;t=PX(t)}return n}let r=ZX(e,t);for(;r&&wX(r)&&YX(r);)r=ZX(r,t);return r&&NX(r)&&YX(r)&&!AX(r)?n:r||function(e){let t=PX(e);for(;vX(t)&&!NX(t);){if(AX(t))return t;if(EX(t))return null;t=PX(t)}return null}(e)||n}const XX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=gX(r),s=!!t&&EX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=$K(1);const u=$K(0),d=vX(r);if((d||!d&&!o)&&(("body"!==hX(r)||xX(i))&&(l=RX(r)),d)){const e=UX(r);c=zX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?$K(0):VX(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:gX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?EX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=DX(e,[],!1).filter((e=>bX(e)&&"body"!==hX(e))),a=null;const o="fixed"===OX(e).position;let i=o?PX(e):e;for(;bX(i)&&!NX(i);){const t=OX(i),n=AX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||xX(i)&&!n&&qX(e,i))?r=r.filter((e=>e!==i)):a=t,i=PX(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=GX(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=GX(t,o[d],a);s=BK(e.top,s),l=zK(e.right,l),c=zK(e.bottom,c),u=BK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:KX,getElementRects:async function(e){const t=this.getOffsetParent||KX,n=this.getDimensions,r=await n(e.floating);return{reference:WX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=FX(e);return{width:t,height:n}},getScale:zX,isElement:bX,isRTL:function(e){return"rtl"===OX(e).direction}};function QX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=jX(e),u=a||o?[...c?DX(c):[],...t?DX(t):[]]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=gX(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-UK(d)+"px "+-UK(a.clientWidth-(u+p))+"px "+-UK(a.clientHeight-(d+f))+"px "+-UK(u)+"px",threshold:BK(0,zK(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||QX(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?UX(e):null;return l&&function t(){const r=UX(e);m&&!QX(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const eQ=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=WK(n),s=YK(n),l="y"===XK(n),c=pX.has(i)?-1:1,u=o&&l?-1:1,d=qK(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},tQ=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=qK(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=XK(WK(a)),f=ZK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=GK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=GK(m+d["y"===p?"top":"left"],m,m-d[e])}const g=l.fn({...t,[f]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:s}}}}}},nQ=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=qK(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=WK(a),b=XK(s),v=WK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[oX(s)]:function(e){const t=oX(e);return[JK(e),t,JK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...aX(s,m,h,k));const E=[s,...x],_=await l.detectOverflow(t,g),S=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=YK(e),a=QK(e),o=KK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=oX(i)),[i,oX(i)]}(a,i,k);S.push(_[e[0]],_[e[1]])}if(T=[...T,{placement:a,overflows:S}],!S.every((e=>e<=0))){var C,A;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&b!==XK(t))||T.every((e=>XK(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(A=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var I;const e=null==(I=T.filter((e=>{if(w){const t=XK(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},rQ=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=qK(e,t),u=await i.detectOverflow(t,c),d=WK(a),p=YK(a),f="y"===XK(a),{width:h,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,k=zK(m-u[g],b),x=zK(h-u[y],v),w=!t.middlewareData.shift;let E=k,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),w&&!p){const e=BK(u.left,0),t=BK(u.right,0),n=BK(u.top,0),r=BK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:BK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:BK(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const S=await i.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},aQ=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=qK(e,t);switch(a){case"referenceHidden":{const e=uX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:dX(e)}}}case"escaped":{const e=uX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:dX(e)}}}default:return{}}}}},oQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=qK(e,t)||{};if(null==c)return{};const d=iX(u),p={x:n,y:r},f=QK(a),h=KK(f),m=await i.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[f]-p[f]-o.floating[h],x=p[f]-o.reference[f],w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=w?w[v]:0;E&&await(null==i.isElement?void 0:i.isElement(w))||(E=s.floating[v]||o.floating[h]);const _=k/2-x/2,S=E/2-m[h]/2-1,T=zK(d[y],S),C=zK(d[b],S),A=T,I=E-m[h]-C,N=E/2-m[h]/2+_,O=GK(A,N,I),R=!l.arrow&&null!=YK(a)&&N!==O&&o.reference[h]/2-(N<A?T:C)-m[h]/2<0,P=R?N<A?N-A:N-I:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:N-O-P,...R&&{alignmentOffset:P}},reset:R}}}),iQ=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=qK(e,t),u={x:n,y:r},d=XK(a),p=ZK(d);let f=u[p],h=u[d];const m=qK(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+g.mainAxis,n=o.reference[p]+o.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=pX.has(WK(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},sQ=(e,t,n)=>{const r=new Map,a={platform:XX,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:cX},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=lX(c,r,l),p=r,f=0;const h={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:b,y:v,data:k,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=v?v:d,h[g]={...h[g],...k},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:u,y:d}=lX(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var lQ="undefined"!=typeof document?X.useLayoutEffect:function(){};function cQ(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!cQ(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!cQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function uQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dQ(e,t){const n=uQ(e);return Math.round(t*n)/n}function pQ(e){const t=X.useRef(e);return lQ((()=>{t.current=e})),t}function fQ(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=X.useState(r);cQ(p,r)||f(r);const[h,m]=X.useState(null),[g,y]=X.useState(null),b=X.useCallback((e=>{e!==w.current&&(w.current=e,m(e))}),[]),v=X.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),k=o||h,x=i||g,w=X.useRef(null),E=X.useRef(null),_=X.useRef(u),S=null!=l,T=pQ(l),C=pQ(a),A=pQ(c),I=X.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),sQ(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};N.current&&!cQ(_.current,t)&&(_.current=t,ue.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);lQ((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const N=X.useRef(!1);lQ((()=>(N.current=!0,()=>{N.current=!1})),[]),lQ((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,I);I()}}),[k,x,I,T,S]);const O=X.useMemo((()=>({reference:w,floating:E,setReference:b,setFloating:v})),[b,v]),R=X.useMemo((()=>({reference:k,floating:x})),[k,x]),P=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=dQ(R.floating,u.x),r=dQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...uQ(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,u.x,u.y]);return X.useMemo((()=>({...u,update:I,refs:O,elements:R,floatingStyles:P})),[u,I,O,R,P])}const hQ=(e,t)=>{const n=eQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},mQ=(e,t)=>{const n=tQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},gQ=(e,t)=>({fn:iQ(e).fn,options:[e,t]}),yQ=(e,t)=>{const n=nQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},bQ=(e,t)=>{const n=rQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},vQ=(e,t)=>{const n=aQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},kQ=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?oQ({element:n.current,padding:r}).fn(t):{}:n?oQ({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var xQ=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(EK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));xQ.displayName="Arrow";var wQ=xQ;function EQ(e){const[t,n]=X.useState(void 0);return LK((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var _Q="Popper",[SQ,TQ]=gK(_Q),[CQ,AQ]=SQ(_Q),IQ=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(CQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};IQ.displayName=_Q;var NQ="PopperAnchor",OQ=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=AQ(NQ,n),i=X.useRef(null),s=mK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx(EK.div,{...a,ref:s})}));OQ.displayName=NQ;var RQ="PopperContent",[PQ,LQ]=SQ(RQ),DQ=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=AQ(RQ,l),[E,_]=X.useState(null),S=mK(t,(e=>_(e))),[T,C]=X.useState(null),A=EQ(T),I=(null==A?void 0:A.width)??0,N=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(zQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=fQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>JX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[hQ({mainAxis:u+N,alignmentAxis:p}),h&&mQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?gQ():void 0,...D}),h&&yQ({...D}),bQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&kQ({element:T,padding:f}),BQ({arrowWidth:I,arrowHeight:N}),b&&vQ({strategy:"referenceHidden",...D})]}),[H,U]=HQ(j),$=_K(k);LK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return LK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(PQ,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(EK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));DQ.displayName=RQ;var MQ="PopperArrow",FQ={top:"bottom",right:"left",bottom:"top",left:"right"},jQ=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=LQ(MQ,n),o=FQ[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(wQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function zQ(e){return null!==e}jQ.displayName=MQ;var BQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=HQ(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function HQ(e){const[t,n="center"]=e.split("-");return[t,n]}var UQ=IQ,$Q=OQ,VQ=DQ,GQ=jQ;var qQ=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef({}),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=WQ(r.current);o.current="mounted"===s?e:"none"}),[s]),LK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=WQ(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),LK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=WQ(r.current).includes(o.animationName);if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=WQ(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=mK(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function WQ(e){return(null==e?void 0:e.animationName)||"none"}function YQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=X.useState(e),[r]=n,a=X.useRef(r),o=_K(t);return X.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=_K(n);return[i,X.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}qQ.displayName="Presence";var ZQ=X.forwardRef(((e,t)=>og.jsx(EK.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));ZQ.displayName="VisuallyHidden";var KQ=ZQ,[XQ]=gK("Tooltip",[TQ]),QQ=TQ(),JQ="TooltipProvider",eJ=700,tJ="tooltip.open",[nJ,rJ]=XQ(JQ),aJ=e=>{const{__scopeTooltip:t,delayDuration:n=eJ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=X.useState(!0),l=X.useRef(!1),c=X.useRef(0);return X.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),og.jsx(nJ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:X.useCallback((()=>{window.clearTimeout(c.current),s(!1)}),[]),onClose:X.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:X.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:o})};aJ.displayName=JQ;var oJ="Tooltip",[iJ,sJ]=XQ(oJ),lJ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=rJ(oJ,e.__scopeTooltip),c=QQ(t),[u,d]=X.useState(null),p=FK(),f=X.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=X.useRef(!1),[y=!1,b]=YQ({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(tJ))):l.onClose(),null==o||o(e)}}),v=X.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),k=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,b(!0)}),[b]),x=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,b(!1)}),[b]),w=X.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{g.current=!0,b(!0),f.current=0}),m)}),[m,b]);return X.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),og.jsx(UQ,{...c,children:og.jsx(iJ,{scope:t,contentId:p,open:y,stateAttribute:v,trigger:u,onTriggerChange:d,onTriggerEnter:X.useCallback((()=>{l.isOpenDelayed?w():k()}),[l.isOpenDelayed,w,k]),onTriggerLeave:X.useCallback((()=>{h?x():(window.clearTimeout(f.current),f.current=0)}),[x,h]),onOpen:k,onClose:x,disableHoverableContent:h,children:n})})};lJ.displayName=oJ;var cJ="TooltipTrigger",uJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=sJ(cJ,n),o=rJ(cJ,n),i=QQ(n),s=mK(t,X.useRef(null),a.onTriggerChange),l=X.useRef(!1),c=X.useRef(!1),u=X.useCallback((()=>l.current=!1),[]);return X.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),og.jsx($Q,{asChild:!0,...i,children:og.jsx(EK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:pK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:pK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:pK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:pK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:pK(e.onBlur,a.onClose),onClick:pK(e.onClick,a.onClose)})})}));uJ.displayName=cJ;var[dJ,pJ]=XQ("TooltipPortal",{forceMount:void 0}),fJ="TooltipContent",hJ=X.forwardRef(((e,t)=>{const n=pJ(fJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=sJ(fJ,e.__scopeTooltip);return og.jsx(qQ,{present:r||i.open,children:i.disableHoverableContent?og.jsx(bJ,{side:a,...o,ref:t}):og.jsx(mJ,{side:a,...o,ref:t})})})),mJ=X.forwardRef(((e,t)=>{const n=sJ(fJ,e.__scopeTooltip),r=rJ(fJ,e.__scopeTooltip),a=X.useRef(null),o=mK(t,a),[i,s]=X.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,p=X.useCallback((()=>{s(null),d(!1)}),[d]),f=X.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return X.useEffect((()=>()=>p()),[p]),X.useEffect((()=>{if(l&&u){const e=e=>f(e,u),t=e=>f(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[l,u,f,p]),X.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==u?void 0:u.contains(t)),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o].x,s=t[o].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(a=!a)}return a}(n,i);r?p():a&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,u,i,c,p]),og.jsx(bJ,{...e,ref:o})})),[gJ,yJ]=XQ(oJ,{isInside:!1}),bJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=sJ(fJ,n),c=QQ(n),{onClose:u}=l;return X.useEffect((()=>(document.addEventListener(tJ,u),()=>document.removeEventListener(tJ,u))),[u]),X.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(l.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,u]),og.jsx(OK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:og.jsxs(VQ,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[og.jsx(kK,{children:r}),og.jsx(gJ,{scope:n,isInside:!0,children:og.jsx(KQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));hJ.displayName=fJ;var vJ="TooltipArrow",kJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=QQ(n);return yJ(vJ,n).isInside?null:og.jsx(GQ,{...a,...r,ref:t})}));kJ.displayName=vJ;var xJ=aJ,wJ=uJ,EJ=kJ;const _J=X.createContext(void 0),SJ=({children:e,...t})=>{const n=iK();return og.jsx(_J.Provider,{value:{...n,...t},children:og.jsx(uK,{children:og.jsx(xJ,{children:e})})})},TJ=()=>{const e=X.useContext(_J);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},CJ=X.createContext(void 0);const AJ=({layout:e,children:t})=>{const n=function(e){const{stop:t,clear:n,conversationId:r,isStreaming:a,loadAndRestoreSession:o,authToken:i,refreshSession:s,getCaptchaHeader:l,invalidateCaptcha:c}=TJ(),{aiChatSettings:u,baseSettings:d}=oR(),{baseUrl:p,appId:f,apiKey:h}=u,m=!!d.getAuthToken,g=!h&&!!f&&(!!i||m),{fetchWithAuth:y}=NR({appId:f,authToken:i,getCaptchaHeader:l,invalidateCaptcha:c,refreshSession:s}),[b,v]=X.useState(!1),[k,x]=X.useState([]),[w,E]=X.useState(!i&&g),[_,S]=X.useState(0),[T,C]=X.useState(!1),A=X.useRef(!1),I=X.useRef(null),N=X.useRef(m),O=X.useRef(i);X.useEffect((()=>{const e=N.current,t=O.current;N.current=m,O.current=i,(e!==m||null!==t&&null!==i&&t!==i)&&(x([]),S(0),C(!1),A.current=!1)}),[m,i]);const R=X.useRef([]);R.current=k;const P=X.useRef(y);P.current=y;const L=X.useCallback((async(e,t=!1)=>{if(p&&i&&g){t||E(!0);try{const n=`${p}/run/v1/conversations?page=${e+1}&limit=25`,r=await P.current(n);if(!r.ok)throw new Error(`Failed to fetch conversations: ${r.status}`);const a=await r.json(),o=(a.data??[]).map((e=>({id:e.id,title:e.title??"",createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})));x((n=>{if(0===e&&!t)return o;if(0===e&&t){const e=new Set(o.map((e=>e.id)));return[...o,...n.slice(25).filter((t=>!e.has(t.id)))]}const r=new Set(n.map((e=>e.id)));return[...n,...o.filter((e=>!r.has(e.id)))]}));const{page:i,pages:s}=a.pagination??{};C(null!=i&&null!=s&&i<s),t||S(e)}catch($Ie){console.error("[useChatHistory] Failed to load conversations:",$Ie)}finally{E(!1)}}}),[p,i,g]);X.useEffect((()=>{b&&(i||m)&&g&&("stack"===e?L(0):!A.current&&i&&(A.current=!0,L(0)))}),[b,i,m,g,e,L]);const D=X.useRef("");X.useEffect((()=>{g&&"sidepane"===e&&r&&a&&A.current&&D.current!==r&&(R.current.some((e=>e.id===r))||(D.current=r,L(0,!0)))}),[r,g,e,L,a]);const M=X.useCallback((()=>{!w&&T&&L(_+1)}),[w,T,_,L]),F=X.useCallback((()=>{t(),n(),"sidepane"!==e&&v(!1)}),[e,t,n]),j=X.useCallback((async t=>{var n;null==(n=I.current)||n.abort();const r=new AbortController;I.current=r,await o(t,r.signal),r.signal.aborted||"sidepane"===e||v(!1)}),[e,o]);return{isEnabled:g,isOpen:b,setIsOpen:v,sessions:k,isLoading:w,hasMore:T,loadMore:M,startNewConversation:F,loadSession:j}}(e);return og.jsx(CJ.Provider,{value:n,children:"function"==typeof t?t(n):t})},IJ=()=>{const e=X.useContext(CJ);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},NJ=X.createContext(void 0),OJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=pL(),o=a[t.name];return og.jsx(NJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},RJ=()=>{const e=X.useContext(NJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},PJ=X.createContext(void 0);const LJ=({children:e,value:t})=>og.jsx(PJ.Provider,{value:t,children:e}),DJ=["light","dark"],MJ="(prefers-color-scheme: dark)",FJ="undefined"==typeof window,jJ=X.createContext(void 0),zJ={setColorMode:e=>{},colorModes:[]};function BJ(e,t){const n=X.useContext(jJ)??zJ;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const HJ=e=>(X.useContext(jJ),og.jsx($J,{...e})),UJ=["light","dark"],$J=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=UJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=X.useState((()=>GJ(a,i))),[m,g]=X.useState((()=>GJ(a))),y=l?Object.values(l):o,b=X.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=WJ());const c=l?l[o]:o,u=t?qJ():null,f=d&&p&&(null==(a=document.getElementById(d))?void 0:a.shadowRoot),h=f?f.getElementById(p)??document.documentElement:document.documentElement;if("class"===s?(h.classList.remove(...y),c&&h.classList.add(c)):c?h.setAttribute(s,c):h.removeAttribute(s),r){const e=DJ.includes(i)?i:null,t=DJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=X.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Bce){}}),[e]),k=X.useCallback((t=>{const r=WJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);X.useEffect((()=>{const e=window.matchMedia(MJ);return e.addListener(k),k(e),()=>e.removeListener(k)}),[k]),X.useEffect((()=>{const e=e=>{if(e.key!==a)return;const t=e.newValue||i;v(t)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[v]),X.useEffect((()=>{b(e??f)}),[e,f]);const x=X.useMemo((()=>({colorMode:f,setColorMode:v,forcedColorMode:e,resolvedColorMode:"system"===f?m:f,colorModes:n?[...o,"system"]:o,systemColorMode:n?m:void 0})),[f,v,e,m,n,o]);return og.jsxs(jJ.Provider,{value:x,children:[og.jsx(VJ,{forcedColorMode:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:a,colorModes:o,defaultColorMode:i,attribute:s,value:l,children:c,attrs:y,nonce:u,shadowHostId:d,rootId:p}),c]})},VJ=X.memo((({forcedColorMode:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultColorMode:o,value:i,attrs:s,nonce:l,shadowHostId:c,rootId:u})=>{const d="system"===o,p=(()=>{const e=c&&u?`document.getElementById('${c}').shadowRoot.getElementById('${u}')`:"document.documentElement";if("class"===n){return`var d=${e},c=d.classList;${`c.remove(${s.map((e=>`'${e}'`)).join(",")})`};`}return`var d=${e},n='${n}',s='setAttribute';`})(),f=(()=>{if(!a)return"";return(DJ.includes(o)?o:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e"})(),h=(e,t=!1,r=!0)=>{const o=i?i[e]:e,s=t?`${e}|| ''`:`'${o}'`;let l="";return a&&r&&!t&&DJ.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${p}${h(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${MJ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":`else{${h(o,!1,!1)}}`}${f}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return og.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),GJ=(e,t)=>{if(FJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Bce){}return n||t},qJ=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout((()=>{document.head.removeChild(e)}),1)}},WJ=e=>{e||(e=window.matchMedia(MJ));return e.matches?"dark":"light"};var YJ=Object.prototype.hasOwnProperty;function ZJ(e,t,n){for(n of e.keys())if(KJ(n,t))return n}function KJ(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&KJ(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=ZJ(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=ZJ(t,a)))return!1;if(!KJ(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(YJ.call(e,n)&&++r&&!YJ.call(t,n))return!1;if(!(n in t)||!KJ(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function XJ(){const{baseSettings:e}=oR(),[t,n]=X.useState([]),r=function(e){const t=X.useRef(void 0);KJ(t.current,e)||(t.current=e);return t.current}(e.theme.styles),{customStyles:a,linksCount:o}=X.useMemo((()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:e,styleSheets:t}=r.reduce(((e,t)=>("link"===t.type?e.links.push(t):"style"===t.type&&e.styleSheets.push(t),e)),{links:[],styleSheets:[]}),a=t.map((e=>og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??nK("link_")))),o=e.map((e=>{const t=e.key??nK("stylesheet_");return og.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:og.jsxs(og.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const QJ=({children:e})=>{const{baseSettings:t}=oR(),{theme:n,primaryBrandColor:r,shadowHost:a,rootElement:o,colorMode:i}=t,{primaryColors:s,varsClassName:l}=n,{disableLoadingDefaultFont:c,fontFamily:u,fontSize:d,zIndex:p}=n,f=bk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=kk[n]||n,a=(n,r=[])=>{for(const[o,i]of Object.entries(n)){const n=[...r,o];if("object"==typeof i&&null!==i)a(i,n);else{const r=n.map((e=>e.replace(/([A-Z])/g,"-$1").toLowerCase())).join("-");t[`--ikp-${e}-${r}`]=i}}};a(r)}return t}({colors:Gm(n.colors,f),fontFamily:u,fontSize:d,zIndex:p}),{customStyles:m,loaded:g}=XJ(),{sync:y,forcedColorMode:b,...v}=i??{},[k,x]=X.useState(),w=X.useRef(null);return X.useEffect((()=>{var e,t;if(!(null==y?void 0:y.target))return;const n="string"==typeof y.target?document.querySelector(y.target):y.target;if(!n)return;function r(e,t){return t.reduce(((t,n)=>({...t,[n]:e.getAttribute(n)})),{})}const a=new MutationObserver((()=>{var e,t;const a=r(n,y.attributes),o=(null==(e=y.isDarkMode)?void 0:e.call(y,a))?"dark":"light";null==(t=y.onChange)||t.call(y,o),x(o)}));a.observe(n,{attributes:!0,attributeFilter:y.attributes,childList:!1,subtree:!1}),w.current=a;const o=(null==(e=y.isDarkMode)?void 0:e.call(y,r(n,null==y?void 0:y.attributes)))?"dark":"light";return null==(t=y.onChange)||t.call(y,o),x(o),()=>a.disconnect()}),[y]),og.jsxs(og.Fragment,{children:[!c&&og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');\n "}}),m,g&&og.jsx(HJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:og.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function JJ(e){const{children:t,config:n,componentType:r}=e;return og.jsx(aR,{value:{...n,componentType:r},children:og.jsx(QJ,{children:og.jsx(sR,{children:t})})})}const e0=X.createContext(void 0),t0=({children:e,source:t})=>og.jsx(e0.Provider,{value:{source:t},children:e}),n0=()=>{const e=X.useContext(e0);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},r0=X.createContext(void 0),a0=({children:e,widget:t})=>og.jsx(r0.Provider,{value:t,children:e}),o0=()=>X.useContext(r0);var i0=X.useLayoutEffect,s0=function(e,t){"function"!=typeof e?e.current=t:e(t)},l0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},c0=function(e){Object.keys(l0).forEach((function(t){e.style.setProperty(t,l0[t],"important")}))},u0=null,d0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var p0=function(){},f0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],h0=!!document.documentElement.currentStyle,m0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,f0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(h0&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function g0(e,t,n){var r,a,o=(r=n,a=Q.useRef(r),i0((function(){a.current=r})),a);X.useLayoutEffect((function(){var n=function(e){return o.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}}),[])}var y0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?p0:o,s=e.onHeightChange,l=void 0===s?p0:s,c=R$(e,y0),u=void 0!==c.value,d=X.useRef(null),p=function(e,t){var n=Q.useRef();return Q.useCallback((function(r){e.current=r,n.current&&s0(n.current,null),n.current=t,t&&s0(t,r)}),[t])}(d,t),f=X.useRef(0),h=X.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:m0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),u0||((u0=document.createElement("textarea")).setAttribute("tabindex","-1"),u0.setAttribute("aria-hidden","true"),c0(u0)),null===u0.parentNode&&document.body.appendChild(u0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;u0.style[t]=i[t]})),c0(u0),u0.value=t;var l=d0(u0,e);u0.value=t,l=d0(u0,e),u0.value="x";var c=u0.scrollHeight-a,u=c*n;"border-box"===s&&(u=u+a+o),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+a+o),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",a,r),i=o[0],s=o[1];f.current!==i&&(f.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return X.useLayoutEffect(m),function(e,t){g0(document.body,"reset",(function(n){e.current.form===n.target&&t(n)}))}(d,(function(){if(!u){var e=d.current,t=e.value;requestAnimationFrame((function(){t!==e.value&&m()}))}})),g0(window,"resize",m),function(e){g0(document.fonts,"loadingdone",e)}(m),X.createElement("textarea",P$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},v0=X.forwardRef(b0),k0="Avatar",[x0]=gK(k0),[w0,E0]=x0(k0),_0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=X.useState("idle");return og.jsx(w0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:og.jsx(EK.span,{...r,ref:t})})}));_0.displayName=k0;var S0="AvatarImage",T0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=E0(S0,n),s=function(e,t){const[n,r]=X.useState("idle");return LK((()=>{if(!e)return void r("error");let n=!0;const a=new window.Image,o=e=>()=>{n&&r(e)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{n=!1}}),[e,t]),n}(r,o.referrerPolicy),l=_K((e=>{a(e),i.onImageLoadingStatusChange(e)}));return LK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?og.jsx(EK.img,{...o,ref:t,src:r}):null}));T0.displayName=S0;var C0="AvatarFallback",A0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=E0(C0,n),[i,s]=X.useState(void 0===r);return X.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>s(!0)),r);return()=>window.clearTimeout(e)}}),[r]),i&&"loaded"!==o.imageLoadingStatus?og.jsx(EK.span,{...a,ref:t}):null}));A0.displayName=C0;var I0=_0,N0=T0,O0=A0;var R0="Checkbox",[P0]=gK(R0),[L0,D0]=P0(R0),M0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,f]=X.useState(null),h=mK(t,(e=>f(e))),m=X.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=YQ({prop:a,defaultProp:o,onChange:c}),v=X.useRef(y);return X.useEffect((()=>{const e=null==p?void 0:p.form;if(e){const t=()=>b(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[p,b]),og.jsxs(L0,{scope:n,state:y,disabled:s,children:[og.jsx(EK.button,{type:"button",role:"checkbox","aria-checked":B0(y)?"mixed":y,"aria-required":i,"data-state":H0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:pK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:pK(e.onClick,(e=>{b((e=>!!B0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&og.jsx(z0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!B0(o)&&o})]})}));M0.displayName=R0;var F0="CheckboxIndicator",j0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=D0(F0,n);return og.jsx(qQ,{present:r||B0(o.state)||!0===o.state,children:og.jsx(EK.span,{"data-state":H0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));j0.displayName=F0;var z0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,i=X.useRef(null),s=function(e){const t=X.useRef({value:e,previous:e});return X.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n),l=EQ(t);X.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=B0(n),a.call(e,!B0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=X.useRef(!B0(n)&&n);return og.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function B0(e){return"indeterminate"===e}function H0(e){return B0(e)?"indeterminate":e?"checked":"unchecked"}var U0=M0,$0=j0,V0=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(W0);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(G0,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(G0,{...r,ref:t,children:n})}));V0.displayName="Slot";var G0=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?hK(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));G0.displayName="SlotClone";var q0=({children:e})=>og.jsx(og.Fragment,{children:e});function W0(e){return X.isValidElement(e)&&e.type===q0}var Y0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?V0:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var Z0,K0="dismissableLayer.update",X0="dismissableLayer.pointerDownOutside",Q0="dismissableLayer.focusOutside",J0=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),e1=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(J0),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=mK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){n1(X0,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){n1(Q0,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return SK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Z0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),t1(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Z0)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),t1())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(K0,e),()=>document.removeEventListener(K0,e)}),[]),og.jsx(Y0.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:pK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:pK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:pK(e.onPointerDownCapture,x.onPointerDownCapture)})}));e1.displayName="DismissableLayer";function t1(){const e=new CustomEvent(K0);document.dispatchEvent(e)}function n1(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(J0),r=X.useRef(null),a=mK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(Y0.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var r1=0;function a1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var o1="focusScope.autoFocusOnMount",i1="focusScope.autoFocusOnUnmount",s1={bubbles:!1,cancelable:!0},l1=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=_K(a),u=_K(o),d=X.useRef(null),p=mK(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:p1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||p1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&p1(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){f1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(o1,s1);s.addEventListener(o1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(p1(r,{select:t}),document.activeElement!==n)return}((e=c1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&p1(s))}return()=>{s.removeEventListener(o1,c),setTimeout((()=>{const e=new CustomEvent(i1,s1);s.addEventListener(i1,u),s.dispatchEvent(e),e.defaultPrevented||p1(t??document.body,{select:!0}),s.removeEventListener(i1,u),f1.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=c1(e),n=u1(t,e),r=u1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&p1(o,{select:!0})):(e.preventDefault(),n&&p1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx(Y0.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function c1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function u1(e,t){for(const n of e)if(!d1(n,{upTo:t}))return n}function d1(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function p1(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}l1.displayName="FocusScope";var f1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=h1(e,t),e.unshift(t)},remove(t){var n;e=h1(e,t),null==(n=e[0])||n.resume()}}}();function h1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var m1=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(Y0.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));m1.displayName="Arrow";var g1=m1,y1="Popper",[b1,v1]=gK(y1),[k1,x1]=b1(y1),w1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(k1,{scope:t,anchor:r,onAnchorChange:a,children:n})};w1.displayName=y1;var E1="PopperAnchor",_1=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=x1(E1,n),i=X.useRef(null),s=mK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx(Y0.div,{...a,ref:s})}));_1.displayName=E1;var S1="PopperContent",[T1,C1]=b1(S1),A1=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=x1(S1,l),[E,_]=X.useState(null),S=mK(t,(e=>_(e))),[T,C]=X.useState(null),A=EQ(T),I=(null==A?void 0:A.width)??0,N=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(R1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=fQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>JX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[hQ({mainAxis:u+N,alignmentAxis:p}),h&&mQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?gQ():void 0,...D}),h&&yQ({...D}),bQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&kQ({element:T,padding:f}),P1({arrowWidth:I,arrowHeight:N}),b&&vQ({strategy:"referenceHidden",...D})]}),[H,U]=L1(j),$=_K(k);LK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return LK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(T1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(Y0.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));A1.displayName=S1;var I1="PopperArrow",N1={top:"bottom",right:"left",bottom:"top",left:"right"},O1=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=C1(I1,n),o=N1[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(g1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function R1(e){return null!==e}O1.displayName=I1;var P1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=L1(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function L1(e){const[t,n="center"]=e.split("-");return[t,n]}var D1=w1,M1=_1,F1=A1,j1=O1,z1=new WeakMap,B1=new WeakMap,H1={},U1=0,$1=function(e){return e&&(e.host||$1(e.parentNode))},V1=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=$1(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);H1[n]||(H1[n]=new WeakMap);var o=H1[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(z1.get(e)||0)+1,c=(o.get(e)||0)+1;z1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&B1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Bce){console.error("aria-hidden: cannot operate on ",e,Bce)}}))};return u(t),s.clear(),U1++,function(){i.forEach((function(e){var t=z1.get(e)-1,a=o.get(e)-1;z1.set(e,t),o.set(e,a),t||(B1.has(e)||e.removeAttribute(r),B1.delete(e)),a||e.removeAttribute(n)})),--U1||(z1=new WeakMap,z1=new WeakMap,B1=new WeakMap,H1={})}},G1=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),V1(r,a,n,"aria-hidden")):function(){return null}},q1="right-scroll-bar-position",W1="width-before-scroll-bar";function Y1(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Z1="undefined"!=typeof window?X.useLayoutEffect:X.useEffect,K1=new WeakMap;function X1(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return Y1(e,t)}))},(a=X.useState((function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=r,a.facade);return Z1((function(){var t=K1.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||Y1(e,null)})),r.forEach((function(e){n.has(e)||Y1(e,a)}))}K1.set(o,e)}),[e]),o}function Q1(e){return e}var J1=function(e){var t=e.sideCar,n=M$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return X.createElement(r,D$({},n))};J1.isSideCarExport=!0;var e2=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Q1);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=D$({async:!0,ssr:!1},e),t}(),t2=function(){},n2=X.forwardRef((function(e,t){var n=X.useRef(null),r=X.useState({onScrollCapture:t2,onWheelCapture:t2,onTouchMoveCapture:t2}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,k=M$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=X1([n,t]),E=D$(D$({},k),a);return X.createElement(X.Fragment,null,u&&X.createElement(x,{sideCar:e2,removeScrollBar:c,shards:d,noRelative:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:v}),i?X.cloneElement(X.Children.only(s),D$(D$({},E),{ref:w})):X.createElement(b,D$({},E,{className:l,ref:w}),s))}));n2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},n2.classNames={fullWidth:W1,zeroRight:q1};function r2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var a2=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=r2())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o2=function(){var e,t=(e=a2(),function(t,n){X.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},i2={left:0,top:0,right:0,gap:0},s2=function(e){return parseInt(e||"",10)||0},l2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return i2;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[s2(n),s2(r),s2(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},c2=o2(),u2="data-scroll-locked",d2=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(u2,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(q1," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(W1," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(q1," .").concat(q1," {\n right: 0 ").concat(r,";\n }\n \n .").concat(W1," .").concat(W1," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(u2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},p2=function(){var e=parseInt(document.body.getAttribute(u2)||"0",10);return isFinite(e)?e:0},f2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;X.useEffect((function(){return document.body.setAttribute(u2,(p2()+1).toString()),function(){var e=p2()-1;e<=0?document.body.removeAttribute(u2):document.body.setAttribute(u2,e.toString())}}),[]);var o=X.useMemo((function(){return l2(a)}),[a]);return X.createElement(c2,{styles:d2(o,!t,a,n?"":"!important")})},h2=!1;if("undefined"!=typeof window)try{var m2=Object.defineProperty({},"passive",{get:function(){return h2=!0,!0}});window.addEventListener("test",m2,m2),window.removeEventListener("test",m2,m2)}catch($Ie){h2=!1}var g2=!!h2&&{passive:!1},y2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},b2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),v2(e,r)){var a=k2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},v2=function(e,t){return"v"===e?function(e){return y2(e,"overflowY")}(t):function(e){return y2(e,"overflowX")}(t)},k2=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},x2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},w2=function(e){return[e.deltaX,e.deltaY]},E2=function(e){return e&&"current"in e?e.current:e},_2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},S2=0,T2=[];function C2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const A2=(I2=function(e){var t=X.useRef([]),n=X.useRef([0,0]),r=X.useRef(),a=X.useState(S2++)[0],o=X.useState(o2)[0],i=X.useRef(e);X.useEffect((function(){i.current=e}),[e]),X.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=F$([e.lockRef.current],(e.shards||[]).map(E2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=X.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=x2(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var h=b2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=b2(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=a*r,i=n.target,s=t.contains(i),l=!1,c=o>0,u=0,d=0;do{if(!i)break;var p=k2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&v2(e,i)&&(u+=h,d+=f);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:c)}),[]),l=X.useCallback((function(e){var n=e;if(T2.length&&T2[T2.length-1]===o){var r="deltaY"in n?w2(n):x2(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a}))[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(E2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=X.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:C2(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=X.useCallback((function(e){n.current=x2(e),r.current=void 0}),[]),d=X.useCallback((function(t){c(t.type,w2(t),t.target,s(t,e.lockRef.current))}),[]),p=X.useCallback((function(t){c(t.type,x2(t),t.target,s(t,e.lockRef.current))}),[]);X.useEffect((function(){return T2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,g2),document.addEventListener("touchmove",l,g2),document.addEventListener("touchstart",u,g2),function(){T2=T2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,g2),document.removeEventListener("touchmove",l,g2),document.removeEventListener("touchstart",u,g2)}}),[]);var f=e.removeScrollBar,h=e.inert;return X.createElement(X.Fragment,null,h?X.createElement(o,{styles:_2(a)}):null,f?X.createElement(f2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},e2.useMedium(I2),J1);var I2,N2=X.forwardRef((function(e,t){return X.createElement(n2,D$({},e,{ref:t,sideCar:A2}))}));N2.classNames=n2.classNames;var O2="Popover",[R2]=gK(O2,[v1]),P2=v1(),[L2,D2]=R2(O2),M2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=P2(t),l=X.useRef(null),[c,u]=X.useState(!1),[d=!1,p]=YQ({prop:r,defaultProp:a,onChange:o});return og.jsx(D1,{...s,children:og.jsx(L2,{scope:t,contentId:FK(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:X.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:X.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:X.useCallback((()=>u(!1)),[]),modal:i,children:n})})};M2.displayName=O2;var F2="PopoverAnchor";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=D2(F2,n),o=P2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return X.useEffect((()=>(i(),()=>s())),[i,s]),og.jsx(M1,{...o,...r,ref:t})})).displayName=F2;var j2="PopoverTrigger",z2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=D2(j2,n),o=P2(n),i=mK(t,a.triggerRef),s=og.jsx(Y0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Z2(a.open),...r,ref:i,onClick:pK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:og.jsx(M1,{asChild:!0,...o,children:s})}));z2.displayName=j2;var[B2,H2]=R2("PopoverPortal",{forceMount:void 0}),U2="PopoverContent",$2=X.forwardRef(((e,t)=>{const n=H2(U2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=D2(U2,e.__scopePopover);return og.jsx(qQ,{present:r||o.open,children:o.modal?og.jsx(V2,{...a,ref:t}):og.jsx(G2,{...a,ref:t})})}));$2.displayName=U2;var V2=X.forwardRef(((e,t)=>{const n=D2(U2,e.__scopePopover),r=X.useRef(null),a=mK(t,r),o=X.useRef(!1);return X.useEffect((()=>{const e=r.current;if(e)return G1(e)}),[]),og.jsx(N2,{as:V0,allowPinchZoom:!0,children:og.jsx(q2,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:pK(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:pK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),G2=X.forwardRef(((e,t)=>{const n=D2(U2,e.__scopePopover),r=X.useRef(!1),a=X.useRef(!1);return og.jsx(q2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),q2=X.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=D2(U2,n),f=P2(n);return X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??a1()),document.body.insertAdjacentElement("beforeend",e[1]??a1()),r1++,()=>{1===r1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),r1--}}),[]),og.jsx(l1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:og.jsx(e1,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:og.jsx(F1,{"data-state":Z2(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),W2="PopoverClose";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=D2(W2,n);return og.jsx(Y0.button,{type:"button",...r,ref:t,onClick:pK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=W2;var Y2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=P2(n);return og.jsx(j1,{...a,...r,ref:t})}));function Z2(e){return e?"open":"closed"}Y2.displayName="PopoverArrow";var K2=M2,X2=z2,Q2=$2,J2=Y2,e5=X.createContext(void 0);var t5="ScrollArea",[n5]=gK(t5),[r5,a5]=n5(t5),o5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=X.useState(null),[c,u]=X.useState(null),[d,p]=X.useState(null),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(0),[v,k]=X.useState(0),[x,w]=X.useState(!1),[E,_]=X.useState(!1),S=mK(t,(e=>l(e))),T=function(e){const t=X.useContext(e5);return e||t||"ltr"}(a);return og.jsx(r5,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:k,children:og.jsx(EK.div,{dir:T,...i,ref:S,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})}));o5.displayName=t5;var i5="ScrollAreaViewport",s5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=a5(i5,n),s=mK(t,X.useRef(null),i.onViewportChange);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),og.jsx(EK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:og.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));s5.displayName=i5;var l5="ScrollAreaScrollbar",c5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=a5(l5,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return X.useEffect((()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)})),[s,o,i]),"hover"===a.type?og.jsx(u5,{...r,ref:t,forceMount:n}):"scroll"===a.type?og.jsx(d5,{...r,ref:t,forceMount:n}):"auto"===a.type?og.jsx(p5,{...r,ref:t,forceMount:n}):"always"===a.type?og.jsx(f5,{...r,ref:t}):null}));c5.displayName=l5;var u5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=a5(l5,e.__scopeScrollArea),[o,i]=X.useState(!1);return X.useEffect((()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout((()=>i(!1)),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[a.scrollArea,a.scrollHideDelay]),og.jsx(qQ,{present:n||o,children:og.jsx(p5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),d5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=a5(l5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=R5((()=>l("SCROLL_END")),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},X.useReducer(((e,t)=>u[e][t]??e),c));var c,u;return X.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,a.scrollHideDelay,l]),X.useEffect((()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,o,l,i]),og.jsx(qQ,{present:n||"hidden"!==s,children:og.jsx(f5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:pK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:pK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),p5=X.forwardRef(((e,t)=>{const n=a5(l5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=X.useState(!1),s="horizontal"===e.orientation,l=R5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return P5(n.viewport,l),P5(n.content,l),og.jsx(qQ,{present:r||o,children:og.jsx(f5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),f5=X.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=a5(l5,e.__scopeScrollArea),o=X.useRef(null),i=X.useRef(0),[s,l]=X.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=T5(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=C5(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return I5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?og.jsx(h5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=A5(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?og.jsx(m5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=A5(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null})),h5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=a5(l5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=mK(t,l,o.onScrollbarXChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(b5,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":C5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),N5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:S5(i.paddingLeft),paddingEnd:S5(i.paddingRight)}})}})})),m5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=a5(l5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=mK(t,l,o.onScrollbarYChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(b5,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":C5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),N5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:S5(i.paddingTop),paddingEnd:S5(i.paddingBottom)}})}})})),[g5,y5]=n5(l5),b5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=a5(l5,n),[h,m]=X.useState(null),g=mK(t,(e=>m(e))),y=X.useRef(null),b=X.useRef(""),v=f.viewport,k=r.content-r.viewport,x=_K(u),w=_K(l),E=R5(d,10);function _(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return X.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[v,h,k,x]),X.useEffect(w,[r,w]),P5(h,E),P5(f.content,E),og.jsx(g5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:_K(o),onThumbPointerUp:_K(i),onThumbPositionChange:w,onThumbPointerDown:_K(s),children:og.jsx(EK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:pK(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(e)}})),onPointerMove:pK(e.onPointerMove,_),onPointerUp:pK(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null}))})})})),v5="ScrollAreaThumb",k5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=y5(v5,e.__scopeScrollArea);return og.jsx(qQ,{present:n||a.hasThumb,children:og.jsx(x5,{ref:t,...r})})})),x5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=a5(v5,n),i=y5(v5,n),{onThumbPositionChange:s}=i,l=mK(t,(e=>i.onThumbChange(e))),c=X.useRef(void 0),u=R5((()=>{c.current&&(c.current(),c.current=void 0)}),100);return X.useEffect((()=>{const e=o.viewport;if(e){const t=()=>{if(u(),!c.current){const t=O5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),og.jsx(EK.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:pK(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})})),onPointerUp:pK(e.onPointerUp,i.onThumbPointerUp)})}));k5.displayName=v5;var w5="ScrollAreaCorner",E5=X.forwardRef(((e,t)=>{const n=a5(w5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?og.jsx(_5,{...e,ref:t}):null}));E5.displayName=w5;var _5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=a5(w5,n),[o,i]=X.useState(0),[s,l]=X.useState(0),c=Boolean(o&&s);return P5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),P5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?og.jsx(EK.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null}));function S5(e){return e?parseInt(e,10):0}function T5(e,t){const n=e/t;return isNaN(n)?0:n}function C5(e){const t=T5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function A5(e,t,n="ltr"){const r=C5(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,i]:[-1*i,0]);return I5([0,i],[0,s])(l)}function I5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function N5(e,t){return e>0&&e<t}var O5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function R5(e,t){const n=_K(e),r=X.useRef(0);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),X.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function P5(e,t){const n=_K(t);LK((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}var L5=o5,D5=s5,M5=E5;function F5(e,[t,n]){return Math.min(n,Math.max(t,e))}function j5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function z5(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},B5(r,...t)]}function B5(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function H5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function U5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=H5(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():H5(e[t],null)}}}}function $5(...e){return X.useCallback(U5(...e),e)}var V5=Symbol.for("react.lazy"),G5=J[" use ".trim().toString()];function q5(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===V5&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function W5(e){const t=Y5(e),n=X.forwardRef(((e,n)=>{let{children:r,...a}=e;q5(r)&&"function"==typeof G5&&(r=G5(r._payload));const o=X.Children.toArray(r),i=o.find(K5);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Y5(e){const t=X.forwardRef(((e,t)=>{let{children:n,...r}=e;if(q5(n)&&"function"==typeof G5&&(n=G5(n._payload)),X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?U5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Z5=Symbol("radix.slottable");function K5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Z5}var X5=X.createContext(void 0);function Q5(e){const t=X.useContext(X5);return e||t||"ltr"}function J5(e){const t=e3(e),n=X.forwardRef(((e,n)=>{const{children:r,...a}=e,o=X.Children.toArray(r),i=o.find(n3);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function e3(e){const t=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?U5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var t3=Symbol("radix.slottable");function n3(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===t3}var r3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=J5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function a3(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var o3,i3="dismissableLayer.update",s3="dismissableLayer.pointerDownOutside",l3="dismissableLayer.focusOutside",c3=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u3=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(c3),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=$5(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=a3(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){p3(s3,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=a3(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){p3(l3,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=a3(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(o3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),d3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o3)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),d3())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(i3,e),()=>document.removeEventListener(i3,e)}),[]),og.jsx(r3.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:j5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:j5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:j5(e.onPointerDownCapture,x.onPointerDownCapture)})}));u3.displayName="DismissableLayer";function d3(){const e=new CustomEvent(i3);document.dispatchEvent(e)}function p3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(c3),r=X.useRef(null),a=$5(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(r3.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var f3=0;function h3(){X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??m3()),document.body.insertAdjacentElement("beforeend",e[1]??m3()),f3++,()=>{1===f3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),f3--}}),[])}function m3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var g3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=W5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),y3="focusScope.autoFocusOnMount",b3="focusScope.autoFocusOnUnmount",v3={bubbles:!1,cancelable:!0},k3=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=a3(a),u=a3(o),d=X.useRef(null),p=$5(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:_3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||_3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&_3(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){S3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(y3,v3);s.addEventListener(y3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_3(r,{select:t}),document.activeElement!==n)return}((e=x3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&_3(s))}return()=>{s.removeEventListener(y3,c),setTimeout((()=>{const e=new CustomEvent(b3,v3);s.addEventListener(b3,u),s.dispatchEvent(e),e.defaultPrevented||_3(t??document.body,{select:!0}),s.removeEventListener(b3,u),S3.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=x3(e),n=w3(t,e),r=w3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&_3(o,{select:!0})):(e.preventDefault(),n&&_3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx(g3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function x3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function w3(e,t){for(const n of e)if(!E3(n,{upTo:t}))return n}function E3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function _3(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}k3.displayName="FocusScope";var S3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=T3(e,t),e.unshift(t)},remove(t){var n;e=T3(e,t),null==(n=e[0])||n.resume()}}}();function T3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var C3=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(r3.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));C3.displayName="Arrow";var A3=C3;function I3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},N3(r,...t)]}function N3(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var O3="Popper",[R3,P3]=I3(O3),[L3,D3]=R3(O3),M3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(L3,{scope:t,anchor:r,onAnchorChange:a,children:n})};M3.displayName=O3;var F3="PopperAnchor",j3=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=D3(F3,n),i=X.useRef(null),s=$5(t,i),l=X.useRef(null);return X.useEffect((()=>{const e=l.current;l.current=(null==r?void 0:r.current)||i.current,e!==l.current&&o.onAnchorChange(l.current)})),r?null:og.jsx(r3.div,{...a,ref:s})}));j3.displayName=F3;var z3="PopperContent",[B3,H3]=R3(z3),U3=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=D3(z3,l),[E,_]=X.useState(null),S=$5(t,(e=>_(e))),[T,C]=X.useState(null),A=function(e){const[t,n]=X.useState(void 0);return HO((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(T),I=(null==A?void 0:A.width)??0,N=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(q3),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=fQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>JX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[hQ({mainAxis:u+N,alignmentAxis:p}),h&&mQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?gQ():void 0,...D}),h&&yQ({...D}),bQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&kQ({element:T,padding:f}),W3({arrowWidth:I,arrowHeight:N}),b&&vQ({strategy:"referenceHidden",...D})]}),[H,U]=Y3(j),$=a3(k);HO((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return HO((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(B3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(r3.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));U3.displayName=z3;var $3="PopperArrow",V3={top:"bottom",right:"left",bottom:"top",left:"right"},G3=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=H3($3,n),o=V3[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(A3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function q3(e){return null!==e}G3.displayName=$3;var W3=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=Y3(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function Y3(e){const[t,n="center"]=e.split("-");return[t,n]}var Z3=M3,K3=j3,X3=U3,Q3=G3,J3=X.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=X.useState(!1);HO((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?de.createPortal(og.jsx(g3.div,{...a,ref:t}),s):null}));J3.displayName="Portal";const e4=[" ","Enter","ArrowUp","ArrowDown"],t4=[" ","Enter"],n4="Select",[r4,a4,o4]=function(e){const t=e+"CollectionProvider",[n,r]=z5(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=Q.useRef(null),o=Q.useRef(new Map).current;return og.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=W5(s),c=Q.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=$5(t,o(s,n).collectionRef);return og.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=W5(u),f=Q.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=Q.useRef(null),s=$5(t,i),l=o(u,n);return Q.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),og.jsx(p,{[d]:"",ref:s,children:r})}));return f.displayName=u,[{Provider:i,Slot:c,ItemSlot:f},function(t){const n=o(e+"CollectionConsumer",t);return Q.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(n4),[i4]=z5(n4,[o4,P3]),s4=P3(),[l4,c4]=i4(n4),[u4,d4]=i4(n4),p4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,disabled:u,required:d}=e,p=s4(t),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(!1),v=Q5(c),[k,x]=fR({prop:r,defaultProp:a??!1,onChange:o,caller:n4}),[w,E]=fR({prop:i,defaultProp:s,onChange:l,caller:n4}),_=X.useRef(null),[S,T]=X.useState(new Set);return og.jsx(Z3,{...p,children:og.jsx(l4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:VO(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:og.jsx(r4.Provider,{scope:t,children:og.jsx(u4,{scope:e.__scopeSelect,onNativeOptionAdd:X.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:X.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:n})})})})};p4.displayName=n4;const f4="SelectTrigger",h4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=s4(n),i=c4(f4,n),s=i.disabled||r,l=$5(t,i.onTriggerChange),c=a4(n),u=X.useRef("touch"),[d,p,f]=Y4((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=Z4(t,e,n);void 0!==r&&i.onValueChange(r.value)})),h=e=>{s||(i.onOpenChange(!0),f()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return og.jsx(K3,{asChild:!0,...o,children:og.jsx(g3.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":W4(i.value)?"":void 0,...a,ref:l,onClick:j5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:j5(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:j5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||e4.includes(e.key)&&(h(),e.preventDefault())}))})})}));h4.displayName=f4;const m4="SelectValue",g4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=c4(m4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=$5(t,l.onValueNodeChange);return HO((()=>{c(u)}),[c,u]),og.jsx(g3.span,{...s,ref:d,style:{pointerEvents:"none"},children:W4(l.value)?og.jsx(og.Fragment,{children:i}):o})}));g4.displayName=m4;const y4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return og.jsx(g3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));y4.displayName="SelectIcon";const b4="SelectContent",v4=X.forwardRef(((e,t)=>{const n=c4(b4,e.__scopeSelect),[r,a]=X.useState();if(HO((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?ue.createPortal(og.jsx(x4,{scope:e.__scopeSelect,children:og.jsx(r4.Slot,{scope:e.__scopeSelect,children:og.jsx("div",{children:e.children})})}),t):null}return og.jsx(_4,{...e,ref:t})}));v4.displayName=b4;const k4=10,[x4,w4]=i4(b4),E4=W5("SelectContent.RemoveScroll"),_4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=c4(b4,n),[v,k]=X.useState(null),[x,w]=X.useState(null),E=$5(t,(e=>k(e))),[_,S]=X.useState(null),[T,C]=X.useState(null),A=a4(n),[I,N]=X.useState(!1),O=X.useRef(!1);X.useEffect((()=>{if(v)return G1(v)}),[v]),h3();const R=X.useCallback((e=>{const[t,...n]=A().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(null==o||o.scrollIntoView({block:"nearest"}),o===t&&x&&(x.scrollTop=0),o===r&&x&&(x.scrollTop=x.scrollHeight),null==o||o.focus(),document.activeElement!==a)return}}),[A,x]),P=X.useCallback((()=>R([_,v])),[R,_,v]);X.useEffect((()=>{I&&P()}),[I,P]);const{onOpenChange:L,triggerPointerDownPosRef:D}=b;X.useEffect((()=>{if(v){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=D.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=D.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():v.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[v,L,D]),X.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[M,F]=Y4((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Z4(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(S(e),r&&(O.current=!0))}),[b.value]),z=X.useCallback((()=>null==v?void 0:v.focus()),[v]),B=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),H="popper"===r?T4:S4,U=H===T4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return og.jsx(x4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:I,searchRef:M,children:og.jsx(N2,{as:E4,allowPinchZoom:!0,removeScrollBar:!1,children:og.jsx(k3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:j5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:og.jsx(u3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:og.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>N(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:j5(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));_4.displayName="SelectContentImpl";const S4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=c4(b4,n),i=w4(b4,n),[s,l]=X.useState(null),[c,u]=X.useState(null),d=$5(t,(e=>u(e))),p=a4(n),f=X.useRef(!1),h=X.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,v=X.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-k4,d=F5(o,[k4,Math.max(k4,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-k4,d=F5(o,[k4,Math.max(k4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*k4,u=m.scrollHeight,d=window.getComputedStyle(c),h=Number.parseInt(d.borderTopWidth,10),b=Number.parseInt(d.paddingTop,10),v=Number.parseInt(d.borderBottomWidth,10),k=h+b+u+Number.parseInt(d.paddingBottom,10)+v,x=Math.min(5*g.offsetHeight,k),w=window.getComputedStyle(m),E=Number.parseInt(w.paddingTop,10),_=Number.parseInt(w.paddingBottom,10),S=e.top+e.height/2-k4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),I=k-A;if(A<=S){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(T,C+(e?_:0)+t+v);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?E:0)+C)+I;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${k4}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>f.current=!0))}}),[p,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);HO((()=>v()),[v]);const[k,x]=X.useState();HO((()=>{c&&x(window.getComputedStyle(c).zIndex)}),[c]);const w=X.useCallback((e=>{e&&!0===h.current&&(v(),null==b||b(),h.current=!1)}),[v,b]);return og.jsx(C4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:og.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:og.jsx(g3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));S4.displayName="SelectItemAlignedPosition";const T4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=k4,...o}=e,i=s4(n);return og.jsx(X3,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));T4.displayName="SelectPopperPosition";const[C4,A4]=i4(b4,{}),I4="SelectViewport",N4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=w4(I4,n),i=A4(I4,n),s=$5(t,o.onViewportChange),l=X.useRef(0);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),og.jsx(r4.Slot,{scope:n,children:og.jsx(g3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:j5(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*k4,a=Number.parseFloat(n.style.minHeight),o=Number.parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))})})]})}));N4.displayName=I4;const O4="SelectGroup",[R4,P4]=i4(O4);X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=VO();return og.jsx(R4,{scope:n,id:a,children:og.jsx(g3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=O4;const L4="SelectLabel";X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=P4(L4,n);return og.jsx(g3.div,{id:a.id,...r,ref:t})})).displayName=L4;const D4="SelectItem",[M4,F4]=i4(D4),j4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=c4(D4,n),l=w4(D4,n),c=s.value===r,[u,d]=X.useState(o??""),[p,f]=X.useState(!1),h=$5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=VO(),g=X.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return og.jsx(M4,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:X.useCallback((e=>{d((t=>t||((null==e?void 0:e.textContent)??"").trim()))}),[]),children:og.jsx(r4.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:og.jsx(g3.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:j5(i.onFocus,(()=>f(!0))),onBlur:j5(i.onBlur,(()=>f(!1))),onClick:j5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:j5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:j5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:j5(i.onPointerMove,(e=>{var t;g.current=e.pointerType,a?null==(t=l.onItemLeave)||t.call(l):"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:j5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:j5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(t4.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));j4.displayName=D4;const z4="SelectItemText",B4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=c4(z4,n),s=w4(z4,n),l=F4(z4,n),c=d4(z4,n),[u,d]=X.useState(null),p=$5(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,l.value,l.disabled)})),f=null==u?void 0:u.textContent,h=X.useMemo((()=>og.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return HO((()=>(m(h),()=>g(h))),[m,g,h]),og.jsxs(og.Fragment,{children:[og.jsx(g3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ue.createPortal(o.children,i.valueNode):null]})}));B4.displayName=z4;const H4="SelectItemIndicator",U4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return F4(H4,n).isSelected?og.jsx(g3.span,{"aria-hidden":!0,...r,ref:t}):null}));U4.displayName=H4;const $4="SelectScrollUpButton";X.forwardRef(((e,t)=>{const n=w4($4,e.__scopeSelect),r=A4($4,e.__scopeSelect),[a,o]=X.useState(!1),i=$5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(G4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=$4;const V4="SelectScrollDownButton";X.forwardRef(((e,t)=>{const n=w4(V4,e.__scopeSelect),r=A4(V4,e.__scopeSelect),[a,o]=X.useState(!1),i=$5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(G4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=V4;const G4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=w4("SelectScrollButton",n),i=X.useRef(null),s=a4(n),l=X.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return X.useEffect((()=>()=>l()),[l]),HO((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})}),[s]),og.jsx(g3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:j5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:j5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:j5(a.onPointerLeave,(()=>{l()}))})}));X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return og.jsx(g3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const q4="SelectArrow";function W4(e){return""===e||void 0===e}function Y4(e){const t=a3(e),n=X.useRef(""),r=X.useRef(0),a=X.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=X.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function Z4(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(o=o.filter((e=>e!==n)));const l=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=s4(n),o=c4(q4,n),i=w4(q4,n);return o.open&&"popper"===i.position?og.jsx(Q3,{...a,...r,ref:t}):null})).displayName=q4;const K4=p4,X4=h4,Q4=g4,J4=y4,e6=v4,t6=N4,n6=j4,r6=B4,a6=U4;var o6=(e,t=[])=>({parts:(...n)=>{if(s6(t))return o6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>o6(e,[...t,...n]),omit:(...n)=>o6(e,t.filter((e=>!n.includes(e)))),rename:e=>o6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${i6(e)}"][data-part="${i6(n)}"]`,`& [data-scope="${i6(e)}"][data-part="${i6(n)}"]`].join(", "),attrs:{"data-scope":i6(e),"data-part":i6(n)}}})),{})}),i6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),s6=e=>0===e.length,l6=o6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),c6=Object.defineProperty,u6=(e,t,n)=>((e,t,n)=>t in e?c6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),d6={itemToValue:e=>"string"==typeof e?e:nW(e)&&aW(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:nW(e)&&aW(e,"label")?e.label:d6.itemToValue(e),isItemDisabled:e=>!(!nW(e)||!aW(e,"disabled"))&&!!e.disabled},p6=class e{constructor(t){this.options=t,u6(this,"items"),u6(this,"indexMap",null),u6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),u6(this,"isEqual",(e=>eW(this.items,e.items))),u6(this,"setItems",(e=>this.copy(e))),u6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),u6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),u6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),u6(this,"at",(e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;const n=this.group();for(const[,r]of n)for(const n of r){if(t===e)return n;t++}return null})),u6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),u6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),u6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??d6.itemToValue(e)})),u6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??d6.isItemDisabled(e))})),u6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??d6.itemToString(e)})),u6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),u6(this,"stringifyItems",((e,t=", ")=>{const n=[];for(const r of e){const e=this.stringifyItem(r);null!=e&&n.push(e)}return n.join(t)})),u6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),u6(this,"has",(e=>-1!==this.indexOf(e))),u6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),u6(this,"group",(()=>{const{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];const n=new Map;this.items.forEach(((t,r)=>{const a=e(t,r);n.has(a)||n.set(a,[]),n.get(a).push(t)}));let r=Array.from(n.entries());return t&&r.sort((([e],[n])=>{if("function"==typeof t)return t(e,n);if(Array.isArray(t)){const r=t.indexOf(e),a=t.indexOf(n);return-1===r?1:-1===a?-1:r-a}return"asc"===t?e.localeCompare(n):"desc"===t?n.localeCompare(e):0})),r})),u6(this,"getNextValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))})),u6(this,"getPreviousValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))})),u6(this,"indexOf",(e=>{if(null==e)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex((t=>this.getItemValue(t)===e));if(!this.indexMap){this.indexMap=new Map;let e=0;const t=this.group();for(const[,n]of t)for(const t of n){const n=this.getItemValue(t);null!=n&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1})),u6(this,"getByText",((e,t)=>{const n=null!=t?this.indexOf(t):-1,r=1===e.length;for(let a=0;a<this.items.length;a++){const o=this.items[(n+a+1)%this.items.length];if((!r||this.getItemValue(o)!==t)&&(!this.getItemDisabled(o)&&f6(this.stringifyItem(o),e)))return o}})),u6(this,"search",((e,t)=>{const{state:n,currentValue:r,timeout:a=350}=t,o=n.keysSoFar+e,i=o.length>1&&Array.from(o).every((e=>e===o[0]))?o[0]:o,s=this.getByText(i,r),l=this.getItemValue(s);function c(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,c(),""!==t&&(n.timer=+setTimeout((()=>{e(""),c()}),a))}(o),l})),u6(this,"update",((e,t)=>{let n=this.indexOf(e);return-1===n?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])})),u6(this,"upsert",((e,t,n="append")=>{let r=this.indexOf(e);if(-1===r){return("append"===n?this.append:this.prepend)(t)}return this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])})),u6(this,"insert",((e,...t)=>this.copy(h6(this.items,e,...t)))),u6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(h6(this.items,n,...t))})),u6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(h6(this.items,n+1,...t))})),u6(this,"prepend",((...e)=>this.copy(h6(this.items,0,...e)))),u6(this,"append",((...e)=>this.copy(h6(this.items,this.items.length,...e)))),u6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),u6(this,"remove",((...e)=>{const t=e.map((e=>"string"==typeof e?e:this.getItemValue(e)));return this.copy(this.items.filter((e=>{const n=this.getItemValue(e);return null!=n&&!t.includes(n)})))})),u6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(m6(this.items,[n],t))})),u6(this,"moveBefore",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(m6(this.items,r,n))})),u6(this,"moveAfter",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(m6(this.items,r,n+1))})),u6(this,"reorder",((e,t)=>this.copy(m6(this.items,[e],t)))),u6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),u6(this,"range",((e,t)=>{let n=[],r=e;for(;null!=r;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]})),u6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),u6(this,"toString",(()=>{let e="";for(const t of this.items){e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e})),u6(this,"toJSON",(()=>({size:this.size,first:this.firstValue,last:this.lastValue}))),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},f6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function h6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function m6(e,t,n){const r=(t=[...t].sort(((e,t)=>e-t))).map((t=>e[t]));for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return n=Math.max(0,n-t.filter((e=>e<n)).length),[...e.slice(0,n),...r,...e.slice(n)]}function g6({values:e,collection:t,selectedItemMap:n}){const r=[];for(const a of e){const e=t.find(a)??n.get(a);null!=e&&r.push(e)}return r}function y6({selectedItemMap:e,values:t,selectedItems:n,collection:r}){const a=new Map(e);for(const i of n){const e=r.getItemValue(i);null!=e&&a.set(e,i)}const o=new Set(t);for(const i of a.keys())o.has(i)||a.delete(i);return a}function b6({values:e,collection:t,selectedItemMap:n}){const r=g6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:y6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function v6({selectedItems:e,collection:t}){return y6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var k6=e=>new p6(e);function x6(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const a={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function w6(e,t){return{contextElement:zW(e)?e:null==e?void 0:e.contextElement,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return x6();const{x:t,y:n,width:r,height:a}=e;return x6(t,n,r,a)}(r):n.getBoundingClientRect()}}}k6.empty=()=>new p6({items:[]});var E6=e=>({variable:e,reference:`var(${e})`}),_6={arrowSize:E6("--arrow-size"),arrowSizeHalf:E6("--arrow-size-half"),arrowBg:E6("--arrow-background"),transformOrigin:E6("--transform-origin"),arrowOffset:E6("--arrow-offset")};function S6(e,t){return{name:"transformOrigin",fn(n){var r,a,o,i;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,p=c.split("-")[0],f=(e=>"top"===e||"bottom"===e?"y":"x")(p),h=(null==(r=l.arrow)?void 0:r.x)||0,m=(null==(a=l.arrow)?void 0:a.y)||0,g=(null==t?void 0:t.clientWidth)||0,y=(null==t?void 0:t.clientHeight)||0,b=h+g/2,v=m+y/2,k=Math.abs((null==(o=l.shift)?void 0:o.y)||0),x=u.reference.height/2,w=y/2,E=(null==(i=e.offset)?void 0:i.mainAxis)??e.gutter,_="number"==typeof E?E+w:E??w,S=k>_,T={top:`${b}px calc(100% + ${_}px)`,bottom:`${b}px ${-_}px`,left:`calc(100% + ${_}px) ${v}px`,right:`${-_}px ${v}px`}[p],C=`${b}px ${u.reference.y+x-d}px`,A=Boolean(e.overlap)&&"y"===f&&S;return s.floating.style.setProperty(_6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var T6={name:"rects",fn:({rects:e})=>({data:e})},C6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:a}=n.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=r?`${r}px`:"",top:null!=a?`${a}px`:"",[o]:`calc(100% + ${_6.arrowOffset.reference})`}),{}}}};var A6={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function I6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function N6(e,t){return null!=e&&Math.abs(e-t)<.5}function O6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function R6(e,t,n){const r=e||t.createElement("div");return oQ({element:r,padding:n.arrowPadding})}function P6(e,t){if(null!=(t.offset??t.gutter))return eQ((({placement:n})=>{var r,a;const o=((null==e?void 0:e.clientHeight)||0)/2,i=(null==(r=t.offset)?void 0:r.mainAxis)??t.gutter,s="number"==typeof i?i+o:i??o,{hasAlign:l}=function(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:null!=n}}(n),c=l?void 0:t.shift;return fW({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function L6(e){if(!e.flip)return;const t=O6(e.boundary);return nQ({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function D6(e){if(!e.slide&&!e.overlap)return;const t=O6(e.boundary);return tQ({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:iQ()})}function M6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return rQ({padding:e.overflowPadding,apply({elements:e,rects:o,availableHeight:i,availableWidth:s}){const l=e.floating,c=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),i=Math.floor(i),N6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),N6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),N6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),N6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function F6(e){if(e.hideWhenDetached)return aQ({strategy:"referenceHidden",boundary:O6(e.boundary)??"clippingAncestors"})}var j6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],z6=["top","right","bottom","left"];function B6(e,t){if(!e)return uW;const n=new Map(t.map((t=>[t,e.style.getPropertyValue(t)])));return()=>{n.forEach(((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)})),0===e.style.length&&e.removeAttribute("style")}}function H6(e,t,n={}){const{defer:r,...a}=n,o=r?DY:e=>e(),i=[];return i.push(o((()=>{const n="function"==typeof e?e():e,r="function"==typeof t?t():t;i.push(function(e,t,n={}){var r;const a=w6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},A6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?B6(t,j6):void 0,l=o.restoreStyles?B6(i,z6):void 0,c=[P6(i,o),L6(o),D6(o),R6(i,t.ownerDocument,o),C6(i),S6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),M6(o),F6(o),T6],{placement:u,strategy:d,onComplete:p,onPositioned:f}=o;let h,m,g=!1;const y=async()=>{var e;if(!a||!t)return;const n=await sQ(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=ZW(t),i=I6(r,n.x),s=I6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,N6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),N6(m,s)||(t.style.setProperty("--y",`${s}px`),m=s),o.hideWhenDetached&&((null==(e=n.middlewareData.hide)?void 0:e.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!g){const e=t.firstElementChild;e&&(t.style.setProperty("--z-index",eY(e).zIndex),g=!0)}},b=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:y,floatingElement:t}),null==f||f({placed:!0})):await y()},v=function(e){return e?!0===e?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}(o.listeners),k=o.listeners?JX(a,t,b,v):uW;return b(),()=>{null==k||k(),null==l||l(),null==s||s(),null==f||f({placed:!1})}}(n,r,a))}))),()=>{i.forEach((e=>null==e?void 0:e()))}}var U6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var $6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},V6=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},G6=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},q6=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},W6=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},Y6=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},Z6=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},K6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroup)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup:${t}`},X6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroupLabel)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup-label:${t}`},Q6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.item)?void 0:r.call(n,t))??`combobox:${e.id}:option:${t}`},J6=e=>e.getById(q6(e)),e8=e=>e.getById(G6(e)),t8=e=>e.getById(W6(e)),n8=e=>e.getById(V6(e)),r8=e=>e.getById(Y6(e)),a8=(e,t)=>{if(null==t)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return function(e,t){return(null==e?void 0:e.querySelector(t))??null}(J6(e),n)},o8=e=>{const t=e8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),LW(t)};function i8(e,t){const{context:n,prop:r,state:a,send:o,scope:i,computed:s,event:l}=e,c=r("translations"),u=r("collection"),d=!!r("disabled"),p=s("isInteractive"),f=!!r("invalid"),h=!!r("required"),m=!!r("readOnly"),g=a.hasTag("open"),y=a.hasTag("focused"),b=r("composite"),v=n.get("highlightedValue"),k=function(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:_6.arrowSize.reference,height:_6.arrowSize.reference,[_6.arrowSizeHalf.variable]:`calc(${_6.arrowSize.reference} / 2)`,[_6.arrowOffset.variable]:`calc(${_6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?U6[t.split("-")[0]]:void 0,background:_6.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}({...r("positioning"),placement:n.get("currentPlacement")});function x(e){const t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return gW(r,(()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`)),{value:r,disabled:Boolean(d||t),highlighted:v===r,selected:n.get("value").includes(r)}}return{focused:y,open:g,inputValue:n.get("inputValue"),highlightedValue:v,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:s("valueAsString"),hasSelectedItems:s("hasSelectedItems"),selectedItems:s("selectedItems"),collection:r("collection"),multiple:!!r("multiple"),disabled:!!d,syncSelectedItems(){o({type:"SELECTED_ITEMS.SYNC"})},reposition(e={}){o({type:"POSITIONING.SET",options:e})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},setInputValue(e,t="script"){o({type:"INPUT_VALUE.SET",value:e,src:t})},clearValue(e){o(null!=e?{type:"ITEM.CLEAR",value:e}:{type:"VALUE.CLEAR"})},focus(){var e;null==(e=e8(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...l6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":FW(f),"data-readonly":FW(m)});var e,n},getLabelProps:()=>t.label({...l6.label.attrs,dir:r("dir"),htmlFor:G6(i),id:$6(i),"data-readonly":FW(m),"data-disabled":FW(d),"data-invalid":FW(f),"data-required":FW(h),"data-focus":FW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=r8(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...l6.control.attrs,dir:r("dir"),id:V6(i),"data-state":g?"open":"closed","data-focus":FW(y),"data-disabled":FW(d),"data-invalid":FW(f)}),getPositionerProps:()=>t.element({...l6.positioner.attrs,dir:r("dir"),id:W6(i),style:k.floating}),getInputProps:()=>t.input({...l6.input.attrs,dir:r("dir"),"aria-invalid":jW(f),"data-invalid":FW(f),"data-autofocus":FW(r("autoFocus")),name:r("name"),form:r("form"),disabled:d,required:r("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:m,placeholder:r("placeholder"),id:G6(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":q6(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?Q6(i,v):void 0,onClick(e){e.defaultPrevented||r("openOnClick")&&p&&o({type:"INPUT.CLICK",src:"input-click"})},onFocus(){d||o({type:"INPUT.FOCUS"})},onBlur(){d||o({type:"INPUT.BLUR"})},onChange(e){o({type:"INPUT.CHANGE",value:e.currentTarget.value,src:"input-change"})},onKeyDown(e){if(e.defaultPrevented)return;if(!p)return;if(e.ctrlKey||e.shiftKey||function(e){return function(e){return e.nativeEvent??e}(e).isComposing||229===e.keyCode}(e))return;const t=r("openOnKeyPress"),n=e.ctrlKey||e.metaKey||e.shiftKey,a=!0,l={ArrowDown(e){(t||g)&&(o({type:e.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:a,src:"arrow-key"}),e.preventDefault())},ArrowUp(){(t||g)&&(o({type:e.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:a,src:"arrow-key"}),e.preventDefault())},Home(e){n||(o({type:"INPUT.HOME",keypress:a}),g&&e.preventDefault())},End(e){n||(o({type:"INPUT.END",keypress:a}),g&&e.preventDefault())},Enter(e){var t;o({type:"INPUT.ENTER",keypress:a,src:"item-select"});const n=s("isCustomValue")&&r("allowCustomValue"),l=null!=v,c=r("alwaysSubmitOnEnter");if(g&&!n&&!c&&l&&e.preventDefault(),null==v)return;const u=a8(i,v);var d;(null==(d=u)?void 0:d.matches("a[href]"))&&(null==(t=r("navigate"))||t({value:v,node:u,href:u.href}))},Escape(){o({type:"INPUT.ESCAPE",keypress:a,src:"escape-key"}),e.preventDefault()}}[kY(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...l6.trigger.attrs,dir:r("dir"),id:Y6(i),"aria-haspopup":b?"listbox":"dialog",type:"button",tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":g,"data-state":g?"open":"closed","aria-controls":g?q6(i):void 0,disabled:d,"data-invalid":FW(f),"data-focusable":FW(e.focusable),"data-readonly":FW(m),"data-disabled":FW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&gY(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&gY(e)&&(e.preventDefault(),queueMicrotask((()=>{o8(i)})))},onKeyDown(e){if(e.defaultPrevented)return;if(b)return;const t={ArrowDown(){o({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){o({type:"INPUT.ARROW_UP",src:"arrow-key"})}}[kY(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...l6.content.attrs,dir:r("dir"),id:q6(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":$6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":FW(0===u.size),onPointerDown(e){gY(e)&&e.preventDefault()}}),getListProps:()=>t.element({...l6.list.attrs,role:b?void 0:"listbox","data-empty":FW(0===u.size),"aria-labelledby":$6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...l6.clearTrigger.attrs,dir:r("dir"),id:Z6(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":FW(f),"aria-label":c.clearTriggerLabel,"aria-controls":G6(i),hidden:!n.get("value").length,onPointerDown(e){gY(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||p&&o({type:"VALUE.CLEAR",src:"clear-trigger"})}}),getItemState:x,getItemProps(e){const n=x(e),a=n.value;return t.element({...l6.item.attrs,dir:r("dir"),id:Q6(i,a),role:"option",tabIndex:-1,"data-highlighted":FW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":jW(n.selected),"aria-disabled":jW(n.disabled),"data-disabled":FW(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||o({type:"ITEM.POINTER_MOVE",value:a})},onPointerLeave(){if(e.persistFocus)return;if(n.disabled)return;const t=l.previous();(null==t?void 0:t.type.includes("POINTER"))&&o({type:"ITEM.POINTER_LEAVE",value:a})},onClick(e){(function(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)})(e)||hY(e)||yY(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...l6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":FW(n.disabled),"data-highlighted":FW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...l6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...l6.itemGroup.attrs,dir:r("dir"),id:K6(i,n),"aria-labelledby":X6(i,n),"data-empty":FW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...l6.itemGroupLabel.attrs,dir:r("dir"),id:X6(i,n),role:"presentation"})}}}var s8="pointerdown.outside",l8="focus.outside";function c8(e){for(const t of e)if(zW(t)&&NY(t))return!0;return!1}var u8=e=>"clientY"in e;function d8(e,t){if(!t||!u8(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,o=a&&e.clientY>t.offsetTop+t.clientHeight;return!!function(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(a?16:0)},{x:e.clientX,y:e.clientY})&&(r||o)}function p8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=YW(e),c=ZW(e),u=function(e){const t={each(t){var n;for(let r=0;r<(null==(n=e.frames)?void 0:n.length);r+=1){const n=e.frames[r];n&&t(n)}},addEventListener:(e,n,r)=>(t.each((t=>{try{t.document.addEventListener(e,n,r)}catch{}})),()=>{try{t.removeEventListener(e,n,r)}catch{}}),removeEventListener(e,n,r){t.each((t=>{try{t.document.removeEventListener(e,n,r)}catch{}}))}};return t}(c),d=function(e){const t=null!=e.frameElement?e.parent:null;return{addEventListener:(e,n,r)=>{try{null==t||t.addEventListener(e,n,r)}catch{}return()=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}}}(c);function p(t,r){if(!zW(r))return!1;if(!r.isConnected)return!1;if(WW(e,r))return!1;if(function(e,t){if(!u8(t)||!e)return!1;const n=e.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}(e,t))return!1;if(s&&aY(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(d8(t,zY(a)))return!1}return!d8(t,zY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=$W(null==e?void 0:e.getRootNode());let m=!1;function g(t){m=!0;const n=()=>{m=!1};function r(n){var r;const s=i&&!uY()?DY:e=>e(),l=n??t,c=(null==(r=null==l?void 0:l.composedPath)?void 0:r.call(l))??[null==l?void 0:l.target];s((()=>{const n=h?c[0]:fY(t);if(e&&p(t,n)){if(a||o){const t=dW(a,o);e.addEventListener(s8,t,{once:!0})}h8(e,s8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:yY(l),focusable:c8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(xY(l,"click",r,{once:!0})),f.add(d.addEventListener("click",r,{once:!0})),f.add(u.addEventListener("click",r,{once:!0}))):r()}const y=new Set,b=setTimeout((()=>{y.add(xY(l,"pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0))}),0);function v(t){if(m)return;(i?DY:e=>e())((()=>{var n;const a=(null==(n=null==t?void 0:t.composedPath)?void 0:n.call(t))??[null==t?void 0:t.target],i=h?a[0]:fY(t);if(e&&p(t,i)){if(r||o){const t=dW(r,o);e.addEventListener(l8,t,{once:!0})}h8(e,l8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:NY(i),target:i}})}}))}return uY()||(y.add(xY(l,"focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0))),()=>{clearTimeout(b),f.forEach((e=>e())),y.forEach((e=>e()))}}function f8(e,t){const{defer:n}=t,r=n?DY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(p8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function h8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function m8(e,t){return xY(YW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var g8,y8="layer:request-dismiss",b8={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter((e=>e.pointerBlocking))},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(null==(t=this.topMostPointerBlockingLayer())?void 0:t.node):-1)},isTopMost(e){const t=this.layers[this.count()-1];return(null==t?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter((t=>t.type===e))},getNestedLayersByType(e,t){const n=this.indexOf(e);return-1===n?[]:this.layers.slice(n+1).filter((e=>e.type===t))},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find((e=>e.type===t))},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some((e=>WW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>WW(t,e)))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(!(t<0)){if(this.recentlyRemoved.add(e),MY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>b8.dismiss(t.node,e)))}this.layers.splice(t,1),this.syncLayers()}},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach(((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested");this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)}))},indexOf(e){return this.layers.findIndex((t=>t.node===e))},dismiss(e,t){const n=this.indexOf(e);if(-1===n)return;const r=this.layers[n];var a,o;a=y8,o=e=>{var t;null==(t=r.requestDismiss)||t.call(r,e),e.defaultPrevented||null==r||r.dismiss()},e.addEventListener(a,o,{once:!0}),function(e,t,n){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});e.dispatchEvent(a)}(e,y8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v8(){b8.layers.forEach((({node:e})=>{e.style.pointerEvents=b8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function k8(e,t){const n=YW(e),r=[];return b8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(g8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=GY((()=>{const t=e();return zW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(VY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{b8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=g8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function x8(e,t){const{defer:n}=t,r=n?DY:e=>e(),a=[];return a.push(r((()=>{const n=rW(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void hW("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;const{onDismiss:r,onRequestDismiss:a,pointerBlocking:o,exclude:i,debug:s,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:o,requestDismiss:a};b8.add(c),v8();const u=[o?k8(e,t.persistentElements):void 0,m8(e,(function(n){var a;b8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),f8(e,{exclude:function(n){var r;if(!e)return!1;const a="function"==typeof i?i():i,o=Array.isArray(a)?a:[a],s=null==(r=t.persistentElements)?void 0:r.map((e=>e())).filter(zW);return s&&o.push(...s),o.some((e=>WW(e,n)))||b8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=fY(e.detail.originalEvent);b8.isInBranch(o)||(null==(n=t.onFocusOutside)||n.call(t,e),null==(a=t.onInteractOutside)||a.call(t,e),e.defaultPrevented||(s&&console.log("onFocusOutside:",e.detail.originalEvent),null==r||r()))},onPointerDownOutside:function(n){var a,o;const i=fY(n.detail.originalEvent);b8.isBelowPointerBlockingLayer(e)||b8.isInBranch(i)||(null==(a=t.onPointerDownOutside)||a.call(t,n),null==(o=t.onInteractOutside)||o.call(t,n),n.defaultPrevented||(s&&console.log("onPointerDownOutside:",n.detail.originalEvent),null==r||r()))},defer:t.defer})];return()=>{b8.remove(e),v8(),function(e){e.style.pointerEvents=""}(e),u.forEach((e=>null==e?void 0:e()))}}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}var w8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var E8=null,_8=new Set,S8=new Map,T8=!1,C8=!1,A8={Tab:!0,Escape:!0};function I8(e,t){for(let n of _8)n(e,t)}function N8(e){T8=!0,function(e){return!(e.metaKey||!pY()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(E8="keyboard",I8("keyboard",e))}function O8(e){E8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(T8=!0,I8("pointer",e))}function R8(e){mY(e)&&(T8=!0,E8="virtual")}function P8(e){const t=fY(e);t!==ZW(t)&&t!==YW(t)&&e.isTrusted&&(T8||C8||(E8="virtual",I8("virtual",e)),T8=!1,C8=!1)}function L8(){T8=!1,C8=!0}var D8=(e,t)=>{const n=ZW(e),r=YW(e),a=S8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",N8,!0),r.removeEventListener("keyup",N8,!0),r.removeEventListener("click",R8,!0),n.removeEventListener("focus",P8,!0),n.removeEventListener("blur",L8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",O8,!0),r.removeEventListener("pointermove",O8,!0),r.removeEventListener("pointerup",O8,!0)):(r.removeEventListener("mousedown",O8,!0),r.removeEventListener("mousemove",O8,!0),r.removeEventListener("mouseup",O8,!0)),S8.delete(n)}};function M8(){return"keyboard"===E8||"virtual"===E8}function F8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||S8.get(ZW(e)))return;const t=ZW(e),n=YW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){T8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",N8,!0),n.addEventListener("keyup",N8,!0),n.addEventListener("click",R8,!0),t.addEventListener("focus",P8,!0),t.addEventListener("blur",L8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",O8,!0),n.addEventListener("pointermove",O8,!0),n.addEventListener("pointerup",O8,!0)):(n.addEventListener("mousedown",O8,!0),n.addEventListener("mousemove",O8,!0),n.addEventListener("mouseup",O8,!0)),t.addEventListener("beforeunload",(()=>{D8(e)}),{once:!0}),S8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||M8(),modality:E8});const o=(e,n)=>{(function(e,t,n){const r=n?fY(n):null,a=YW(r),o=ZW(r),i=KW(a);return!((e=e||i instanceof o.HTMLInputElement&&!w8.has(null==i?void 0:i.type)||i instanceof o.HTMLTextAreaElement||i instanceof o.HTMLElement&&i.isContentEditable)&&"keyboard"===t&&n instanceof o.KeyboardEvent&&!Reflect.has(A8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:M8(),modality:e}))};return _8.add(o),()=>{_8.delete(o)}}var{guards:j8,createMachine:z8,choose:B8}={guards:{and:(...e)=>function(t){return e.every((e=>t.guard(e)))},or:(...e)=>function(t){return e.some((e=>t.guard(e)))},not:e=>function(t){return!t.guard(e)}},createMachine:e=>IW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:H8,not:U8}=j8,$8=z8({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){jY(e)},collection:k6.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open.suggesting":"closed.idle",context({prop:e,bindable:t,getContext:n,getEvent:r}){const a=e("value")??e("defaultValue")??[],o=e("collection").findMany(a);return{currentPlacement:t((()=>({defaultValue:void 0}))),value:t((()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:eW,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=b6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:b6({values:s,collection:o,selectedItemMap:i.nextSelectedItemMap});a.set("selectedItemMap",l.nextSelectedItemMap),null==(r=e("onValueChange"))||r({value:t,items:i.selectedItems})}}))),highlightedValue:t((()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){var n;const r=e("collection").find(t);null==(n=e("onHighlightChange"))||n({highlightedValue:t,highlightedItem:r})}}))),inputValue:t((()=>{let t=e("inputValue")||e("defaultInputValue");const n=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){const r=e("collection").stringifyMany(n);t=pW(e("selectionBehavior"),{preserve:t||r,replace:r,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){var n;const a=r(),o=(a.previousEvent||a).src;null==(n=e("onInputValueChange"))||n({inputValue:t,reason:o})}}})),highlightedItem:t((()=>{const t=e("highlightedValue");return{defaultValue:e("collection").find(t)}})),selectedItemMap:t((()=>({defaultValue:v6({selectedItems:o,collection:e("collection")})})))}},computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,selectedItems:({context:e,prop:t})=>g6({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:r,send:a}){n([()=>e.hash("value")],(()=>{r(["syncSelectedItems"])})),n([()=>e.get("inputValue")],(()=>{r(["syncInputValue"])})),n([()=>e.get("highlightedValue")],(()=>{r(["syncHighlightedItem","autofillInputValue"])})),n([()=>t("open")],(()=>{r(["toggleVisibility"])})),n([()=>t("collection").toString()],(()=>{a({type:"CHILDREN_CHANGE"})}))},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:B8([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{closed:{tags:["closed"],initial:"idle",states:{idle:{tags:["idle"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"open.interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"open.suggesting"},{target:"open.interacting"}],"INPUT.CHANGE":[{guard:H8("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"open.suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:H8("isCustomValue",U8("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:H8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:H8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}}}},open:{tags:["open","focused"],entry:["setInitialFocus"],effects:["trackFocusVisible","scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"closed.focused",actions:["setFinalFocus"]},{target:"closed.idle"}],"INPUT.ENTER":[{guard:H8("isOpenControlled","isCustomValue",U8("hasHighlightedItem"),U8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:H8("isCustomValue",U8("hasHighlightedItem"),U8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:H8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:H8("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:H8("isOpenControlled","isCustomValue",U8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:H8("isCustomValue",U8("allowCustomValue")),target:"closed.idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"closed.focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]},initial:"interacting",states:{interacting:{on:{CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:H8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:H8("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.ESCAPE":[{guard:H8("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"closed.focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:H8("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return!0===(r=n)||!1===r?n:!!(null==n?void 0:n({inputValue:t.get("inputValue")}));var r},restoreFocus:({event:e})=>{var t;const n=e.restoreFocus??(null==(t=e.previousEvent)?void 0:t.restoreFocus);return null==n||!!n},isChangeEvent:({event:e})=>{var t;return"INPUT.CHANGE"===(null==(t=e.previousEvent)?void 0:t.type)},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackFocusVisible({scope:e}){var t;return F8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return x8((()=>J6(n)),{type:"listbox",defer:!0,exclude:()=>{return[e8(n),r8(n),(e=n,e.getById(Z6(e)))];var e},onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement:({context:e,prop:t,scope:n})=>(e.set("currentPlacement",t("positioning").placement),H6((()=>n8(n)||r8(n)),(()=>t8(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=e8(n);let a=[];const o=r=>{if("pointer"===E8)return;const o=e.get("highlightedValue");if(!o)return;const i=J6(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>a8(n,o)})}const l=a8(n,o),c=DY((()=>{$Y(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=DY((()=>{var e;E8=e="virtual",I8(e,null),o(!0)}));a.push(i);const s=FY(r,{attributes:["aria-activedescendant"],callback:()=>o(!1)});return a.push(s),()=>{a.forEach((e=>e()))}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){H6((()=>n8(n)),(()=>t8(n)),{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:r}=e,a=r("collection"),o=n.get("highlightedValue");if(!o||!a.has(o))return;const i=r("multiple")?Qq(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=pW(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){MY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=a8(n,r),o=J6(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>a8(n,r)})}else $Y(a,{rootEl:o,block:"nearest"})}))},selectItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{var e;const r=a("multiple")?Qq(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=pW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r),clear:""});t.set("inputValue",o)}))},clearItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{const e=Xq(t.get("value"),n.value);t.set("value",e);const r=pW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){DY((()=>{o8(e)}))},setFinalFocus({scope:e}){DY((()=>{const t=r8(e);null==(null==t?void 0:t.dataset.focusable)?o8(e):(e=>{const t=r8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=e8(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&LW(r)})))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const r=pW(t("selectionBehavior"),{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){const{context:t,flush:n,event:r,prop:a}=e;n((()=>{t.set("value",r.value);const e=pW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r.value),clear:""});t.set("inputValue",e)}))},clearSelectedItems(e){const{context:t,flush:n,prop:r}=e;n((()=>{t.set("value",[]);const e=pW(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany([]),clear:""});t.set("inputValue",e)}))},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const r=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>a8(t,r)})}else{const e=J6(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=V8(t);null==(r=e("onOpenChange"))||r({open:!0,reason:a,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;const a=V8(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(J6(n)?queueMicrotask:DY)((()=>{const n=t("collection").firstValue;n&&e.set("highlightedValue",n)}))},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(J6(n)?queueMicrotask:DY)((()=>{const n=t("collection").lastValue;n&&e.set("highlightedValue",n)}))},highlightNextItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getNextValue(r),!n&&t("loopFocus")&&(n=a.firstValue)):n=a.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getPreviousValue(r),!n&&t("loopFocus")&&(n=a.lastValue)):n=a.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){DY((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){DY((()=>{let r=null;r=n("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue,r&&e.set("highlightedValue",r)}))},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){DY((()=>{const r=t("collection");let a=null;a=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue,a&&e.set("highlightedValue",a)}))},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:a}){const o=e8(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));DY((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=b6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=pW(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:r.stringifyMany(a),clear:""});t.set("inputValue",i)}))},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function V8(e){return(e.previousEvent||e).src}const G8=X.forwardRef(((e,t)=>{const{children:n,defaultValue:r=[],items:a,multiple:o=!1,placeholder:i,name:s,disabled:l,required:c,id:u,onValueChange:d}=e,p=X.useId(),f=u??p,h=qO(),[m,g]=X.useState(a),y=X.useMemo((()=>k6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=i8(ZY($8,{id:f,collection:y,defaultValue:r,multiple:o,placeholder:i,name:s,disabled:l,required:c,openOnClick:!0,getRootNode:()=>{var e;return(null==(e=null==h?void 0:h.shadowHost)?void 0:e.shadowRoot)??document},selectionBehavior:o?"clear":"replace",onOpenChange(e){e.open||g(a)},onInputValueChange(e){const t=""===e.inputValue.trim()?a:a.filter((t=>t.label.toLowerCase().includes(e.inputValue.toLowerCase())));g(t.length>0?t:[])},onValueChange(e){null==d||d(e)}}),JY),v=X.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return og.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:og.jsx(o9.Provider,{value:v,children:n})})}));G8.displayName="ComboboxRoot";const q8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=i9(),o=a.getControlProps();return og.jsx("div",{"data-scope":"combobox","data-part":"control","data-state":a.open?"open":"closed","data-disabled":a.disabled?"":void 0,"data-focus":a.focused?"":void 0,...o,ref:W8(t,o.ref),...r,children:n})}));function W8(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}q8.displayName="ComboboxControl";const Y8=X.forwardRef(((e,t)=>{const n=i9(),r=n.getInputProps();return og.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:W8(t,r.ref)})}));Y8.displayName="ComboboxInput";const Z8=X.forwardRef(((e,t)=>{const n=i9(),r=n.getTriggerProps();return og.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:W8(t,r.ref),...e,children:e.children??"▼"})}));Z8.displayName="ComboboxTrigger";const K8=X.forwardRef((function(e,t){const n=i9();return og.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),X8=X.forwardRef(((e,t)=>{const n=i9(),r=n.getContentProps();return og.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:W8(t,r.ref),...e,children:e.children})}));X8.displayName="ComboboxContent";const Q8=X.forwardRef(((e,t)=>{const n=i9().getListProps();return og.jsx("div",{ref:W8(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));Q8.displayName="ComboboxList";const J8=({children:e})=>{const t=function(){const e=X.useContext(o9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return og.jsx(og.Fragment,{children:e(t)})};J8.displayName="ComboboxListItems";const e9=X.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));e9.displayName="ComboboxListEmpty";const t9=X.createContext(null),n9=X.forwardRef(((e,t)=>{const{item:n,...r}=e,a=i9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return og.jsx(t9.Provider,{value:n,children:og.jsx("div",{ref:W8(t,i.ref),"data-scope":"combobox","data-part":"item","data-value":n.value,"data-highlighted":o.highlighted?"":void 0,"data-state":o.selected?"checked":"unchecked","data-disabled":o.disabled?"":void 0,...i,...r,children:e.children})})}));n9.displayName="ComboboxItem";const r9=X.forwardRef(((e,t)=>{const n=X.useContext(t9),r=i9(),a=n?r.getItemTextProps({item:n}):{};return og.jsx("span",{ref:W8(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));r9.displayName="ComboboxItemText";const a9=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.useContext(t9),o=i9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?og.jsx("span",{ref:W8(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??og.jsx(qG,{iconSettings:{builtIn:"LuCheck"}})}):null}));a9.displayName="ComboboxItemIndicator";const o9=X.createContext(null);function i9(){const e=X.useContext(o9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const s9=X.forwardRef(((e,t)=>{const n=i9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>og.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,og.jsx("button",{type:"button","data-part":"tag-clear","aria-label":`Remove ${t.label}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t.value)},children:og.jsx(qG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));s9.displayName="ComboboxSelectedTags";var l9=Object.defineProperty,c9=(e,t,n)=>((e,t,n)=>t in e?l9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),u9={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},d9=[],p9=class{constructor(e,t){c9(this,"trapStack"),c9(this,"config"),c9(this,"doc"),c9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),c9(this,"portalContainers",new Set),c9(this,"listenerCleanups",[]),c9(this,"handleFocus",(e=>{const t=fY(e),n=this.findContainerIndex(t,e)>=0;if(n||BW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(PY(this.state.mostRecentlyFocusedNode)>0){const e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){const e=r.findIndex((e=>e===this.state.mostRecentlyFocusedNode));e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some((e=>e.tabbableNodes.some((e=>PY(e)>0))))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0})),c9(this,"handlePointerDown",(e=>{const t=fY(e);this.findContainerIndex(t,e)>=0||(y9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):y9(this.config.allowOutsideClick,e)||e.preventDefault())})),c9(this,"handleClick",(e=>{const t=fY(e);this.findContainerIndex(t,e)>=0||y9(this.config.clickOutsideDeactivates,e)||y9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),c9(this,"handleTabKey",(e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;const t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;h9(e)&&e.preventDefault(),this.tryFocus(n)}})),c9(this,"handleEscapeKey",(e=>{b9(e)&&!1!==y9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),c9(this,"_mutationObserver"),c9(this,"setupMutationObserver",(()=>{const e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver((e=>{e.some((e=>Array.from(e.removedNodes).some((e=>e===this.state.mostRecentlyFocusedNode))))&&this.tryFocus(this.getInitialFocusNode());e.some((e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return!!function(e){var t;return!!function(e){return e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")}(e)||Boolean(null==(t=e.querySelector)?void 0:t.call(e,'[aria-controls][aria-expanded="true"]'))}(t)||!(!t.id||this.state.containers.some((e=>e.contains(t))))&&iY(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),c9(this,"updateObservedNodes",(()=>{var e;null==(e=this._mutationObserver)||e.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map((e=>{var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})})),this.portalContainers.forEach((e=>{this.observePortalContainer(e)})))})),c9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!NY(e)){const t=KW(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{const t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");if(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return e})),c9(this,"tryFocus",(e=>{!1!==e&&e!==KW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,k9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),c9(this,"deactivate",(e=>{if(!this.state.active)return this;const t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),u9.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const n=this.getOption(t,"onDeactivate"),r=this.getOption(t,"onPostDeactivate"),a=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");null==n||n();const i=()=>{v9((()=>{if(o){const e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}null==r||r()}))};if(o&&a){return a(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(i,i),this}return i(),this})),c9(this,"pause",(e=>{if(this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onPause"),n=this.getOption(e,"onPostPause");return this.state.paused=!0,null==t||t(),this.removeListeners(),this.updateObservedNodes(),null==n||n(),this})),c9(this,"unpause",(e=>{if(!this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onUnpause"),n=this.getOption(e,"onPostUnpause");return this.state.paused=!1,null==t||t(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n(),this})),c9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),c9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),c9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),c9(this,"getNodeForOption",((e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if("function"==typeof r&&(r=r(...n)),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let a=r;if("string"==typeof r){try{a=this.doc.querySelector(r)}catch($Ie){throw new Error(`\`${e}\` appears to be an invalid selector; error="${$Ie.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),c9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||fY(t);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const e=this.findContainerIndex(r,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)a=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex((({firstTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||NY(r)&&!RY(r)&&!(null==o?void 0:o.nextTabbableNode(r,!1)))&&(n=e),n>=0){const e=0===n?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];a=PY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else h9(t)||(a=null==o?void 0:o.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex((({lastTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||NY(r)&&!RY(r)&&!(null==o?void 0:o.nextTabbableNode(r)))&&(n=e),n>=0){const e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];a=PY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else h9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||d9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:m9,isKeyBackward:g9,...t};this.doc=n.document||YW(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach((e=>{oY(e).forEach((e=>{this.addPortalContainer(e)}))}))}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return this.state.containerGroups.findIndex((({container:t,tabbableNodes:r})=>t.contains(e)||(null==n?void 0:n.includes(t))||r.find((t=>t===e))||this.isControlledElement(t,e)))}isControlledElement(e,t){return!!this.config.followControlledElements&&aY(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=OY(e,{getShadowRoot:this.config.getShadowRoot}),n=IY(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],o=r,i=a;let s=!1;for(let l=0;l<t.length;l++)if(PY(t[l])>0){s=!0;break}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:i,nextTabbableNode:function(e,r=!0){const a=t.indexOf(e);if(a>=0)return t[a+(r?1:-1)];const o=n.indexOf(e);if(!(o<0))if(r){for(let t=o+1;t<n.length;t++)if(RY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(RY(n[t]))return n[t]}}})),this.state.tabbableGroups=this.state.containerGroups.filter((e=>e.tabbableNodes.length>0)),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find((e=>e.posTabIndexesFound))&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return u9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?v9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(xY(this.doc,"focusin",this.handleFocus,!0),xY(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),xY(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),xY(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),xY(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),xY(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach((e=>e())),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=KW(this.doc),null==t||t();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},f9=e=>"keydown"===(null==e?void 0:e.type),h9=e=>f9(e)&&"Tab"===(null==e?void 0:e.key),m9=e=>f9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),g9=e=>f9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),y9=(e,...t)=>"function"==typeof e?e(...t):e,b9=e=>!e.isComposing&&"Escape"===e.key,v9=e=>setTimeout(e,0),k9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var x9=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef(null),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=w9(r.current);o.current="mounted"===s?e:"none"}),[s]),HO((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=w9(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),HO((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=w9(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=w9(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=$5(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function w9(e){return(null==e?void 0:e.animationName)||"none"}x9.displayName="Presence";var E9="data-scroll-lock";function _9(e){const t=eY(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function S9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(E9))return;const o=_9(r)||_9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(E9,"");const s=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(r),l=[function(e,t,n){if(!e)return DW;const r=e.style.getPropertyValue(t);return r===n?DW:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),dY()?(()=>{const{scrollX:e,scrollY:t,visualViewport:r}=n,l=(null==r?void 0:r.offsetLeft)??0,c=(null==r?void 0:r.offsetTop)??0,u={position:"fixed",overflow:"hidden",top:-(t-Math.floor(c))+"px",left:-(e-Math.floor(l))+"px",right:"0"};!o&&i>0&&(u[s]=`${i}px`);const d=VY(a,u);return()=>{null==d||d(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(()=>{const e={overflow:"hidden"};return!o&&i>0&&(e[s]=`${i}px`),VY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(E9)}}const T9="Dialog",[C9]=z5(T9),[A9,I9]=C9(T9),N9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=X.useRef(null),l=X.useRef(null),[c=!1,u]=fR({prop:r,defaultProp:a??!1,onChange:o});return og.jsx(A9,{scope:t,triggerRef:s,contentRef:l,contentId:VO(),titleId:VO(),descriptionId:VO(),open:c,onOpenChange:u,onOpenToggle:X.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};N9.displayName=T9;const O9="DialogTrigger";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(O9,n),o=$5(t,a.triggerRef);return og.jsx(g3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Z9(a.open),...r,ref:o,onClick:j5(e.onClick,a.onOpenToggle)})})).displayName=O9;const R9="DialogPortal",[P9,L9]=C9(R9,{forceMount:void 0}),D9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=I9(R9,t);return og.jsx(P9,{scope:t,forceMount:n,children:X.Children.map(r,(e=>og.jsx(x9,{present:n||o.open,children:og.jsx(J3,{asChild:!0,container:a,children:e})})))})};D9.displayName=R9;const M9="DialogOverlay",F9=X.forwardRef(((e,t)=>{const n=L9(M9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=I9(M9,e.__scopeDialog);return o.modal?og.jsx(x9,{present:r||o.open,children:og.jsx(j9,{...a,ref:t})}):null}));F9.displayName=M9;const j9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(M9,n),o=qO();return X.useEffect((()=>{var e;return S9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),og.jsx(g3.div,{"data-dialog-overlay":"","data-state":Z9(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),z9="DialogContent",B9=X.forwardRef(((e,t)=>{const n=L9(z9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=I9(z9,e.__scopeDialog);return og.jsx(x9,{present:r||o.open,children:o.modal?og.jsx(H9,{...a,ref:t}):og.jsx(U9,{...a,ref:t})})}));B9.displayName=z9;const H9=X.forwardRef(((e,t)=>{const n=I9(z9,e.__scopeDialog),r=X.useRef(null),a=$5(t,n.contentRef,r);return X.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return G1([e,...Array.from(t)])}}),[]),og.jsx($9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:j5(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault();e.target.closest("[data-ikp-component]")&&e.preventDefault()})),onFocusOutside:j5(e.onFocusOutside,(e=>e.preventDefault()))})})),U9=X.forwardRef(((e,t)=>{const n=I9(z9,e.__scopeDialog),r=X.useRef(!1),a=X.useRef(!1);return og.jsx($9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),$9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=I9(z9,n),l=X.useRef(null),c=$5(t,l);return h3(),X.useEffect((()=>{if(r)return function(e,t={}){let n;const r=DY((()=>{const r=(Array.isArray(e)?e:[e]).map((e=>"function"==typeof e?e():e)).filter((e=>null!=e));if(0===r.length)return;const a=r[0];n=new p9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:YW(a)});try{n.activate()}catch{}}));return function(){null==n||n.deactivate(),r()}}(l.current,{preventScroll:!0,onActivate:a,onDeactivate:o,initialFocus:!1,allowOutsideClick:e=>{var t;const n=(null==(t=e.composedPath)?void 0:t.call(e)[0])??e.target;return!!n.closest("[data-ikp-component]")||!!n.closest("[data-dialog-overlay]")}})}),[]),og.jsx(u3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Z9(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),V9="DialogTitle",G9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(V9,n);return og.jsx(g3.h2,{id:a.titleId,...r,ref:t})}));G9.displayName=V9;const q9="DialogDescription";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(q9,n);return og.jsx(g3.p,{id:a.descriptionId,...r,ref:t})})).displayName=q9;const W9="DialogClose",Y9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(W9,n);return og.jsx(g3.button,{type:"button",...r,ref:t,onClick:j5(e.onClick,(()=>a.onOpenChange(!1)))})}));function Z9(e){return e?"open":"closed"}Y9.displayName=W9;const K9=N9,X9=D9,Q9=F9,J9=B9,e7=G9,t7=Y9,n7=X.forwardRef(((e,t)=>{const n=X.useId();return og.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[og.jsx("title",{children:"AI Avatar"}),og.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${n}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${n}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${n}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsxs("defs",{children:[og.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),r7=X.forwardRef(((e,t)=>og.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[og.jsx("title",{children:"User Avatar"}),og.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}))),a7=X.forwardRef((({isExternal:e,...t},n)=>og.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));a7.displayName="Link";const o7=X.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=oR(),o=Object.assign({},a.urlQueryParamsToAppend,t),i=e?function(e,t){if(!t)return e;try{const n=new URL(e);for(const e of Object.keys(t))t[e]&&n.searchParams.append(e,t[e]);return n.href}catch{return e}}(e,o):e;return og.jsx(a7,{ref:r,href:i,...n})}));function i7(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(a,r).trim();!e&&o||t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function s7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}o7.displayName="LinkWithQueryParams";const l7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u7={};function d7(e,t){return(u7.jsx?c7:l7).test(e)}const p7=/[ \t\n\f\r]/g;function f7(e){return""===e.replace(p7,"")}class h7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function m7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new h7(n,r,t)}function g7(e){return e.toLowerCase()}h7.prototype.normal={},h7.prototype.property={},h7.prototype.space=void 0;class y7{constructor(e,t){this.attribute=t,this.property=e}}y7.prototype.attribute="",y7.prototype.booleanish=!1,y7.prototype.boolean=!1,y7.prototype.commaOrSpaceSeparated=!1,y7.prototype.commaSeparated=!1,y7.prototype.defined=!1,y7.prototype.mustUseProperty=!1,y7.prototype.number=!1,y7.prototype.overloadedBoolean=!1,y7.prototype.property="",y7.prototype.spaceSeparated=!1,y7.prototype.space=void 0;let b7=0;const v7=T7(),k7=T7(),x7=T7(),w7=T7(),E7=T7(),_7=T7(),S7=T7();function T7(){return 2**++b7}const C7=Object.freeze(Object.defineProperty({__proto__:null,boolean:v7,booleanish:k7,commaOrSpaceSeparated:S7,commaSeparated:_7,number:w7,overloadedBoolean:x7,spaceSeparated:E7},Symbol.toStringTag,{value:"Module"})),A7=Object.keys(C7);class I7 extends y7{constructor(e,t,n,r){let a=-1;if(super(e,t),N7(this,"space",r),"number"==typeof n)for(;++a<A7.length;){const e=A7[a];N7(this,A7[a],(n&C7[e])===C7[e])}}}function N7(e,t,n){n&&(e[t]=n)}function O7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new I7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[g7(r)]=r,n[g7(o.attribute)]=r}return new h7(t,n,e.space)}I7.prototype.defined=!0;const R7=O7({properties:{ariaActiveDescendant:null,ariaAtomic:k7,ariaAutoComplete:null,ariaBusy:k7,ariaChecked:k7,ariaColCount:w7,ariaColIndex:w7,ariaColSpan:w7,ariaControls:E7,ariaCurrent:null,ariaDescribedBy:E7,ariaDetails:null,ariaDisabled:k7,ariaDropEffect:E7,ariaErrorMessage:null,ariaExpanded:k7,ariaFlowTo:E7,ariaGrabbed:k7,ariaHasPopup:null,ariaHidden:k7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:E7,ariaLevel:w7,ariaLive:null,ariaModal:k7,ariaMultiLine:k7,ariaMultiSelectable:k7,ariaOrientation:null,ariaOwns:E7,ariaPlaceholder:null,ariaPosInSet:w7,ariaPressed:k7,ariaReadOnly:k7,ariaRelevant:null,ariaRequired:k7,ariaRoleDescription:E7,ariaRowCount:w7,ariaRowIndex:w7,ariaRowSpan:w7,ariaSelected:k7,ariaSetSize:w7,ariaSort:null,ariaValueMax:w7,ariaValueMin:w7,ariaValueNow:w7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function P7(e,t){return t in e?e[t]:t}function L7(e,t){return P7(e,t.toLowerCase())}const D7=O7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_7,acceptCharset:E7,accessKey:E7,action:null,allow:null,allowFullScreen:v7,allowPaymentRequest:v7,allowUserMedia:v7,alt:null,as:null,async:v7,autoCapitalize:null,autoComplete:E7,autoFocus:v7,autoPlay:v7,blocking:E7,capture:null,charSet:null,checked:v7,cite:null,className:E7,cols:w7,colSpan:null,content:null,contentEditable:k7,controls:v7,controlsList:E7,coords:w7|_7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v7,defer:v7,dir:null,dirName:null,disabled:v7,download:x7,draggable:k7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v7,formTarget:null,headers:E7,height:w7,hidden:x7,high:w7,href:null,hrefLang:null,htmlFor:E7,httpEquiv:E7,id:null,imageSizes:null,imageSrcSet:null,inert:v7,inputMode:null,integrity:null,is:null,isMap:v7,itemId:null,itemProp:E7,itemRef:E7,itemScope:v7,itemType:E7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v7,low:w7,manifest:null,max:null,maxLength:w7,media:null,method:null,min:null,minLength:w7,multiple:v7,muted:v7,name:null,nonce:null,noModule:v7,noValidate:v7,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:v7,optimum:w7,pattern:null,ping:E7,placeholder:null,playsInline:v7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v7,referrerPolicy:null,rel:E7,required:v7,reversed:v7,rows:w7,rowSpan:w7,sandbox:E7,scope:null,scoped:v7,seamless:v7,selected:v7,shadowRootClonable:v7,shadowRootDelegatesFocus:v7,shadowRootMode:null,shape:null,size:w7,sizes:null,slot:null,span:w7,spellCheck:k7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:w7,step:null,style:null,tabIndex:w7,target:null,title:null,translate:null,type:null,typeMustMatch:v7,useMap:null,value:k7,width:w7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:E7,axis:null,background:null,bgColor:null,border:w7,borderColor:null,bottomMargin:w7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v7,declare:v7,event:null,face:null,frame:null,frameBorder:null,hSpace:w7,leftMargin:w7,link:null,longDesc:null,lowSrc:null,marginHeight:w7,marginWidth:w7,noResize:v7,noHref:v7,noShade:v7,noWrap:v7,object:null,profile:null,prompt:null,rev:null,rightMargin:w7,rules:null,scheme:null,scrolling:k7,standby:null,summary:null,text:null,topMargin:w7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:w7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:v7,disableRemotePlayback:v7,prefix:null,property:null,results:w7,security:null,unselectable:null},space:"html",transform:L7}),M7=O7({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:S7,accentHeight:w7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:w7,amplitude:w7,arabicForm:null,ascent:w7,attributeName:null,attributeType:null,azimuth:w7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:w7,by:null,calcMode:null,capHeight:w7,className:E7,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:w7,diffuseConstant:w7,direction:null,display:null,dur:null,divisor:w7,dominantBaseline:null,download:v7,dx:null,dy:null,edgeMode:null,editable:null,elevation:w7,enableBackground:null,end:null,event:null,exponent:w7,externalResourcesRequired:null,fill:null,fillOpacity:w7,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:_7,g2:_7,glyphName:_7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:w7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:w7,horizOriginX:w7,horizOriginY:w7,id:null,ideographic:w7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:w7,k:w7,k1:w7,k2:w7,k3:w7,k4:w7,kernelMatrix:S7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:w7,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:w7,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:w7,overlineThickness:w7,paintOrder:null,panose1:null,path:null,pathLength:w7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:E7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:w7,pointsAtY:w7,pointsAtZ:w7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:S7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:S7,rev:S7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:S7,requiredFeatures:S7,requiredFonts:S7,requiredFormats:S7,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:w7,specularExponent:w7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:w7,strikethroughThickness:w7,string:null,stroke:null,strokeDashArray:S7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:w7,strokeOpacity:w7,strokeWidth:null,style:null,surfaceScale:w7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:S7,tabIndex:w7,tableValues:null,target:null,targetX:w7,targetY:w7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:S7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:w7,underlineThickness:w7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:w7,values:null,vAlphabetic:w7,vMathematical:w7,vectorEffect:null,vHanging:w7,vIdeographic:w7,version:null,vertAdvY:w7,vertOriginX:w7,vertOriginY:w7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:w7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:P7}),F7=O7({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),j7=O7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:L7}),z7=O7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),B7={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"},H7=/[A-Z]/g,U7=/-[a-z]/g,$7=/^data[-\w.:]+$/i;function V7(e,t){const n=g7(t);let r=t,a=y7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&$7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(U7,q7);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!U7.test(e)){let n=e.replace(H7,G7);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=I7}return new a(r,t)}function G7(e){return"-"+e.toLowerCase()}function q7(e){return e.charAt(1).toUpperCase()}const W7=m7([R7,D7,F7,j7,z7],"html"),Y7=m7([R7,M7,F7,j7,z7],"svg");function Z7(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function K7(e){return e.join(" ").trim()}var X7={},Q7=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,J7=/\n/g,eee=/^\s*/,tee=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,nee=/^:\s*/,ree=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,aee=/^[;\s]*/,oee=/^\s+|\s+$/g,iee="";function see(e){return e?e.replace(oee,iee):iee}var lee=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(J7);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(eee)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;iee!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,iee===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(tee);if(t){if(d(),!l(nee))return s("property missing ':'");var n=l(ree),r=e({type:"declaration",property:see(t[0].replace(Q7,iee)),value:n?see(n[0].replace(Q7,iee)):iee});return l(aee),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},cee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X7,"__esModule",{value:!0}),X7.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,uee.default)(e),a="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const uee=cee(lee);var dee={};Object.defineProperty(dee,"__esModule",{value:!0}),dee.camelCase=void 0;var pee=/^--[a-zA-Z0-9_-]+$/,fee=/-([a-z])/g,hee=/^[^-]+$/,mee=/^-(webkit|moz|ms|o|khtml)-/,gee=/^-(ms)-/,yee=function(e,t){return t.toUpperCase()},bee=function(e,t){return"".concat(t,"-")};dee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||hee.test(e)||pee.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(gee,bee):e.replace(mee,bee)).replace(fee,yee))};var vee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kee=vee(X7),xee=dee;function wee(e,t){var n={};return e&&"string"==typeof e?((0,kee.default)(e,(function(e,r){e&&r&&(n[(0,xee.camelCase)(e,t)]=r)})),n):n}wee.default=wee;const Eee=l(wee),_ee=Tee("end"),See=Tee("start");function Tee(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 Cee(e){return e&&"object"==typeof e?"position"in e||"type"in e?Iee(e.position):"start"in e||"end"in e?Iee(e):"line"in e||"column"in e?Aee(e):"":""}function Aee(e){return Nee(e&&e.line)+":"+Nee(e&&e.column)}function Iee(e){return Aee(e&&e.start)+"-"+Aee(e&&e.end)}function Nee(e){return e&&"number"==typeof e?e:1}class Oee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="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:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Cee(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Oee.prototype.file="",Oee.prototype.name="",Oee.prototype.reason="",Oee.prototype.message="",Oee.prototype.stack="",Oee.prototype.column=void 0,Oee.prototype.line=void 0,Oee.prototype.ancestors=void 0,Oee.prototype.cause=void 0,Oee.prototype.fatal=void 0,Oee.prototype.place=void 0,Oee.prototype.ruleId=void 0,Oee.prototype.source=void 0;const Ree={}.hasOwnProperty,Pee=new Map,Lee=/[A-Z]/g,Dee=new Set(["table","tbody","thead","tfoot","tr"]),Mee=new Set(["td","th"]),Fee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jee(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,a,o){const i=Array.isArray(a.children),s=See(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.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,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Y7:W7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=zee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function zee(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=Y7,e.schema=a);e.ancestors.push(t);const o=Vee(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Ree.call(t.properties,a)){const o=$ee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Mee.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Uee(e,t);Dee.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&f7(t.value):f7(t));var t})));return Bee(e,i,o,t),Hee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,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)}Gee(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=Y7,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:Vee(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 a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Gee(e,t.position);else{const a=r.name;let o;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,o=e.evaluater.evaluateExpression(t.expression)}else Gee(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Uee(e,t);return Bee(e,i,o,t),Hee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,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);Gee(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Hee(r,Uee(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 Bee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Uee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Pee;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=zee(e,o,i);void 0!==s&&n.push(s)}return n}function $ee(e,t,n){const r=V7(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?s7(n):K7(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Eee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Oee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Fee+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Ree.call(e,n)&&(t[qee(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?B7[r.property]||r.property:r.attribute,n]}}function Vee(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=d7(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=d7(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 Ree.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Gee(e)}function Gee(e,t){const n=new Oee("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=Fee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qee(e){let t=e.replace(Lee,Wee);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Wee(e){return"-"+e.toLowerCase()}const Yee={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"]},Zee={};function Kee(e,t){return Xee(e,"boolean"!=typeof Zee.includeImageAlt||Zee.includeImageAlt,"boolean"!=typeof Zee.includeHtml||Zee.includeHtml)}function Xee(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qee(e.children,t,n)}return Array.isArray(e)?Qee(e,t,n):""}function Qee(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Xee(e[a],t,n);return r.join("")}const Jee=document.createElement("i");function ete(e){const t="&"+e+";";Jee.innerHTML=t;const n=Jee.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function tte(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function nte(e,t){return e.length>0?(tte(e,e.length,0,t),e):t}const rte={}.hasOwnProperty;function ate(e){const t={};let n=-1;for(;++n<e.length;)ote(t,e[n]);return t}function ote(e,t){let n;for(n in t){const r=(rte.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){rte.call(r,o)||(r[o]=[]);const e=a[o];ite(r[o],Array.isArray(e)?e:e?[e]:[])}}}function ite(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);tte(e,0,0,r)}function ste(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 lte(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cte=xte(/[A-Za-z]/),ute=xte(/[\dA-Za-z]/),dte=xte(/[#-'*+\--9=?A-Z^-~]/);function pte(e){return null!==e&&(e<32||127===e)}const fte=xte(/\d/),hte=xte(/[\dA-Fa-f]/),mte=xte(/[!-/:-@[-`{-~]/);function gte(e){return null!==e&&e<-2}function yte(e){return null!==e&&(e<0||32===e)}function bte(e){return-2===e||-1===e||32===e}const vte=xte(new RegExp("\\p{P}|\\p{S}","u")),kte=xte(/\s/);function xte(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function wte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ute(e.charCodeAt(n+1))&&ute(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Ete(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(bte(r))return e.enter(n),i(r);return t(r)};function i(r){return bte(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const _te={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"),Ete(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,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):gte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const Ste={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return tte(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Tte,u,d)(a)}function u(e){return r&&b(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Tte,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):gte(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;tte(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Tte={tokenize:function(e,t,n){return Ete(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Cte(e){return null===e||yte(e)||kte(e)?1:vte(e)?2:void 0}function Ate(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Ite={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Nte(d,-s),Nte(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=nte(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=nte(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=nte(l,Ate(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=nte(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=nte(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,tte(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Cte(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=Cte(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Nte(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ote={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"),a};function a(t){return cte(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ute(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||ute(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(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||pte(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):dte(t)?(e.consume(t),l):n(t)}function c(e){return ute(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||ute(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Rte={partial:!0,tokenize:function(e,t,n){return function(t){return bte(t)?Ete(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||gte(e)?t(e):n(e)}}};const Pte={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(bte(t))return Ete(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Pte,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"),a}return n(t)};function a(n){return bte(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Lte={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 mte(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Dte={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ute,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=hte,c):(e.enter("characterReferenceValue"),a=7,o=fte,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ute||ete(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const Mte={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Fte={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),bte(t)?Ete(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),bte(t)?Ete(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||gte(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=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,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),bte(t)?Ete(e,c,"whitespace")(t):c(t))}function c(n){return null===n||gte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Mte,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||gte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):bte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ete(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||gte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||gte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&bte(t)?Ete(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||gte(t)?e.check(Mte,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||gte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const jte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Ete(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):gte(t)?e.attempt(zte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||gte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},zte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):gte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):Ete(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):gte(e)?a(e):n(e)}}};const Bte={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,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):gte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||gte(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class Hte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Ute(this.left,n),a.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),Ute(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ute(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);Ute(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ute(this.left,t.reverse())}}}function Ute(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 $te(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new Hte(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Vte(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return tte(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Vte(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const Gte={resolve:function(e){return $te(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?a(t):gte(t)?e.check(qte,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},qte={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"),Ete(e,a,"linePrefix")};function a(a){if(null===a||gte(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Wte(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||pte(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||gte(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!yte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||pte(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Yte(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):gte(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||gte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!bte(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Zte(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):gte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ete(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||gte(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Kte(e,t){let n;return function r(a){if(gte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(bte(a))return Ete(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const Xte={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Yte.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=lte(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 yte(t)?Kte(e,s)(t):s(t)}function s(t){return Wte(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Qte,c,c)(t)}function c(t){return bte(t)?Ete(e,u,"whitespace")(t):u(t)}function u(o){return null===o||gte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Qte={partial:!0,tokenize:function(e,t,n){return function(t){return yte(t)?Kte(e,r)(t):n(t)};function r(t){return Zte(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return bte(t)?Ete(e,o,"whitespace")(t):o(t)}function o(e){return null===e||gte(e)?t(e):n(e)}}};const Jte={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return gte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const ene={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},tte(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||yte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||gte(n)?(e.exit("atxHeading"),t(n)):bte(n)?Ete(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||yte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const tne=["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"],nne=["pre","script","style","textarea"],rne={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):cte(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):cte(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return cte(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||yte(s)){const l=47===s,c=i.toLowerCase();return l||o||!nne.includes(c)?tne.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||ute(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function g(t){return bte(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||cte(t)?(e.consume(t),b):bte(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||ute(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):bte(t)?(e.consume(t),v):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):bte(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||gte(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||yte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||bte(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||gte(t)?T(t):bte(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),N):60===t&&1===a?(e.consume(t),O):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!gte(t)||6!==a&&7!==a?null===t||gte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(ane,M,C)(t))}function C(t){return e.check(one,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||gte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),L):T(t)}function O(t){return 47===t?(e.consume(t),i="",R):T(t)}function R(t){if(62===t){const n=i.toLowerCase();return nne.includes(n)?(e.consume(t),D):T(t)}return cte(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),R):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||gte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},ane={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Rte,t,n)}}},one={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(gte(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const ine={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):cte(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):cte(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):gte(t)?(i=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):gte(t)?(i=h,R(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):gte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):gte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return cte(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ute(t)?(e.consume(t),x):w(t)}function w(t){return gte(t)?(i=w,R(t)):bte(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||ute(t)?(e.consume(t),E):47===t||62===t||yte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||cte(t)?(e.consume(t),S):gte(t)?(i=_,R(t)):bte(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ute(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):gte(t)?(i=T,R(t)):bte(t)?(e.consume(t),T):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):gte(t)?(i=C,R(t)):bte(t)?(e.consume(t),C):(e.consume(t),I)}function A(t){return t===a?(e.consume(t),a=void 0,N):null===t?n(t):gte(t)?(i=A,R(t)):(e.consume(t),A)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||yte(t)?_(t):(e.consume(t),I)}function N(e){return 47===e||62===e||yte(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return bte(t)?Ete(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const sne={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&tte(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=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(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=nte(o,e.slice(r+1,r+s+3)),o=nte(o,[["enter",u,t]]),o=nte(o,Ate(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=nte(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=nte(o,e.slice(a+1)),o=nte(o,[["exit",l,t]]),tte(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(lte(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(lne,c,o?c:u)(t):91===t?e.attempt(cne,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(une,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},lne={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 yte(t)?Kte(e,a)(t):a(t)}function a(t){return 41===t?c(t):Wte(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return yte(t)?Kte(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Zte(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return yte(t)?Kte(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},cne={tokenize:function(e,t,n){const r=this;return function(t){return Yte.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(lte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},une={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 dne={name:"labelStartImage",resolveAll:sne.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"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const pne={name:"labelStartLink",resolveAll:sne.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"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const fne={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ete(e,t,"linePrefix")}}};const hne={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||gte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),bte(t)?Ete(e,o,"whitespace")(t):o(t))}}};const mne={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rte,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ete(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!bte(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ete(e,e.attempt(mne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:fte(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(hne,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return fte(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Rte,r.interrupt?n:c,e.attempt(gne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return bte(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},gne={partial:!0,tokenize:function(e,t,n){const r=this;return Ete(e,(function(e){const a=r.events[r.events.length-1];return!bte(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},yne={partial:!0,tokenize:function(e,t,n){const r=this;return Ete(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const bne={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),bte(t)?Ete(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||gte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const vne={tokenize:function(e){const t=this,n=e.attempt(Rte,(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,Ete(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Gte,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 kne={resolveAll:_ne()},xne=Ene("string"),wne=Ene("text");function Ene(e){return{resolveAll:_ne("text"===e?Sne:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function _ne(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function Sne(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],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const Tne={42:mne,43:mne,45:mne,48:mne,49:mne,50:mne,51:mne,52:mne,53:mne,54:mne,55:mne,56:mne,57:mne,62:Pte},Cne={91:Xte},Ane={[-2]:jte,[-1]:jte,32:jte},Ine={35:ene,42:hne,45:[bne,hne],60:rne,61:bne,95:hne,96:Fte,126:Fte},Nne={38:Dte,92:Lte},One={[-5]:fne,[-4]:fne,[-3]:fne,33:dne,38:Dte,42:Ite,60:[Ote,ine],91:pne,92:[Jte,Lte],93:sne,95:Ite,96:Bte},Rne={null:[Ite,kne]},Pne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Cne,disable:{null:[]},document:Tne,flow:Ine,flowInitial:Ane,insideSpan:Rne,string:Nne,text:One},Symbol.toStringTag,{value:"Module"}));function Lne(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){gte(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){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&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=nte(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=Ate(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),a}function y(e){return f.restore(),++u<i.length?m(i[u]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&tte(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const Dne=/[\0\t\n\r]/g;const Mne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ste(n.slice(t?2:1),t?16:10)}return ete(n)||e}const jne={}.hasOwnProperty;function zne(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:o(X),blockQuote:o(q),characterEscape:S,characterReference:S,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:S,data:S,codeFlowValue:S,definition:o(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:S,htmlText:o(J,i),htmlTextData:S,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(X),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:G,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(O),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(I),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:F,resource:j,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:w,strong:l(),thematicBreak:l()}};Hne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];jne.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||$ne).call(o,void 0,e[0])}for(r.position={start:Bne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Bne(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(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:Bne(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Cee({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||$ne).call(this,e,r[0])}n.position.end=Bne(e.end)}function u(){return Kee(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lte(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Bne(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Bne(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Bne(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){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 L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Mne,Fne)}(t),n.identifier=lte(t).toLowerCase()}function D(){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 M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function j(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lte(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=ste(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=ete(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Bne(e.end)}function V(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){T.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 Y(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!$te(e););return e}(function(e){const t={constructs:ate([Pne,...(e||{}).extensions||[]]),content:n(_te),defined:[],document:n(Ste),flow:n(vne),lazy:{},string:n(xne),text:n(wne)};return t;function n(e){return function(n){return Lne(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(Dne.lastIndex=u,l=Dne.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Bne(e){return{line:e.line,column:e.column,offset:e.offset}}function Hne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Hne(e,r):Une(e,r)}}function Une(e,t){let n;for(n in t)if(jne.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 $ne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cee({start:t.start,end:t.end})+") is still open")}function Vne(e){const t=this;t.parser=function(n){return zne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Gne(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 a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function qne(e){const t=e.spread;return null==t?e.children.length>1:t}function Wne(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Yne(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Yne(t.slice(a),a>0,!1)),o.join("")}function Yne(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const Zne={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={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},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(),a=wte(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},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 Gne(e,t);const a={src:wte(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:wte(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 Gne(e,t);const a={href:wte(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:wte(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),a=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=qne(n[r])}return t}(n):qne(t),o={},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:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];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 o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},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(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=See(t.children[1]),i=_ee(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},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,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Wne(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:Kne,yaml:Kne,definition:Kne,footnoteDefinition:Kne};function Kne(){}const Xne="object"==typeof self?self:globalThis,Qne=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new Xne[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);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 Xne[o](i),a)};return r})(new Map,e)(0),Jne="",{toString:ere}={},{keys:tre}=Object,nre=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ere.call(e).slice(8,-1);switch(n){case"Array":return[1,Jne];case"Object":return[2,Jne];case"Date":return[3,Jne];case"RegExp":return[4,Jne];case"Map":return[5,Jne];case"Set":return[6,Jne];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},rre=([e,t])=>0===e&&("function"===t||"symbol"===t),are=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=nre(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of tre(r))!e&&rre(nre(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[a,i]of r)(e||!rre(nre(a))&&!rre(nre(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&rre(nre(a))||t.push(o(a));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},ore="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Qne(are(e,t)):structuredClone(e):(e,t)=>Qne(are(e,t));function ire(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 sre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const lre=function(e){if(null==e)return ure;if("function"==typeof e)return cre(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lre(e[n]);return cre(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 cre(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return cre(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function cre(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ure(){return!0}const dre=[],pre=!0,fre=!1;function hre(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=lre(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=dre;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[pre,e];return null==e?dre:[e]}(n(a,l)),p[0]===fre))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===fre)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function mre(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),hre(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}const gre={}.hasOwnProperty,yre={};function bre(e,t){e.position&&(t.position=function(e){const t=See(e),n=_ee(e);if(t&&n)return{start:t,end:n}}(e))}function vre(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=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&&a&&Object.assign(n.properties,ore(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function kre(e,t){const n=t.data||{},r=!("value"in t)||gre.call(n,"hProperties")||gre.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 xre(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 wre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ere(e,t){const n=function(e,t){const n=t||yre,r=new Map,a=new Map,o=new Map,i={...Zne,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=wre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=wre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:vre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(gre.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=ore(n);return r.children=s.all(e),r}return ore(e)}return(s.options.unknownHandler||kre)(s,e,t)},options:n,patch:bre,wrap:xre};return mre(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ire,r=e.options.footnoteBackLabel||sre,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=wte(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ore(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function _re(e,t){return e&&"run"in e?async function(n,r){const a=Ere(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Ere(n,{file:r,...e||t})}}function Sre(e){if(e)throw e}var Tre=Object.prototype.hasOwnProperty,Cre=Object.prototype.toString,Are=Object.defineProperty,Ire=Object.getOwnPropertyDescriptor,Nre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Cre.call(e)},Ore=function(e){if(!e||"[object Object]"!==Cre.call(e))return!1;var t,n=Tre.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Tre.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Tre.call(e,t)},Rre=function(e,t){Are&&"__proto__"===t.name?Are(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Pre=function(e,t){if("__proto__"===t){if(!Tre.call(e,t))return;if(Ire)return Ire(e,t).value}return e[t]},Lre=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Pre(s,n),s!==(a=Pre(t,n))&&(u&&a&&(Ore(a)||(o=Nre(a)))?(o?(o=!1,i=r&&Nre(r)?r:[]):i=r&&Ore(r)?r:{},Rre(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Rre(s,{name:n,newValue:a}));return s};const Dre=l(Lre);function Mre(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 Fre(){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 a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(a);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return a(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(i,a):s instanceof Error?a(s):i(s))}function a(e,...r){n||(n=!0,t(e,...r))}function i(e){a(null,e)}}(s,a)(...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 jre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');zre(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(zre(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){zre(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)zre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){zre(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function zre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Bre={cwd:function(){return"/"}};function Hre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Ure(e){if("string"==typeof e)e=new URL(e);else if(!Hre(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 $re=["history","path","basename","stem","extname","dirname"];class Vre{constructor(e){let t;t=e?Hre(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Bre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<$re.length;){const e=$re[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)$re.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?jre.basename(this.path):void 0}set basename(e){qre(e,"basename"),Gre(e,"basename"),this.path=jre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?jre.dirname(this.path):void 0}set dirname(e){Wre(this.basename,"dirname"),this.path=jre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?jre.extname(this.path):void 0}set extname(e){if(Gre(e,"extname"),Wre(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=jre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Hre(e)&&(e=Ure(e)),qre(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?jre.basename(this.path,this.extname):void 0}set stem(e){qre(e,"stem"),Gre(e,"stem"),this.path=jre.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 Oee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Gre(e,t){if(e&&e.includes(jre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jre.sep+"`")}function qre(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Wre(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Yre=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Zre={}.hasOwnProperty;class Kre extends Yre{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=Fre()}copy(){const e=new Kre;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Dre(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(eae("data",this.frozen),this.namespace[e]=t,this):Zre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(eae("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=rae(e),n=this.parser||this.Parser;return Qre("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Qre("process",this.parser||this.Parser),Jre("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=rae(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Qre("processSync",this.parser||this.Parser),Jre("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Sre(e),t=r})),nae("processSync","process",n),t}run(e,t,n){tae(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=rae(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Sre(e),n=t,r=!0})),nae("runSync","run",r),n}stringify(e,t){this.freeze();const n=rae(t),r=this.compiler||this.Compiler;return Jre("stringify",r),tae(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(eae("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(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=Dre(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];Mre(i)&&Mre(r)&&(r=Dre(!0,i,r)),n[a]=[e,r,...o]}}}}const Xre=(new Kre).freeze();function Qre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Jre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function eae(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 tae(e){if(!Mre(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function nae(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rae(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Vre(e)}const aae=[],oae={allowDangerousHtml:!0},iae=/^(https?|ircs?|mailto|xmpp)$/i,sae=[{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 lae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||aae,l=e.remarkPlugins||aae,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oae}:oae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||cae,f=Xre().use(Vne).use(l).use(_re,c).use(s),h=new Vre;"string"==typeof r&&(h.value=r);for(const y of sae)Object.hasOwn(e,y.from)&&(y.from,y.to&&y.to,y.id);const m=f.parse(h);let g=f.runSync(m,h);return a&&(g={type:"element",tagName:"div",properties:{className:a},children:"root"===g.type?g.children:[g]}),mre(g,(function(e,r,a){if("raw"===e.type&&a&&"number"==typeof r)return u?a.children.splice(r,1):a.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in Yee)if(Object.hasOwn(Yee,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Yee[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,a)),o&&a&&"number"==typeof r)return d&&e.children?a.children.splice(r,1,...e.children):a.children.splice(r,1),r}})),jee(g,{Fragment:og.Fragment,components:o,ignoreInvalidStyle:!0,jsx:og.jsx,jsxs:og.jsxs,passKeys:!0,passNode:!0})}function cae(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||iae.test(e.slice(0,t))?e:""}const uae=/[#.]/g;function dae(e,t,n){const r=n?function(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...o){let i;if(null==n){i={type:"root",children:[]};const e=a;o.unshift(e)}else{i=function(e,t){const n=e||"",r={};let a,o,i=0;for(;i<n.length;){uae.lastIndex=i;const e=uae.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?"#"===a?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=i.tagName.toLowerCase(),l=r?r.get(s):void 0;if(i.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(a))o.unshift(a);else for(const[t,n]of Object.entries(a))pae(e,i.properties,t,n)}for(const e of o)fae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function pae(e,t,n,r){const a=V7(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?Z7(r):a.commaSeparated?i7(r):a.commaOrSpaceSeparated?Z7(i7(r).join(" ")):hae(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(hae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function fae(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)fae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?fae(e,t.children):e.push(t)}}function hae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||g7(n)===g7(t)))return!0}return n}const mae=dae(W7,"div"),gae=dae(Y7,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);function yae(e,t){const n=e.indexOf("\r",t),r=e.indexOf("\n",t);return-1===r?n:-1===n||n+1===r?r:n<r?n:r}const bae={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},vae={}.hasOwnProperty,kae=Object.prototype;function xae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Eae(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:wae(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];return{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){const e=n[n.length-1],r=yae(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}const r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){const e=yae(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),a=r.toPoint(0),o=r.toPoint(t.length);n.position={start:a,end:o}}return n}case"#documentType":return n={type:"doctype"},Eae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},Eae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===bae.svg?Y7:W7;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;vae.call(kae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?gae:mae,i=o(t.tagName,a,wae(e,t.childNodes));if(Eae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&_ae(r.startTag),o=r&&r.endTag&&_ae(r.endTag),s=xae(e,n.content);a&&o&&e.file&&(s.position={start:a.end,end:o.start}),i.content=s}return e.schema=n,i}(e,t),n}}function wae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=xae(e,t[n]);r.push(a)}return r}function Eae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=_ae(n);if("element"===t.type){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const r={};let a;if(n.attrs)for(a in n.attrs)vae.call(n.attrs,a)&&(r[V7(e.schema,a).property]=_ae(n.attrs[a]));n.startTag;const o=_ae(n.startTag),i=n.endTag?_ae(n.endTag):void 0,s={opening:o};i&&(s.closing=i),s.properties=r,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _ae(e){const t=Sae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sae(e){return e.line&&e.column?e:void 0}const Tae={}.hasOwnProperty;function Cae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&Tae.call(t,e)){const n=String(t[e]);a=Tae.call(o,n)?o[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Aae={},Iae={}.hasOwnProperty,Nae=Cae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Rae(e.children,n,t),Pae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=Y7);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&Iae.call(e.properties,o)){const t=Oae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:bae[i],childNodes:[],parentNode:null};s.childNodes=Rae(e.children,s,r),Pae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Rae(e.children,n,t),Pae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Pae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Pae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Pae(e,t),t}}});function Oae(e,t,n){const r=V7(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?s7(n):K7(n));const a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=bae[r.space]}return a}function Rae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Nae(e[r],n);o.parentNode=t,a.push(o)}return a}function Pae(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Lae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Dae=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Mae="�";var Fae,jae;(jae=Fae||(Fae={}))[jae.EOF=-1]="EOF",jae[jae.NULL=0]="NULL",jae[jae.TABULATION=9]="TABULATION",jae[jae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",jae[jae.LINE_FEED=10]="LINE_FEED",jae[jae.FORM_FEED=12]="FORM_FEED",jae[jae.SPACE=32]="SPACE",jae[jae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",jae[jae.QUOTATION_MARK=34]="QUOTATION_MARK",jae[jae.AMPERSAND=38]="AMPERSAND",jae[jae.APOSTROPHE=39]="APOSTROPHE",jae[jae.HYPHEN_MINUS=45]="HYPHEN_MINUS",jae[jae.SOLIDUS=47]="SOLIDUS",jae[jae.DIGIT_0=48]="DIGIT_0",jae[jae.DIGIT_9=57]="DIGIT_9",jae[jae.SEMICOLON=59]="SEMICOLON",jae[jae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",jae[jae.EQUALS_SIGN=61]="EQUALS_SIGN",jae[jae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",jae[jae.QUESTION_MARK=63]="QUESTION_MARK",jae[jae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",jae[jae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",jae[jae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",jae[jae.GRAVE_ACCENT=96]="GRAVE_ACCENT",jae[jae.LATIN_SMALL_A=97]="LATIN_SMALL_A",jae[jae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const zae="--",Bae="[CDATA[",Hae="doctype",Uae="script",$ae="public",Vae="system";function Gae(e){return e>=55296&&e<=57343}function qae(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Wae(e){return e>=64976&&e<=65007||Dae.has(e)}var Yae,Zae;(Zae=Yae||(Yae={})).controlCharacterInInputStream="control-character-in-input-stream",Zae.noncharacterInInputStream="noncharacter-in-input-stream",Zae.surrogateInInputStream="surrogate-in-input-stream",Zae.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Zae.endTagWithAttributes="end-tag-with-attributes",Zae.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Zae.unexpectedSolidusInTag="unexpected-solidus-in-tag",Zae.unexpectedNullCharacter="unexpected-null-character",Zae.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Zae.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Zae.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Zae.missingEndTagName="missing-end-tag-name",Zae.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Zae.unknownNamedCharacterReference="unknown-named-character-reference",Zae.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Zae.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Zae.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Zae.eofBeforeTagName="eof-before-tag-name",Zae.eofInTag="eof-in-tag",Zae.missingAttributeValue="missing-attribute-value",Zae.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Zae.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Zae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Zae.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Zae.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Zae.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Zae.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Zae.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Zae.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Zae.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Zae.cdataInHtmlContent="cdata-in-html-content",Zae.incorrectlyOpenedComment="incorrectly-opened-comment",Zae.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Zae.eofInDoctype="eof-in-doctype",Zae.nestedComment="nested-comment",Zae.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Zae.eofInComment="eof-in-comment",Zae.incorrectlyClosedComment="incorrectly-closed-comment",Zae.eofInCdata="eof-in-cdata",Zae.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Zae.nullCharacterReference="null-character-reference",Zae.surrogateCharacterReference="surrogate-character-reference",Zae.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Zae.controlCharacterReference="control-character-reference",Zae.noncharacterCharacterReference="noncharacter-character-reference",Zae.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Zae.missingDoctypeName="missing-doctype-name",Zae.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Zae.duplicateAttribute="duplicate-attribute",Zae.nonConformingDoctype="non-conforming-doctype",Zae.missingDoctype="missing-doctype",Zae.misplacedDoctype="misplaced-doctype",Zae.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Zae.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Zae.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Zae.openElementsLeftAfterEof="open-elements-left-after-eof",Zae.abandonedHeadElementChild="abandoned-head-element-child",Zae.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Zae.nestedNoscriptInHead="nested-noscript-in-head",Zae.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class Kae{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:a}=this,o=r+t,i=a+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:i,endOffset:i}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Fae.EOF;return this._err(Yae.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++){if((32|this.html.charCodeAt(this.pos+n))!==e.charCodeAt(n))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Fae.EOF;const n=this.html.charCodeAt(t);return n===Fae.CARRIAGE_RETURN?Fae.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Fae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Fae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Fae.LINE_FEED;if(e===Fae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Gae(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Fae.LINE_FEED||e===Fae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){qae(e)?this._err(Yae.controlCharacterInInputStream):Wae(e)&&this._err(Yae.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xae,Qae;function Jae(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}(Qae=Xae||(Xae={}))[Qae.CHARACTER=0]="CHARACTER",Qae[Qae.NULL_CHARACTER=1]="NULL_CHARACTER",Qae[Qae.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Qae[Qae.START_TAG=3]="START_TAG",Qae[Qae.END_TAG=4]="END_TAG",Qae[Qae.COMMENT=5]="COMMENT",Qae[Qae.DOCTYPE=6]="DOCTYPE",Qae[Qae.EOF=7]="EOF",Qae[Qae.HIBERNATION=8]="HIBERNATION";const eoe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),toe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var noe,roe;(roe=noe||(noe={}))[roe.NUM=35]="NUM",roe[roe.SEMI=59]="SEMI",roe[roe.EQUALS=61]="EQUALS",roe[roe.ZERO=48]="ZERO",roe[roe.NINE=57]="NINE",roe[roe.LOWER_A=97]="LOWER_A",roe[roe.LOWER_F=102]="LOWER_F",roe[roe.LOWER_X=120]="LOWER_X",roe[roe.LOWER_Z=122]="LOWER_Z",roe[roe.UPPER_A=65]="UPPER_A",roe[roe.UPPER_F=70]="UPPER_F",roe[roe.UPPER_Z=90]="UPPER_Z";var aoe,ooe,ioe,soe,loe,coe,uoe,doe,poe,foe,hoe,moe,goe,yoe,boe,voe;function koe(e){return e>=noe.ZERO&&e<=noe.NINE}function xoe(e){return e===noe.EQUALS||function(e){return e>=noe.UPPER_A&&e<=noe.UPPER_Z||e>=noe.LOWER_A&&e<=noe.LOWER_Z||koe(e)}(e)}(ooe=aoe||(aoe={}))[ooe.VALUE_LENGTH=49152]="VALUE_LENGTH",ooe[ooe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",ooe[ooe.JUMP_TABLE=127]="JUMP_TABLE",(soe=ioe||(ioe={}))[soe.EntityStart=0]="EntityStart",soe[soe.NumericStart=1]="NumericStart",soe[soe.NumericDecimal=2]="NumericDecimal",soe[soe.NumericHex=3]="NumericHex",soe[soe.NamedEntity=4]="NamedEntity",(coe=loe||(loe={}))[coe.Legacy=0]="Legacy",coe[coe.Strict=1]="Strict",coe[coe.Attribute=2]="Attribute";class woe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ioe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=loe.Strict}startEntity(e){this.decodeMode=e,this.state=ioe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ioe.EntityStart:return e.charCodeAt(t)===noe.NUM?(this.state=ioe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ioe.NamedEntity,this.stateNamedEntity(e,t));case ioe.NumericStart:return this.stateNumericStart(e,t);case ioe.NumericDecimal:return this.stateNumericDecimal(e,t);case ioe.NumericHex:return this.stateNumericHex(e,t);case ioe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===noe.LOWER_X?(this.state=ioe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ioe.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const a=e.charCodeAt(t);if(!(koe(a)||(r=a,r>=noe.UPPER_A&&r<=noe.UPPER_F||r>=noe.LOWER_A&&r<=noe.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!koe(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===noe.SEMI)this.consumed+=1;else if(this.decodeMode===loe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=toe.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==noe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],a=(r&aoe.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=Eoe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===loe.Attribute&&(0===a||xoe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&aoe.VALUE_LENGTH)>>14,0!==a){if(o===noe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==loe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&aoe.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~aoe.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ioe.NamedEntity:return 0===this.result||this.decodeMode===loe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case ioe.NumericDecimal:return this.emitNumericEntity(0,2);case ioe.NumericHex:return this.emitNumericEntity(0,3);case ioe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ioe.EntityStart:return 0}}}function Eoe(e,t,n,r){const a=(t&aoe.BRANCH_LENGTH)>>7,o=t&aoe.JUMP_TABLE;if(0===a)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=a?-1:e[n+t]-1}let i=n,s=i+a-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+a];s=t-1}}return-1}(doe=uoe||(uoe={})).HTML="http://www.w3.org/1999/xhtml",doe.MATHML="http://www.w3.org/1998/Math/MathML",doe.SVG="http://www.w3.org/2000/svg",doe.XLINK="http://www.w3.org/1999/xlink",doe.XML="http://www.w3.org/XML/1998/namespace",doe.XMLNS="http://www.w3.org/2000/xmlns/",(foe=poe||(poe={})).TYPE="type",foe.ACTION="action",foe.ENCODING="encoding",foe.PROMPT="prompt",foe.NAME="name",foe.COLOR="color",foe.FACE="face",foe.SIZE="size",(moe=hoe||(hoe={})).NO_QUIRKS="no-quirks",moe.QUIRKS="quirks",moe.LIMITED_QUIRKS="limited-quirks",(yoe=goe||(goe={})).A="a",yoe.ADDRESS="address",yoe.ANNOTATION_XML="annotation-xml",yoe.APPLET="applet",yoe.AREA="area",yoe.ARTICLE="article",yoe.ASIDE="aside",yoe.B="b",yoe.BASE="base",yoe.BASEFONT="basefont",yoe.BGSOUND="bgsound",yoe.BIG="big",yoe.BLOCKQUOTE="blockquote",yoe.BODY="body",yoe.BR="br",yoe.BUTTON="button",yoe.CAPTION="caption",yoe.CENTER="center",yoe.CODE="code",yoe.COL="col",yoe.COLGROUP="colgroup",yoe.DD="dd",yoe.DESC="desc",yoe.DETAILS="details",yoe.DIALOG="dialog",yoe.DIR="dir",yoe.DIV="div",yoe.DL="dl",yoe.DT="dt",yoe.EM="em",yoe.EMBED="embed",yoe.FIELDSET="fieldset",yoe.FIGCAPTION="figcaption",yoe.FIGURE="figure",yoe.FONT="font",yoe.FOOTER="footer",yoe.FOREIGN_OBJECT="foreignObject",yoe.FORM="form",yoe.FRAME="frame",yoe.FRAMESET="frameset",yoe.H1="h1",yoe.H2="h2",yoe.H3="h3",yoe.H4="h4",yoe.H5="h5",yoe.H6="h6",yoe.HEAD="head",yoe.HEADER="header",yoe.HGROUP="hgroup",yoe.HR="hr",yoe.HTML="html",yoe.I="i",yoe.IMG="img",yoe.IMAGE="image",yoe.INPUT="input",yoe.IFRAME="iframe",yoe.KEYGEN="keygen",yoe.LABEL="label",yoe.LI="li",yoe.LINK="link",yoe.LISTING="listing",yoe.MAIN="main",yoe.MALIGNMARK="malignmark",yoe.MARQUEE="marquee",yoe.MATH="math",yoe.MENU="menu",yoe.META="meta",yoe.MGLYPH="mglyph",yoe.MI="mi",yoe.MO="mo",yoe.MN="mn",yoe.MS="ms",yoe.MTEXT="mtext",yoe.NAV="nav",yoe.NOBR="nobr",yoe.NOFRAMES="noframes",yoe.NOEMBED="noembed",yoe.NOSCRIPT="noscript",yoe.OBJECT="object",yoe.OL="ol",yoe.OPTGROUP="optgroup",yoe.OPTION="option",yoe.P="p",yoe.PARAM="param",yoe.PLAINTEXT="plaintext",yoe.PRE="pre",yoe.RB="rb",yoe.RP="rp",yoe.RT="rt",yoe.RTC="rtc",yoe.RUBY="ruby",yoe.S="s",yoe.SCRIPT="script",yoe.SEARCH="search",yoe.SECTION="section",yoe.SELECT="select",yoe.SOURCE="source",yoe.SMALL="small",yoe.SPAN="span",yoe.STRIKE="strike",yoe.STRONG="strong",yoe.STYLE="style",yoe.SUB="sub",yoe.SUMMARY="summary",yoe.SUP="sup",yoe.TABLE="table",yoe.TBODY="tbody",yoe.TEMPLATE="template",yoe.TEXTAREA="textarea",yoe.TFOOT="tfoot",yoe.TD="td",yoe.TH="th",yoe.THEAD="thead",yoe.TITLE="title",yoe.TR="tr",yoe.TRACK="track",yoe.TT="tt",yoe.U="u",yoe.UL="ul",yoe.SVG="svg",yoe.VAR="var",yoe.WBR="wbr",yoe.XMP="xmp",(voe=boe||(boe={}))[voe.UNKNOWN=0]="UNKNOWN",voe[voe.A=1]="A",voe[voe.ADDRESS=2]="ADDRESS",voe[voe.ANNOTATION_XML=3]="ANNOTATION_XML",voe[voe.APPLET=4]="APPLET",voe[voe.AREA=5]="AREA",voe[voe.ARTICLE=6]="ARTICLE",voe[voe.ASIDE=7]="ASIDE",voe[voe.B=8]="B",voe[voe.BASE=9]="BASE",voe[voe.BASEFONT=10]="BASEFONT",voe[voe.BGSOUND=11]="BGSOUND",voe[voe.BIG=12]="BIG",voe[voe.BLOCKQUOTE=13]="BLOCKQUOTE",voe[voe.BODY=14]="BODY",voe[voe.BR=15]="BR",voe[voe.BUTTON=16]="BUTTON",voe[voe.CAPTION=17]="CAPTION",voe[voe.CENTER=18]="CENTER",voe[voe.CODE=19]="CODE",voe[voe.COL=20]="COL",voe[voe.COLGROUP=21]="COLGROUP",voe[voe.DD=22]="DD",voe[voe.DESC=23]="DESC",voe[voe.DETAILS=24]="DETAILS",voe[voe.DIALOG=25]="DIALOG",voe[voe.DIR=26]="DIR",voe[voe.DIV=27]="DIV",voe[voe.DL=28]="DL",voe[voe.DT=29]="DT",voe[voe.EM=30]="EM",voe[voe.EMBED=31]="EMBED",voe[voe.FIELDSET=32]="FIELDSET",voe[voe.FIGCAPTION=33]="FIGCAPTION",voe[voe.FIGURE=34]="FIGURE",voe[voe.FONT=35]="FONT",voe[voe.FOOTER=36]="FOOTER",voe[voe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",voe[voe.FORM=38]="FORM",voe[voe.FRAME=39]="FRAME",voe[voe.FRAMESET=40]="FRAMESET",voe[voe.H1=41]="H1",voe[voe.H2=42]="H2",voe[voe.H3=43]="H3",voe[voe.H4=44]="H4",voe[voe.H5=45]="H5",voe[voe.H6=46]="H6",voe[voe.HEAD=47]="HEAD",voe[voe.HEADER=48]="HEADER",voe[voe.HGROUP=49]="HGROUP",voe[voe.HR=50]="HR",voe[voe.HTML=51]="HTML",voe[voe.I=52]="I",voe[voe.IMG=53]="IMG",voe[voe.IMAGE=54]="IMAGE",voe[voe.INPUT=55]="INPUT",voe[voe.IFRAME=56]="IFRAME",voe[voe.KEYGEN=57]="KEYGEN",voe[voe.LABEL=58]="LABEL",voe[voe.LI=59]="LI",voe[voe.LINK=60]="LINK",voe[voe.LISTING=61]="LISTING",voe[voe.MAIN=62]="MAIN",voe[voe.MALIGNMARK=63]="MALIGNMARK",voe[voe.MARQUEE=64]="MARQUEE",voe[voe.MATH=65]="MATH",voe[voe.MENU=66]="MENU",voe[voe.META=67]="META",voe[voe.MGLYPH=68]="MGLYPH",voe[voe.MI=69]="MI",voe[voe.MO=70]="MO",voe[voe.MN=71]="MN",voe[voe.MS=72]="MS",voe[voe.MTEXT=73]="MTEXT",voe[voe.NAV=74]="NAV",voe[voe.NOBR=75]="NOBR",voe[voe.NOFRAMES=76]="NOFRAMES",voe[voe.NOEMBED=77]="NOEMBED",voe[voe.NOSCRIPT=78]="NOSCRIPT",voe[voe.OBJECT=79]="OBJECT",voe[voe.OL=80]="OL",voe[voe.OPTGROUP=81]="OPTGROUP",voe[voe.OPTION=82]="OPTION",voe[voe.P=83]="P",voe[voe.PARAM=84]="PARAM",voe[voe.PLAINTEXT=85]="PLAINTEXT",voe[voe.PRE=86]="PRE",voe[voe.RB=87]="RB",voe[voe.RP=88]="RP",voe[voe.RT=89]="RT",voe[voe.RTC=90]="RTC",voe[voe.RUBY=91]="RUBY",voe[voe.S=92]="S",voe[voe.SCRIPT=93]="SCRIPT",voe[voe.SEARCH=94]="SEARCH",voe[voe.SECTION=95]="SECTION",voe[voe.SELECT=96]="SELECT",voe[voe.SOURCE=97]="SOURCE",voe[voe.SMALL=98]="SMALL",voe[voe.SPAN=99]="SPAN",voe[voe.STRIKE=100]="STRIKE",voe[voe.STRONG=101]="STRONG",voe[voe.STYLE=102]="STYLE",voe[voe.SUB=103]="SUB",voe[voe.SUMMARY=104]="SUMMARY",voe[voe.SUP=105]="SUP",voe[voe.TABLE=106]="TABLE",voe[voe.TBODY=107]="TBODY",voe[voe.TEMPLATE=108]="TEMPLATE",voe[voe.TEXTAREA=109]="TEXTAREA",voe[voe.TFOOT=110]="TFOOT",voe[voe.TD=111]="TD",voe[voe.TH=112]="TH",voe[voe.THEAD=113]="THEAD",voe[voe.TITLE=114]="TITLE",voe[voe.TR=115]="TR",voe[voe.TRACK=116]="TRACK",voe[voe.TT=117]="TT",voe[voe.U=118]="U",voe[voe.UL=119]="UL",voe[voe.SVG=120]="SVG",voe[voe.VAR=121]="VAR",voe[voe.WBR=122]="WBR",voe[voe.XMP=123]="XMP";const _oe=new Map([[goe.A,boe.A],[goe.ADDRESS,boe.ADDRESS],[goe.ANNOTATION_XML,boe.ANNOTATION_XML],[goe.APPLET,boe.APPLET],[goe.AREA,boe.AREA],[goe.ARTICLE,boe.ARTICLE],[goe.ASIDE,boe.ASIDE],[goe.B,boe.B],[goe.BASE,boe.BASE],[goe.BASEFONT,boe.BASEFONT],[goe.BGSOUND,boe.BGSOUND],[goe.BIG,boe.BIG],[goe.BLOCKQUOTE,boe.BLOCKQUOTE],[goe.BODY,boe.BODY],[goe.BR,boe.BR],[goe.BUTTON,boe.BUTTON],[goe.CAPTION,boe.CAPTION],[goe.CENTER,boe.CENTER],[goe.CODE,boe.CODE],[goe.COL,boe.COL],[goe.COLGROUP,boe.COLGROUP],[goe.DD,boe.DD],[goe.DESC,boe.DESC],[goe.DETAILS,boe.DETAILS],[goe.DIALOG,boe.DIALOG],[goe.DIR,boe.DIR],[goe.DIV,boe.DIV],[goe.DL,boe.DL],[goe.DT,boe.DT],[goe.EM,boe.EM],[goe.EMBED,boe.EMBED],[goe.FIELDSET,boe.FIELDSET],[goe.FIGCAPTION,boe.FIGCAPTION],[goe.FIGURE,boe.FIGURE],[goe.FONT,boe.FONT],[goe.FOOTER,boe.FOOTER],[goe.FOREIGN_OBJECT,boe.FOREIGN_OBJECT],[goe.FORM,boe.FORM],[goe.FRAME,boe.FRAME],[goe.FRAMESET,boe.FRAMESET],[goe.H1,boe.H1],[goe.H2,boe.H2],[goe.H3,boe.H3],[goe.H4,boe.H4],[goe.H5,boe.H5],[goe.H6,boe.H6],[goe.HEAD,boe.HEAD],[goe.HEADER,boe.HEADER],[goe.HGROUP,boe.HGROUP],[goe.HR,boe.HR],[goe.HTML,boe.HTML],[goe.I,boe.I],[goe.IMG,boe.IMG],[goe.IMAGE,boe.IMAGE],[goe.INPUT,boe.INPUT],[goe.IFRAME,boe.IFRAME],[goe.KEYGEN,boe.KEYGEN],[goe.LABEL,boe.LABEL],[goe.LI,boe.LI],[goe.LINK,boe.LINK],[goe.LISTING,boe.LISTING],[goe.MAIN,boe.MAIN],[goe.MALIGNMARK,boe.MALIGNMARK],[goe.MARQUEE,boe.MARQUEE],[goe.MATH,boe.MATH],[goe.MENU,boe.MENU],[goe.META,boe.META],[goe.MGLYPH,boe.MGLYPH],[goe.MI,boe.MI],[goe.MO,boe.MO],[goe.MN,boe.MN],[goe.MS,boe.MS],[goe.MTEXT,boe.MTEXT],[goe.NAV,boe.NAV],[goe.NOBR,boe.NOBR],[goe.NOFRAMES,boe.NOFRAMES],[goe.NOEMBED,boe.NOEMBED],[goe.NOSCRIPT,boe.NOSCRIPT],[goe.OBJECT,boe.OBJECT],[goe.OL,boe.OL],[goe.OPTGROUP,boe.OPTGROUP],[goe.OPTION,boe.OPTION],[goe.P,boe.P],[goe.PARAM,boe.PARAM],[goe.PLAINTEXT,boe.PLAINTEXT],[goe.PRE,boe.PRE],[goe.RB,boe.RB],[goe.RP,boe.RP],[goe.RT,boe.RT],[goe.RTC,boe.RTC],[goe.RUBY,boe.RUBY],[goe.S,boe.S],[goe.SCRIPT,boe.SCRIPT],[goe.SEARCH,boe.SEARCH],[goe.SECTION,boe.SECTION],[goe.SELECT,boe.SELECT],[goe.SOURCE,boe.SOURCE],[goe.SMALL,boe.SMALL],[goe.SPAN,boe.SPAN],[goe.STRIKE,boe.STRIKE],[goe.STRONG,boe.STRONG],[goe.STYLE,boe.STYLE],[goe.SUB,boe.SUB],[goe.SUMMARY,boe.SUMMARY],[goe.SUP,boe.SUP],[goe.TABLE,boe.TABLE],[goe.TBODY,boe.TBODY],[goe.TEMPLATE,boe.TEMPLATE],[goe.TEXTAREA,boe.TEXTAREA],[goe.TFOOT,boe.TFOOT],[goe.TD,boe.TD],[goe.TH,boe.TH],[goe.THEAD,boe.THEAD],[goe.TITLE,boe.TITLE],[goe.TR,boe.TR],[goe.TRACK,boe.TRACK],[goe.TT,boe.TT],[goe.U,boe.U],[goe.UL,boe.UL],[goe.SVG,boe.SVG],[goe.VAR,boe.VAR],[goe.WBR,boe.WBR],[goe.XMP,boe.XMP]]);function Soe(e){var t;return null!==(t=_oe.get(e))&&void 0!==t?t:boe.UNKNOWN}const Toe=boe,Coe={[uoe.HTML]:new Set([Toe.ADDRESS,Toe.APPLET,Toe.AREA,Toe.ARTICLE,Toe.ASIDE,Toe.BASE,Toe.BASEFONT,Toe.BGSOUND,Toe.BLOCKQUOTE,Toe.BODY,Toe.BR,Toe.BUTTON,Toe.CAPTION,Toe.CENTER,Toe.COL,Toe.COLGROUP,Toe.DD,Toe.DETAILS,Toe.DIR,Toe.DIV,Toe.DL,Toe.DT,Toe.EMBED,Toe.FIELDSET,Toe.FIGCAPTION,Toe.FIGURE,Toe.FOOTER,Toe.FORM,Toe.FRAME,Toe.FRAMESET,Toe.H1,Toe.H2,Toe.H3,Toe.H4,Toe.H5,Toe.H6,Toe.HEAD,Toe.HEADER,Toe.HGROUP,Toe.HR,Toe.HTML,Toe.IFRAME,Toe.IMG,Toe.INPUT,Toe.LI,Toe.LINK,Toe.LISTING,Toe.MAIN,Toe.MARQUEE,Toe.MENU,Toe.META,Toe.NAV,Toe.NOEMBED,Toe.NOFRAMES,Toe.NOSCRIPT,Toe.OBJECT,Toe.OL,Toe.P,Toe.PARAM,Toe.PLAINTEXT,Toe.PRE,Toe.SCRIPT,Toe.SECTION,Toe.SELECT,Toe.SOURCE,Toe.STYLE,Toe.SUMMARY,Toe.TABLE,Toe.TBODY,Toe.TD,Toe.TEMPLATE,Toe.TEXTAREA,Toe.TFOOT,Toe.TH,Toe.THEAD,Toe.TITLE,Toe.TR,Toe.TRACK,Toe.UL,Toe.WBR,Toe.XMP]),[uoe.MATHML]:new Set([Toe.MI,Toe.MO,Toe.MN,Toe.MS,Toe.MTEXT,Toe.ANNOTATION_XML]),[uoe.SVG]:new Set([Toe.TITLE,Toe.FOREIGN_OBJECT,Toe.DESC]),[uoe.XLINK]:new Set,[uoe.XML]:new Set,[uoe.XMLNS]:new Set},Aoe=new Set([Toe.H1,Toe.H2,Toe.H3,Toe.H4,Toe.H5,Toe.H6]);var Ioe,Noe;goe.STYLE,goe.SCRIPT,goe.XMP,goe.IFRAME,goe.NOEMBED,goe.NOFRAMES,goe.PLAINTEXT,(Noe=Ioe||(Ioe={}))[Noe.DATA=0]="DATA",Noe[Noe.RCDATA=1]="RCDATA",Noe[Noe.RAWTEXT=2]="RAWTEXT",Noe[Noe.SCRIPT_DATA=3]="SCRIPT_DATA",Noe[Noe.PLAINTEXT=4]="PLAINTEXT",Noe[Noe.TAG_OPEN=5]="TAG_OPEN",Noe[Noe.END_TAG_OPEN=6]="END_TAG_OPEN",Noe[Noe.TAG_NAME=7]="TAG_NAME",Noe[Noe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Noe[Noe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Noe[Noe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Noe[Noe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Noe[Noe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Noe[Noe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Noe[Noe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Noe[Noe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Noe[Noe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Noe[Noe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Noe[Noe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Noe[Noe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Noe[Noe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Noe[Noe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Noe[Noe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Noe[Noe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Noe[Noe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Noe[Noe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Noe[Noe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Noe[Noe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Noe[Noe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Noe[Noe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Noe[Noe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Noe[Noe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Noe[Noe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Noe[Noe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Noe[Noe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Noe[Noe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Noe[Noe.COMMENT_START=42]="COMMENT_START",Noe[Noe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Noe[Noe.COMMENT=44]="COMMENT",Noe[Noe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Noe[Noe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Noe[Noe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Noe[Noe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Noe[Noe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Noe[Noe.COMMENT_END=50]="COMMENT_END",Noe[Noe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Noe[Noe.DOCTYPE=52]="DOCTYPE",Noe[Noe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Noe[Noe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Noe[Noe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Noe[Noe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Noe[Noe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Noe[Noe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Noe[Noe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Noe[Noe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Noe[Noe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Noe[Noe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Noe[Noe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Noe[Noe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Noe[Noe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Noe[Noe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Noe[Noe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Noe[Noe.CDATA_SECTION=68]="CDATA_SECTION",Noe[Noe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Noe[Noe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Noe[Noe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Noe[Noe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Ooe={DATA:Ioe.DATA,RCDATA:Ioe.RCDATA,RAWTEXT:Ioe.RAWTEXT,SCRIPT_DATA:Ioe.SCRIPT_DATA,PLAINTEXT:Ioe.PLAINTEXT,CDATA_SECTION:Ioe.CDATA_SECTION};function Roe(e){return e>=Fae.LATIN_CAPITAL_A&&e<=Fae.LATIN_CAPITAL_Z}function Poe(e){return function(e){return e>=Fae.LATIN_SMALL_A&&e<=Fae.LATIN_SMALL_Z}(e)||Roe(e)}function Loe(e){return Poe(e)||function(e){return e>=Fae.DIGIT_0&&e<=Fae.DIGIT_9}(e)}function Doe(e){return e+32}function Moe(e){return e===Fae.SPACE||e===Fae.LINE_FEED||e===Fae.TABULATION||e===Fae.FORM_FEED}function Foe(e){return Moe(e)||e===Fae.SOLIDUS||e===Fae.GREATER_THAN_SIGN}class joe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Ioe.DATA,this.returnState=Ioe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Kae(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new woe(eoe,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Yae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Yae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Fae.NULL?Yae.nullCharacterReference:e>1114111?Yae.characterReferenceOutsideUnicodeRange:Gae(e)?Yae.surrogateCharacterReference:Wae(e)?Yae.noncharacterCharacterReference:qae(e)||e===Fae.CARRIAGE_RETURN?Yae.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:Xae.START_TAG,tagName:"",tagID:boe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xae.END_TAG,tagName:"",tagID:boe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Xae.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Xae.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===Jae(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Yae.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Soe(e.tagName),e.type===Xae.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(Yae.endTagWithAttributes),e.selfClosing&&this._err(Yae.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Xae.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Xae.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Xae.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Xae.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Moe(e)?Xae.WHITESPACE_CHARACTER:e===Fae.NULL?Xae.NULL_CHARACTER:Xae.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Xae.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Ioe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?loe.Attribute:loe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Ioe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Ioe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Ioe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Ioe.DATA:this._stateData(e);break;case Ioe.RCDATA:this._stateRcdata(e);break;case Ioe.RAWTEXT:this._stateRawtext(e);break;case Ioe.SCRIPT_DATA:this._stateScriptData(e);break;case Ioe.PLAINTEXT:this._statePlaintext(e);break;case Ioe.TAG_OPEN:this._stateTagOpen(e);break;case Ioe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Ioe.TAG_NAME:this._stateTagName(e);break;case Ioe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Ioe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Ioe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Ioe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Ioe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Ioe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Ioe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Ioe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Ioe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Ioe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Ioe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Ioe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Ioe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Ioe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Ioe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Ioe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Ioe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Ioe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Ioe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Ioe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Ioe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Ioe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Ioe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Ioe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Ioe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Ioe.BOGUS_COMMENT:this._stateBogusComment(e);break;case Ioe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Ioe.COMMENT_START:this._stateCommentStart(e);break;case Ioe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Ioe.COMMENT:this._stateComment(e);break;case Ioe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Ioe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Ioe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Ioe.COMMENT_END:this._stateCommentEnd(e);break;case Ioe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Ioe.DOCTYPE:this._stateDoctype(e);break;case Ioe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Ioe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Ioe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Ioe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Ioe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Ioe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Ioe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Ioe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Ioe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Ioe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Ioe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Ioe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Ioe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Ioe.CDATA_SECTION:this._stateCdataSection(e);break;case Ioe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Ioe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Ioe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Ioe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Fae.LESS_THAN_SIGN:this.state=Ioe.TAG_OPEN;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitCodePoint(e);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.LESS_THAN_SIGN:this.state=Ioe.RCDATA_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Fae.LESS_THAN_SIGN:this.state=Ioe.RAWTEXT_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Poe(e))this._createStartTagToken(),this.state=Ioe.TAG_NAME,this._stateTagName(e);else switch(e){case Fae.EXCLAMATION_MARK:this.state=Ioe.MARKUP_DECLARATION_OPEN;break;case Fae.SOLIDUS:this.state=Ioe.END_TAG_OPEN;break;case Fae.QUESTION_MARK:this._err(Yae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Ioe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Fae.EOF:this._err(Yae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Yae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Ioe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Poe(e))this._createEndTagToken(),this.state=Ioe.TAG_NAME,this._stateTagName(e);else switch(e){case Fae.GREATER_THAN_SIGN:this._err(Yae.missingEndTagName),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(Yae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Ioe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_ATTRIBUTE_NAME;break;case Fae.SOLIDUS:this.state=Ioe.SELF_CLOSING_START_TAG;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.tagName+=Mae;break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Roe(e)?Doe(e):e)}}_stateRcdataLessThanSign(e){e===Fae.SOLIDUS?this.state=Ioe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Ioe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Poe(e)?(this.state=Ioe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=Ioe.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Ioe.BEFORE_ATTRIBUTE_NAME,!1;case Fae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Ioe.SELF_CLOSING_START_TAG,!1;case Fae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Ioe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Fae.SOLIDUS?this.state=Ioe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Ioe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Poe(e)?(this.state=Ioe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=Ioe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Fae.SOLIDUS:this.state=Ioe.SCRIPT_DATA_END_TAG_OPEN;break;case Fae.EXCLAMATION_MARK:this.state=Ioe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Poe(e)?(this.state=Ioe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Fae.HYPHEN_MINUS?(this.state=Ioe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Fae.HYPHEN_MINUS?(this.state=Ioe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Fae.HYPHEN_MINUS:this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.SCRIPT_DATA,this._emitChars(">");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Fae.SOLIDUS?this.state=Ioe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Poe(e)?(this._emitChars("<"),this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Poe(e)?(this.state=Ioe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Uae,!1)&&Foe(this.preprocessor.peek(Uae.length))){this._emitCodePoint(e);for(let e=0;e<Uae.length;e++)this._emitCodePoint(this._consume());this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Fae.HYPHEN_MINUS:this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.SCRIPT_DATA,this._emitChars(">");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Fae.SOLIDUS?(this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Uae,!1)&&Foe(this.preprocessor.peek(Uae.length))){this._emitCodePoint(e);for(let e=0;e<Uae.length;e++)this._emitCodePoint(this._consume());this.state=Ioe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.SOLIDUS:case Fae.GREATER_THAN_SIGN:case Fae.EOF:this.state=Ioe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Fae.EQUALS_SIGN:this._err(Yae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Ioe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=Ioe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:case Fae.SOLIDUS:case Fae.GREATER_THAN_SIGN:case Fae.EOF:this._leaveAttrName(),this.state=Ioe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Fae.EQUALS_SIGN:this._leaveAttrName(),this.state=Ioe.BEFORE_ATTRIBUTE_VALUE;break;case Fae.QUOTATION_MARK:case Fae.APOSTROPHE:case Fae.LESS_THAN_SIGN:this._err(Yae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.name+=Mae;break;default:this.currentAttr.name+=String.fromCodePoint(Roe(e)?Doe(e):e)}}_stateAfterAttributeName(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.SOLIDUS:this.state=Ioe.SELF_CLOSING_START_TAG;break;case Fae.EQUALS_SIGN:this.state=Ioe.BEFORE_ATTRIBUTE_VALUE;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=Ioe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.QUOTATION_MARK:this.state=Ioe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this.state=Ioe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingAttributeValue),this.state=Ioe.DATA,this.emitCurrentTagToken();break;default:this.state=Ioe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Fae.QUOTATION_MARK:this.state=Ioe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.value+=Mae;break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Fae.APOSTROPHE:this.state=Ioe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.value+=Mae;break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this._leaveAttrValue(),this.state=Ioe.BEFORE_ATTRIBUTE_NAME;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.value+=Mae;break;case Fae.QUOTATION_MARK:case Fae.APOSTROPHE:case Fae.LESS_THAN_SIGN:case Fae.EQUALS_SIGN:case Fae.GRAVE_ACCENT:this._err(Yae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this._leaveAttrValue(),this.state=Ioe.BEFORE_ATTRIBUTE_NAME;break;case Fae.SOLIDUS:this._leaveAttrValue(),this.state=Ioe.SELF_CLOSING_START_TAG;break;case Fae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this._err(Yae.missingWhitespaceBetweenAttributes),this.state=Ioe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Fae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this._err(Yae.unexpectedSolidusInTag),this.state=Ioe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.data+=Mae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(zae,!0)?(this._createCommentToken(zae.length+1),this.state=Ioe.COMMENT_START):this._consumeSequenceIfMatch(Hae,!1)?(this.currentLocation=this.getCurrentLocation(Hae.length+1),this.state=Ioe.DOCTYPE):this._consumeSequenceIfMatch(Bae,!0)?this.inForeignNode?this.state=Ioe.CDATA_SECTION:(this._err(Yae.cdataInHtmlContent),this._createCommentToken(Bae.length+1),this.currentToken.data="[CDATA[",this.state=Ioe.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Yae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Ioe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_START_DASH;break;case Fae.GREATER_THAN_SIGN:{this._err(Yae.abruptClosingOfEmptyComment),this.state=Ioe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_END;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptClosingOfEmptyComment),this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_END_DASH;break;case Fae.LESS_THAN_SIGN:t.data+="<",this.state=Ioe.COMMENT_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.data+=Mae;break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Fae.EXCLAMATION_MARK:t.data+="!",this.state=Ioe.COMMENT_LESS_THAN_SIGN_BANG;break;case Fae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Fae.HYPHEN_MINUS?this.state=Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Ioe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Fae.HYPHEN_MINUS?this.state=Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Ioe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Fae.GREATER_THAN_SIGN&&e!==Fae.EOF&&this._err(Yae.nestedComment),this.state=Ioe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_END;break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EXCLAMATION_MARK:this.state=Ioe.COMMENT_END_BANG;break;case Fae.HYPHEN_MINUS:t.data+="-";break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:t.data+="--!",this.state=Ioe.COMMENT_END_DASH;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.incorrectlyClosedComment),this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_DOCTYPE_NAME;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Fae.EOF:{this._err(Yae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Yae.missingWhitespaceBeforeDoctypeName),this.state=Ioe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Roe(e))this._createDoctypeToken(String.fromCharCode(Doe(e))),this.state=Ioe.DOCTYPE_NAME;else switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._createDoctypeToken(Mae),this.state=Ioe.DOCTYPE_NAME;break;case Fae.GREATER_THAN_SIGN:{this._err(Yae.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Ioe.DATA;break}case Fae.EOF:{this._err(Yae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Ioe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.AFTER_DOCTYPE_NAME;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.name+=Mae;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Roe(e)?Doe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch($ae,!1)?this.state=Ioe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Vae,!1)?this.state=Ioe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Yae.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Fae.QUOTATION_MARK:this._err(Yae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this._err(Yae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.QUOTATION_MARK:t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Fae.QUOTATION_MARK:this.state=Ioe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.publicId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Fae.APOSTROPHE:this.state=Ioe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.publicId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.QUOTATION_MARK:this._err(Yae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this._err(Yae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.QUOTATION_MARK:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Fae.QUOTATION_MARK:this._err(Yae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this._err(Yae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.QUOTATION_MARK:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Fae.QUOTATION_MARK:this.state=Ioe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.systemId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Fae.APOSTROPHE:this.state=Ioe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.systemId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Fae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter);break;case Fae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Fae.RIGHT_SQUARE_BRACKET:this.state=Ioe.CDATA_SECTION_BRACKET;break;case Fae.EOF:this._err(Yae.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Fae.RIGHT_SQUARE_BRACKET?this.state=Ioe.CDATA_SECTION_END:(this._emitChars("]"),this.state=Ioe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA;break;case Fae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=Ioe.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(!this.preprocessor.lastChunkWritten)return this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,void(this.preprocessor.endOfChunkHit=!0);e=this.entityDecoder.end()}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Fae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Loe(this.preprocessor.peek(1))?Ioe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Loe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Fae.SEMICOLON&&this._err(Yae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const zoe=new Set([boe.DD,boe.DT,boe.LI,boe.OPTGROUP,boe.OPTION,boe.P,boe.RB,boe.RP,boe.RT,boe.RTC]),Boe=new Set([...zoe,boe.CAPTION,boe.COLGROUP,boe.TBODY,boe.TD,boe.TFOOT,boe.TH,boe.THEAD,boe.TR]),Hoe=new Set([boe.APPLET,boe.CAPTION,boe.HTML,boe.MARQUEE,boe.OBJECT,boe.TABLE,boe.TD,boe.TEMPLATE,boe.TH]),Uoe=new Set([...Hoe,boe.OL,boe.UL]),$oe=new Set([...Hoe,boe.BUTTON]),Voe=new Set([boe.ANNOTATION_XML,boe.MI,boe.MN,boe.MO,boe.MS,boe.MTEXT]),Goe=new Set([boe.DESC,boe.FOREIGN_OBJECT,boe.TITLE]),qoe=new Set([boe.TR,boe.TEMPLATE,boe.HTML]),Woe=new Set([boe.TBODY,boe.TFOOT,boe.THEAD,boe.TEMPLATE,boe.HTML]),Yoe=new Set([boe.TABLE,boe.TEMPLATE,boe.HTML]),Zoe=new Set([boe.TD,boe.TH]);class Koe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=boe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===boe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===uoe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==uoe.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Aoe,uoe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Zoe,uoe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Yoe,uoe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Woe,uoe.HTML)}clearBackToTableRowContext(){this.clearBackTo(qoe,uoe.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===boe.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===boe.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case uoe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case uoe.SVG:if(Goe.has(r))return!1;break;case uoe.MATHML:if(Voe.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Hoe)}hasInListItemScope(e){return this.hasInDynamicScope(e,Uoe)}hasInButtonScope(e){return this.hasInDynamicScope(e,$oe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case uoe.HTML:if(Aoe.has(t))return!0;if(Hoe.has(t))return!1;break;case uoe.SVG:if(Goe.has(t))return!1;break;case uoe.MATHML:if(Voe.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===uoe.HTML)switch(this.tagIDs[t]){case e:return!0;case boe.TABLE:case boe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===uoe.HTML)switch(this.tagIDs[e]){case boe.TBODY:case boe.THEAD:case boe.TFOOT:return!0;case boe.TABLE:case boe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===uoe.HTML)switch(this.tagIDs[t]){case e:return!0;case boe.OPTION:case boe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&zoe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Boe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Boe.has(this.currentTagId);)this.pop()}}var Xoe,Qoe;(Qoe=Xoe||(Xoe={}))[Qoe.Marker=0]="Marker",Qoe[Qoe.Element=1]="Element";const Joe={type:Xoe.Marker};class eie{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,a=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let i=0;i<this.entries.length;i++){const e=this.entries[i];if(e.type===Xoe.Marker)break;const{element:t}=e;if(this.treeAdapter.getTagName(t)===a&&this.treeAdapter.getNamespaceURI(t)===o){const e=this.treeAdapter.getAttrList(t);e.length===r&&n.push({idx:i,attrs:e})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let a=0;for(let o=0;o<n.length;o++){const e=n[o];e.attrs.every((e=>r.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(Joe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Xoe.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Xoe.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Joe);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===Xoe.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===Xoe.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===Xoe.Element&&t.element===e))}}const tie={createDocument:()=>({nodeName:"#document",mode:hoe.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=n,a.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};tie.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(tie.isTextNode(n))return void(n.value+=t)}tie.appendChild(e,tie.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tie.isTextNode(r)?r.value+=t:tie.insertBefore(e,tie.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},nie="html",rie=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],aie=[...rie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],oie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),iie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],sie=[...iie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lie(e,t){return t.some((t=>e.startsWith(t)))}const cie="text/html",uie="application/xhtml+xml",die=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),pie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:uoe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:uoe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:uoe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:uoe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:uoe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:uoe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:uoe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:uoe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:uoe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:uoe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:uoe.XMLNS}]]),fie=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),hie=new Set([boe.B,boe.BIG,boe.BLOCKQUOTE,boe.BODY,boe.BR,boe.CENTER,boe.CODE,boe.DD,boe.DIV,boe.DL,boe.DT,boe.EM,boe.EMBED,boe.H1,boe.H2,boe.H3,boe.H4,boe.H5,boe.H6,boe.HEAD,boe.HR,boe.I,boe.IMG,boe.LI,boe.LISTING,boe.MENU,boe.META,boe.NOBR,boe.OL,boe.P,boe.PRE,boe.RUBY,boe.S,boe.SMALL,boe.SPAN,boe.STRONG,boe.STRIKE,boe.SUB,boe.SUP,boe.TABLE,boe.TT,boe.U,boe.UL,boe.VAR]);function mie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function gie(e){for(let t=0;t<e.attrs.length;t++){const n=die.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function yie(e){for(let t=0;t<e.attrs.length;t++){const n=pie.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function bie(e,t,n,r){return(!r||r===uoe.HTML)&&function(e,t,n){if(t===uoe.MATHML&&e===boe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===poe.ENCODING){const e=n[r].value.toLowerCase();return e===cie||e===uie}return t===uoe.SVG&&(e===boe.FOREIGN_OBJECT||e===boe.DESC||e===boe.TITLE)}(e,t,n)||(!r||r===uoe.MATHML)&&function(e,t){return t===uoe.MATHML&&(e===boe.MI||e===boe.MO||e===boe.MN||e===boe.MS||e===boe.MTEXT)}(e,t)}var vie,kie;(kie=vie||(vie={}))[kie.INITIAL=0]="INITIAL",kie[kie.BEFORE_HTML=1]="BEFORE_HTML",kie[kie.BEFORE_HEAD=2]="BEFORE_HEAD",kie[kie.IN_HEAD=3]="IN_HEAD",kie[kie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",kie[kie.AFTER_HEAD=5]="AFTER_HEAD",kie[kie.IN_BODY=6]="IN_BODY",kie[kie.TEXT=7]="TEXT",kie[kie.IN_TABLE=8]="IN_TABLE",kie[kie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",kie[kie.IN_CAPTION=10]="IN_CAPTION",kie[kie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",kie[kie.IN_TABLE_BODY=12]="IN_TABLE_BODY",kie[kie.IN_ROW=13]="IN_ROW",kie[kie.IN_CELL=14]="IN_CELL",kie[kie.IN_SELECT=15]="IN_SELECT",kie[kie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",kie[kie.IN_TEMPLATE=17]="IN_TEMPLATE",kie[kie.AFTER_BODY=18]="AFTER_BODY",kie[kie.IN_FRAMESET=19]="IN_FRAMESET",kie[kie.AFTER_FRAMESET=20]="AFTER_FRAMESET",kie[kie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",kie[kie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const xie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wie=new Set([boe.TABLE,boe.TBODY,boe.TFOOT,boe.THEAD,boe.TR]),Eie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tie,onParseError:null};class _ie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=vie.INITIAL,this.originalInsertionMode=vie.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Eie,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new joe(this.options,this),this.activeFormattingElements=new eie(this.treeAdapter),this.fragmentContextID=n?Soe(this.treeAdapter.getTagName(n)):boe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new Koe(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...Eie,...t};null!=e||(e=n.treeAdapter.createElement(goe.TEMPLATE,uoe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",uoe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===boe.TEMPLATE&&a.tmplInsertionModeStack.unshift(vie.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const a=null!==(r=e.location)&&void 0!==r?r:xie,o={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,a;null===(a=(r=this.treeAdapter).onItemPush)||void 0===a||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===uoe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,uoe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=vie.TEXT}switchToPlaintextParsing(){this.insertionMode=vie.TEXT,this.originalInsertionMode=vie.IN_BODY,this.tokenizer.state=Ooe.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===goe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===uoe.HTML)switch(this.fragmentContextID){case boe.TITLE:case boe.TEXTAREA:this.tokenizer.state=Ooe.RCDATA;break;case boe.STYLE:case boe.XMP:case boe.IFRAME:case boe.NOEMBED:case boe.NOFRAMES:case boe.NOSCRIPT:this.tokenizer.state=Ooe.RAWTEXT;break;case boe.SCRIPT:this.tokenizer.state=Ooe.SCRIPT_DATA;break;case boe.PLAINTEXT:this.tokenizer.state=Ooe.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,uoe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,uoe.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(goe.HTML,uoe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,boe.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,o=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===Xae.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==boe.SVG||this.treeAdapter.getTagName(t)!==goe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==uoe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===boe.MGLYPH||e.tagID===boe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,uoe.HTML))}_processToken(e){switch(e.type){case Xae.CHARACTER:this.onCharacter(e);break;case Xae.NULL_CHARACTER:this.onNullCharacter(e);break;case Xae.COMMENT:this.onComment(e);break;case Xae.DOCTYPE:this.onDoctype(e);break;case Xae.START_TAG:this._processStartTag(e);break;case Xae.END_TAG:this.onEndTag(e);break;case Xae.EOF:this.onEof(e);break;case Xae.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return bie(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===Xoe.Marker||this.openElements.contains(e.element)));for(let n=-1===t?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=vie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(boe.P),this.openElements.popUntilTagNamePopped(boe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case boe.TR:return void(this.insertionMode=vie.IN_ROW);case boe.TBODY:case boe.THEAD:case boe.TFOOT:return void(this.insertionMode=vie.IN_TABLE_BODY);case boe.CAPTION:return void(this.insertionMode=vie.IN_CAPTION);case boe.COLGROUP:return void(this.insertionMode=vie.IN_COLUMN_GROUP);case boe.TABLE:return void(this.insertionMode=vie.IN_TABLE);case boe.BODY:return void(this.insertionMode=vie.IN_BODY);case boe.FRAMESET:return void(this.insertionMode=vie.IN_FRAMESET);case boe.SELECT:return void this._resetInsertionModeForSelect(e);case boe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case boe.HTML:return void(this.insertionMode=this.headElement?vie.AFTER_HEAD:vie.BEFORE_HEAD);case boe.TD:case boe.TH:if(e>0)return void(this.insertionMode=vie.IN_CELL);break;case boe.HEAD:if(e>0)return void(this.insertionMode=vie.IN_HEAD)}this.insertionMode=vie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===boe.TEMPLATE)break;if(e===boe.TABLE)return void(this.insertionMode=vie.IN_SELECT_IN_TABLE)}this.insertionMode=vie.IN_SELECT}_isElementCausesFosterParenting(e){return wie.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case boe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===uoe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case boe.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Coe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:Die(this,e);break;case vie.BEFORE_HEAD:Mie(this,e);break;case vie.IN_HEAD:zie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:Bie(this,e);break;case vie.AFTER_HEAD:Hie(this,e);break;case vie.IN_BODY:case vie.IN_CAPTION:case vie.IN_CELL:case vie.IN_TEMPLATE:Vie(this,e);break;case vie.TEXT:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case vie.IN_TABLE:case vie.IN_TABLE_BODY:case vie.IN_ROW:Jie(this,e);break;case vie.IN_TABLE_TEXT:ase(this,e);break;case vie.IN_COLUMN_GROUP:lse(this,e);break;case vie.AFTER_BODY:yse(this,e);break;case vie.AFTER_AFTER_BODY:bse(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Mae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:Die(this,e);break;case vie.BEFORE_HEAD:Mie(this,e);break;case vie.IN_HEAD:zie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:Bie(this,e);break;case vie.AFTER_HEAD:Hie(this,e);break;case vie.TEXT:this._insertCharacters(e);break;case vie.IN_TABLE:case vie.IN_TABLE_BODY:case vie.IN_ROW:Jie(this,e);break;case vie.IN_COLUMN_GROUP:lse(this,e);break;case vie.AFTER_BODY:yse(this,e);break;case vie.AFTER_AFTER_BODY:bse(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Rie(this,e);else switch(this.insertionMode){case vie.INITIAL:case vie.BEFORE_HTML:case vie.BEFORE_HEAD:case vie.IN_HEAD:case vie.IN_HEAD_NO_SCRIPT:case vie.AFTER_HEAD:case vie.IN_BODY:case vie.IN_TABLE:case vie.IN_CAPTION:case vie.IN_COLUMN_GROUP:case vie.IN_TABLE_BODY:case vie.IN_ROW:case vie.IN_CELL:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:case vie.IN_TEMPLATE:case vie.IN_FRAMESET:case vie.AFTER_FRAMESET:Rie(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case vie.AFTER_AFTER_BODY:case vie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case vie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?hoe.QUIRKS:function(e){if(e.name!==nie)return hoe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return hoe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),oie.has(n))return hoe.QUIRKS;let e=null===t?aie:rie;if(lie(n,e))return hoe.QUIRKS;if(e=null===t?iie:sie,lie(n,e))return hoe.LIMITED_QUIRKS}return hoe.NO_QUIRKS}(t);(function(e){return e.name===nie&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Yae.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=vie.BEFORE_HTML}(this,e);break;case vie.BEFORE_HEAD:case vie.IN_HEAD:case vie.IN_HEAD_NO_SCRIPT:case vie.AFTER_HEAD:this._err(e,Yae.misplacedDoctype);break;case vie.IN_TABLE_TEXT:ose(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Yae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===boe.FONT&&e.attrs.some((({name:e})=>e===poe.COLOR||e===poe.SIZE||e===poe.FACE))||hie.has(t)}(t))vse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===uoe.MATHML?mie(t):r===uoe.SVG&&(!function(e){const t=fie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Soe(e.tagName))}(t),gie(t)),yie(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:!function(e,t){t.tagID===boe.HTML?(e._insertElement(t,uoe.HTML),e.insertionMode=vie.BEFORE_HEAD):Die(e,t)}(this,e);break;case vie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.HEAD:e._insertElement(t,uoe.HTML),e.headElement=e.openElements.current,e.insertionMode=vie.IN_HEAD;break;default:Mie(e,t)}}(this,e);break;case vie.IN_HEAD:Fie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.BASEFONT:case boe.BGSOUND:case boe.HEAD:case boe.LINK:case boe.META:case boe.NOFRAMES:case boe.STYLE:Fie(e,t);break;case boe.NOSCRIPT:e._err(t,Yae.nestedNoscriptInHead);break;default:Bie(e,t)}}(this,e);break;case vie.AFTER_HEAD:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.BODY:e._insertElement(t,uoe.HTML),e.framesetOk=!1,e.insertionMode=vie.IN_BODY;break;case boe.FRAMESET:e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_FRAMESET;break;case boe.BASE:case boe.BASEFONT:case boe.BGSOUND:case boe.LINK:case boe.META:case boe.NOFRAMES:case boe.SCRIPT:case boe.STYLE:case boe.TEMPLATE:case boe.TITLE:e._err(t,Yae.abandonedHeadElementChild),e.openElements.push(e.headElement,boe.HEAD),Fie(e,t),e.openElements.remove(e.headElement);break;case boe.HEAD:e._err(t,Yae.misplacedStartTagForHeadElement);break;default:Hie(e,t)}}(this,e);break;case vie.IN_BODY:Zie(this,e);break;case vie.IN_TABLE:ese(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.IN_CAPTION:!function(e,t){const n=t.tagID;ise.has(n)?e.openElements.hasInTableScope(boe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(boe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=vie.IN_TABLE,ese(e,t)):Zie(e,t)}(this,e);break;case vie.IN_COLUMN_GROUP:sse(this,e);break;case vie.IN_TABLE_BODY:cse(this,e);break;case vie.IN_ROW:dse(this,e);break;case vie.IN_CELL:!function(e,t){const n=t.tagID;ise.has(n)?(e.openElements.hasInTableScope(boe.TD)||e.openElements.hasInTableScope(boe.TH))&&(e._closeTableCell(),dse(e,t)):Zie(e,t)}(this,e);break;case vie.IN_SELECT:fse(this,e);break;case vie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===boe.CAPTION||n===boe.TABLE||n===boe.TBODY||n===boe.TFOOT||n===boe.THEAD||n===boe.TR||n===boe.TD||n===boe.TH?(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fse(e,t)}(this,e);break;case vie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case boe.BASE:case boe.BASEFONT:case boe.BGSOUND:case boe.LINK:case boe.META:case boe.NOFRAMES:case boe.SCRIPT:case boe.STYLE:case boe.TEMPLATE:case boe.TITLE:Fie(e,t);break;case boe.CAPTION:case boe.COLGROUP:case boe.TBODY:case boe.TFOOT:case boe.THEAD:e.tmplInsertionModeStack[0]=vie.IN_TABLE,e.insertionMode=vie.IN_TABLE,ese(e,t);break;case boe.COL:e.tmplInsertionModeStack[0]=vie.IN_COLUMN_GROUP,e.insertionMode=vie.IN_COLUMN_GROUP,sse(e,t);break;case boe.TR:e.tmplInsertionModeStack[0]=vie.IN_TABLE_BODY,e.insertionMode=vie.IN_TABLE_BODY,cse(e,t);break;case boe.TD:case boe.TH:e.tmplInsertionModeStack[0]=vie.IN_ROW,e.insertionMode=vie.IN_ROW,dse(e,t);break;default:e.tmplInsertionModeStack[0]=vie.IN_BODY,e.insertionMode=vie.IN_BODY,Zie(e,t)}}(this,e);break;case vie.AFTER_BODY:!function(e,t){t.tagID===boe.HTML?Zie(e,t):yse(e,t)}(this,e);break;case vie.IN_FRAMESET:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.FRAMESET:e._insertElement(t,uoe.HTML);break;case boe.FRAME:e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.NOFRAMES:Fie(e,t)}}(this,e);break;case vie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.NOFRAMES:Fie(e,t)}}(this,e);break;case vie.AFTER_AFTER_BODY:!function(e,t){t.tagID===boe.HTML?Zie(e,t):bse(e,t)}(this,e);break;case vie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.NOFRAMES:Fie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===boe.P||t.tagID===boe.BR)return vse(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===uoe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==boe.HTML&&n!==boe.HEAD&&n!==boe.BODY&&n!==boe.BR||Die(e,t)}(this,e);break;case vie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===boe.HEAD||n===boe.BODY||n===boe.HTML||n===boe.BR?Mie(e,t):e._err(t,Yae.endTagWithoutMatchingOpenElement)}(this,e);break;case vie.IN_HEAD:!function(e,t){switch(t.tagID){case boe.HEAD:e.openElements.pop(),e.insertionMode=vie.AFTER_HEAD;break;case boe.BODY:case boe.BR:case boe.HTML:zie(e,t);break;case boe.TEMPLATE:jie(e,t);break;default:e._err(t,Yae.endTagWithoutMatchingOpenElement)}}(this,e);break;case vie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case boe.NOSCRIPT:e.openElements.pop(),e.insertionMode=vie.IN_HEAD;break;case boe.BR:Bie(e,t);break;default:e._err(t,Yae.endTagWithoutMatchingOpenElement)}}(this,e);break;case vie.AFTER_HEAD:!function(e,t){switch(t.tagID){case boe.BODY:case boe.HTML:case boe.BR:Hie(e,t);break;case boe.TEMPLATE:jie(e,t);break;default:e._err(t,Yae.endTagWithoutMatchingOpenElement)}}(this,e);break;case vie.IN_BODY:Xie(this,e);break;case vie.TEXT:!function(e,t){var n;t.tagID===boe.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case vie.IN_TABLE:tse(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case boe.CAPTION:case boe.TABLE:e.openElements.hasInTableScope(boe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(boe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=vie.IN_TABLE,n===boe.TABLE&&tse(e,t));break;case boe.BODY:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TBODY:case boe.TD:case boe.TFOOT:case boe.TH:case boe.THEAD:case boe.TR:break;default:Xie(e,t)}}(this,e);break;case vie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case boe.COLGROUP:e.openElements.currentTagId===boe.COLGROUP&&(e.openElements.pop(),e.insertionMode=vie.IN_TABLE);break;case boe.TEMPLATE:jie(e,t);break;case boe.COL:break;default:lse(e,t)}}(this,e);break;case vie.IN_TABLE_BODY:use(this,e);break;case vie.IN_ROW:pse(this,e);break;case vie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case boe.TD:case boe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=vie.IN_ROW);break;case boe.TABLE:case boe.TBODY:case boe.TFOOT:case boe.THEAD:case boe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),pse(e,t));break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:break;default:Xie(e,t)}}(this,e);break;case vie.IN_SELECT:hse(this,e);break;case vie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===boe.CAPTION||n===boe.TABLE||n===boe.TBODY||n===boe.TFOOT||n===boe.THEAD||n===boe.TR||n===boe.TD||n===boe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):hse(e,t)}(this,e);break;case vie.IN_TEMPLATE:!function(e,t){t.tagID===boe.TEMPLATE&&jie(e,t)}(this,e);break;case vie.AFTER_BODY:gse(this,e);break;case vie.IN_FRAMESET:!function(e,t){t.tagID!==boe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===boe.FRAMESET||(e.insertionMode=vie.AFTER_FRAMESET))}(this,e);break;case vie.AFTER_FRAMESET:!function(e,t){t.tagID===boe.HTML&&(e.insertionMode=vie.AFTER_AFTER_FRAMESET)}(this,e);break;case vie.AFTER_AFTER_BODY:bse(this,e)}}onEof(e){switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:Die(this,e);break;case vie.BEFORE_HEAD:Mie(this,e);break;case vie.IN_HEAD:zie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:Bie(this,e);break;case vie.AFTER_HEAD:Hie(this,e);break;case vie.IN_BODY:case vie.IN_TABLE:case vie.IN_CAPTION:case vie.IN_COLUMN_GROUP:case vie.IN_TABLE_BODY:case vie.IN_ROW:case vie.IN_CELL:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:Qie(this,e);break;case vie.TEXT:!function(e,t){e._err(t,Yae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.IN_TEMPLATE:mse(this,e);break;case vie.AFTER_BODY:case vie.IN_FRAMESET:case vie.AFTER_FRAMESET:case vie.AFTER_AFTER_BODY:case vie.AFTER_AFTER_FRAMESET:Pie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Fae.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case vie.IN_HEAD:case vie.IN_HEAD_NO_SCRIPT:case vie.AFTER_HEAD:case vie.TEXT:case vie.IN_COLUMN_GROUP:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:case vie.IN_FRAMESET:case vie.AFTER_FRAMESET:this._insertCharacters(e);break;case vie.IN_BODY:case vie.IN_CAPTION:case vie.IN_CELL:case vie.IN_TEMPLATE:case vie.AFTER_BODY:case vie.AFTER_AFTER_BODY:case vie.AFTER_AFTER_FRAMESET:$ie(this,e);break;case vie.IN_TABLE:case vie.IN_TABLE_BODY:case vie.IN_ROW:Jie(this,e);break;case vie.IN_TABLE_TEXT:rse(this,e)}}}function Sie(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Kie(e,t),n}function Tie(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Cie(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,i=a;i!==n;o++,i=a){a=e.openElements.getCommonAncestor(i);const n=e.activeFormattingElements.getElementEntry(i),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(i)):(i=Aie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Aie(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Iie(e,t,n){const r=Soe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===boe.TEMPLATE&&a===uoe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Nie(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function Oie(e,t){for(let n=0;n<8;n++){const n=Sie(e,t);if(!n)break;const r=Tie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=Cie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&Iie(e,o,a),Nie(e,r,n)}}function Rie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Pie(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Lie(e,t){e._err(t,Yae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,hoe.QUIRKS),e.insertionMode=vie.BEFORE_HTML,e._processToken(t)}function Die(e,t){e._insertFakeRootElement(),e.insertionMode=vie.BEFORE_HEAD,e._processToken(t)}function Mie(e,t){e._insertFakeElement(goe.HEAD,boe.HEAD),e.headElement=e.openElements.current,e.insertionMode=vie.IN_HEAD,e._processToken(t)}function Fie(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.BASE:case boe.BASEFONT:case boe.BGSOUND:case boe.LINK:case boe.META:e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.TITLE:e._switchToTextParsing(t,Ooe.RCDATA);break;case boe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ooe.RAWTEXT):(e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_HEAD_NO_SCRIPT);break;case boe.NOFRAMES:case boe.STYLE:e._switchToTextParsing(t,Ooe.RAWTEXT);break;case boe.SCRIPT:e._switchToTextParsing(t,Ooe.SCRIPT_DATA);break;case boe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=vie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(vie.IN_TEMPLATE);break;case boe.HEAD:e._err(t,Yae.misplacedStartTagForHeadElement);break;default:zie(e,t)}}function jie(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==boe.TEMPLATE&&e._err(t,Yae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(boe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Yae.endTagWithoutMatchingOpenElement)}function zie(e,t){e.openElements.pop(),e.insertionMode=vie.AFTER_HEAD,e._processToken(t)}function Bie(e,t){const n=t.type===Xae.EOF?Yae.openElementsLeftAfterEof:Yae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=vie.IN_HEAD,e._processToken(t)}function Hie(e,t){e._insertFakeElement(goe.BODY,boe.BODY),e.insertionMode=vie.IN_BODY,Uie(e,t)}function Uie(e,t){switch(t.type){case Xae.CHARACTER:Vie(e,t);break;case Xae.WHITESPACE_CHARACTER:$ie(e,t);break;case Xae.COMMENT:Rie(e,t);break;case Xae.START_TAG:Zie(e,t);break;case Xae.END_TAG:Xie(e,t);break;case Xae.EOF:Qie(e,t)}}function $ie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Vie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Gie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,uoe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qie(e){const t=Jae(e,poe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Wie(e,t){e._switchToTextParsing(t,Ooe.RAWTEXT)}function Yie(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML)}function Zie(e,t){switch(t.tagID){case boe.I:case boe.S:case boe.B:case boe.U:case boe.EM:case boe.TT:case boe.BIG:case boe.CODE:case boe.FONT:case boe.SMALL:case boe.STRIKE:case boe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case boe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(goe.A);n&&(Oie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case boe.H1:case boe.H2:case boe.H3:case boe.H4:case boe.H5:case boe.H6:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Aoe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.P:case boe.DL:case boe.OL:case boe.UL:case boe.DIV:case boe.DIR:case boe.NAV:case boe.MAIN:case boe.MENU:case boe.ASIDE:case boe.CENTER:case boe.FIGURE:case boe.FOOTER:case boe.HEADER:case boe.HGROUP:case boe.DIALOG:case boe.DETAILS:case boe.ADDRESS:case boe.ARTICLE:case boe.SEARCH:case boe.SECTION:case boe.SUMMARY:case boe.FIELDSET:case boe.BLOCKQUOTE:case boe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.LI:case boe.DD:case boe.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===boe.LI&&t===boe.LI||(n===boe.DD||n===boe.DT)&&(t===boe.DD||t===boe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==boe.ADDRESS&&t!==boe.DIV&&t!==boe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.BR:case boe.IMG:case boe.WBR:case boe.AREA:case boe.EMBED:case boe.KEYGEN:Gie(e,t);break;case boe.HR:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._appendElement(t,uoe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case boe.RB:case boe.RTC:!function(e,t){e.openElements.hasInScope(boe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.RT:case boe.RP:!function(e,t){e.openElements.hasInScope(boe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(boe.RTC),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.PRE:case boe.LISTING:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case boe.XMP:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ooe.RAWTEXT)}(e,t);break;case boe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),gie(t),yie(t),t.selfClosing?e._appendElement(t,uoe.SVG):e._insertElement(t,uoe.SVG),t.ackSelfClosing=!0}(e,t);break;case boe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case boe.BASE:case boe.LINK:case boe.META:case boe.STYLE:case boe.TITLE:case boe.SCRIPT:case boe.BGSOUND:case boe.BASEFONT:case boe.TEMPLATE:Fie(e,t);break;case boe.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case boe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case boe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(boe.NOBR)&&(Oie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,uoe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case boe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),mie(t),yie(t),t.selfClosing?e._appendElement(t,uoe.MATHML):e._insertElement(t,uoe.MATHML),t.ackSelfClosing=!0}(e,t);break;case boe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==hoe.QUIRKS&&e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),e.framesetOk=!1,e.insertionMode=vie.IN_TABLE}(e,t);break;case boe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,uoe.HTML),qie(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case boe.PARAM:case boe.TRACK:case boe.SOURCE:!function(e,t){e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0}(e,t);break;case boe.IMAGE:!function(e,t){t.tagName=goe.IMG,t.tagID=boe.IMG,Gie(e,t)}(e,t);break;case boe.BUTTON:!function(e,t){e.openElements.hasInScope(boe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(boe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.framesetOk=!1}(e,t);break;case boe.APPLET:case boe.OBJECT:case boe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case boe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ooe.RAWTEXT)}(e,t);break;case boe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===vie.IN_TABLE||e.insertionMode===vie.IN_CAPTION||e.insertionMode===vie.IN_TABLE_BODY||e.insertionMode===vie.IN_ROW||e.insertionMode===vie.IN_CELL?vie.IN_SELECT_IN_TABLE:vie.IN_SELECT}(e,t);break;case boe.OPTION:case boe.OPTGROUP:!function(e,t){e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.NOEMBED:case boe.NOFRAMES:Wie(e,t);break;case boe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_FRAMESET)}(e,t);break;case boe.TEXTAREA:!function(e,t){e._insertElement(t,uoe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ooe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=vie.TEXT}(e,t);break;case boe.NOSCRIPT:e.options.scriptingEnabled?Wie(e,t):Yie(e,t);break;case boe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),e.tokenizer.state=Ooe.PLAINTEXT}(e,t);break;case boe.COL:case boe.TH:case boe.TD:case boe.TR:case boe.HEAD:case boe.FRAME:case boe.TBODY:case boe.TFOOT:case boe.THEAD:case boe.CAPTION:case boe.COLGROUP:break;default:Yie(e,t)}}function Kie(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==boe.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,o))break}}function Xie(e,t){switch(t.tagID){case boe.A:case boe.B:case boe.I:case boe.S:case boe.U:case boe.EM:case boe.TT:case boe.BIG:case boe.CODE:case boe.FONT:case boe.NOBR:case boe.SMALL:case boe.STRIKE:case boe.STRONG:Oie(e,t);break;case boe.P:!function(e){e.openElements.hasInButtonScope(boe.P)||e._insertFakeElement(goe.P,boe.P),e._closePElement()}(e);break;case boe.DL:case boe.UL:case boe.OL:case boe.DIR:case boe.DIV:case boe.NAV:case boe.PRE:case boe.MAIN:case boe.MENU:case boe.ASIDE:case boe.BUTTON:case boe.CENTER:case boe.FIGURE:case boe.FOOTER:case boe.HEADER:case boe.HGROUP:case boe.DIALOG:case boe.ADDRESS:case boe.ARTICLE:case boe.DETAILS:case boe.SEARCH:case boe.SECTION:case boe.SUMMARY:case boe.LISTING:case boe.FIELDSET:case boe.BLOCKQUOTE:case boe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case boe.LI:!function(e){e.openElements.hasInListItemScope(boe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(boe.LI),e.openElements.popUntilTagNamePopped(boe.LI))}(e);break;case boe.DD:case boe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case boe.H1:case boe.H2:case boe.H3:case boe.H4:case boe.H5:case boe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case boe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(goe.BR,boe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case boe.BODY:!function(e,t){if(e.openElements.hasInScope(boe.BODY)&&(e.insertionMode=vie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case boe.HTML:!function(e,t){e.openElements.hasInScope(boe.BODY)&&(e.insertionMode=vie.AFTER_BODY,gse(e,t))}(e,t);break;case boe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(boe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(boe.FORM):n&&e.openElements.remove(n))}(e);break;case boe.APPLET:case boe.OBJECT:case boe.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case boe.TEMPLATE:jie(e,t);break;default:Kie(e,t)}}function Qie(e,t){e.tmplInsertionModeStack.length>0?mse(e,t):Pie(e,t)}function Jie(e,t){if(void 0!==e.openElements.currentTagId&&wie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=vie.IN_TABLE_TEXT,t.type){case Xae.CHARACTER:ase(e,t);break;case Xae.WHITESPACE_CHARACTER:rse(e,t)}else nse(e,t)}function ese(e,t){switch(t.tagID){case boe.TD:case boe.TH:case boe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(goe.TBODY,boe.TBODY),e.insertionMode=vie.IN_TABLE_BODY,cse(e,t)}(e,t);break;case boe.STYLE:case boe.SCRIPT:case boe.TEMPLATE:Fie(e,t);break;case boe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(goe.COLGROUP,boe.COLGROUP),e.insertionMode=vie.IN_COLUMN_GROUP,sse(e,t)}(e,t);break;case boe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,uoe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case boe.TABLE:!function(e,t){e.openElements.hasInTableScope(boe.TABLE)&&(e.openElements.popUntilTagNamePopped(boe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case boe.TBODY:case boe.TFOOT:case boe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_TABLE_BODY}(e,t);break;case boe.INPUT:!function(e,t){qie(t)?e._appendElement(t,uoe.HTML):nse(e,t),t.ackSelfClosing=!0}(e,t);break;case boe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_CAPTION}(e,t);break;case boe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_COLUMN_GROUP}(e,t);break;default:nse(e,t)}}function tse(e,t){switch(t.tagID){case boe.TABLE:e.openElements.hasInTableScope(boe.TABLE)&&(e.openElements.popUntilTagNamePopped(boe.TABLE),e._resetInsertionMode());break;case boe.TEMPLATE:jie(e,t);break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TBODY:case boe.TD:case boe.TFOOT:case boe.TH:case boe.THEAD:case boe.TR:break;default:nse(e,t)}}function nse(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Uie(e,t),e.fosterParentingEnabled=n}function rse(e,t){e.pendingCharacterTokens.push(t)}function ase(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ose(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)nse(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ise=new Set([boe.CAPTION,boe.COL,boe.COLGROUP,boe.TBODY,boe.TD,boe.TFOOT,boe.TH,boe.THEAD,boe.TR]);function sse(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.COL:e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.TEMPLATE:Fie(e,t);break;default:lse(e,t)}}function lse(e,t){e.openElements.currentTagId===boe.COLGROUP&&(e.openElements.pop(),e.insertionMode=vie.IN_TABLE,e._processToken(t))}function cse(e,t){switch(t.tagID){case boe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_ROW;break;case boe.TH:case boe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(goe.TR,boe.TR),e.insertionMode=vie.IN_ROW,dse(e,t);break;case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.TBODY:case boe.TFOOT:case boe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE,ese(e,t));break;default:ese(e,t)}}function use(e,t){const n=t.tagID;switch(t.tagID){case boe.TBODY:case boe.TFOOT:case boe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE);break;case boe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE,tse(e,t));break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TD:case boe.TH:case boe.TR:break;default:tse(e,t)}}function dse(e,t){switch(t.tagID){case boe.TH:case boe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_CELL,e.activeFormattingElements.insertMarker();break;case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.TBODY:case boe.TFOOT:case boe.THEAD:case boe.TR:e.openElements.hasInTableScope(boe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY,cse(e,t));break;default:ese(e,t)}}function pse(e,t){switch(t.tagID){case boe.TR:e.openElements.hasInTableScope(boe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY);break;case boe.TABLE:e.openElements.hasInTableScope(boe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY,use(e,t));break;case boe.TBODY:case boe.TFOOT:case boe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(boe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY,use(e,t));break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TD:case boe.TH:break;default:tse(e,t)}}function fse(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.OPTION:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e._insertElement(t,uoe.HTML);break;case boe.OPTGROUP:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===boe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,uoe.HTML);break;case boe.HR:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===boe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.INPUT:case boe.KEYGEN:case boe.TEXTAREA:case boe.SELECT:e.openElements.hasInSelectScope(boe.SELECT)&&(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode(),t.tagID!==boe.SELECT&&e._processStartTag(t));break;case boe.SCRIPT:case boe.TEMPLATE:Fie(e,t)}}function hse(e,t){switch(t.tagID){case boe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===boe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===boe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===boe.OPTGROUP&&e.openElements.pop();break;case boe.OPTION:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop();break;case boe.SELECT:e.openElements.hasInSelectScope(boe.SELECT)&&(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode());break;case boe.TEMPLATE:jie(e,t)}}function mse(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(boe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Pie(e,t)}function gse(e,t){var n;if(t.tagID===boe.HTML){if(e.fragmentContext||(e.insertionMode=vie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===boe.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else yse(e,t)}function yse(e,t){e.insertionMode=vie.IN_BODY,Uie(e,t)}function bse(e,t){e.insertionMode=vie.IN_BODY,Uie(e,t)}function vse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==uoe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}goe.AREA,goe.BASE,goe.BASEFONT,goe.BGSOUND,goe.BR,goe.COL,goe.EMBED,goe.FRAME,goe.HR,goe.IMG,goe.INPUT,goe.KEYGEN,goe.LINK,goe.META,goe.PARAM,goe.SOURCE,goe.TRACK,goe.WBR;const kse=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xse=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),wse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ese(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=Cae("type",{handlers:{root:Sse,element:Tse,text:Cse,comment:Nse,doctype:Ase,raw:Ose},unknown:Rse}),a={parser:n?new _ie(wse):_ie.getFragmentParser(void 0,wse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),Pse(a,See());const o=function(e,t){const n=t||{};return xae({file:n.file||void 0,location:!1,schema:"svg"===n.space?Y7:W7,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&mre(o,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===o.type&&1===o.children.length&&o.children[0].type===e.type?o.children[0]:o}function _se(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Sse(e,t){_se(e.children,t)}function Tse(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ooe.PLAINTEXT)return;Pse(t,See(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:bae.html;a===bae.html&&"svg"===n&&(a=bae.svg);const o=function(e,t){const n=(t||Aae).space;return Nae(e,"svg"===n?Y7:W7)}({...e,children:[]},{space:a===bae.svg?"svg":"html"}),i={type:Xae.START_TAG,tagName:n,tagID:Soe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Dse(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),_se(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Lae.includes(n))return;if(t.parser.tokenizer.state===Ooe.PLAINTEXT)return;Pse(t,_ee(e));const r={type:Xae.END_TAG,tagName:n,tagID:Soe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Dse(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Ooe.RCDATA&&t.parser.tokenizer.state!==Ooe.RAWTEXT&&t.parser.tokenizer.state!==Ooe.SCRIPT_DATA||(t.parser.tokenizer.state=Ooe.DATA)}(e,t)}function Cse(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xae.CHARACTER,chars:e.value,location:Dse(e)};Pse(t,See(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ase(e,t){const n={type:Xae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Dse(e)};Pse(t,See(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ise(e,t){t.stitches=!0;const n=function(e){return ore("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=Ese({type:"root",children:e.children},t.options);n.children=r.children}Nse({type:"comment",value:{stitch:n}},t)}function Nse(e,t){const n=e.value,r={type:Xae.COMMENT,data:n,location:Dse(e)};Pse(t,See(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ose(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Lse(t,See(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(kse,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Rse(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw xse.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+e)}Ise(n,t)}function Pse(e,t){Lse(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ooe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Lse(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Dse(e){const t=See(e)||{line:void 0,column:void 0,offset:void 0},n=_ee(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Mse(e){return function(t,n){return Ese(t,{...e,file:n})}}function Fse(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function jse(e,t,n){const r=lre((n||{}).ignore||[]),a=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([zse(e[0]),Bse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)hre(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function zse(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Bse(e){return"function"==typeof e?e:function(){return e}}const Hse="phrasing",Use=["autolink","link","image","label"];function $se(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vse(e){this.config.enter.autolinkProtocol.call(this,e)}function Gse(e){this.config.exit.autolinkProtocol.call(this,e)}function qse(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Wse(e){this.config.exit.autolinkEmail.call(this,e)}function Yse(e){this.exit(e)}function Zse(e){jse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kse],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Xse]],{ignore:["link","linkReference"]})}function Kse(e,t,n,r,a){let o="";if(!Qse(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=Fse(e,"(");let o=Fse(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function Xse(e,t,n,r){return!(!Qse(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qse(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||kte(n)||vte(n))&&(!t||47!==n)}function Jse(){this.buffer()}function ele(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tle(){this.buffer()}function nle(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function rle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ale(e){this.exit(e)}function ole(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ile(e){this.exit(e)}function sle(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function lle(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?ule:cle)));return s(),i},footnoteReference:sle},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function cle(e,t,n){return 0===t?e:ule(e,t,n)}function ule(e,t,n){return(n?"":" ")+e}sle.peek=function(){return"["};const dle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ple(e){this.enter({type:"delete",children:[]},e)}function fle(e){this.exit(e)}function hle(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function mle(e){return e.length}function gle(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function yle(e,t,n){return">"+(n?"":" ")+e}function ble(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function vle(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&(o=n.stack,i=n.unsafe[a],ble(o,i.inConstruct,!0)&&!ble(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function kle(e,t,n){return(n?"":" ")+e}function xle(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ele(e,t,n){const r=Cte(e),a=Cte(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function _le(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ele(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=wle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ele(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+wle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Sle(e){return e.value||""}function Tle(e,t,n,r){const a=xle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Cle(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ale(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function Ile(e,t){const n=Kee(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Nle(e,t,n,r){const a=xle(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Ile(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Ole(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Rle(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ple(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}hle.peek=function(){return"~"},_le.peek=function(e,t,n){return n.options.emphasis||"*"},Sle.peek=function(){return"<"},Tle.peek=function(){return"!"},Cle.peek=function(){return"!"},Ale.peek=function(){return"`"},Nle.peek=function(e,t,n){return Ile(e,n)?"<":"["},Ole.peek=function(){return"["};const Lle=lre(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dle(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ele(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=wle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ele(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+wle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Dle.peek=function(e,t,n){return n.options.strong||"*"};const Mle={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),yle);return a(),i},break:vle,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,kle);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=xle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:_le,hardBreak:vle,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return mre(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,fre})),Boolean((!e.depth||e.depth<3)&&Kee(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=wle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Sle,image:Tle,imageReference:Cle,inlineCode:Ale,link:Nle,linkReference:Ole,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Rle(n);const s=e.ordered?"."===i?")":".":function(e){const t=Rle(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ple(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Rle(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some((function(e){return Lle(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Dle,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ple(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Fle(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function jle(e){this.exit(e),this.data.inTable=void 0}function zle(e){this.enter({type:"tableRow",children:[]},e)}function Ble(e){this.exit(e)}function Hle(e){this.enter({type:"tableCell",children:[]},e)}function Ule(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$le));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $le(e,t){return"|"===t?t:e}function Vle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Mle.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=s([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||mle,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=null==(d=e[u][o])?"":String(d);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)o[p]=gle(r[p]);else{const e=gle(r);for(;++p<c;)o[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=o[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[p]&&(l[p]=a),h[p]=a),f[p]=i}i.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const e=i[u],t=s[u];p=-1;const r=[];for(;++p<c;){const a=e[p]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=o[p];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function Gle(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function qle(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Wle(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=Mle.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const Yle={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},Zle={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(Xle,l,s)(t):null===t||yte(t)||kte(t)||45!==t&&vte(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},Kle={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(Xle,t,o)(i):null===i||yte(i)||kte(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},Xle={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||yte(i)||kte(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||yte(e)||kte(e)?t(e):r(e)}function o(e){return cte(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):cte(t)?(e.consume(t),i):n(t)}},partial:!0},Qle={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ute(e)?n(e):t(e)}},partial:!0},Jle={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!ace.call(r,r.previous)||lce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Yle,e.attempt(Zle,e.attempt(Kle,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:ace},ece={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&oce.call(r,r.previous)&&!lce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(cte(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||pte(t)||yte(t)||kte(t)||vte(t)?n(t):e.attempt(Zle,e.attempt(Kle,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:oce},tce={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!sce(t)||!ice.call(r,r.previous)||lce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return sce(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Qle,c,l)(t):45===t||95===t||ute(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&cte(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:ice},nce={};let rce=48;for(;rce<123;)nce[rce]=tce,rce++,58===rce?rce=65:91===rce&&(rce=97);function ace(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||yte(e)}function oce(e){return!cte(e)}function ice(e){return!(47===e||sce(e))}function sce(e){return 43===e||45===e||46===e||95===e||ute(e)}function lce(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}nce[43]=tce,nce[45]=tce,nce[46]=tce,nce[95]=tce,nce[72]=[tce,ece],nce[104]=[tce,ece],nce[87]=[tce,Jle],nce[119]=[tce,Jle];const cce={tokenize:function(e,t,n){const r=this;return Ete(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function uce(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=lte(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function dce(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function pce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||yte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(lte(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return yte(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function fce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||yte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=lte(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return yte(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),Ete(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function hce(e,t,n){return e.check(Rte,t,e.attempt(cce,t,n))}function mce(e){e.exit("gfmFootnoteDefinition")}function gce(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=Cte(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=Cte(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&tte(i,i.length,0,Ate(s,e.slice(r+1,n),t)),tte(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),tte(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class yce{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function bce(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function vce(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?k:s;if(o===k&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):gte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):bte(t)?Ete(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||yte(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,bte(t)?Ete(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return bte(t)?Ete(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||gte(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return bte(t)?Ete(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||gte(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function k(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||gte(n)?(e.exit("tableRow"),t(n)):bte(n)?Ete(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||yte(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:w)}function E(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function kce(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new yce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(wce(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=xce(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=xce(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=xce(p,t,l,s,o,a)):0!==c[1]&&(a=xce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&wce(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=bce(t.events,o))}return e}function xce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},Ece(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Ece(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=Ece(t.events,n[2]),o=Ece(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},Ece(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function wce(e,t,n,r,a){const o=[],i=Ece(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ece(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const _ce={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return yte(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return gte(r)?t(r):bte(r)?e.check({tokenize:Sce},t,n)(r):n(r)}}};function Sce(e,t,n){return Ete(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Tce={};function Cce(e){const t=e||Tce,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return ate([{text:nce},{document:{91:{name:"gfmFootnoteDefinition",tokenize:fce,continuation:{tokenize:hce},exit:mce}},text:{91:{name:"gfmFootnoteCall",tokenize:pce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uce,resolveTo:dce}}},gce(e),{flow:{null:{name:"table",tokenize:vce,resolveAll:kce}}},{text:{91:_ce}}])}(t)),a.push([{transforms:[Zse],enter:{literalAutolink:$se,literalAutolinkEmail:Vse,literalAutolinkHttp:Vse,literalAutolinkWww:Vse},exit:{literalAutolink:Yse,literalAutolinkEmail:Wse,literalAutolinkHttp:Gse,literalAutolinkWww:qse}},{enter:{gfmFootnoteCallString:Jse,gfmFootnoteCall:ele,gfmFootnoteDefinitionLabelString:tle,gfmFootnoteDefinition:nle},exit:{gfmFootnoteCallString:rle,gfmFootnoteCall:ale,gfmFootnoteDefinitionLabelString:ole,gfmFootnoteDefinition:ile}},{canContainEols:["delete"],enter:{strikethrough:ple},exit:{strikethrough:fle}},{enter:{table:Fle,tableData:Hle,tableHeader:Hle,tableRow:zle},exit:{codeText:Ule,table:jle,tableData:Ble,tableHeader:Ble,tableRow:Ble}},{exit:{taskListCheckValueChecked:Gle,taskListCheckValueUnchecked:Gle,paragraph:qle}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hse,notInConstruct:Use},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Hse,notInConstruct:Use},{character:":",before:"[ps]",after:"\\/",inConstruct:Hse,notInConstruct:Use}]},lle(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dle}],handlers:{delete:hle}},Vle(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wle}}]}}(t))}const Ace=function(e){if(null==e)return Nce;if("string"==typeof e)return function(e){return Ice(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ace(e[n]);return Ice(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return Ice(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return Ice(e);throw new Error("Expected function, string, or object as test")};function Ice(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Nce(){return!0}const Oce=!0,Rce=!1,Pce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=Ace(t),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=[];if((!t||a(i,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Oce,e];return[e]}(n(i,l)),p[0]===Rce))return p;if(i.children&&"skip"!==p[0])for(u=(r?i.children.length:-1)+o,d=l.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,d)(),c[0]===Rce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Lce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Pce(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Dce(){return e=>{Lce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\^/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)})),Lce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\~/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)}))}}function Mce(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Mce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Mce(e))&&(r&&(r+=" "),r+=t);return r}var jce,zce,Bce,Hce,Uce,$ce,Vce,Gce=Object.create,qce=Object.defineProperty,Wce=Object.defineProperties,Yce=Object.getOwnPropertyDescriptor,Zce=Object.getOwnPropertyDescriptors,Kce=Object.getOwnPropertyNames,Xce=Object.getOwnPropertySymbols,Qce=Object.getPrototypeOf,Jce=Object.prototype.hasOwnProperty,eue=Object.prototype.propertyIsEnumerable,tue=(e,t,n)=>t in e?qce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nue=(e,t)=>{for(var n in t||(t={}))Jce.call(t,n)&&tue(e,n,t[n]);if(Xce)for(var n of Xce(t))eue.call(t,n)&&tue(e,n,t[n]);return e},rue=(e,t)=>Wce(e,Zce(t)),aue=(e,t)=>{var n={};for(var r in e)Jce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Xce)for(var r of Xce(e))t.indexOf(r)<0&&eue.call(e,r)&&(n[r]=e[r]);return n},oue=(jce={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new s;return l(a,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,y=!!m.lookbehind,b=!!m.greedy,v=m.alias;if(b&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var x=m.pattern||m,w=s.next,E=u;w!==t.tail&&!(d&&E>=d.reach);E+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,T=1;if(b){if(!(S=o(x,E,e,y))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,I=E;for(I+=w.value.length;C>=I;)I+=(w=w.next).value.length;if(E=I-=w.value.length,w.value instanceof a)continue;for(var N=w;N!==t.tail&&(I<A||"string"==typeof N.value);N=N.next)T++,I+=N.value.length;T--,_=e.slice(E,I),S.index-=E}else if(!(S=o(x,0,_,y)))continue;C=S.index;var O=S[0],R=_.slice(0,C),P=_.slice(C+O.length),L=E+_.length;d&&L>d.reach&&(d.reach=L);var D=w.prev;if(R&&(D=l(t,D,R),E+=R.length),c(t,D,T),w=l(t,D,new a(p,g?r.tokenize(O,g):O,v,O)),P&&l(t,w,P),T>1){var M={cause:p+","+h,reach:L};i(e,t,n,w.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return zce||(0,jce[Kce(jce)[0]])((zce={exports:{}}).exports,zce),zce.exports}),iue=((e,t,n)=>(n=null!=e?Gce(Qce(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Kce(t))Jce.call(e,a)||a===n||qce(e,a,{get:()=>t[a],enumerable:!(r=Yce(t,a))||r.enumerable});return e})(e&&e.__esModule?n:qce(n,"default",{value:e,enumerable:!0}),e)))(oue());iue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},iue.languages.markup.tag.inside["attr-value"].inside.entity=iue.languages.markup.entity,iue.languages.markup.doctype.inside["internal-subset"].inside=iue.languages.markup,iue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(iue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:iue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:iue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},iue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(iue.languages.markup.tag,"addAttribute",{value:function(e,t){iue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:iue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),iue.languages.html=iue.languages.markup,iue.languages.mathml=iue.languages.markup,iue.languages.svg=iue.languages.markup,iue.languages.xml=iue.languages.extend("markup",{}),iue.languages.ssml=iue.languages.xml,iue.languages.atom=iue.languages.xml,iue.languages.rss=iue.languages.xml,Bce=iue,Hce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},$ce="(?:[^\\\\-]|"+(Uce=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",$ce=RegExp($ce+"-"+$ce),Vce={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Bce.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:$ce,inside:{escape:Uce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":Hce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:Uce}},"special-escape":Hce,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":Vce}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:Uce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":Vce}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},iue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},iue.languages.javascript=iue.languages.extend("clike",{"class-name":[iue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),iue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,iue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:iue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:iue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:iue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:iue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:iue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),iue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:iue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),iue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),iue.languages.markup&&(iue.languages.markup.tag.addInlined("script","javascript"),iue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),iue.languages.js=iue.languages.javascript,iue.languages.actionscript=iue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),iue.languages.actionscript["class-name"].alias="function",delete iue.languages.actionscript.parameter,delete iue.languages.actionscript["literal-property"],iue.languages.markup&&iue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:iue.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(iue),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(iue),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(iue),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(iue),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(iue),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a,o=t[n];"code"!==o.type?e(o.content):(a=o.content[1],o=o.content[3],a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content&&(a=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),a="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,a]:o.alias.push(a):o.alias=[a]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r];if(o=/language-(.+)/.exec(o)){n=o[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(iue),iue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:iue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},iue.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<a.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=a.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))a++;else if(r.test(s)&&0==--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),iue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=d.length)return;var i,l,p,f,h,m,g,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(m="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=m.substring(0,g),h=u[i],p=void 0,(f={})["interpolation-punctuation"]=a,3===(f=e.tokenize(h,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,h),f=m.substring(g+i.length),h=[],l&&h.push(l),h.push(p),f&&(t(m=[f]),h.push.apply(h,m)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(h)),o+=h.length-1):y.content=h)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,a=n.length;r<a;r++){var o,i,s,c=n[r];"string"!=typeof c&&(o=c.content,Array.isArray(o)?"template-string"===c.type?(c=o[1],3===o.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(o[1]=l(i,s,c))):t(o):"string"!=typeof o&&t([o]))}}(t.tokens)}))}(iue),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(iue),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(iue),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(iue),iue.languages.n4js=iue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),iue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),iue.languages.n4jsd=iue.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];a=(o="RegExp"===e.util.type(o)?e.languages.javascript[a]={pattern:o}:o).inside||{};(o.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(iue),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;"string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"!==a.content[a.content.length-1].content&&n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces&&(o=s(a),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(o+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(o=s(t[r-1])+o,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",o,null,o)),a.content&&"string"!=typeof a.content&&i(a.content)}}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(iue),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(iue),iue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},iue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=iue.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(iue),iue.languages.c=iue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),iue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),iue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},iue.languages.c.string],char:iue.languages.c.char,comment:iue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:iue.languages.c}}}}),iue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete iue.languages.c.boolean,iue.languages.objectivec=iue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete iue.languages.objectivec["class-name"],iue.languages.objc=iue.languages.objectivec,iue.languages.reason=iue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),iue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete iue.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(iue),iue.languages.go=iue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),iue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete iue.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(iue),iue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},iue.languages.python["string-interpolation"].inside.interpolation.inside.rest=iue.languages.python,iue.languages.py=iue.languages.python,iue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},iue.languages.webmanifest=iue.languages.json;var sue={};((e,t)=>{for(var n in t)qce(e,n,{get:t[n],enumerable:!0})})(sue,{dracula:()=>lue,duotoneDark:()=>cue,duotoneLight:()=>uue,github:()=>due,gruvboxMaterialDark:()=>Aue,gruvboxMaterialLight:()=>Iue,jettwaveDark:()=>_ue,jettwaveLight:()=>Sue,nightOwl:()=>pue,nightOwlLight:()=>fue,oceanicNext:()=>gue,okaidia:()=>yue,oneDark:()=>Tue,oneLight:()=>Cue,palenight:()=>bue,shadesOfPurple:()=>vue,synthwave84:()=>kue,ultramin:()=>xue,vsDark:()=>wue,vsLight:()=>Eue});var lue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},cue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},uue={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},due={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},pue={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},fue={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},hue="#c5a5c5",mue="#8dc891",gue={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:hue}},{types:["attr-value"],style:{color:mue}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:mue}},{types:["punctuation"],style:{color:mue}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:hue}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},yue={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},bue={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},vue={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},kue={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},xue={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},wue={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Eue={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},_ue={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Sue={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Tue={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},Cue={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Aue={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Iue={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Nue=/\r\n|\r|\n/,Oue=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Rue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Pue=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(o=r[i]++)<a[i];){let e,c=t[i];const u=n[i][o];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=Rue(c,u.type),u.alias&&(c=Rue(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Nue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Oue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Oue(s),l},Lue=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=nue(nue({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=rue(nue({},n),{backgroundColor:void 0}),r},Due=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Lue(r,o),s=(e=>X.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=aue(n,["className","style","line"]);const s=rue(nue({},i),{className:Fce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=nue(nue({},s.style||{}),a)),s}),[e]))(i),l=(e=>{const t=X.useCallback((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return X.useCallback((e=>{var n=e,{token:r,className:a,style:o}=n,i=aue(n,["token","className","style"]);const s=rue(nue({},i),{className:Fce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=nue(nue({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>X.useMemo((()=>{if(null==n)return Pue([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),Pue(a.tokens)}),[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:c,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:s,getTokenProps:l})},Mue=e=>X.createElement(Due,rue(nue({},e),{prism:e.prism||iue,theme:e.theme||wue,code:e.code,language:e.language}))
70
+ */const WG={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown",chatHistory:"LuHistory",chatHistoryPanel:"LuPanelLeft",backToChat:"LuArrowLeft",fileUpload:"LuPaperclip",filePdf:"FaRegFilePdf",fileText:"PiFileText",fileMarkdown:"PiFileMarkdown",fileHtml:"PiFileHtml",fileCsv:"PiFileCsv",fileLog:"PiFileLog",fileJson:"PiFileJson",file:"PiFile",fileSql:"PiFileSql",filePy:"PiFilePy"};function YG({iconKey:e,...t}){var n;const r=WG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=oR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return og.jsx(qG,{"data-icon":e,iconSettings:i,...t})}const ZG=X.createContext(void 0),KG=({children:e})=>{const[t,n]=X.useState(null),r=X.useCallback((e=>{n(e)}),[]),a=X.useCallback((()=>{n(null)}),[]),o=X.useMemo((()=>({imagePreview:t,openImagePreview:r,closeImagePreview:a})),[t,r,a]);return og.jsx(ZG.Provider,{value:o,children:e})},XG=()=>{const e=X.useContext(ZG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},QG=X.createContext(void 0),JG=({children:e,message:t})=>og.jsx(QG.Provider,{value:{message:t},children:e}),eq=()=>{const e=X.useContext(QG);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var tq=(e,t=[])=>({parts:(...n)=>{if(rq(t))return tq(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>tq(e,[...t,...n]),omit:(...n)=>tq(e,t.filter((e=>!n.includes(e)))),rename:e=>tq(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${nq(e)}"][data-part="${nq(n)}"]`,`& [data-scope="${nq(e)}"][data-part="${nq(n)}"]`].join(", "),attrs:{"data-scope":nq(e),"data-part":nq(n)}}})),{})}),nq=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),rq=e=>0===e.length,aq=tq("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),oq=Object.defineProperty,iq=(e,t,n)=>((e,t,n)=>t in e?oq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),sq=e=>"object"==typeof e&&null!==e,lq=e=>e?"":void 0,cq=e=>sq(e)&&1===e.nodeType&&"string"==typeof e.nodeName,uq=e=>sq(e)&&void 0!==e.nodeType,dq=e=>uq(e)&&11===e.nodeType&&"host"in e;function pq(e,t){var n;if(!e||!t)return!1;if(!cq(e)||!uq(t))return!1;if(cq(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&dq(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fq(e){var t;return dq(e)?fq(e.host):(e=>sq(e)&&9===e.nodeType)(e)?e.defaultView??window:cq(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function hq(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}var mq=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},gq=class e{constructor(){iq(this,"id",null),iq(this,"fn_cleanup"),iq(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};var yq={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},bq=e=>e.isDirectory,vq=e=>e.isFile,kq=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),xq=(e,t="")=>new Promise((n=>{const r=[],a=()=>{e.readEntries((e=>{if(0===e.length)return void n(Promise.all(r).then((e=>e.flat())));const o=e.map((e=>e?bq(e)?xq(e.createReader(),`${t}${e.name}`):vq(e)?new Promise((n=>{e.file((e=>{n(kq(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var wq=e=>function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}(e)||function(e){return/^.*\.[\w]+$/.test(e)}(e);var Eq=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,_q=e=>null!=e;var Sq=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap((e=>{const[t,n]=e.split("_");return t.split(",").map((e=>[e,n]))})));function Tq(e,t){if(e&&t){const n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;const r=e.name||"",a=(e.type||function(e){const t=e.split(".").pop();return t&&Sq.get(t)||null}(r)||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):a===t}))}return!0}var Cq=function(e){const t=new Map;return function(n,r){const a=n+(r?Object.entries(r).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(t.has(a))return t.get(a);let o=new e(n,r);return t.set(a,o),o}}(Intl.NumberFormat);var Aq=["","kilo","mega","giga","tera"],Iq=["","kilo","mega","giga","tera","peta"],Nq=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(0===e)return"0 B";const{unitSystem:r="decimal",precision:a=3,unit:o="byte",unitDisplay:i="short"}=n,s="binary"===r?1024:1e3,l="bit"===o?Aq:Iq,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const p=parseFloat(u.toPrecision(a));return function(e,t,n={}){return Cq(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function Oq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(Oq(t)):e.concat(t)),[])}var Rq=e=>String.fromCharCode(e+(e>25?39:97));var Pq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Rq(t%52)+n;return Rq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function Lq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var Dq=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},Mq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},Fq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},jq=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemDeleteTrigger)?void 0:r.call(n,t))??`file:${e.id}:item-delete:${t}`},zq=e=>Pq(`${e.name}-${e.size}`),Bq=e=>e.getById(Fq(e));function Hq(e){const t=hq(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function Uq(e,t,n=[],r=[]){const{prop:a,computed:o}=e,i=[],s=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach((e=>{var t;const[r,c]=function(e,t){const n="application/x-moz-file"===e.type||Tq(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(_q(e.size))if(_q(t)&&_q(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(_q(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(_q(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>Eq(t,e)))||i.some((t=>Eq(t,e))),f=null==(t=a("validate"))?void 0:t(e,l),h=!f||0===f.length;if(r&&u&&h&&!p)i.push(e);else{const t=[c,d];p&&t.push("FILE_EXISTS"),h||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}})),function(e,t,n){const{prop:r,computed:a}=e;return!(!a("multiple")&&t>1||(a("multiple")||t+n.length!==2)&&t+n.length>r("maxFiles"))}(e,i.length,n)||(i.forEach((e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})})),i.splice(0)),{acceptedFiles:i,rejectedFiles:s}}var $q="accepted";function Vq(e,t){if(!e||"file"===e.getAttribute("type"))return!1;const n=e.closest("button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]");return n!=t&&pq(t,n)}function Gq(e,t){const{state:n,send:r,prop:a,computed:o,scope:i,context:s}=e,l=!!a("disabled"),c=!!a("readOnly"),u=!!a("required"),d=a("allowDrop"),p=a("translations"),f=n.matches("dragging"),h=n.matches("focused")&&!l,m=s.get("acceptedFiles"),g=a("maxFiles");return{dragging:f,focused:h,disabled:l,readOnly:c,transforming:s.get("transforming"),maxFilesReached:m.length>=g,remainingFiles:Math.max(0,g-m.length),openFilePicker(){l||c||r({type:"OPEN"})},deleteFile(e,t=$q){l||c||r({type:"FILE.DELETE",file:e,itemType:t})},acceptedFiles:m,rejectedFiles:s.get("rejectedFiles"),setFiles(e){l||c||r({type:"FILES.SET",files:e,count:e.length})},clearRejectedFiles(){l||c||r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){l||c||r({type:"FILES.CLEAR"})},getFileSize:e=>Nq(e.size,a("locale")),createFileUrl(e,t){const n=i.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(l||c)return!1;const t=Array.from((null==e?void 0:e.items)??[]).reduce(((e,t)=>{if("file"!==t.kind)return e;const n=t.getAsFile();return n?[...e,n]:e}),[]);return!!t.length&&(r({type:"FILE.SELECT",files:t}),!0)},getRootProps:()=>t.element({...aq.root.attrs,dir:a("dir"),id:Dq(i),"data-disabled":lq(l),"data-readonly":lq(c),"data-dragging":lq(f)}),getDropzoneProps:(e={})=>t.element({...aq.dropzone.attrs,dir:a("dir"),id:Mq(i),tabIndex:l||c||e.disableClick?void 0:0,role:e.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l||c||void 0,"data-invalid":lq(a("invalid")),"data-disabled":lq(l),"data-readonly":lq(c),"data-dragging":lq(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=hq(t);pq(t.currentTarget,n)&&(Vq(n,t.currentTarget)||e.disableClick||"Enter"!==t.key&&" "!==t.key||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(t){if(l||c)return;if(t.defaultPrevented)return;if(e.disableClick)return;const n=hq(t);pq(t.currentTarget,n)&&(Vq(n,t.currentTarget)||("label"===t.currentTarget.localName&&t.preventDefault(),r({type:"DROPZONE.CLICK"})))},onDragOver(e){if(l||c)return;if(!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch{}if(!Hq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(pq(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;Hq(e)&&(t=e.dataTransfer.items,n=a("directory"),Promise.all(Array.from(t).filter((e=>"file"===e.kind)).map((e=>{const t=(e=>"function"==typeof e.getAsEntry?e.getAsEntry():"function"==typeof e.webkitGetAsEntry?e.webkitGetAsEntry():null)(e);if(!t)return null;if(bq(t)&&n)return xq(t.createReader(),`${t.name}`);if(vq(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?kq(t,""):null)}return vq(t)?new Promise((e=>{t.file((t=>{e(kq(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:Oq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...aq.trigger.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.trigger)??`file:${e.id}:trigger`),disabled:l||c,"data-disabled":lq(l),"data-readonly":lq(c),"data-invalid":lq(a("invalid")),type:"button",onClick(e){l||c||(pq((e=>e.getById(Mq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:Fq(i),tabIndex:-1,disabled:l||c,type:"file",required:a("required"),capture:a("capture"),name:a("name"),accept:o("acceptAttr"),webkitdirectory:a("directory")?"":void 0,multiple:o("multiple")||a("maxFiles")>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=""},onInput(e){if(l||c)return;const{files:t}=e.currentTarget;r({type:"FILE.SELECT",files:t?Array.from(t):[]})},style:yq}),getItemGroupProps(e={}){const{type:n=$q}=e;return t.element({...aq.itemGroup.attrs,dir:a("dir"),"data-disabled":lq(l),"data-type":n})},getItemProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.item.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.itemName.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.itemName)?void 0:u.call(c,s))??`file:${o.id}:item-name:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.itemSizeText)?void 0:u.call(c,s))??`file:${o.id}:item-size:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=$q}=e;return t.element({...aq.itemPreview.attrs,dir:a("dir"),id:(o=i,s=zq(n),(null==(u=null==(c=o.ids)?void 0:c.itemPreview)?void 0:u.call(c,s))??`file:${o.id}:item-preview:${s}`),"data-disabled":lq(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=$q}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...aq.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":lq(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=$q}=e;return t.button({...aq.itemDeleteTrigger.attrs,dir:a("dir"),id:jq(i,zq(o)),type:"button",disabled:l||c,"data-disabled":lq(l),"data-readonly":lq(c),"data-type":s,"aria-label":null==(n=p.deleteFile)?void 0:n.call(p,o),onClick(){l||c||r({type:"FILE.DELETE",file:o,itemType:s})}})},getLabelProps(){return t.label({...aq.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:Fq(i),"data-disabled":lq(l),"data-required":lq(u)});var e,n},getClearTriggerProps:()=>t.button({...aq.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":lq(l),"data-readonly":lq(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var qq=new WeakMap,Wq=new WeakMap;function Yq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Lq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){!function(e,t){if(null==e)throw new Error(t())}(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||Lq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=(l=t,(s=e)?`${s}.${l}`:l);r(a,n)}var s,l}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}var Zq,Kq=(Zq={props:({props:e})=>({minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:n})=>({acceptedFiles:t((()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>Eq(e,t[n]))),hash:e=>e.map((e=>`${e.name}-${e.size}`)).join(","),onChange(t){var r,a;const o=n();null==(r=e("onFileAccept"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:t,rejectedFiles:o.get("rejectedFiles")})}}))),rejectedFiles:t((()=>({defaultValue:[],isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>Eq(e.file,t[n].file))),onChange(t){var r,a;const o=n();null==(r=e("onFileReject"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:t})}}))),transforming:t((()=>({defaultValue:!1})))}),computed:{acceptAttr:({prop:e})=>function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(wq).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(wq).join(",")}(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],(()=>{n(["syncInputElement"])}))},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop"))return;if(!e("allowDrop"))return;if(e("disabled"))return;const n=t.getDoc();return((...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))})(mq(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),mq(n,"drop",(e=>{var n;pq((n=t).getById(Dq(n)),hq(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=Bq(e);if(!n)return;!function(e,t){const n=fq(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach((e=>{r.items.add(e)})),e.files=r.files}}catch{}}(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))}))},openFilePicker({scope:e}){!function(e){const t=gq.create();t.request(e),t.cleanup}((()=>{var t;null==(t=Bq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=Uq(e,r.files);n.set("acceptedFiles",t("multiple")?a:a.length>0?[a[0]]:[]),n.set("rejectedFiles",o)},setEventFiles(e){const{computed:t,context:n,event:r,prop:a}=e,o=n.get("acceptedFiles"),i=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=Uq(e,r.files,o,i),c=e=>t("multiple")?(n.set("acceptedFiles",(t=>[...t,...e])),void n.set("rejectedFiles",l)):e.length?(n.set("acceptedFiles",[e[0]]),void n.set("rejectedFiles",l)):void(l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))),u=a("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch((e=>{!function(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}(`[zag-js/file-upload] error transforming files\n${e}`)})).finally((()=>{n.set("transforming",!1)}))):c(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){const n=e.get("rejectedFiles").filter((e=>!Eq(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!Eq(e,t.file)));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}},function(e){const t=qq.get(e);if(t)return t;const{index:n,idIndex:r}=Yq(e);qq.set(e,n),Wq.set(e,r)}(Zq),Zq);var Xq=(e,...t)=>e.filter((e=>!t.includes(e))),Qq=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Xq(e,t):((e,...t)=>e.concat(t))(e,t),Jq=e=>"Array"===(null==e?void 0:e.constructor.name),eW=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof(null==e?void 0:e.isEqual)&&"function"==typeof(null==t?void 0:t.isEqual))return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Jq(e)&&Jq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!eW(e[n],t[n]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let a=0;a<r;a++){if(!Reflect.has(e,n[a]))return!1}for(let a=0;a<r;a++){const r=n[a];if(!eW(e[r],t[r]))return!1}return!0},tW=e=>null!=e&&"object"==typeof e,nW=e=>tW(e)&&!(e=>Array.isArray(e))(e),rW=e=>"function"==typeof e,aW=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),oW=Function.prototype.toString,iW=oW.call(Object),sW=e=>{if(!tW(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||lW(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=aW(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&oW.call(n)==iW},lW=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e),cW=e=>e(),uW=()=>{},dW=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function pW(e,t,...n){var r;if(e in t){const r=t[e];return rW(r)?r(...n):r}const a=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw null==(r=Error.captureStackTrace)||r.call(Error,a,pW),a}function fW(e){if(!sW(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const r of t){const t=e[r];void 0!==t&&(n[r]=fW(t))}return n}function hW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function mW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function gW(e,t){if(null==e)throw new Error(t())}var yW=".",bW=new WeakMap,vW=new WeakMap;function kW(e){return e.join(yW)}function xW(e){return e.startsWith("#")}function wW(e,t){return e?`${e}${yW}${t}`:t}function EW(e){const t=bW.get(e);if(t)return t;const{index:n,idIndex:r}=function(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&mW(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){gW(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||mW(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=wW(e,t);r(a,n)}}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}(e);return bW.set(e,n),vW.set(e,r),n}function _W(e){return e?String(e).split(yW).filter(Boolean):[]}function SW(e,t){if(!t)return[];const n=EW(e),r=_W(t),a=[],o=[];for(const i of r){o.push(i);const e=kW(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function TW(e,t){const n=EW(e),r=_W(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=kW(a);if(!n.has(e))return t}let o=kW(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${yW}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function CW(e,t){return EW(e).has(t)}function AW(e,t,n){const r=String(t);if(xW(r)){const t=function(e){return xW(e)?e.slice(1):e}(r),n=function(e,t){var n;return EW(e),null==(n=vW.get(e))?void 0:n.get(t)}(e,t);return gW(n,(()=>`[zag-js] Unknown state id: "${t}"`)),TW(e,n)}if(function(e){return e.startsWith(yW)}(r)&&n){return TW(e,wW(n,r.slice(1)))}if(!function(e){return e.includes(yW)}(r)&&n){const t=_W(n);for(let n=t.length-1;n>=1;n--){const a=wW(t.slice(0,n).join(yW),r);if(CW(e,a))return TW(e,a)}if(CW(e,r))return TW(e,r)}return TW(e,r)}function IW(e){return EW(e),e}var NW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(NW||{}),OW="__init__",RW=Object.defineProperty,PW=(e,t,n)=>((e,t,n)=>t in e?RW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function LW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var DW=()=>{},MW=e=>"object"==typeof e&&null!==e,FW=e=>e?"":void 0,jW=e=>e?"true":void 0,zW=e=>MW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,BW=e=>MW(e)&&9===e.nodeType,HW=e=>zW(e)?e.localName||"":"#document";var UW=e=>MW(e)&&void 0!==e.nodeType,$W=e=>UW(e)&&11===e.nodeType&&"host"in e,VW=e=>zW(e)&&"input"===e.localName;function GW(e){if(!e)return!1;return KW(e.getRootNode())===e}var qW=/(textarea|select)/;function WW(e,t){var n;if(!e||!t)return!1;if(!zW(e)||!UW(t))return!1;if(zW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&$W(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function YW(e){return BW(e)?e:(e=>MW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function ZW(e){var t;return $W(e)?ZW(e.host):BW(e)?e.defaultView??window:zW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function KW(e){let t=e.activeElement;for(;null==t?void 0:t.shadowRoot;){const e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function XW(e){if("html"===HW(e))return e;const t=e.assignedSlot||e.parentNode||$W(e)&&e.host||YW(e).documentElement;return $W(t)?t.host:t}function QW(e){let t;try{if(t=e.getRootNode({composed:!0}),BW(t)||$W(t))return t}catch{}return e.ownerDocument??document}var JW=new WeakMap;function eY(e){return JW.has(e)||JW.set(e,ZW(e).getComputedStyle(e)),JW.get(e)}var tY=new Set(["menu","listbox","dialog","grid","tree","region"]),nY=e=>tY.has(e),rY=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function aY(e,t){const n=new Set,r=QW(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=rY(i);for(const o of e){if(!o||n.has(o))continue;n.add(o);const e=r.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");if(n&&nY(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function oY(e){const t=new Set;return function(e,t){const n=QW(e),r=new Set,a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=rY(i);for(const o of e){if(!o||r.has(o))continue;r.add(o);const e=n.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");n&&tY.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function iY(e){if(!e.id)return!1;const t=QW(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`,a=t.querySelector(r);return Boolean(a&&function(e){const t=e.getAttribute("role");return Boolean(t&&tY.has(t))}(e))}var sY=()=>"undefined"!=typeof document;var lY=e=>sY()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),cY=e=>sY()&&e.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((({brand:e,version:t})=>`${e}/${t}`)).join(" "):navigator.userAgent}()),uY=()=>sY()&&!!navigator.maxTouchPoints,dY=()=>lY(/^iPhone/i)||lY(/^iPad/i)||pY()&&navigator.maxTouchPoints>1,pY=()=>lY(/^Mac/i);function fY(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}function hY(e){const t=e.currentTarget;if(!t)return!1;if(!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=1===e.button,r=(a=e,pY()?a.metaKey:a.ctrlKey);var a;return n||r}function mY(e){return!(""!==e.pointerType||!e.isTrusted)||(cY(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var gY=e=>0===e.button,yY=e=>2===e.button||pY()&&e.ctrlKey&&0===e.button,bY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},vY={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function kY(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=bY[a]??a;return"rtl"===n&&"horizontal"===r&&a in vY&&(a=vY[a]),a}var xY=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},wY=e=>zW(e)&&"IFRAME"===e.tagName,EY=/^(audio|video|details)$/;function _Y(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function SY(e){if(!function(e){return VW(e)&&"radio"===e.type}(e)||!e.name)return!0;if(e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter((t=>t.form===e.form&&NY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function TY(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;const n=t(e);return(!0===n?e.shadowRoot:n)||null}function CY(e,t,n){const r=[...e],a=[...e],o=new Set,i=new Map;e.forEach(((e,t)=>i.set(e,t)));let s=0;for(;s<a.length;){const e=a[s++];if(!e||o.has(e))continue;o.add(e);const l=TY(e,t);if(l){const t=Array.from(l.querySelectorAll(AY)).filter(n),o=i.get(e);if(void 0!==o){const e=o+1;r.splice(e,0,...t),t.forEach(((t,n)=>{i.set(t,e+n)}));for(let n=e+t.length;n<r.length;n++)i.set(r[n],n)}else{const e=r.length;r.push(...t),t.forEach(((t,n)=>{i.set(t,e+n)}))}a.push(...t)}}return r}var AY="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",IY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(AY));(1==n||"if-empty"==n&&0===a.length)&&zW(e)&&NY(e)&&a.unshift(e);const o=[];for(const i of a)if(NY(i))if(wY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...IY(e,{getShadowRoot:r}))}else o.push(i);return r?CY(o,r,NY):o};function NY(e){return!(!zW(e)||e.closest("[inert]"))&&(e.matches(AY)&&(!!zW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function OY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(AY));n&&RY(e)&&a.unshift(e);const o=[];for(const i of a)if(RY(i))if(wY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...OY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=CY(o,r,RY);return!e.length&&n?a:e}return!o.length&&n?a:o}function RY(e){return!!(zW(e)&&e.tabIndex>0)||!(!NY(e)||(e=>_Y(e)<0)(e))&&SY(e)}function PY(e){return e.tabIndex<0&&(EY.test(e.localName)||function(e){if(null==e||!zW(e))return!1;try{return VW(e)&&null!=e.selectionStart||qW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(_Y(t)))?0:e.tabIndex;var t}var LY=class e{constructor(){PW(this,"id",null),PW(this,"fn_cleanup"),PW(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function DY(e){const t=LY.create();return t.request(e),t.cleanup}function MY(e){const t=new Set;function n(e){const n=globalThis.requestAnimationFrame(e);t.add((()=>globalThis.cancelAnimationFrame(n)))}return n((()=>n(e))),function(){t.forEach((e=>e()))}}function FY(e,t){const{defer:n}=t,r=n?DY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(function(e,t){if(!e)return;const{attributes:n,callback:r}=t,a=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&r(t)}));return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function jY(e){const t=()=>{const t=ZW(e);e.dispatchEvent(new t.MouseEvent("click"))};cY(/Firefox/i)?function(e,t,n){const r=DY((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function zY(e){const t=XW(e);return["html","body","#document"].includes(HW(t))?YW(t).body:zW(t)&&UY(t)?t:zY(t)}var BY=/auto|scroll|overlay|hidden|clip/,HY=new Set(["inline","contents"]);function UY(e){const t=ZW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return BY.test(n+a+r)&&!HY.has(o)}function $Y(e,t){const{rootEl:n,...r}=t||{};e&&n&&UY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function VY(e,t){if(!e)return DW;const n=Object.keys(t).reduce(((t,n)=>(t[n]=e.style.getPropertyValue(n),t)),{});return r=n,a=t,Object.keys(r).every((e=>r[e]===a[e]))?DW:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function GY(e,t){const{timeout:n,rootNode:r}=t,a=ZW(r),o=YW(r),i=new a.AbortController;return function(e,t,n){const{signal:r}=t;return[new Promise(((t,a)=>{const o=setTimeout((()=>{a(new Error(`Timeout of ${n}ms exceeded`))}),n);r.addEventListener("abort",(()=>{clearTimeout(o),a(new DOMException("Promise aborted","AbortError"))})),e.then((e=>{r.aborted||(clearTimeout(o),t(e))})).catch((e=>{r.aborted||(clearTimeout(o),a(e))}))})),()=>t.abort()]}(new Promise((t=>{const n=e();if(n)return void t(n);const r=new a.MutationObserver((()=>{const n=e();n&&n.isConnected&&(r.disconnect(),t(n))}));r.observe(o.body,{childList:!0,subtree:!0})})),i,n)}var qY=void 0!==globalThis.document?X.useLayoutEffect:X.useEffect;function WY(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=X.useState(t),[a,o]=X.useState(r),i=void 0!==e().value,s=X.useRef(a);s.current=i?e().value:a;const l=X.useRef(s.current);qY((()=>{l.current=s.current}),[a,e().value]);return{initial:r,ref:s,get:function(){return i?e().value:a},set(t){(e().sync?ue.flushSync:cW)((()=>(t=>{var r,a;const s=l.current,c=rW(t)?t(s):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:s}),i||o(c),n(c,s)||null==(a=(r=e()).onChange)||a.call(r,c,s)})(t)))},invoke(t,n){var r,a;null==(a=(r=e()).onChange)||a.call(r,t,n)},hash(t){var n,r;return(null==(r=(n=e()).hash)?void 0:r.call(n,t))??String(t)}}}WY.cleanup=e=>{X.useEffect((()=>e),[])},WY.ref=e=>{const t=X.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var YY=(e,t)=>{const n=X.useRef(!1),r=X.useRef(!1);X.useEffect((()=>{if(n.current&&r.current)return t();r.current=!0}),[...(e??[]).map((e=>"function"==typeof e?e():e))]),X.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])};function ZY(e,t={}){var n,r,a,o;const i=X.useMemo((()=>{const{id:e,ids:n,getRootNode:r}=t;return function(e){const t=()=>{var t;return(null==(t=e.getRootNode)?void 0:t.call(e))??document},n=()=>YW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>KW(t()),isActiveElement:GW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=KY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:fW(t),scope:i}))??t),c=KY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:WY,scope:i,flush:XY,getContext:()=>u,getComputed:()=>E,getRefs:()=>y,getEvent:()=>m()})),u={get(e){var t;return null==(t=c.current)?void 0:t[e].ref.current},set(e,t){var n;null==(n=c.current)||n[e].set(t)},initial(e){var t;return null==(t=c.current)?void 0:t[e].initial},hash(e){var t,n;const r=null==(t=c.current)?void 0:t[e].get();return null==(n=c.current)?void 0:n[e].hash(r)}},d=X.useRef(new Map),p=X.useRef(null),f=X.useRef(null),h=X.useRef({type:""}),m=()=>({...h.current,current:()=>h.current,previous:()=>f.current}),g=()=>({..._,matches:(...e)=>e.some((e=>function(e,t){return!!e&&(e===t||e.startsWith(`${t}${yW}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return SW(e,t).some((e=>{var t;return null==(t=e.state.tags)?void 0:t.includes(n)}))}(e,_.ref.current,t)}),y=function(e){const t=X.useRef(e);return{get:e=>t.current[e],set(e,n){t.current[e]=n}}}((null==(a=e.refs)?void 0:a.call(e,{prop:l,context:u}))??{}),b=()=>({state:g(),context:u,event:m(),prop:l,send:A,action:v,guard:k,track:YY,refs:y,computed:E,flush:XY,scope:i,choose:w}),v=t=>{const n=rW(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.actions)?void 0:r[t];return a||hW(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),a}));for(const e of r)null==e||e(b())},k=t=>{var n,r;return rW(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=rW(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.effects)?void 0:r[t];return a||hW(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),a})),a=[];for(const e of r){const t=null==e?void 0:e(b());t&&a.push(t)}return()=>a.forEach((e=>null==e?void 0:e()))},w=e=>{return(t=e,null==t?[]:Array.isArray(t)?t:[t]).find((e=>{let t=!e.guard;return(e=>"string"==typeof e)(e.guard)?t=!!k(e.guard):rW(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{gW(e.computed,(()=>"[zag-js] No computed object found on machine"));return(0,e.computed[t])({context:u,event:m(),prop:l,refs:y,scope:i,computed:E})},_=WY((()=>({defaultValue:AW(e,e.initialState({prop:l})),onChange(t,n){var r,a;const{exiting:o,entering:i}=function(e,t,n,r){var a,o,i,s;const l=t?SW(e,t):[],c=SW(e,n);let u=0;for(;u<l.length&&u<c.length&&(null==(a=l[u])?void 0:a.path)===(null==(o=c[u])?void 0:o.path);)u+=1;let d=l.slice(u).reverse(),p=c.slice(u);const f=(null==(i=l.at(-1))?void 0:i.path)===(null==(s=c.at(-1))?void 0:s.path);return r&&f&&(d=l.slice().reverse(),p=c),{exiting:d,entering:p}}(e,n,t,null==(r=p.current)?void 0:r.reenter);if(o.forEach((e=>{const t=d.current.get(e.path);null==t||t(),d.current.delete(e.path)})),o.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.exit)})),v(null==(a=p.current)?void 0:a.actions),i.forEach((e=>{var t;const n=x(null==(t=e.state)?void 0:t.effects);n&&d.current.set(e.path,n)})),n===OW){v(e.entry);const t=x(e.effects);t&&d.current.set(OW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=X.useRef(void 0),T=X.useRef(NW.NotStarted);qY((()=>{queueMicrotask((()=>{const e=T.current===NW.Started;T.current=NW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():OW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=NW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=NW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==NW.Started)return;f.current=h.current,h.current=t;let n=C();const{transitions:r,source:a}=function(e,t,n){var r,a;const o=SW(e,t);for(let s=o.length-1;s>=0;s--){const e=null==(r=o[s])?void 0:r.state.on,t=null==e?void 0:e[n];if(t)return{transitions:t,source:null==(a=o[s])?void 0:a.path}}const i=e.on;return{transitions:null==i?void 0:i[n],source:void 0}}(e,n,t.type),o=w(r);if(!o)return;p.current=o;const i=AW(e,o.target??n,a);s("transition",t.type,o.target||n,`(${o.actions})`);i!==n?ue.flushSync((()=>_.set(i))):o.reenter?_.invoke(n,n):v(o.actions??[])}))};return null==(o=e.watch)||o.call(e,b()),{state:g(),send:A,context:u,prop:l,scope:i,refs:y,computed:E,event:m(),getStatus:()=>T.current}}function KY(e){const t=X.useRef(e);return t.current=e,t}function XY(e){queueMicrotask((()=>{ue.flushSync((()=>e()))}))}var QY,JY=(QY=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>QY({style:e}).style:QY}));const eZ=X.createContext(null);function tZ({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=X.useId(),u=qO(),d=Gq(ZY(Kq,{id:c,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,getRootNode:()=>{var e;return(null==(e=null==u?void 0:u.shadowHost)?void 0:e.shadowRoot)??document},onFileAccept:i,onFileChange:s,onFileReject:l}),JY);return og.jsx(eZ.Provider,{value:d,children:e})}function nZ(){const e=X.useContext(eZ);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function rZ(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const aZ={"application/pdf":"filePdf","text/plain":"fileText","text/markdown":"fileMarkdown","text/html":"fileHtml","text/csv":"fileCsv","text/x-log":"fileLog","application/json":"fileJson","text/x-sql":"fileSql","application/x-sql":"fileSql","text/x-script.python":"filePy","text/x-python":"filePy","text/x-python-script":"filePy"};function oZ(e){return e.startsWith("image/")}const iZ={"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/webp":[".webp"],"application/pdf":[".pdf"],"text/plain":[".txt",".text",".bat",".cfg",".conf",".def",".dic",".in",".list"],"text/x-log":[".log"],"text/markdown":[".md",".markdown"],"text/html":[".html",".htm"],"text/csv":[".csv"],"text/xml":[".xml"],"text/css":[".css"],"application/json":[".json"],"application/yaml":[".yaml",".yml"],"application/x-yaml":[".yaml",".yml"],"text/x-yaml":[".yaml",".yml"],"application/toml":[".toml"],"application/x-toml":[".toml"],"application/graphql":[".graphql",".gql"],"application/x-graphql":[".graphql",".gql"],"text/x-graphql":[".graphql",".gql"],"application/x-ndjson":[".ndjson"],"application/json5":[".json5"],"application/x-json5":[".json5"],"application/javascript":[".js",".mjs"],"text/javascript":[".js",".mjs"],"application/typescript":[".ts"],"text/x-typescript":[".ts"],"text/jsx":[".jsx"],"text/tsx":[".tsx"],"text/x-sh":[".sh"],"text/x-bash":[".bash"],"application/x-bash":[".bash"],"text/x-zsh":[".zsh"],"text/x-shellscript":[".sh",".ksh"],"application/x-powershell":[".ps1"],"text/vbscript":[".vbs"],"text/x-awk":[".awk"],"application/x-awk":[".awk"],"text/x-c":[".c",".h"],"text/x-c++":[".cpp",".cc",".cxx",".hh"],"text/x-csharp":[".cs"],"text/x-objectivec":[".m"],"text/x-objectivec++":[".mm"],"text/x-java":[".java"],"text/x-scala":[".scala"],"application/x-scala":[".scala"],"text/x-kotlin":[".kt"],"text/x-groovy":[".groovy"],"text/x-clojure":[".clj"],"text/x-go":[".go"],"text/x-golang":[".go"],"text/x-rust":[".rs"],"application/x-rust":[".rs"],"text/x-swift":[".swift"],"text/x-dart":[".dart"],"text/x-python":[".py"],"text/x-script.python":[".py"],"text/x-python-script":[".py"],"text/x-ruby":[".rb"],"text/x-perl":[".pl"],"text/x-lua":[".lua"],"text/x-r":[".r"],"text/x-R":[".r"],"text/x-julia":[".jl"],"text/x-elixir":[".ex"],"text/x-erlang":[".erl"],"text/x-haskell":[".hs"],"text/x-lisp":[".lisp"],"text/x-php":[".php"],"application/x-php":[".php"],"application/x-httpd-php":[".php"],"application/x-httpd-php-source":[".php"],"text/x-tex":[".tex"],"text/x-rst":[".rst"],"text/x-handlebars":[".hbs"],"text/x-mustache":[".mustache"],"text/x-ejs":[".ejs"],"text/x-jinja2":[".jinja",".jinja2"],"text/x-liquid":[".liquid"],"text/x-erb":[".erb"],"text/x-twig":[".twig"],"text/x-pug":[".pug"],"text/x-jade":[".jade"],"text/x-tmpl":[".tmpl"],"text/x-astro":[".astro"],"text/x-sass":[".sass"],"text/x-scss":[".scss"],"text/x-less":[".less"],"text/x-sql":[".sql"],"application/x-sql":[".sql"],"text/x-makefile":[".makefile",".mk"],"text/x-cmake":[".cmake"],"text/x-dockerfile":[".dockerfile"],"text/x-gradle":[".gradle"],"text/x-ini":[".ini"],"text/x-properties":[".properties"],"text/x-protobuf":[".proto"],"application/x-protobuf":[".proto"],"text/x-hcl":[".hcl"],"text/x-terraform":[".tf"],"application/x-terraform":[".tf"],"text/x-diff":[".diff"],"text/x-patch":[".patch"],"application/x-patch":[".patch"],"text/x-asm":[".asm",".s"],"message/rfc822":[".eml",".mht",".mhtml",".mime",".nws"],"text/srt":[".srt"],"application/x-subrip":[".srt"],"text/x-subrip":[".srt"],"text/vtt":[".vtt"],"text/x-vcard":[".vcf"],"text/calendar":[".ics",".ifb"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.oasis.opendocument.text":[".odt"],"application/vnd.oasis.opendocument.spreadsheet":[".ods"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/vnd.apple.pages":[".pages"],"application/vnd.apple.numbers":[".numbers"],"application/vnd.apple.keynote":[".key"],"application/x-iwork-pages-sffpages":[".pages"],"application/x-iwork-numbers-sffnumbers":[".numbers"],"application/x-iwork-keynote-sffkey":[".key"]},sZ=new Set(Object.keys(iZ)),lZ=10485760,cZ=Object.entries(iZ).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function uZ(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=cZ[n];return r?new File([e],e.name,{type:r}):e}const dZ=NV("div",{_id:"aiChatMessage__Files"}),pZ=({children:e,...t})=>{const{message:n}=eq();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return sZ.has(t??"")}));return r.length?og.jsx(dZ,{...t,children:e(r)}):null},fZ=NV("button",{_id:"aiChatMessage__File"}),hZ=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=XG(),[i,s]=X.useState(!0),l=X.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return og.jsx(MZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:og.jsx(fZ,{type:"button","aria-label":oZ(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":mV(i),onClick:rZ(r,(()=>{if(oZ(n??""))o({url:e,name:t??"file"});else if(e)if(e.startsWith("data:")){const n=document.createElement("a");n.href=e,n.download=t??"file",n.click()}else window.open(e,"_blank","noopener,noreferrer")})),...a})})},mZ=NV("div",{_id:"aiChatInput__Fieldset"}),gZ=e=>{const t=nZ();return og.jsx(mZ,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":mV(t.dragging),...e})},yZ=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=TJ();return og.jsx(tZ,{accept:iZ,maxFiles:10,maxFileSize:lZ,preventDocumentDrop:!0,acceptedFiles:t,onFileAccept:e=>n(e.files),onFileReject:e=>{const t=function(e){var t;if(!e.length)return null;const n=t=>e.some((e=>e.errors.includes(t)));if(n("TOO_MANY_FILES"))return{title:"Attachment limit reached",message:"You can only attach up to 10 files per message."};if(n("FILE_INVALID_TYPE"))return{title:"Unsupported file type",message:"Supported formats include images, PDFs, text, code, and document files."};if(n("FILE_TOO_LARGE"))return{title:"File too large",message:"Files must be smaller than 10MB."};if(n("FILE_EXISTS"))return{title:"File already exists",message:`The file "${(null==(t=e.find((e=>e.errors.includes("FILE_EXISTS"))))?void 0:t.file.name)??"file"}" is already attached to this message.`};return{title:"File rejected",message:"This file could not be added."}}(e.files);t&&r(t)},children:og.jsx(gZ,{...e})})},bZ=NV("div",{_id:"aiChatInput__DropZone"}),vZ=NV("div",{_id:"aiChatInput__Notification"}),kZ=e=>{const{inputNotification:t}=TJ();return t?og.jsx(vZ,{role:"alert",...e}):null},xZ=NV("p",{_id:"aiChatInput__NotificationTitle"}),wZ=({children:e,...t})=>{const{inputNotification:n}=TJ();return(null==n?void 0:n.title)?og.jsxs(xZ,{...t,children:[e,n.title]}):null},EZ=NV("p",{_id:"aiChatInput__NotificationMessage"}),_Z=e=>{const{inputNotification:t}=TJ();return og.jsx(EZ,{...e,children:null==t?void 0:t.message})},SZ=NV("button",{_id:"aiChatInput__NotificationClose"}),TZ=({onClick:e,...t})=>{const{clearInputNotification:n}=TJ();return og.jsx(SZ,{type:"button","aria-label":"Dismiss",onClick:rZ(e,n),...t})},CZ=NV("div",{_id:"aiChatInput__NotificationContent"}),AZ=NV("div",{_id:"aiChatInput__NotificationHeader"}),IZ=NV(YG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),NZ=NV("button",{_id:"aiChatInput__FileUploadButton"}),OZ=e=>{const{aiChatSettings:t}=oR(),n=nZ(),{onClick:r,...a}=e;return og.jsx(NZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:rZ(r,(()=>n.openFilePicker())),...a})},RZ=NV("input",{_id:"aiChatInput__FileInput"}),PZ=e=>{const t=nZ();return og.jsx(RZ,{...e,...t.getHiddenInputProps()})},LZ=NV("div",{_id:"aiChatInput__FileList"}),DZ=({children:e,...t})=>{const n=nZ().acceptedFiles;return n.length?og.jsx(LZ,{...t,children:e(n)}):null},MZ=Q.createContext(null);function FZ(){const e=Q.useContext(MZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const jZ=NV("div",{_id:"aiChatInput__FileItem"}),zZ=({file:e,...t})=>{const n=nZ(),[r,a]=X.useState(void 0),[o,i]=X.useState(!0);X.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return og.jsx(MZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:og.jsx(jZ,{"data-loading":mV(o),...t})})},BZ=NV("button",{_id:"aiChatInput__FilePreviewTrigger"}),HZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=FZ(),{openImagePreview:a}=XG();return og.jsx(BZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:rZ(e,(()=>{n&&a({url:n,name:r.name})})),...t})},UZ=NV("span",{_id:"aiChatInput__FileContent"}),$Z=e=>og.jsx(UZ,{...e}),VZ=NV("img",{_id:"aiChatInput__FileThumbnail"}),GZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=FZ();return og.jsx(VZ,{src:n,alt:r.name,onLoad:rZ(e,(()=>a(!1))),...t})},qZ=({className:e})=>{const{file:t}=FZ(),n=aZ[uZ(t).type]??"file";return og.jsx(YG,{iconKey:n,className:e})},WZ=NV("span",{_id:"aiChatInput__FileName"}),YZ=e=>{const{file:t}=FZ();return og.jsx(WZ,{...e,children:t.name})},ZZ=NV("button",{_id:"aiChatInput__FileRemove"}),KZ=NV(YG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),XZ=({onClick:e,...t})=>{const{onRemove:n}=FZ();return og.jsx(ZZ,{type:"button","aria-label":"Remove file",onClick:rZ(e,n),...t})},QZ=e=>{const[t,n]=X.useState(!1);return X.useEffect((()=>{const t=window.matchMedia(e);n(t.matches);const r=e=>n(e.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}),[e]),t},JZ=()=>{};function eK(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const tK=new Map;function nK(e="id"){const t=(tK.get(e)||0)+1;return tK.set(e,t),`${e}${t}`}function rK(e){const t=Number(e.code)||Number(e.statusCode);if(t&&!Number.isNaN(t))return t;try{const t=Number(JSON.parse(e.message??"").status);return t&&!Number.isNaN(t)?t:null}catch{return null}}const aK="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",oK="Please try again.",iK=()=>{const{baseSettings:e,aiChatSettings:t}=oR(),[n="",r]=fR({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),{logEvent:a}=lR(),{setConversationId:o,emitToParent:i}=function(){const e=qO(),t=null==e?void 0:e.shadowHost,n=X.useRef("");return{setConversationId:X.useCallback((e=>{n.current=e}),[]),emitToParent:X.useCallback(((e,r)=>{if(!t)return void console.warn("useStreamingEvents: No host element available for parent event emission");const a=new CustomEvent(`ikp-${e}`,{detail:{...r,conversationId:n.current,timestamp:Date.now()},bubbles:!0,composed:!0});t.dispatchEvent(a)}),[t])}}(),s=X.useRef(n);X.useEffect((()=>{const e=s.current;s.current=n,e!==n&&a({eventName:"chat_conversation_changed",properties:{conversationId:n,previousConversationId:e}})}),[n,a]);const[l,c]=X.useState(""),{shouldBypassCaptcha:u,filters:d,userProperties:p,analyticsProperties:f}=e,{authToken:h,isAuthenticated:m,isAuthConfigured:g,refreshAuthToken:y,sessionToken:b,refreshSession:v,getCaptchaHeader:k,invalidateCaptcha:x,effectiveAuthToken:w,applicableRefreshSession:E}=FR(),{onInputMessageChange:_,filters:S,baseUrl:T,agentUrl:C,context:A,headers:I,appId:N,apiKey:O,files:R}=t,P=X.useRef(k);P.current=k;const L=C||`${T}/run/api/chat`,{loadConversation:D}=(({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o})=>{const{fetchWithAuth:i}=NR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??JZ,refreshSession:o});return{loadConversation:X.useCallback((async(t,r)=>{var a;if(!e||!n)return null;try{const n=`${e}/run/v1/conversations/${t}`,o=await i(n,{signal:r});if(!o.ok)throw new Error(`Failed to load conversation: ${o.status}`);return(null==(a=(await o.json()).data)?void 0:a.messages)??[]}catch($Ie){return $Ie instanceof Error&&"AbortError"===$Ie.name||console.error("[useConversationLoader]",$Ie),null}}),[e,n,i])}})({baseUrl:T,appId:N,authToken:w,getCaptchaHeader:k,invalidateCaptcha:x,refreshSession:E}),[M,F]=X.useState(!1),j=X.useRef(null);j.current=b;const z=X.useRef(null);z.current=h;const B=X.useRef(void 0);B.current=p&&Object.keys(p).length>0?p:void 0;const H=X.useRef(void 0);H.current=f&&Object.keys(f).length>0?f:void 0;const U=X.useRef(0),$=X.useRef(null),V=X.useRef(null),G=X.useRef(void 0),q=(null==R?void 0:R.map((e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`)).join("\n"))??"";X.useEffect((()=>{G.current=(null==R?void 0:R.length)?R:void 0}),[q]);const W=X.useRef(I);W.current=I;const Y=X.useRef(void 0);Y.current=d||S?JSON.stringify({...d,...S}):void 0;const[Z,K]=X.useState([]),Q=X.useMemo((()=>new n$({api:L,headers:()=>{const e=O??z.current??j.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":(new Date).toISOString(),"x-inkeep-invocation-type":"chat_widget",...N?{"x-inkeep-app-id":N}:{},...e?{Authorization:`Bearer ${e}`}:{},...Y.current?{"inkeep-filters":Y.current}:{},...W.current}},prepareSendMessagesRequest:async e=>{const t=await P.current(),n=e.messages[e.messages.length-1];return n||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:n?[n]:[],trigger:e.trigger,messageId:e.messageId,...B.current?{userProperties:B.current}:{},...H.current?{properties:H.current}:{}},headers:{...e.headers,...t}}},body:{requestContext:A}})),[L,A,N,O]),{messages:J,sendMessage:ee,addToolApprovalResponse:te,status:ne,setMessages:re,stop:ae,error:oe}=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=X.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const a={...n,onToolCall:e=>{var t,n;return null==(n=(t=r.current).onToolCall)?void 0:n.call(t,e)},onData:e=>{var t,n;return null==(n=(t=r.current).onData)?void 0:n.call(t,e)},onFinish:e=>{var t,n;return null==(n=(t=r.current).onFinish)?void 0:n.call(t,e)},onError:e=>{var t,n;return null==(n=(t=r.current).onError)?void 0:n.call(t,e)},sendAutomaticallyWhen:e=>{var t,n,a;return null!=(a=null==(n=(t=r.current).sendAutomaticallyWhen)?void 0:n.call(t,e))&&a}},o=X.useRef("chat"in n?n.chat:new O$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new O$(a));const i=X.useCallback((t=>o.current["~registerMessagesCallback"](t,e)),[e,o.current.id]),s=X.useSyncExternalStore(i,(()=>o.current.messages),(()=>o.current.messages)),l=X.useSyncExternalStore(o.current["~registerStatusCallback"],(()=>o.current.status),(()=>o.current.status)),c=X.useSyncExternalStore(o.current["~registerErrorCallback"],(()=>o.current.error),(()=>o.current.error)),u=X.useCallback((e=>{"function"==typeof e&&(e=e(o.current.messages)),o.current.messages=e}),[o]);return X.useEffect((()=>{t&&o.current.resumeStream()}),[t,o]),{id:o.current.id,messages:s,setMessages:u,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:l,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}({transport:Q,onData(e){i(e.type,e.data)},async onFinish({message:e}){i("completion",{conversationId:n}),await a({eventName:"assistant_message_received",properties:{conversationId:n,messageId:e.id}}),a({eventName:"assistant_answer_displayed",properties:{conversationId:n,messageId:e.id}})},onError(t){var r,o;console.error("onError",{code:t.code,message:t.message});const i=u||O?null:function(e){const t=rK(e),n=CR(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":null}(t);if(null!==i&&U.current<1){U.current++;const e=V.current,t=$.current;return void(async()=>{if("session"===i&&g){const e=await y();if(!e)throw new Error("Auth token refresh failed");z.current=e}else if("session"===i){const e=await v();e&&(j.current=e)}else x();e?te(e):t&&(re((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r})),ee({id:t.messageId,parts:[...t.content.trim()?[{type:"text",text:t.content}]:[],...t.files??[]]},{body:t.body}))})().catch((()=>{U.current=0,x(),re((e=>{const t=[...e],n=t[t.length-1];if(!n)return t;const r=aK;return"user"===n.role?t.push({id:eK(16),role:"assistant",parts:[{type:"text",text:r}]}):n.parts=[{type:"text",text:r}],t}))}))}U.current=0,null!==i&&x();const s=function(e){const t=rK(e);return 400===t||429===t}(t),l=(t=>{var n,r;switch(rK(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??oK}catch{return(null==(r=t.message)?void 0:r.trim())||oK}case 401:return g?"Authentication failed. Please try again.":aK;case 403:return`There seems to be a configuration error. Please contact ${e.organizationDisplayName??"Administrator"}`;case 429:return"You're sending requests too quickly. Please wait a moment and try again.";default:return aK}})(t);if(a({eventName:"chat_error",properties:{conversationId:n,messageId:null==(r=J.at(-1))?void 0:r.id,error:t.message}}),s){xe({title:"Request failed",message:l},8e3),re((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r}));const e=null==(o=$.current)?void 0:o.content;return e&&c(e),void(ve.current=t)}re((e=>{const t=[...e],n=t[t.length-1];return n&&("user"===n.role?t.push({id:eK(16),role:"assistant",parts:[{type:"text",text:l}]}):n.parts=[{type:"text",text:l}]),t}))}}),ie=X.useRef(m);X.useEffect((()=>{const e=ie.current;ie.current=m,e!==m&&(ae(),be(null),re([]),r(""),c(""),K([]),x())}),[m,ae,re,r,x]);const se="submitted"===ne,le="streaming"===ne,ce=X.useMemo((()=>{var e,t;const n=[...J??[]].reverse().find((e=>"assistant"===e.role));if(!n)return!1;const r=null==(e=n.parts)?void 0:e.at(-1);return!!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.type&&t.type.startsWith("tool-")})(r)&&("output-available"===r.state&&(!!(null==(t=r.approval)?void 0:t.id)&&!le))}),[J,le]),[ue,de]=X.useState(!1),pe=le||ce&&!ue,fe=se||pe,he=0===J.length,me=!l.trim()&&0===Z.length||fe,ge=QZ("(max-width: 768px)"),[ye,be]=X.useState(null),ve=X.useRef(null);X.useEffect((()=>{if(oe){if(ve.current===oe)return void(ve.current=null);be(oe)}}),[oe]);const{inputNotification:ke,showInputNotification:xe,clearInputNotification:we}=function(){const[e,t]=X.useState(null),n=X.useRef(null),r=X.useCallback(((e,r=5e3)=>{n.current&&clearTimeout(n.current),t(e),n.current=setTimeout((()=>t(null)),r)}),[]),a=X.useCallback((()=>{n.current&&clearTimeout(n.current),t(null)}),[]);return X.useEffect((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{inputNotification:e,showInputNotification:r,clearInputNotification:a}}(),Ee=X.useRef(null);X.useEffect((()=>{null==_||_(l)}),[l]);const _e=async(e=l)=>{var t;if(me&&(!e||0===e.trim().length)&&0===Z.length)return;if(!e.trim()&&!Z.length&&!(null==(t=G.current)?void 0:t.length))return;const i=Z;K([]),c(""),U.current=0,V.current=null,de(!1);let s=n;s||(s=`conv_${eK(16)}`,r(s));const u=eK(21);o(s),await a({eventName:"user_message_submitted",properties:{conversationId:s,messageId:u}});const d=G.current;G.current=void 0;let p=[];if(i.length>0)try{p=await Promise.all(i.map((e=>{const t=uZ(e);return new Promise(((e,n)=>{const r=new FileReader;r.onload=()=>{"string"==typeof r.result?e({type:"file",url:r.result,mediaType:t.type,filename:t.name}):n(new Error(`Failed to read file "${t.name}"`))},r.onerror=()=>n(new Error(`Failed to read file "${t.name}"`)),r.readAsDataURL(t)}))})))}catch(m){return void xe({title:"Failed to attach files",message:"Could not read one or more files. Please try again."})}const f=p.length||(null==d?void 0:d.length)?[...p,...d??[]]:void 0,h=[...e.trim()?[{type:"text",text:e}]:[],...f??[]];$.current={content:e,messageId:u,body:{conversationId:s},files:f},ee({id:u,parts:h},{body:{conversationId:s}})},Se=X.useCallback((e=>{U.current=0,V.current=e,de(!1),te(e)}),[te]),Te=X.useCallback((()=>{de(!0),ae().then((()=>{i("aborted",{conversationId:n})}))}),[ae,n,i]),Ce=()=>{be(null),re([]),r(""),x(),G.current=(null==R?void 0:R.length)?R:void 0,a({eventName:"chat_clear_button_clicked",properties:{conversationId:n}})},Ae=X.useCallback(((e,t)=>{be(null),re(t),r(e),x(),G.current=void 0}),[re,r,x]),Ie=X.useCallback((async(e,t)=>{Te(),Ae(e,[]),F(!0);try{const n=await D(e,t);if(null===n)return!1;const r=n[n.length-1],a="user"===(null==r?void 0:r.role)?[...n,{id:eK(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:n;return Ae(e,a),!0}finally{(null==t?void 0:t.aborted)||F(!1)}}),[Ae,D,Te]);(({conversationId:e,effectiveAuthToken:t,loadAndRestoreSession:n,onLoadFailed:r})=>{const a=X.useRef(null),o=X.useRef(n);o.current=n;const i=X.useRef(r);i.current=r,X.useEffect((()=>{if(!e||!t)return;if(a.current===e)return;a.current=e;const n=new AbortController,r=t=>{var n;a.current=null,console.error("[useInitialConversation] failed to load conversation:",e,t),null==(n=i.current)||n.call(i)};return(async()=>{try{await o.current(e,n.signal)||n.signal.aborted||r()}catch($Ie){n.signal.aborted||r($Ie)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:w,loadAndRestoreSession:Ie,onLoadFailed:()=>Ae("",[])});const{openForm:Ne}=pL(),Oe=o0();return X.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:_e,updateInputMessage(e){c(e)},clearChat:Ce,openForm:e=>{null==Oe||Oe.setView("chat"),Ne(e,void 0)},focusInput:()=>{var e;null==(e=Ee.current)||e.focus()}}))),{messages:J,sendMessage:ee,addToolApprovalResponse:Se,isLoading:se,isStreaming:pe,isBusy:fe,error:ye,setError:be,isSubmitDisabled:me,input:l,handleInputChange:e=>c(e.target.value),handleInputKeyDown:e=>{"Enter"!==e.key||e.shiftKey||me||e.nativeEvent.isComposing||(e.preventDefault(),_e())},handleSubmit:_e,stop:Te,clear:Ce,inputRef:Ee,isMobile:ge,files:Z,setFiles:K,isNewChat:he,conversationId:n,restoreSession:Ae,loadAndRestoreSession:Ie,isSessionLoading:M,authToken:m?h:b,refreshSession:m?y:v,getCaptchaHeader:k,invalidateCaptcha:x,inputNotification:ke,showInputNotification:xe,clearInputNotification:we}},sK=()=>{};const lK=X.createContext(void 0);function cK(){const{baseSettings:e,aiChatSettings:t}=oR(),[n,r]=X.useState(null),[a,o]=X.useState({}),{conversationId:i,messages:s,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}=TJ(),{analyticsProperties:p}=e,{logEvent:f}=lR(),{submitFeedback:h}=function({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o}){const{fetchWithAuth:i}=NR({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??sK,refreshSession:o});return{submitFeedback:X.useCallback((async({conversationId:t,messageId:r,type:a,details:o})=>{if(!e||!n)return;const s=`${e}/run/v1/feedback`,l=await i(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,messageId:r,type:a,details:o})});if(!l.ok)throw new Error(`Feedback submission failed: ${l.status}`);return l.json()}),[e,n,i])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}),m=X.useCallback((async(t,n,r)=>{o((e=>({...e,[t]:{type:n,messageId:t,details:r}}))),e.onFeedback?e.onFeedback({type:n,messageId:t,details:r,properties:p}).catch((e=>console.warn("[feedback] onFeedback error:",e))):h({conversationId:i,messageId:t,type:n,details:r}).catch((e=>console.warn("[feedback] submitFeedbackToApi error:",e)));const a=s.findIndex((e=>e.id===t)),l=s[a],c={conversationId:i,question:vV(s[a-1]),answer:vV(l),messageId:t,details:r};f({eventName:"positive"===n?"assistant_positive_feedback_submitted":"assistant_negative_feedback_submitted",properties:c}),"negative"===n&&f({eventName:"user_escalation_indicated",properties:{escalationType:"downvote",conversationId:i,messageId:t}})}),[s,i,p,e,f,h]);return{feedback:a,currentFeedback:n,setCurrentFeedback:r,submitPositiveFeedback:X.useCallback((async e=>{m(e,"positive")}),[m]),submitNegativeFeedback:X.useCallback((async(e,t)=>{m(e,"negative",t)}),[m])}}const uK=({children:e})=>{const t=cK();return og.jsx(lK.Provider,{value:t,children:e})},dK=()=>{const e=X.useContext(lK);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function pK(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function fK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function hK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=fK(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():fK(e[t],null)}}}}function mK(...e){return X.useCallback(hK(...e),e)}function gK(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},yK(r,...t)]}function yK(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var bK=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(xK);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(vK,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(vK,{...r,ref:t,children:n})}));bK.displayName="Slot";var vK=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n);return X.cloneElement(n,{...wK(r,n.props),ref:t?hK(t,e):e})}return X.Children.count(n)>1?X.Children.only(null):null}));vK.displayName="SlotClone";var kK=({children:e})=>og.jsx(og.Fragment,{children:e});function xK(e){return X.isValidElement(e)&&e.type===kK}function wK(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}var EK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?bK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function _K(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function SK(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var TK,CK="dismissableLayer.update",AK="dismissableLayer.pointerDownOutside",IK="dismissableLayer.focusOutside",NK=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),OK=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(NK),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=mK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){PK(AK,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){PK(IK,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return SK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(TK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),RK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=TK)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),RK())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(CK,e),()=>document.removeEventListener(CK,e)}),[]),og.jsx(EK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:pK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:pK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:pK(e.onPointerDownCapture,x.onPointerDownCapture)})}));OK.displayName="DismissableLayer";function RK(){const e=new CustomEvent(CK);document.dispatchEvent(e)}function PK(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(NK),r=X.useRef(null),a=mK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(EK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var LK=Boolean(null==globalThis?void 0:globalThis.document)?X.useLayoutEffect:()=>{},DK=J["useId".toString()]||(()=>{}),MK=0;function FK(e){const[t,n]=X.useState(DK());return LK((()=>{n((e=>e??String(MK++)))}),[e]),e||(t?`radix-${t}`:"")}const jK=["top","right","bottom","left"],zK=Math.min,BK=Math.max,HK=Math.round,UK=Math.floor,$K=e=>({x:e,y:e}),VK={left:"right",right:"left",bottom:"top",top:"bottom"};function GK(e,t,n){return BK(e,zK(t,n))}function qK(e,t){return"function"==typeof e?e(t):e}function WK(e){return e.split("-")[0]}function YK(e){return e.split("-")[1]}function ZK(e){return"x"===e?"y":"x"}function KK(e){return"y"===e?"height":"width"}function XK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function QK(e){return ZK(XK(e))}function JK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const eX=["left","right"],tX=["right","left"],nX=["top","bottom"],rX=["bottom","top"];function aX(e,t,n,r){const a=YK(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?tX:eX:t?eX:tX;case"left":case"right":return t?nX:rX;default:return[]}}(WK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(JK)))),o}function oX(e){const t=WK(e);return VK[t]+e.slice(t.length)}function iX(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function sX(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function lX(e,t,n){let{reference:r,floating:a}=e;const o=XK(t),i=QK(t),s=KK(i),l=WK(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch(YK(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function cX(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=qK(t,e),h=iX(f),m=s[p?"floating"===d?"reference":"floating":d],g=sX(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},k=sX(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-k.top+h.top)/v.y,bottom:(k.bottom-g.bottom+h.bottom)/v.y,left:(g.left-k.left+h.left)/v.x,right:(k.right-g.right+h.right)/v.x}}function uX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dX(e){return jK.some((t=>e[t]>=0))}const pX=new Set(["left","top"]);function fX(){return"undefined"!=typeof window}function hX(e){return yX(e)?(e.nodeName||"").toLowerCase():"#document"}function mX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function gX(e){var t;return null==(t=(yX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function yX(e){return!!fX()&&(e instanceof Node||e instanceof mX(e).Node)}function bX(e){return!!fX()&&(e instanceof Element||e instanceof mX(e).Element)}function vX(e){return!!fX()&&(e instanceof HTMLElement||e instanceof mX(e).HTMLElement)}function kX(e){return!(!fX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof mX(e).ShadowRoot)}function xX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=OX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function wX(e){return/^(table|td|th)$/.test(hX(e))}function EX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const _X=/transform|translate|scale|rotate|perspective|filter/,SX=/paint|layout|strict|content/,TX=e=>!!e&&"none"!==e;let CX;function AX(e){const t=bX(e)?OX(e):e;return TX(t.transform)||TX(t.translate)||TX(t.scale)||TX(t.rotate)||TX(t.perspective)||!IX()&&(TX(t.backdropFilter)||TX(t.filter))||_X.test(t.willChange||"")||SX.test(t.contain||"")}function IX(){return null==CX&&(CX="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),CX}function NX(e){return/^(html|body|#document)$/.test(hX(e))}function OX(e){return mX(e).getComputedStyle(e)}function RX(e){return bX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function PX(e){if("html"===hX(e))return e;const t=e.assignedSlot||e.parentNode||kX(e)&&e.host||gX(e);return kX(t)?t.host:t}function LX(e){const t=PX(e);return NX(t)?e.ownerDocument?e.ownerDocument.body:e.body:vX(t)&&xX(t)?t:LX(t)}function DX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=LX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=mX(a);if(o){const e=MX(i);return t.concat(i,i.visualViewport||[],xX(a)?a:[],e&&n?DX(e):[])}return t.concat(a,DX(a,[],n))}function MX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FX(e){const t=OX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=vX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=HK(n)!==o||HK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function jX(e){return bX(e)?e:e.contextElement}function zX(e){const t=jX(e);if(!vX(t))return $K(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=FX(t);let i=(o?HK(n.width):n.width)/r,s=(o?HK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const BX=$K(0);function HX(e){const t=mX(e);return IX()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:BX}function UX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=jX(e);let i=$K(1);t&&(r?bX(r)&&(i=zX(r)):i=zX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==mX(e))&&t}(o,n,r)?HX(o):$K(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=mX(o),t=r&&bX(r)?mX(r):r;let n=e,a=MX(n);for(;a&&r&&t!==n;){const e=zX(a),t=a.getBoundingClientRect(),r=OX(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=mX(a),a=MX(n)}}return sX({width:u,height:d,x:l,y:c})}function $X(e,t){const n=RX(e).scrollLeft;return t?t.left+n:UX(gX(e)).left+n}function VX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-$X(e,n),y:n.top+t.scrollTop}}function GX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=mX(e),r=gX(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=IX();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=$X(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=gX(e),n=RX(e),r=e.ownerDocument.body,a=BK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=BK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+$X(e);const s=-n.scrollTop;return"rtl"===OX(r).direction&&(i+=BK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(gX(e));else if(bX(t))r=function(e,t){const n=UX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=vX(e)?zX(e):$K(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=HX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return sX(r)}function qX(e,t){const n=PX(e);return!(n===t||!bX(n)||NX(n))&&("fixed"===OX(n).position||qX(n,t))}function WX(e,t,n){const r=vX(t),a=gX(t),o="fixed"===n,i=UX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=$K(0);function c(){l.x=$X(a)}if(r||!r&&!o)if(("body"!==hX(t)||xX(a))&&(s=RX(t)),r){const e=UX(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?$K(0):VX(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function YX(e){return"static"===OX(e).position}function ZX(e,t){if(!vX(e)||"fixed"===OX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return gX(e)===n&&(n=n.ownerDocument.body),n}function KX(e,t){const n=mX(e);if(EX(e))return n;if(!vX(e)){let t=PX(e);for(;t&&!NX(t);){if(bX(t)&&!YX(t))return t;t=PX(t)}return n}let r=ZX(e,t);for(;r&&wX(r)&&YX(r);)r=ZX(r,t);return r&&NX(r)&&YX(r)&&!AX(r)?n:r||function(e){let t=PX(e);for(;vX(t)&&!NX(t);){if(AX(t))return t;if(EX(t))return null;t=PX(t)}return null}(e)||n}const XX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=gX(r),s=!!t&&EX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=$K(1);const u=$K(0),d=vX(r);if((d||!d&&!o)&&(("body"!==hX(r)||xX(i))&&(l=RX(r)),d)){const e=UX(r);c=zX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?$K(0):VX(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:gX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?EX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=DX(e,[],!1).filter((e=>bX(e)&&"body"!==hX(e))),a=null;const o="fixed"===OX(e).position;let i=o?PX(e):e;for(;bX(i)&&!NX(i);){const t=OX(i),n=AX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||xX(i)&&!n&&qX(e,i))?r=r.filter((e=>e!==i)):a=t,i=PX(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=GX(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=GX(t,o[d],a);s=BK(e.top,s),l=zK(e.right,l),c=zK(e.bottom,c),u=BK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:KX,getElementRects:async function(e){const t=this.getOffsetParent||KX,n=this.getDimensions,r=await n(e.floating);return{reference:WX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=FX(e);return{width:t,height:n}},getScale:zX,isElement:bX,isRTL:function(e){return"rtl"===OX(e).direction}};function QX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=jX(e),u=a||o?[...c?DX(c):[],...t?DX(t):[]]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=gX(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-UK(d)+"px "+-UK(a.clientWidth-(u+p))+"px "+-UK(a.clientHeight-(d+f))+"px "+-UK(u)+"px",threshold:BK(0,zK(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||QX(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?UX(e):null;return l&&function t(){const r=UX(e);m&&!QX(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const eQ=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=WK(n),s=YK(n),l="y"===XK(n),c=pX.has(i)?-1:1,u=o&&l?-1:1,d=qK(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},tQ=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=qK(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=XK(WK(a)),f=ZK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=GK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=GK(m+d["y"===p?"top":"left"],m,m-d[e])}const g=l.fn({...t,[f]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:s}}}}}},nQ=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=qK(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=WK(a),b=XK(s),v=WK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[oX(s)]:function(e){const t=oX(e);return[JK(e),t,JK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...aX(s,m,h,k));const E=[s,...x],_=await l.detectOverflow(t,g),S=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=YK(e),a=QK(e),o=KK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=oX(i)),[i,oX(i)]}(a,i,k);S.push(_[e[0]],_[e[1]])}if(T=[...T,{placement:a,overflows:S}],!S.every((e=>e<=0))){var C,A;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&b!==XK(t))||T.every((e=>XK(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(A=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var I;const e=null==(I=T.filter((e=>{if(w){const t=XK(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},rQ=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=qK(e,t),u=await i.detectOverflow(t,c),d=WK(a),p=YK(a),f="y"===XK(a),{width:h,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,k=zK(m-u[g],b),x=zK(h-u[y],v),w=!t.middlewareData.shift;let E=k,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),w&&!p){const e=BK(u.left,0),t=BK(u.right,0),n=BK(u.top,0),r=BK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:BK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:BK(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const S=await i.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},aQ=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=qK(e,t);switch(a){case"referenceHidden":{const e=uX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:dX(e)}}}case"escaped":{const e=uX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:dX(e)}}}default:return{}}}}},oQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=qK(e,t)||{};if(null==c)return{};const d=iX(u),p={x:n,y:r},f=QK(a),h=KK(f),m=await i.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[f]-p[f]-o.floating[h],x=p[f]-o.reference[f],w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=w?w[v]:0;E&&await(null==i.isElement?void 0:i.isElement(w))||(E=s.floating[v]||o.floating[h]);const _=k/2-x/2,S=E/2-m[h]/2-1,T=zK(d[y],S),C=zK(d[b],S),A=T,I=E-m[h]-C,N=E/2-m[h]/2+_,O=GK(A,N,I),R=!l.arrow&&null!=YK(a)&&N!==O&&o.reference[h]/2-(N<A?T:C)-m[h]/2<0,P=R?N<A?N-A:N-I:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:N-O-P,...R&&{alignmentOffset:P}},reset:R}}}),iQ=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=qK(e,t),u={x:n,y:r},d=XK(a),p=ZK(d);let f=u[p],h=u[d];const m=qK(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+g.mainAxis,n=o.reference[p]+o.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=pX.has(WK(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},sQ=(e,t,n)=>{const r=new Map,a={platform:XX,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:cX},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=lX(c,r,l),p=r,f=0;const h={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:b,y:v,data:k,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=v?v:d,h[g]={...h[g],...k},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:u,y:d}=lX(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var lQ="undefined"!=typeof document?X.useLayoutEffect:function(){};function cQ(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!cQ(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!cQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function uQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dQ(e,t){const n=uQ(e);return Math.round(t*n)/n}function pQ(e){const t=X.useRef(e);return lQ((()=>{t.current=e})),t}function fQ(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=X.useState(r);cQ(p,r)||f(r);const[h,m]=X.useState(null),[g,y]=X.useState(null),b=X.useCallback((e=>{e!==w.current&&(w.current=e,m(e))}),[]),v=X.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),k=o||h,x=i||g,w=X.useRef(null),E=X.useRef(null),_=X.useRef(u),S=null!=l,T=pQ(l),C=pQ(a),A=pQ(c),I=X.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),sQ(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};N.current&&!cQ(_.current,t)&&(_.current=t,ue.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);lQ((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const N=X.useRef(!1);lQ((()=>(N.current=!0,()=>{N.current=!1})),[]),lQ((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,I);I()}}),[k,x,I,T,S]);const O=X.useMemo((()=>({reference:w,floating:E,setReference:b,setFloating:v})),[b,v]),R=X.useMemo((()=>({reference:k,floating:x})),[k,x]),P=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=dQ(R.floating,u.x),r=dQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...uQ(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,u.x,u.y]);return X.useMemo((()=>({...u,update:I,refs:O,elements:R,floatingStyles:P})),[u,I,O,R,P])}const hQ=(e,t)=>{const n=eQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},mQ=(e,t)=>{const n=tQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},gQ=(e,t)=>({fn:iQ(e).fn,options:[e,t]}),yQ=(e,t)=>{const n=nQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},bQ=(e,t)=>{const n=rQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},vQ=(e,t)=>{const n=aQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},kQ=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?oQ({element:n.current,padding:r}).fn(t):{}:n?oQ({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var xQ=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(EK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));xQ.displayName="Arrow";var wQ=xQ;function EQ(e){const[t,n]=X.useState(void 0);return LK((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var _Q="Popper",[SQ,TQ]=gK(_Q),[CQ,AQ]=SQ(_Q),IQ=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(CQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};IQ.displayName=_Q;var NQ="PopperAnchor",OQ=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=AQ(NQ,n),i=X.useRef(null),s=mK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx(EK.div,{...a,ref:s})}));OQ.displayName=NQ;var RQ="PopperContent",[PQ,LQ]=SQ(RQ),DQ=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=AQ(RQ,l),[E,_]=X.useState(null),S=mK(t,(e=>_(e))),[T,C]=X.useState(null),A=EQ(T),I=(null==A?void 0:A.width)??0,N=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(zQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=fQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>JX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[hQ({mainAxis:u+N,alignmentAxis:p}),h&&mQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?gQ():void 0,...D}),h&&yQ({...D}),bQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&kQ({element:T,padding:f}),BQ({arrowWidth:I,arrowHeight:N}),b&&vQ({strategy:"referenceHidden",...D})]}),[H,U]=HQ(j),$=_K(k);LK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return LK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(PQ,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(EK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));DQ.displayName=RQ;var MQ="PopperArrow",FQ={top:"bottom",right:"left",bottom:"top",left:"right"},jQ=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=LQ(MQ,n),o=FQ[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(wQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function zQ(e){return null!==e}jQ.displayName=MQ;var BQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=HQ(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function HQ(e){const[t,n="center"]=e.split("-");return[t,n]}var UQ=IQ,$Q=OQ,VQ=DQ,GQ=jQ;var qQ=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef({}),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=WQ(r.current);o.current="mounted"===s?e:"none"}),[s]),LK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=WQ(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),LK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=WQ(r.current).includes(o.animationName);if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=WQ(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=mK(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function WQ(e){return(null==e?void 0:e.animationName)||"none"}function YQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=X.useState(e),[r]=n,a=X.useRef(r),o=_K(t);return X.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=_K(n);return[i,X.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}qQ.displayName="Presence";var ZQ=X.forwardRef(((e,t)=>og.jsx(EK.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));ZQ.displayName="VisuallyHidden";var KQ=ZQ,[XQ]=gK("Tooltip",[TQ]),QQ=TQ(),JQ="TooltipProvider",eJ=700,tJ="tooltip.open",[nJ,rJ]=XQ(JQ),aJ=e=>{const{__scopeTooltip:t,delayDuration:n=eJ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=X.useState(!0),l=X.useRef(!1),c=X.useRef(0);return X.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),og.jsx(nJ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:X.useCallback((()=>{window.clearTimeout(c.current),s(!1)}),[]),onClose:X.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:X.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:o})};aJ.displayName=JQ;var oJ="Tooltip",[iJ,sJ]=XQ(oJ),lJ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=rJ(oJ,e.__scopeTooltip),c=QQ(t),[u,d]=X.useState(null),p=FK(),f=X.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=X.useRef(!1),[y=!1,b]=YQ({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(tJ))):l.onClose(),null==o||o(e)}}),v=X.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),k=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,b(!0)}),[b]),x=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,b(!1)}),[b]),w=X.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{g.current=!0,b(!0),f.current=0}),m)}),[m,b]);return X.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),og.jsx(UQ,{...c,children:og.jsx(iJ,{scope:t,contentId:p,open:y,stateAttribute:v,trigger:u,onTriggerChange:d,onTriggerEnter:X.useCallback((()=>{l.isOpenDelayed?w():k()}),[l.isOpenDelayed,w,k]),onTriggerLeave:X.useCallback((()=>{h?x():(window.clearTimeout(f.current),f.current=0)}),[x,h]),onOpen:k,onClose:x,disableHoverableContent:h,children:n})})};lJ.displayName=oJ;var cJ="TooltipTrigger",uJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=sJ(cJ,n),o=rJ(cJ,n),i=QQ(n),s=mK(t,X.useRef(null),a.onTriggerChange),l=X.useRef(!1),c=X.useRef(!1),u=X.useCallback((()=>l.current=!1),[]);return X.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),og.jsx($Q,{asChild:!0,...i,children:og.jsx(EK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:pK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:pK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:pK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:pK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:pK(e.onBlur,a.onClose),onClick:pK(e.onClick,a.onClose)})})}));uJ.displayName=cJ;var[dJ,pJ]=XQ("TooltipPortal",{forceMount:void 0}),fJ="TooltipContent",hJ=X.forwardRef(((e,t)=>{const n=pJ(fJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=sJ(fJ,e.__scopeTooltip);return og.jsx(qQ,{present:r||i.open,children:i.disableHoverableContent?og.jsx(bJ,{side:a,...o,ref:t}):og.jsx(mJ,{side:a,...o,ref:t})})})),mJ=X.forwardRef(((e,t)=>{const n=sJ(fJ,e.__scopeTooltip),r=rJ(fJ,e.__scopeTooltip),a=X.useRef(null),o=mK(t,a),[i,s]=X.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,p=X.useCallback((()=>{s(null),d(!1)}),[d]),f=X.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return X.useEffect((()=>()=>p()),[p]),X.useEffect((()=>{if(l&&u){const e=e=>f(e,u),t=e=>f(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[l,u,f,p]),X.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==u?void 0:u.contains(t)),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o].x,s=t[o].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(a=!a)}return a}(n,i);r?p():a&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,u,i,c,p]),og.jsx(bJ,{...e,ref:o})})),[gJ,yJ]=XQ(oJ,{isInside:!1}),bJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=sJ(fJ,n),c=QQ(n),{onClose:u}=l;return X.useEffect((()=>(document.addEventListener(tJ,u),()=>document.removeEventListener(tJ,u))),[u]),X.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(l.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,u]),og.jsx(OK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:og.jsxs(VQ,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[og.jsx(kK,{children:r}),og.jsx(gJ,{scope:n,isInside:!0,children:og.jsx(KQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));hJ.displayName=fJ;var vJ="TooltipArrow",kJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=QQ(n);return yJ(vJ,n).isInside?null:og.jsx(GQ,{...a,...r,ref:t})}));kJ.displayName=vJ;var xJ=aJ,wJ=uJ,EJ=kJ;const _J=X.createContext(void 0),SJ=({children:e,...t})=>{const n=iK();return og.jsx(_J.Provider,{value:{...n,...t},children:og.jsx(uK,{children:og.jsx(xJ,{children:e})})})},TJ=()=>{const e=X.useContext(_J);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},CJ=X.createContext(void 0);const AJ=({layout:e,children:t})=>{const n=function(e){const{stop:t,clear:n,conversationId:r,isStreaming:a,loadAndRestoreSession:o,authToken:i,refreshSession:s,getCaptchaHeader:l,invalidateCaptcha:c}=TJ(),{aiChatSettings:u,baseSettings:d}=oR(),{baseUrl:p,appId:f,apiKey:h}=u,m=!!d.getAuthToken,g=!h&&!!f&&(!!i||m),{fetchWithAuth:y}=NR({appId:f,authToken:i,getCaptchaHeader:l,invalidateCaptcha:c,refreshSession:s}),[b,v]=X.useState(!1),[k,x]=X.useState([]),[w,E]=X.useState(!i&&g),[_,S]=X.useState(0),[T,C]=X.useState(!1),A=X.useRef(!1),I=X.useRef(null),N=X.useRef(m),O=X.useRef(i);X.useEffect((()=>{const e=N.current,t=O.current;N.current=m,O.current=i,(e!==m||null!==t&&null!==i&&t!==i)&&(x([]),S(0),C(!1),A.current=!1)}),[m,i]);const R=X.useRef([]);R.current=k;const P=X.useRef(y);P.current=y;const L=X.useCallback((async(e,t=!1)=>{if(p&&i&&g){t||E(!0);try{const n=`${p}/run/v1/conversations?page=${e+1}&limit=25`,r=await P.current(n);if(!r.ok)throw new Error(`Failed to fetch conversations: ${r.status}`);const a=await r.json(),o=(a.data??[]).map((e=>({id:e.id,title:e.title??"",createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})));x((n=>{if(0===e&&!t)return o;if(0===e&&t){const e=new Set(o.map((e=>e.id)));return[...o,...n.slice(25).filter((t=>!e.has(t.id)))]}const r=new Set(n.map((e=>e.id)));return[...n,...o.filter((e=>!r.has(e.id)))]}));const{page:i,pages:s}=a.pagination??{};C(null!=i&&null!=s&&i<s),t||S(e)}catch($Ie){console.error("[useChatHistory] Failed to load conversations:",$Ie)}finally{E(!1)}}}),[p,i,g]);X.useEffect((()=>{b&&(i||m)&&g&&("stack"===e?L(0):!A.current&&i&&(A.current=!0,L(0)))}),[b,i,m,g,e,L]);const D=X.useRef("");X.useEffect((()=>{g&&"sidepane"===e&&r&&a&&A.current&&D.current!==r&&(R.current.some((e=>e.id===r))||(D.current=r,L(0,!0)))}),[r,g,e,L,a]);const M=X.useCallback((()=>{!w&&T&&L(_+1)}),[w,T,_,L]),F=X.useCallback((()=>{t(),n(),"sidepane"!==e&&v(!1)}),[e,t,n]),j=X.useCallback((async t=>{var n;null==(n=I.current)||n.abort();const r=new AbortController;I.current=r,await o(t,r.signal),r.signal.aborted||"sidepane"===e||v(!1)}),[e,o]);return{isEnabled:g,isOpen:b,setIsOpen:v,sessions:k,isLoading:w,hasMore:T,loadMore:M,startNewConversation:F,loadSession:j}}(e);return og.jsx(CJ.Provider,{value:n,children:"function"==typeof t?t(n):t})},IJ=()=>{const e=X.useContext(CJ);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},NJ=X.createContext(void 0),OJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=pL(),o=a[t.name];return og.jsx(NJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},RJ=()=>{const e=X.useContext(NJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},PJ=X.createContext(void 0);const LJ=({children:e,value:t})=>og.jsx(PJ.Provider,{value:t,children:e}),DJ=["light","dark"],MJ="(prefers-color-scheme: dark)",FJ="undefined"==typeof window,jJ=X.createContext(void 0),zJ={setColorMode:e=>{},colorModes:[]};function BJ(e,t){const n=X.useContext(jJ)??zJ;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const HJ=e=>(X.useContext(jJ),og.jsx($J,{...e})),UJ=["light","dark"],$J=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=UJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=X.useState((()=>GJ(a,i))),[m,g]=X.useState((()=>GJ(a))),y=l?Object.values(l):o,b=X.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=WJ());const c=l?l[o]:o,u=t?qJ():null,f=d&&p&&(null==(a=document.getElementById(d))?void 0:a.shadowRoot),h=f?f.getElementById(p)??document.documentElement:document.documentElement;if("class"===s?(h.classList.remove(...y),c&&h.classList.add(c)):c?h.setAttribute(s,c):h.removeAttribute(s),r){const e=DJ.includes(i)?i:null,t=DJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=X.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Bce){}}),[e]),k=X.useCallback((t=>{const r=WJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);X.useEffect((()=>{const e=window.matchMedia(MJ);return e.addListener(k),k(e),()=>e.removeListener(k)}),[k]),X.useEffect((()=>{const e=e=>{if(e.key!==a)return;const t=e.newValue||i;v(t)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[v]),X.useEffect((()=>{b(e??f)}),[e,f]);const x=X.useMemo((()=>({colorMode:f,setColorMode:v,forcedColorMode:e,resolvedColorMode:"system"===f?m:f,colorModes:n?[...o,"system"]:o,systemColorMode:n?m:void 0})),[f,v,e,m,n,o]);return og.jsxs(jJ.Provider,{value:x,children:[og.jsx(VJ,{forcedColorMode:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:a,colorModes:o,defaultColorMode:i,attribute:s,value:l,children:c,attrs:y,nonce:u,shadowHostId:d,rootId:p}),c]})},VJ=X.memo((({forcedColorMode:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultColorMode:o,value:i,attrs:s,nonce:l,shadowHostId:c,rootId:u})=>{const d="system"===o,p=(()=>{const e=c&&u?`document.getElementById('${c}').shadowRoot.getElementById('${u}')`:"document.documentElement";if("class"===n){return`var d=${e},c=d.classList;${`c.remove(${s.map((e=>`'${e}'`)).join(",")})`};`}return`var d=${e},n='${n}',s='setAttribute';`})(),f=(()=>{if(!a)return"";return(DJ.includes(o)?o:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e"})(),h=(e,t=!1,r=!0)=>{const o=i?i[e]:e,s=t?`${e}|| ''`:`'${o}'`;let l="";return a&&r&&!t&&DJ.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${p}${h(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${MJ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":`else{${h(o,!1,!1)}}`}${f}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return og.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),GJ=(e,t)=>{if(FJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Bce){}return n||t},qJ=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout((()=>{document.head.removeChild(e)}),1)}},WJ=e=>{e||(e=window.matchMedia(MJ));return e.matches?"dark":"light"};var YJ=Object.prototype.hasOwnProperty;function ZJ(e,t,n){for(n of e.keys())if(KJ(n,t))return n}function KJ(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&KJ(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=ZJ(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=ZJ(t,a)))return!1;if(!KJ(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(YJ.call(e,n)&&++r&&!YJ.call(t,n))return!1;if(!(n in t)||!KJ(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function XJ(){const{baseSettings:e}=oR(),[t,n]=X.useState([]),r=function(e){const t=X.useRef(void 0);KJ(t.current,e)||(t.current=e);return t.current}(e.theme.styles),{customStyles:a,linksCount:o}=X.useMemo((()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:e,styleSheets:t}=r.reduce(((e,t)=>("link"===t.type?e.links.push(t):"style"===t.type&&e.styleSheets.push(t),e)),{links:[],styleSheets:[]}),a=t.map((e=>og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??nK("link_")))),o=e.map((e=>{const t=e.key??nK("stylesheet_");return og.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:og.jsxs(og.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const QJ=({children:e})=>{const{baseSettings:t}=oR(),{theme:n,primaryBrandColor:r,shadowHost:a,rootElement:o,colorMode:i}=t,{primaryColors:s,varsClassName:l}=n,{disableLoadingDefaultFont:c,fontFamily:u,fontSize:d,zIndex:p}=n,f=bk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=kk[n]||n,a=(n,r=[])=>{for(const[o,i]of Object.entries(n)){const n=[...r,o];if("object"==typeof i&&null!==i)a(i,n);else{const r=n.map((e=>e.replace(/([A-Z])/g,"-$1").toLowerCase())).join("-");t[`--ikp-${e}-${r}`]=i}}};a(r)}return t}({colors:Gm(n.colors,f),fontFamily:u,fontSize:d,zIndex:p}),{customStyles:m,loaded:g}=XJ(),{sync:y,forcedColorMode:b,...v}=i??{},[k,x]=X.useState(),w=X.useRef(null);return X.useEffect((()=>{var e,t;if(!(null==y?void 0:y.target))return;const n="string"==typeof y.target?document.querySelector(y.target):y.target;if(!n)return;function r(e,t){return t.reduce(((t,n)=>({...t,[n]:e.getAttribute(n)})),{})}const a=new MutationObserver((()=>{var e,t;const a=r(n,y.attributes),o=(null==(e=y.isDarkMode)?void 0:e.call(y,a))?"dark":"light";null==(t=y.onChange)||t.call(y,o),x(o)}));a.observe(n,{attributes:!0,attributeFilter:y.attributes,childList:!1,subtree:!1}),w.current=a;const o=(null==(e=y.isDarkMode)?void 0:e.call(y,r(n,null==y?void 0:y.attributes)))?"dark":"light";return null==(t=y.onChange)||t.call(y,o),x(o),()=>a.disconnect()}),[y]),og.jsxs(og.Fragment,{children:[!c&&og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');\n "}}),m,g&&og.jsx(HJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:og.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function JJ(e){const{children:t,config:n,componentType:r}=e;return og.jsx(aR,{value:{...n,componentType:r},children:og.jsx(QJ,{children:og.jsx(sR,{children:t})})})}const e0=X.createContext(void 0),t0=({children:e,source:t})=>og.jsx(e0.Provider,{value:{source:t},children:e}),n0=()=>{const e=X.useContext(e0);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},r0=X.createContext(void 0),a0=({children:e,widget:t})=>og.jsx(r0.Provider,{value:t,children:e}),o0=()=>X.useContext(r0);var i0=X.useLayoutEffect,s0=function(e,t){"function"!=typeof e?e.current=t:e(t)},l0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},c0=function(e){Object.keys(l0).forEach((function(t){e.style.setProperty(t,l0[t],"important")}))},u0=null,d0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var p0=function(){},f0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],h0=!!document.documentElement.currentStyle,m0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,f0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(h0&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function g0(e,t,n){var r,a,o=(r=n,a=Q.useRef(r),i0((function(){a.current=r})),a);X.useLayoutEffect((function(){var n=function(e){return o.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}}),[])}var y0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],b0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?p0:o,s=e.onHeightChange,l=void 0===s?p0:s,c=R$(e,y0),u=void 0!==c.value,d=X.useRef(null),p=function(e,t){var n=Q.useRef();return Q.useCallback((function(r){e.current=r,n.current&&s0(n.current,null),n.current=t,t&&s0(t,r)}),[t])}(d,t),f=X.useRef(0),h=X.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:m0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),u0||((u0=document.createElement("textarea")).setAttribute("tabindex","-1"),u0.setAttribute("aria-hidden","true"),c0(u0)),null===u0.parentNode&&document.body.appendChild(u0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;u0.style[t]=i[t]})),c0(u0),u0.value=t;var l=d0(u0,e);u0.value=t,l=d0(u0,e),u0.value="x";var c=u0.scrollHeight-a,u=c*n;"border-box"===s&&(u=u+a+o),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+a+o),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",a,r),i=o[0],s=o[1];f.current!==i&&(f.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return X.useLayoutEffect(m),function(e,t){g0(document.body,"reset",(function(n){e.current.form===n.target&&t(n)}))}(d,(function(){if(!u){var e=d.current,t=e.value;requestAnimationFrame((function(){t!==e.value&&m()}))}})),g0(window,"resize",m),function(e){g0(document.fonts,"loadingdone",e)}(m),X.createElement("textarea",P$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},v0=X.forwardRef(b0),k0="Avatar",[x0]=gK(k0),[w0,E0]=x0(k0),_0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=X.useState("idle");return og.jsx(w0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:og.jsx(EK.span,{...r,ref:t})})}));_0.displayName=k0;var S0="AvatarImage",T0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=E0(S0,n),s=function(e,t){const[n,r]=X.useState("idle");return LK((()=>{if(!e)return void r("error");let n=!0;const a=new window.Image,o=e=>()=>{n&&r(e)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{n=!1}}),[e,t]),n}(r,o.referrerPolicy),l=_K((e=>{a(e),i.onImageLoadingStatusChange(e)}));return LK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?og.jsx(EK.img,{...o,ref:t,src:r}):null}));T0.displayName=S0;var C0="AvatarFallback",A0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=E0(C0,n),[i,s]=X.useState(void 0===r);return X.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>s(!0)),r);return()=>window.clearTimeout(e)}}),[r]),i&&"loaded"!==o.imageLoadingStatus?og.jsx(EK.span,{...a,ref:t}):null}));A0.displayName=C0;var I0=_0,N0=T0,O0=A0;var R0="Checkbox",[P0]=gK(R0),[L0,D0]=P0(R0),M0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,f]=X.useState(null),h=mK(t,(e=>f(e))),m=X.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=YQ({prop:a,defaultProp:o,onChange:c}),v=X.useRef(y);return X.useEffect((()=>{const e=null==p?void 0:p.form;if(e){const t=()=>b(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[p,b]),og.jsxs(L0,{scope:n,state:y,disabled:s,children:[og.jsx(EK.button,{type:"button",role:"checkbox","aria-checked":B0(y)?"mixed":y,"aria-required":i,"data-state":H0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:pK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:pK(e.onClick,(e=>{b((e=>!!B0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&og.jsx(z0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!B0(o)&&o})]})}));M0.displayName=R0;var F0="CheckboxIndicator",j0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=D0(F0,n);return og.jsx(qQ,{present:r||B0(o.state)||!0===o.state,children:og.jsx(EK.span,{"data-state":H0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));j0.displayName=F0;var z0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,i=X.useRef(null),s=function(e){const t=X.useRef({value:e,previous:e});return X.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n),l=EQ(t);X.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=B0(n),a.call(e,!B0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=X.useRef(!B0(n)&&n);return og.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function B0(e){return"indeterminate"===e}function H0(e){return B0(e)?"indeterminate":e?"checked":"unchecked"}var U0=M0,$0=j0,V0=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(W0);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(G0,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(G0,{...r,ref:t,children:n})}));V0.displayName="Slot";var G0=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?hK(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));G0.displayName="SlotClone";var q0=({children:e})=>og.jsx(og.Fragment,{children:e});function W0(e){return X.isValidElement(e)&&e.type===q0}var Y0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?V0:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var Z0,K0="dismissableLayer.update",X0="dismissableLayer.pointerDownOutside",Q0="dismissableLayer.focusOutside",J0=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),e1=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(J0),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=mK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){n1(X0,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=_K(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){n1(Q0,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return SK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Z0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),t1(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Z0)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),t1())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(K0,e),()=>document.removeEventListener(K0,e)}),[]),og.jsx(Y0.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:pK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:pK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:pK(e.onPointerDownCapture,x.onPointerDownCapture)})}));e1.displayName="DismissableLayer";function t1(){const e=new CustomEvent(K0);document.dispatchEvent(e)}function n1(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(J0),r=X.useRef(null),a=mK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(Y0.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var r1=0;function a1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var o1="focusScope.autoFocusOnMount",i1="focusScope.autoFocusOnUnmount",s1={bubbles:!1,cancelable:!0},l1=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=_K(a),u=_K(o),d=X.useRef(null),p=mK(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:p1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||p1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&p1(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){f1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(o1,s1);s.addEventListener(o1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(p1(r,{select:t}),document.activeElement!==n)return}((e=c1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&p1(s))}return()=>{s.removeEventListener(o1,c),setTimeout((()=>{const e=new CustomEvent(i1,s1);s.addEventListener(i1,u),s.dispatchEvent(e),e.defaultPrevented||p1(t??document.body,{select:!0}),s.removeEventListener(i1,u),f1.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=c1(e),n=u1(t,e),r=u1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&p1(o,{select:!0})):(e.preventDefault(),n&&p1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx(Y0.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function c1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function u1(e,t){for(const n of e)if(!d1(n,{upTo:t}))return n}function d1(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function p1(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}l1.displayName="FocusScope";var f1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=h1(e,t),e.unshift(t)},remove(t){var n;e=h1(e,t),null==(n=e[0])||n.resume()}}}();function h1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var m1=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(Y0.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));m1.displayName="Arrow";var g1=m1,y1="Popper",[b1,v1]=gK(y1),[k1,x1]=b1(y1),w1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(k1,{scope:t,anchor:r,onAnchorChange:a,children:n})};w1.displayName=y1;var E1="PopperAnchor",_1=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=x1(E1,n),i=X.useRef(null),s=mK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx(Y0.div,{...a,ref:s})}));_1.displayName=E1;var S1="PopperContent",[T1,C1]=b1(S1),A1=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=x1(S1,l),[E,_]=X.useState(null),S=mK(t,(e=>_(e))),[T,C]=X.useState(null),A=EQ(T),I=(null==A?void 0:A.width)??0,N=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(R1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=fQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>JX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[hQ({mainAxis:u+N,alignmentAxis:p}),h&&mQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?gQ():void 0,...D}),h&&yQ({...D}),bQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&kQ({element:T,padding:f}),P1({arrowWidth:I,arrowHeight:N}),b&&vQ({strategy:"referenceHidden",...D})]}),[H,U]=L1(j),$=_K(k);LK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return LK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(T1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(Y0.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));A1.displayName=S1;var I1="PopperArrow",N1={top:"bottom",right:"left",bottom:"top",left:"right"},O1=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=C1(I1,n),o=N1[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(g1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function R1(e){return null!==e}O1.displayName=I1;var P1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=L1(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function L1(e){const[t,n="center"]=e.split("-");return[t,n]}var D1=w1,M1=_1,F1=A1,j1=O1,z1=new WeakMap,B1=new WeakMap,H1={},U1=0,$1=function(e){return e&&(e.host||$1(e.parentNode))},V1=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=$1(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);H1[n]||(H1[n]=new WeakMap);var o=H1[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(z1.get(e)||0)+1,c=(o.get(e)||0)+1;z1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&B1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Bce){console.error("aria-hidden: cannot operate on ",e,Bce)}}))};return u(t),s.clear(),U1++,function(){i.forEach((function(e){var t=z1.get(e)-1,a=o.get(e)-1;z1.set(e,t),o.set(e,a),t||(B1.has(e)||e.removeAttribute(r),B1.delete(e)),a||e.removeAttribute(n)})),--U1||(z1=new WeakMap,z1=new WeakMap,B1=new WeakMap,H1={})}},G1=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),V1(r,a,n,"aria-hidden")):function(){return null}},q1="right-scroll-bar-position",W1="width-before-scroll-bar";function Y1(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Z1="undefined"!=typeof window?X.useLayoutEffect:X.useEffect,K1=new WeakMap;function X1(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return Y1(e,t)}))},(a=X.useState((function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=r,a.facade);return Z1((function(){var t=K1.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||Y1(e,null)})),r.forEach((function(e){n.has(e)||Y1(e,a)}))}K1.set(o,e)}),[e]),o}function Q1(e){return e}var J1=function(e){var t=e.sideCar,n=M$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return X.createElement(r,D$({},n))};J1.isSideCarExport=!0;var e2=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Q1);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=D$({async:!0,ssr:!1},e),t}(),t2=function(){},n2=X.forwardRef((function(e,t){var n=X.useRef(null),r=X.useState({onScrollCapture:t2,onWheelCapture:t2,onTouchMoveCapture:t2}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,k=M$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=X1([n,t]),E=D$(D$({},k),a);return X.createElement(X.Fragment,null,u&&X.createElement(x,{sideCar:e2,removeScrollBar:c,shards:d,noRelative:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:v}),i?X.cloneElement(X.Children.only(s),D$(D$({},E),{ref:w})):X.createElement(b,D$({},E,{className:l,ref:w}),s))}));n2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},n2.classNames={fullWidth:W1,zeroRight:q1};function r2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var a2=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=r2())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o2=function(){var e,t=(e=a2(),function(t,n){X.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},i2={left:0,top:0,right:0,gap:0},s2=function(e){return parseInt(e||"",10)||0},l2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return i2;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[s2(n),s2(r),s2(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},c2=o2(),u2="data-scroll-locked",d2=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(u2,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(q1," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(W1," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(q1," .").concat(q1," {\n right: 0 ").concat(r,";\n }\n \n .").concat(W1," .").concat(W1," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(u2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},p2=function(){var e=parseInt(document.body.getAttribute(u2)||"0",10);return isFinite(e)?e:0},f2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;X.useEffect((function(){return document.body.setAttribute(u2,(p2()+1).toString()),function(){var e=p2()-1;e<=0?document.body.removeAttribute(u2):document.body.setAttribute(u2,e.toString())}}),[]);var o=X.useMemo((function(){return l2(a)}),[a]);return X.createElement(c2,{styles:d2(o,!t,a,n?"":"!important")})},h2=!1;if("undefined"!=typeof window)try{var m2=Object.defineProperty({},"passive",{get:function(){return h2=!0,!0}});window.addEventListener("test",m2,m2),window.removeEventListener("test",m2,m2)}catch($Ie){h2=!1}var g2=!!h2&&{passive:!1},y2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},b2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),v2(e,r)){var a=k2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},v2=function(e,t){return"v"===e?function(e){return y2(e,"overflowY")}(t):function(e){return y2(e,"overflowX")}(t)},k2=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},x2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},w2=function(e){return[e.deltaX,e.deltaY]},E2=function(e){return e&&"current"in e?e.current:e},_2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},S2=0,T2=[];function C2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const A2=(I2=function(e){var t=X.useRef([]),n=X.useRef([0,0]),r=X.useRef(),a=X.useState(S2++)[0],o=X.useState(o2)[0],i=X.useRef(e);X.useEffect((function(){i.current=e}),[e]),X.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=F$([e.lockRef.current],(e.shards||[]).map(E2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=X.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=x2(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var h=b2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=b2(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=a*r,i=n.target,s=t.contains(i),l=!1,c=o>0,u=0,d=0;do{if(!i)break;var p=k2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&v2(e,i)&&(u+=h,d+=f);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:c)}),[]),l=X.useCallback((function(e){var n=e;if(T2.length&&T2[T2.length-1]===o){var r="deltaY"in n?w2(n):x2(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a}))[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(E2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=X.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:C2(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=X.useCallback((function(e){n.current=x2(e),r.current=void 0}),[]),d=X.useCallback((function(t){c(t.type,w2(t),t.target,s(t,e.lockRef.current))}),[]),p=X.useCallback((function(t){c(t.type,x2(t),t.target,s(t,e.lockRef.current))}),[]);X.useEffect((function(){return T2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,g2),document.addEventListener("touchmove",l,g2),document.addEventListener("touchstart",u,g2),function(){T2=T2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,g2),document.removeEventListener("touchmove",l,g2),document.removeEventListener("touchstart",u,g2)}}),[]);var f=e.removeScrollBar,h=e.inert;return X.createElement(X.Fragment,null,h?X.createElement(o,{styles:_2(a)}):null,f?X.createElement(f2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},e2.useMedium(I2),J1);var I2,N2=X.forwardRef((function(e,t){return X.createElement(n2,D$({},e,{ref:t,sideCar:A2}))}));N2.classNames=n2.classNames;var O2="Popover",[R2]=gK(O2,[v1]),P2=v1(),[L2,D2]=R2(O2),M2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=P2(t),l=X.useRef(null),[c,u]=X.useState(!1),[d=!1,p]=YQ({prop:r,defaultProp:a,onChange:o});return og.jsx(D1,{...s,children:og.jsx(L2,{scope:t,contentId:FK(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:X.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:X.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:X.useCallback((()=>u(!1)),[]),modal:i,children:n})})};M2.displayName=O2;var F2="PopoverAnchor";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=D2(F2,n),o=P2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return X.useEffect((()=>(i(),()=>s())),[i,s]),og.jsx(M1,{...o,...r,ref:t})})).displayName=F2;var j2="PopoverTrigger",z2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=D2(j2,n),o=P2(n),i=mK(t,a.triggerRef),s=og.jsx(Y0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Z2(a.open),...r,ref:i,onClick:pK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:og.jsx(M1,{asChild:!0,...o,children:s})}));z2.displayName=j2;var[B2,H2]=R2("PopoverPortal",{forceMount:void 0}),U2="PopoverContent",$2=X.forwardRef(((e,t)=>{const n=H2(U2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=D2(U2,e.__scopePopover);return og.jsx(qQ,{present:r||o.open,children:o.modal?og.jsx(V2,{...a,ref:t}):og.jsx(G2,{...a,ref:t})})}));$2.displayName=U2;var V2=X.forwardRef(((e,t)=>{const n=D2(U2,e.__scopePopover),r=X.useRef(null),a=mK(t,r),o=X.useRef(!1);return X.useEffect((()=>{const e=r.current;if(e)return G1(e)}),[]),og.jsx(N2,{as:V0,allowPinchZoom:!0,children:og.jsx(q2,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:pK(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:pK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),G2=X.forwardRef(((e,t)=>{const n=D2(U2,e.__scopePopover),r=X.useRef(!1),a=X.useRef(!1);return og.jsx(q2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),q2=X.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=D2(U2,n),f=P2(n);return X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??a1()),document.body.insertAdjacentElement("beforeend",e[1]??a1()),r1++,()=>{1===r1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),r1--}}),[]),og.jsx(l1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:og.jsx(e1,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:og.jsx(F1,{"data-state":Z2(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),W2="PopoverClose";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=D2(W2,n);return og.jsx(Y0.button,{type:"button",...r,ref:t,onClick:pK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=W2;var Y2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=P2(n);return og.jsx(j1,{...a,...r,ref:t})}));function Z2(e){return e?"open":"closed"}Y2.displayName="PopoverArrow";var K2=M2,X2=z2,Q2=$2,J2=Y2,e5=X.createContext(void 0);var t5="ScrollArea",[n5]=gK(t5),[r5,a5]=n5(t5),o5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=X.useState(null),[c,u]=X.useState(null),[d,p]=X.useState(null),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(0),[v,k]=X.useState(0),[x,w]=X.useState(!1),[E,_]=X.useState(!1),S=mK(t,(e=>l(e))),T=function(e){const t=X.useContext(e5);return e||t||"ltr"}(a);return og.jsx(r5,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:k,children:og.jsx(EK.div,{dir:T,...i,ref:S,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})}));o5.displayName=t5;var i5="ScrollAreaViewport",s5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=a5(i5,n),s=mK(t,X.useRef(null),i.onViewportChange);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),og.jsx(EK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:og.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));s5.displayName=i5;var l5="ScrollAreaScrollbar",c5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=a5(l5,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return X.useEffect((()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)})),[s,o,i]),"hover"===a.type?og.jsx(u5,{...r,ref:t,forceMount:n}):"scroll"===a.type?og.jsx(d5,{...r,ref:t,forceMount:n}):"auto"===a.type?og.jsx(p5,{...r,ref:t,forceMount:n}):"always"===a.type?og.jsx(f5,{...r,ref:t}):null}));c5.displayName=l5;var u5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=a5(l5,e.__scopeScrollArea),[o,i]=X.useState(!1);return X.useEffect((()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout((()=>i(!1)),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[a.scrollArea,a.scrollHideDelay]),og.jsx(qQ,{present:n||o,children:og.jsx(p5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),d5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=a5(l5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=R5((()=>l("SCROLL_END")),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},X.useReducer(((e,t)=>u[e][t]??e),c));var c,u;return X.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,a.scrollHideDelay,l]),X.useEffect((()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,o,l,i]),og.jsx(qQ,{present:n||"hidden"!==s,children:og.jsx(f5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:pK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:pK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),p5=X.forwardRef(((e,t)=>{const n=a5(l5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=X.useState(!1),s="horizontal"===e.orientation,l=R5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return P5(n.viewport,l),P5(n.content,l),og.jsx(qQ,{present:r||o,children:og.jsx(f5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),f5=X.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=a5(l5,e.__scopeScrollArea),o=X.useRef(null),i=X.useRef(0),[s,l]=X.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=T5(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=C5(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return I5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?og.jsx(h5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=A5(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?og.jsx(m5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=A5(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null})),h5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=a5(l5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=mK(t,l,o.onScrollbarXChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(b5,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":C5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),N5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:S5(i.paddingLeft),paddingEnd:S5(i.paddingRight)}})}})})),m5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=a5(l5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=mK(t,l,o.onScrollbarYChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(b5,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":C5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),N5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:S5(i.paddingTop),paddingEnd:S5(i.paddingBottom)}})}})})),[g5,y5]=n5(l5),b5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=a5(l5,n),[h,m]=X.useState(null),g=mK(t,(e=>m(e))),y=X.useRef(null),b=X.useRef(""),v=f.viewport,k=r.content-r.viewport,x=_K(u),w=_K(l),E=R5(d,10);function _(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return X.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[v,h,k,x]),X.useEffect(w,[r,w]),P5(h,E),P5(f.content,E),og.jsx(g5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:_K(o),onThumbPointerUp:_K(i),onThumbPositionChange:w,onThumbPointerDown:_K(s),children:og.jsx(EK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:pK(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(e)}})),onPointerMove:pK(e.onPointerMove,_),onPointerUp:pK(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null}))})})})),v5="ScrollAreaThumb",k5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=y5(v5,e.__scopeScrollArea);return og.jsx(qQ,{present:n||a.hasThumb,children:og.jsx(x5,{ref:t,...r})})})),x5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=a5(v5,n),i=y5(v5,n),{onThumbPositionChange:s}=i,l=mK(t,(e=>i.onThumbChange(e))),c=X.useRef(void 0),u=R5((()=>{c.current&&(c.current(),c.current=void 0)}),100);return X.useEffect((()=>{const e=o.viewport;if(e){const t=()=>{if(u(),!c.current){const t=O5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),og.jsx(EK.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:pK(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})})),onPointerUp:pK(e.onPointerUp,i.onThumbPointerUp)})}));k5.displayName=v5;var w5="ScrollAreaCorner",E5=X.forwardRef(((e,t)=>{const n=a5(w5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?og.jsx(_5,{...e,ref:t}):null}));E5.displayName=w5;var _5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=a5(w5,n),[o,i]=X.useState(0),[s,l]=X.useState(0),c=Boolean(o&&s);return P5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),P5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?og.jsx(EK.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null}));function S5(e){return e?parseInt(e,10):0}function T5(e,t){const n=e/t;return isNaN(n)?0:n}function C5(e){const t=T5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function A5(e,t,n="ltr"){const r=C5(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,i]:[-1*i,0]);return I5([0,i],[0,s])(l)}function I5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function N5(e,t){return e>0&&e<t}var O5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function R5(e,t){const n=_K(e),r=X.useRef(0);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),X.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function P5(e,t){const n=_K(t);LK((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}var L5=o5,D5=s5,M5=E5;function F5(e,[t,n]){return Math.min(n,Math.max(t,e))}function j5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function z5(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},B5(r,...t)]}function B5(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function H5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function U5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=H5(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():H5(e[t],null)}}}}function $5(...e){return X.useCallback(U5(...e),e)}var V5=Symbol.for("react.lazy"),G5=J[" use ".trim().toString()];function q5(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===V5&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function W5(e){const t=Y5(e),n=X.forwardRef(((e,n)=>{let{children:r,...a}=e;q5(r)&&"function"==typeof G5&&(r=G5(r._payload));const o=X.Children.toArray(r),i=o.find(K5);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Y5(e){const t=X.forwardRef(((e,t)=>{let{children:n,...r}=e;if(q5(n)&&"function"==typeof G5&&(n=G5(n._payload)),X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?U5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Z5=Symbol("radix.slottable");function K5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Z5}var X5=X.createContext(void 0);function Q5(e){const t=X.useContext(X5);return e||t||"ltr"}function J5(e){const t=e3(e),n=X.forwardRef(((e,n)=>{const{children:r,...a}=e,o=X.Children.toArray(r),i=o.find(n3);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function e3(e){const t=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?U5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var t3=Symbol("radix.slottable");function n3(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===t3}var r3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=J5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function a3(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var o3,i3="dismissableLayer.update",s3="dismissableLayer.pointerDownOutside",l3="dismissableLayer.focusOutside",c3=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u3=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(c3),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=$5(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=a3(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){p3(s3,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=a3(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){p3(l3,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=a3(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(o3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),d3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o3)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),d3())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(i3,e),()=>document.removeEventListener(i3,e)}),[]),og.jsx(r3.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:j5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:j5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:j5(e.onPointerDownCapture,x.onPointerDownCapture)})}));u3.displayName="DismissableLayer";function d3(){const e=new CustomEvent(i3);document.dispatchEvent(e)}function p3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(c3),r=X.useRef(null),a=$5(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(r3.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var f3=0;function h3(){X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??m3()),document.body.insertAdjacentElement("beforeend",e[1]??m3()),f3++,()=>{1===f3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),f3--}}),[])}function m3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var g3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=W5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),y3="focusScope.autoFocusOnMount",b3="focusScope.autoFocusOnUnmount",v3={bubbles:!1,cancelable:!0},k3=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=a3(a),u=a3(o),d=X.useRef(null),p=$5(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:_3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||_3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&_3(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){S3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(y3,v3);s.addEventListener(y3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_3(r,{select:t}),document.activeElement!==n)return}((e=x3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&_3(s))}return()=>{s.removeEventListener(y3,c),setTimeout((()=>{const e=new CustomEvent(b3,v3);s.addEventListener(b3,u),s.dispatchEvent(e),e.defaultPrevented||_3(t??document.body,{select:!0}),s.removeEventListener(b3,u),S3.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=x3(e),n=w3(t,e),r=w3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&_3(o,{select:!0})):(e.preventDefault(),n&&_3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx(g3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function x3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function w3(e,t){for(const n of e)if(!E3(n,{upTo:t}))return n}function E3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function _3(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}k3.displayName="FocusScope";var S3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=T3(e,t),e.unshift(t)},remove(t){var n;e=T3(e,t),null==(n=e[0])||n.resume()}}}();function T3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var C3=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(r3.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));C3.displayName="Arrow";var A3=C3;function I3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},N3(r,...t)]}function N3(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var O3="Popper",[R3,P3]=I3(O3),[L3,D3]=R3(O3),M3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(L3,{scope:t,anchor:r,onAnchorChange:a,children:n})};M3.displayName=O3;var F3="PopperAnchor",j3=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=D3(F3,n),i=X.useRef(null),s=$5(t,i),l=X.useRef(null);return X.useEffect((()=>{const e=l.current;l.current=(null==r?void 0:r.current)||i.current,e!==l.current&&o.onAnchorChange(l.current)})),r?null:og.jsx(r3.div,{...a,ref:s})}));j3.displayName=F3;var z3="PopperContent",[B3,H3]=R3(z3),U3=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=D3(z3,l),[E,_]=X.useState(null),S=$5(t,(e=>_(e))),[T,C]=X.useState(null),A=function(e){const[t,n]=X.useState(void 0);return HO((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(T),I=(null==A?void 0:A.width)??0,N=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(q3),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=fQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>JX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[hQ({mainAxis:u+N,alignmentAxis:p}),h&&mQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?gQ():void 0,...D}),h&&yQ({...D}),bQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&kQ({element:T,padding:f}),W3({arrowWidth:I,arrowHeight:N}),b&&vQ({strategy:"referenceHidden",...D})]}),[H,U]=Y3(j),$=a3(k);HO((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return HO((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(B3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(r3.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));U3.displayName=z3;var $3="PopperArrow",V3={top:"bottom",right:"left",bottom:"top",left:"right"},G3=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=H3($3,n),o=V3[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(A3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function q3(e){return null!==e}G3.displayName=$3;var W3=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=Y3(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function Y3(e){const[t,n="center"]=e.split("-");return[t,n]}var Z3=M3,K3=j3,X3=U3,Q3=G3,J3=X.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=X.useState(!1);HO((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?de.createPortal(og.jsx(g3.div,{...a,ref:t}),s):null}));J3.displayName="Portal";const e4=[" ","Enter","ArrowUp","ArrowDown"],t4=[" ","Enter"],n4="Select",[r4,a4,o4]=function(e){const t=e+"CollectionProvider",[n,r]=z5(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=Q.useRef(null),o=Q.useRef(new Map).current;return og.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=W5(s),c=Q.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=$5(t,o(s,n).collectionRef);return og.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=W5(u),f=Q.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=Q.useRef(null),s=$5(t,i),l=o(u,n);return Q.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),og.jsx(p,{[d]:"",ref:s,children:r})}));return f.displayName=u,[{Provider:i,Slot:c,ItemSlot:f},function(t){const n=o(e+"CollectionConsumer",t);return Q.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(n4),[i4]=z5(n4,[o4,P3]),s4=P3(),[l4,c4]=i4(n4),[u4,d4]=i4(n4),p4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,disabled:u,required:d}=e,p=s4(t),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(!1),v=Q5(c),[k,x]=fR({prop:r,defaultProp:a??!1,onChange:o,caller:n4}),[w,E]=fR({prop:i,defaultProp:s,onChange:l,caller:n4}),_=X.useRef(null),[S,T]=X.useState(new Set);return og.jsx(Z3,{...p,children:og.jsx(l4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:VO(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:og.jsx(r4.Provider,{scope:t,children:og.jsx(u4,{scope:e.__scopeSelect,onNativeOptionAdd:X.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:X.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:n})})})})};p4.displayName=n4;const f4="SelectTrigger",h4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=s4(n),i=c4(f4,n),s=i.disabled||r,l=$5(t,i.onTriggerChange),c=a4(n),u=X.useRef("touch"),[d,p,f]=Y4((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=Z4(t,e,n);void 0!==r&&i.onValueChange(r.value)})),h=e=>{s||(i.onOpenChange(!0),f()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return og.jsx(K3,{asChild:!0,...o,children:og.jsx(g3.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":W4(i.value)?"":void 0,...a,ref:l,onClick:j5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:j5(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:j5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||e4.includes(e.key)&&(h(),e.preventDefault())}))})})}));h4.displayName=f4;const m4="SelectValue",g4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=c4(m4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=$5(t,l.onValueNodeChange);return HO((()=>{c(u)}),[c,u]),og.jsx(g3.span,{...s,ref:d,style:{pointerEvents:"none"},children:W4(l.value)?og.jsx(og.Fragment,{children:i}):o})}));g4.displayName=m4;const y4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return og.jsx(g3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));y4.displayName="SelectIcon";const b4="SelectContent",v4=X.forwardRef(((e,t)=>{const n=c4(b4,e.__scopeSelect),[r,a]=X.useState();if(HO((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?ue.createPortal(og.jsx(x4,{scope:e.__scopeSelect,children:og.jsx(r4.Slot,{scope:e.__scopeSelect,children:og.jsx("div",{children:e.children})})}),t):null}return og.jsx(_4,{...e,ref:t})}));v4.displayName=b4;const k4=10,[x4,w4]=i4(b4),E4=W5("SelectContent.RemoveScroll"),_4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=c4(b4,n),[v,k]=X.useState(null),[x,w]=X.useState(null),E=$5(t,(e=>k(e))),[_,S]=X.useState(null),[T,C]=X.useState(null),A=a4(n),[I,N]=X.useState(!1),O=X.useRef(!1);X.useEffect((()=>{if(v)return G1(v)}),[v]),h3();const R=X.useCallback((e=>{const[t,...n]=A().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(null==o||o.scrollIntoView({block:"nearest"}),o===t&&x&&(x.scrollTop=0),o===r&&x&&(x.scrollTop=x.scrollHeight),null==o||o.focus(),document.activeElement!==a)return}}),[A,x]),P=X.useCallback((()=>R([_,v])),[R,_,v]);X.useEffect((()=>{I&&P()}),[I,P]);const{onOpenChange:L,triggerPointerDownPosRef:D}=b;X.useEffect((()=>{if(v){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=D.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=D.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():v.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[v,L,D]),X.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[M,F]=Y4((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Z4(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(S(e),r&&(O.current=!0))}),[b.value]),z=X.useCallback((()=>null==v?void 0:v.focus()),[v]),B=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),H="popper"===r?T4:S4,U=H===T4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return og.jsx(x4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:I,searchRef:M,children:og.jsx(N2,{as:E4,allowPinchZoom:!0,removeScrollBar:!1,children:og.jsx(k3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:j5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:og.jsx(u3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:og.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>N(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:j5(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));_4.displayName="SelectContentImpl";const S4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=c4(b4,n),i=w4(b4,n),[s,l]=X.useState(null),[c,u]=X.useState(null),d=$5(t,(e=>u(e))),p=a4(n),f=X.useRef(!1),h=X.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,v=X.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-k4,d=F5(o,[k4,Math.max(k4,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-k4,d=F5(o,[k4,Math.max(k4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*k4,u=m.scrollHeight,d=window.getComputedStyle(c),h=Number.parseInt(d.borderTopWidth,10),b=Number.parseInt(d.paddingTop,10),v=Number.parseInt(d.borderBottomWidth,10),k=h+b+u+Number.parseInt(d.paddingBottom,10)+v,x=Math.min(5*g.offsetHeight,k),w=window.getComputedStyle(m),E=Number.parseInt(w.paddingTop,10),_=Number.parseInt(w.paddingBottom,10),S=e.top+e.height/2-k4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),I=k-A;if(A<=S){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(T,C+(e?_:0)+t+v);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?E:0)+C)+I;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${k4}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>f.current=!0))}}),[p,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);HO((()=>v()),[v]);const[k,x]=X.useState();HO((()=>{c&&x(window.getComputedStyle(c).zIndex)}),[c]);const w=X.useCallback((e=>{e&&!0===h.current&&(v(),null==b||b(),h.current=!1)}),[v,b]);return og.jsx(C4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:og.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:og.jsx(g3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));S4.displayName="SelectItemAlignedPosition";const T4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=k4,...o}=e,i=s4(n);return og.jsx(X3,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));T4.displayName="SelectPopperPosition";const[C4,A4]=i4(b4,{}),I4="SelectViewport",N4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=w4(I4,n),i=A4(I4,n),s=$5(t,o.onViewportChange),l=X.useRef(0);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),og.jsx(r4.Slot,{scope:n,children:og.jsx(g3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:j5(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*k4,a=Number.parseFloat(n.style.minHeight),o=Number.parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))})})]})}));N4.displayName=I4;const O4="SelectGroup",[R4,P4]=i4(O4);X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=VO();return og.jsx(R4,{scope:n,id:a,children:og.jsx(g3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=O4;const L4="SelectLabel";X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=P4(L4,n);return og.jsx(g3.div,{id:a.id,...r,ref:t})})).displayName=L4;const D4="SelectItem",[M4,F4]=i4(D4),j4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=c4(D4,n),l=w4(D4,n),c=s.value===r,[u,d]=X.useState(o??""),[p,f]=X.useState(!1),h=$5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=VO(),g=X.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return og.jsx(M4,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:X.useCallback((e=>{d((t=>t||((null==e?void 0:e.textContent)??"").trim()))}),[]),children:og.jsx(r4.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:og.jsx(g3.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:j5(i.onFocus,(()=>f(!0))),onBlur:j5(i.onBlur,(()=>f(!1))),onClick:j5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:j5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:j5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:j5(i.onPointerMove,(e=>{var t;g.current=e.pointerType,a?null==(t=l.onItemLeave)||t.call(l):"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:j5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:j5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(t4.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));j4.displayName=D4;const z4="SelectItemText",B4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=c4(z4,n),s=w4(z4,n),l=F4(z4,n),c=d4(z4,n),[u,d]=X.useState(null),p=$5(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,l.value,l.disabled)})),f=null==u?void 0:u.textContent,h=X.useMemo((()=>og.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return HO((()=>(m(h),()=>g(h))),[m,g,h]),og.jsxs(og.Fragment,{children:[og.jsx(g3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ue.createPortal(o.children,i.valueNode):null]})}));B4.displayName=z4;const H4="SelectItemIndicator",U4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return F4(H4,n).isSelected?og.jsx(g3.span,{"aria-hidden":!0,...r,ref:t}):null}));U4.displayName=H4;const $4="SelectScrollUpButton";X.forwardRef(((e,t)=>{const n=w4($4,e.__scopeSelect),r=A4($4,e.__scopeSelect),[a,o]=X.useState(!1),i=$5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(G4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=$4;const V4="SelectScrollDownButton";X.forwardRef(((e,t)=>{const n=w4(V4,e.__scopeSelect),r=A4(V4,e.__scopeSelect),[a,o]=X.useState(!1),i=$5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(G4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=V4;const G4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=w4("SelectScrollButton",n),i=X.useRef(null),s=a4(n),l=X.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return X.useEffect((()=>()=>l()),[l]),HO((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})}),[s]),og.jsx(g3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:j5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:j5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:j5(a.onPointerLeave,(()=>{l()}))})}));X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return og.jsx(g3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const q4="SelectArrow";function W4(e){return""===e||void 0===e}function Y4(e){const t=a3(e),n=X.useRef(""),r=X.useRef(0),a=X.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=X.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function Z4(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(o=o.filter((e=>e!==n)));const l=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=s4(n),o=c4(q4,n),i=w4(q4,n);return o.open&&"popper"===i.position?og.jsx(Q3,{...a,...r,ref:t}):null})).displayName=q4;const K4=p4,X4=h4,Q4=g4,J4=y4,e6=v4,t6=N4,n6=j4,r6=B4,a6=U4;var o6=(e,t=[])=>({parts:(...n)=>{if(s6(t))return o6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>o6(e,[...t,...n]),omit:(...n)=>o6(e,t.filter((e=>!n.includes(e)))),rename:e=>o6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${i6(e)}"][data-part="${i6(n)}"]`,`& [data-scope="${i6(e)}"][data-part="${i6(n)}"]`].join(", "),attrs:{"data-scope":i6(e),"data-part":i6(n)}}})),{})}),i6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),s6=e=>0===e.length,l6=o6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),c6=Object.defineProperty,u6=(e,t,n)=>((e,t,n)=>t in e?c6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),d6={itemToValue:e=>"string"==typeof e?e:nW(e)&&aW(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:nW(e)&&aW(e,"label")?e.label:d6.itemToValue(e),isItemDisabled:e=>!(!nW(e)||!aW(e,"disabled"))&&!!e.disabled},p6=class e{constructor(t){this.options=t,u6(this,"items"),u6(this,"indexMap",null),u6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),u6(this,"isEqual",(e=>eW(this.items,e.items))),u6(this,"setItems",(e=>this.copy(e))),u6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),u6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),u6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),u6(this,"at",(e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;const n=this.group();for(const[,r]of n)for(const n of r){if(t===e)return n;t++}return null})),u6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),u6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),u6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??d6.itemToValue(e)})),u6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??d6.isItemDisabled(e))})),u6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??d6.itemToString(e)})),u6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),u6(this,"stringifyItems",((e,t=", ")=>{const n=[];for(const r of e){const e=this.stringifyItem(r);null!=e&&n.push(e)}return n.join(t)})),u6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),u6(this,"has",(e=>-1!==this.indexOf(e))),u6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),u6(this,"group",(()=>{const{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];const n=new Map;this.items.forEach(((t,r)=>{const a=e(t,r);n.has(a)||n.set(a,[]),n.get(a).push(t)}));let r=Array.from(n.entries());return t&&r.sort((([e],[n])=>{if("function"==typeof t)return t(e,n);if(Array.isArray(t)){const r=t.indexOf(e),a=t.indexOf(n);return-1===r?1:-1===a?-1:r-a}return"asc"===t?e.localeCompare(n):"desc"===t?n.localeCompare(e):0})),r})),u6(this,"getNextValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))})),u6(this,"getPreviousValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))})),u6(this,"indexOf",(e=>{if(null==e)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex((t=>this.getItemValue(t)===e));if(!this.indexMap){this.indexMap=new Map;let e=0;const t=this.group();for(const[,n]of t)for(const t of n){const n=this.getItemValue(t);null!=n&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1})),u6(this,"getByText",((e,t)=>{const n=null!=t?this.indexOf(t):-1,r=1===e.length;for(let a=0;a<this.items.length;a++){const o=this.items[(n+a+1)%this.items.length];if((!r||this.getItemValue(o)!==t)&&(!this.getItemDisabled(o)&&f6(this.stringifyItem(o),e)))return o}})),u6(this,"search",((e,t)=>{const{state:n,currentValue:r,timeout:a=350}=t,o=n.keysSoFar+e,i=o.length>1&&Array.from(o).every((e=>e===o[0]))?o[0]:o,s=this.getByText(i,r),l=this.getItemValue(s);function c(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,c(),""!==t&&(n.timer=+setTimeout((()=>{e(""),c()}),a))}(o),l})),u6(this,"update",((e,t)=>{let n=this.indexOf(e);return-1===n?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])})),u6(this,"upsert",((e,t,n="append")=>{let r=this.indexOf(e);if(-1===r){return("append"===n?this.append:this.prepend)(t)}return this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])})),u6(this,"insert",((e,...t)=>this.copy(h6(this.items,e,...t)))),u6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(h6(this.items,n,...t))})),u6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(h6(this.items,n+1,...t))})),u6(this,"prepend",((...e)=>this.copy(h6(this.items,0,...e)))),u6(this,"append",((...e)=>this.copy(h6(this.items,this.items.length,...e)))),u6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),u6(this,"remove",((...e)=>{const t=e.map((e=>"string"==typeof e?e:this.getItemValue(e)));return this.copy(this.items.filter((e=>{const n=this.getItemValue(e);return null!=n&&!t.includes(n)})))})),u6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(m6(this.items,[n],t))})),u6(this,"moveBefore",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(m6(this.items,r,n))})),u6(this,"moveAfter",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(m6(this.items,r,n+1))})),u6(this,"reorder",((e,t)=>this.copy(m6(this.items,[e],t)))),u6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),u6(this,"range",((e,t)=>{let n=[],r=e;for(;null!=r;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]})),u6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),u6(this,"toString",(()=>{let e="";for(const t of this.items){e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e})),u6(this,"toJSON",(()=>({size:this.size,first:this.firstValue,last:this.lastValue}))),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},f6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function h6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function m6(e,t,n){const r=(t=[...t].sort(((e,t)=>e-t))).map((t=>e[t]));for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return n=Math.max(0,n-t.filter((e=>e<n)).length),[...e.slice(0,n),...r,...e.slice(n)]}function g6({values:e,collection:t,selectedItemMap:n}){const r=[];for(const a of e){const e=t.find(a)??n.get(a);null!=e&&r.push(e)}return r}function y6({selectedItemMap:e,values:t,selectedItems:n,collection:r}){const a=new Map(e);for(const i of n){const e=r.getItemValue(i);null!=e&&a.set(e,i)}const o=new Set(t);for(const i of a.keys())o.has(i)||a.delete(i);return a}function b6({values:e,collection:t,selectedItemMap:n}){const r=g6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:y6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function v6({selectedItems:e,collection:t}){return y6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var k6=e=>new p6(e);function x6(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const a={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function w6(e,t){return{contextElement:zW(e)?e:null==e?void 0:e.contextElement,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return x6();const{x:t,y:n,width:r,height:a}=e;return x6(t,n,r,a)}(r):n.getBoundingClientRect()}}}k6.empty=()=>new p6({items:[]});var E6=e=>({variable:e,reference:`var(${e})`}),_6={arrowSize:E6("--arrow-size"),arrowSizeHalf:E6("--arrow-size-half"),arrowBg:E6("--arrow-background"),transformOrigin:E6("--transform-origin"),arrowOffset:E6("--arrow-offset")};function S6(e,t){return{name:"transformOrigin",fn(n){var r,a,o,i;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,p=c.split("-")[0],f=(e=>"top"===e||"bottom"===e?"y":"x")(p),h=(null==(r=l.arrow)?void 0:r.x)||0,m=(null==(a=l.arrow)?void 0:a.y)||0,g=(null==t?void 0:t.clientWidth)||0,y=(null==t?void 0:t.clientHeight)||0,b=h+g/2,v=m+y/2,k=Math.abs((null==(o=l.shift)?void 0:o.y)||0),x=u.reference.height/2,w=y/2,E=(null==(i=e.offset)?void 0:i.mainAxis)??e.gutter,_="number"==typeof E?E+w:E??w,S=k>_,T={top:`${b}px calc(100% + ${_}px)`,bottom:`${b}px ${-_}px`,left:`calc(100% + ${_}px) ${v}px`,right:`${-_}px ${v}px`}[p],C=`${b}px ${u.reference.y+x-d}px`,A=Boolean(e.overlap)&&"y"===f&&S;return s.floating.style.setProperty(_6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var T6={name:"rects",fn:({rects:e})=>({data:e})},C6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:a}=n.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=r?`${r}px`:"",top:null!=a?`${a}px`:"",[o]:`calc(100% + ${_6.arrowOffset.reference})`}),{}}}};var A6={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function I6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function N6(e,t){return null!=e&&Math.abs(e-t)<.5}function O6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function R6(e,t,n){const r=e||t.createElement("div");return oQ({element:r,padding:n.arrowPadding})}function P6(e,t){if(null!=(t.offset??t.gutter))return eQ((({placement:n})=>{var r,a;const o=((null==e?void 0:e.clientHeight)||0)/2,i=(null==(r=t.offset)?void 0:r.mainAxis)??t.gutter,s="number"==typeof i?i+o:i??o,{hasAlign:l}=function(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:null!=n}}(n),c=l?void 0:t.shift;return fW({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function L6(e){if(!e.flip)return;const t=O6(e.boundary);return nQ({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function D6(e){if(!e.slide&&!e.overlap)return;const t=O6(e.boundary);return tQ({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:iQ()})}function M6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return rQ({padding:e.overflowPadding,apply({elements:e,rects:o,availableHeight:i,availableWidth:s}){const l=e.floating,c=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),i=Math.floor(i),N6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),N6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),N6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),N6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function F6(e){if(e.hideWhenDetached)return aQ({strategy:"referenceHidden",boundary:O6(e.boundary)??"clippingAncestors"})}var j6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],z6=["top","right","bottom","left"];function B6(e,t){if(!e)return uW;const n=new Map(t.map((t=>[t,e.style.getPropertyValue(t)])));return()=>{n.forEach(((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)})),0===e.style.length&&e.removeAttribute("style")}}function H6(e,t,n={}){const{defer:r,...a}=n,o=r?DY:e=>e(),i=[];return i.push(o((()=>{const n="function"==typeof e?e():e,r="function"==typeof t?t():t;i.push(function(e,t,n={}){var r;const a=w6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},A6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?B6(t,j6):void 0,l=o.restoreStyles?B6(i,z6):void 0,c=[P6(i,o),L6(o),D6(o),R6(i,t.ownerDocument,o),C6(i),S6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),M6(o),F6(o),T6],{placement:u,strategy:d,onComplete:p,onPositioned:f}=o;let h,m,g=!1;const y=async()=>{var e;if(!a||!t)return;const n=await sQ(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=ZW(t),i=I6(r,n.x),s=I6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,N6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),N6(m,s)||(t.style.setProperty("--y",`${s}px`),m=s),o.hideWhenDetached&&((null==(e=n.middlewareData.hide)?void 0:e.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!g){const e=t.firstElementChild;e&&(t.style.setProperty("--z-index",eY(e).zIndex),g=!0)}},b=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:y,floatingElement:t}),null==f||f({placed:!0})):await y()},v=function(e){return e?!0===e?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}(o.listeners),k=o.listeners?JX(a,t,b,v):uW;return b(),()=>{null==k||k(),null==l||l(),null==s||s(),null==f||f({placed:!1})}}(n,r,a))}))),()=>{i.forEach((e=>null==e?void 0:e()))}}var U6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var $6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},V6=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},G6=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},q6=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},W6=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},Y6=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},Z6=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},K6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroup)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup:${t}`},X6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroupLabel)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup-label:${t}`},Q6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.item)?void 0:r.call(n,t))??`combobox:${e.id}:option:${t}`},J6=e=>e.getById(q6(e)),e8=e=>e.getById(G6(e)),t8=e=>e.getById(W6(e)),n8=e=>e.getById(V6(e)),r8=e=>e.getById(Y6(e)),a8=(e,t)=>{if(null==t)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return function(e,t){return(null==e?void 0:e.querySelector(t))??null}(J6(e),n)},o8=e=>{const t=e8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),LW(t)};function i8(e,t){const{context:n,prop:r,state:a,send:o,scope:i,computed:s,event:l}=e,c=r("translations"),u=r("collection"),d=!!r("disabled"),p=s("isInteractive"),f=!!r("invalid"),h=!!r("required"),m=!!r("readOnly"),g=a.hasTag("open"),y=a.hasTag("focused"),b=r("composite"),v=n.get("highlightedValue"),k=function(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:_6.arrowSize.reference,height:_6.arrowSize.reference,[_6.arrowSizeHalf.variable]:`calc(${_6.arrowSize.reference} / 2)`,[_6.arrowOffset.variable]:`calc(${_6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?U6[t.split("-")[0]]:void 0,background:_6.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}({...r("positioning"),placement:n.get("currentPlacement")});function x(e){const t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return gW(r,(()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`)),{value:r,disabled:Boolean(d||t),highlighted:v===r,selected:n.get("value").includes(r)}}return{focused:y,open:g,inputValue:n.get("inputValue"),highlightedValue:v,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:s("valueAsString"),hasSelectedItems:s("hasSelectedItems"),selectedItems:s("selectedItems"),collection:r("collection"),multiple:!!r("multiple"),disabled:!!d,syncSelectedItems(){o({type:"SELECTED_ITEMS.SYNC"})},reposition(e={}){o({type:"POSITIONING.SET",options:e})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},setInputValue(e,t="script"){o({type:"INPUT_VALUE.SET",value:e,src:t})},clearValue(e){o(null!=e?{type:"ITEM.CLEAR",value:e}:{type:"VALUE.CLEAR"})},focus(){var e;null==(e=e8(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...l6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":FW(f),"data-readonly":FW(m)});var e,n},getLabelProps:()=>t.label({...l6.label.attrs,dir:r("dir"),htmlFor:G6(i),id:$6(i),"data-readonly":FW(m),"data-disabled":FW(d),"data-invalid":FW(f),"data-required":FW(h),"data-focus":FW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=r8(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...l6.control.attrs,dir:r("dir"),id:V6(i),"data-state":g?"open":"closed","data-focus":FW(y),"data-disabled":FW(d),"data-invalid":FW(f)}),getPositionerProps:()=>t.element({...l6.positioner.attrs,dir:r("dir"),id:W6(i),style:k.floating}),getInputProps:()=>t.input({...l6.input.attrs,dir:r("dir"),"aria-invalid":jW(f),"data-invalid":FW(f),"data-autofocus":FW(r("autoFocus")),name:r("name"),form:r("form"),disabled:d,required:r("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:m,placeholder:r("placeholder"),id:G6(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":q6(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?Q6(i,v):void 0,onClick(e){e.defaultPrevented||r("openOnClick")&&p&&o({type:"INPUT.CLICK",src:"input-click"})},onFocus(){d||o({type:"INPUT.FOCUS"})},onBlur(){d||o({type:"INPUT.BLUR"})},onChange(e){o({type:"INPUT.CHANGE",value:e.currentTarget.value,src:"input-change"})},onKeyDown(e){if(e.defaultPrevented)return;if(!p)return;if(e.ctrlKey||e.shiftKey||function(e){return function(e){return e.nativeEvent??e}(e).isComposing||229===e.keyCode}(e))return;const t=r("openOnKeyPress"),n=e.ctrlKey||e.metaKey||e.shiftKey,a=!0,l={ArrowDown(e){(t||g)&&(o({type:e.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:a,src:"arrow-key"}),e.preventDefault())},ArrowUp(){(t||g)&&(o({type:e.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:a,src:"arrow-key"}),e.preventDefault())},Home(e){n||(o({type:"INPUT.HOME",keypress:a}),g&&e.preventDefault())},End(e){n||(o({type:"INPUT.END",keypress:a}),g&&e.preventDefault())},Enter(e){var t;o({type:"INPUT.ENTER",keypress:a,src:"item-select"});const n=s("isCustomValue")&&r("allowCustomValue"),l=null!=v,c=r("alwaysSubmitOnEnter");if(g&&!n&&!c&&l&&e.preventDefault(),null==v)return;const u=a8(i,v);var d;(null==(d=u)?void 0:d.matches("a[href]"))&&(null==(t=r("navigate"))||t({value:v,node:u,href:u.href}))},Escape(){o({type:"INPUT.ESCAPE",keypress:a,src:"escape-key"}),e.preventDefault()}}[kY(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...l6.trigger.attrs,dir:r("dir"),id:Y6(i),"aria-haspopup":b?"listbox":"dialog",type:"button",tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":g,"data-state":g?"open":"closed","aria-controls":g?q6(i):void 0,disabled:d,"data-invalid":FW(f),"data-focusable":FW(e.focusable),"data-readonly":FW(m),"data-disabled":FW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&gY(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&gY(e)&&(e.preventDefault(),queueMicrotask((()=>{o8(i)})))},onKeyDown(e){if(e.defaultPrevented)return;if(b)return;const t={ArrowDown(){o({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){o({type:"INPUT.ARROW_UP",src:"arrow-key"})}}[kY(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...l6.content.attrs,dir:r("dir"),id:q6(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":$6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":FW(0===u.size),onPointerDown(e){gY(e)&&e.preventDefault()}}),getListProps:()=>t.element({...l6.list.attrs,role:b?void 0:"listbox","data-empty":FW(0===u.size),"aria-labelledby":$6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...l6.clearTrigger.attrs,dir:r("dir"),id:Z6(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":FW(f),"aria-label":c.clearTriggerLabel,"aria-controls":G6(i),hidden:!n.get("value").length,onPointerDown(e){gY(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||p&&o({type:"VALUE.CLEAR",src:"clear-trigger"})}}),getItemState:x,getItemProps(e){const n=x(e),a=n.value;return t.element({...l6.item.attrs,dir:r("dir"),id:Q6(i,a),role:"option",tabIndex:-1,"data-highlighted":FW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":jW(n.selected),"aria-disabled":jW(n.disabled),"data-disabled":FW(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||o({type:"ITEM.POINTER_MOVE",value:a})},onPointerLeave(){if(e.persistFocus)return;if(n.disabled)return;const t=l.previous();(null==t?void 0:t.type.includes("POINTER"))&&o({type:"ITEM.POINTER_LEAVE",value:a})},onClick(e){(function(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)})(e)||hY(e)||yY(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...l6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":FW(n.disabled),"data-highlighted":FW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...l6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...l6.itemGroup.attrs,dir:r("dir"),id:K6(i,n),"aria-labelledby":X6(i,n),"data-empty":FW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...l6.itemGroupLabel.attrs,dir:r("dir"),id:X6(i,n),role:"presentation"})}}}var s8="pointerdown.outside",l8="focus.outside";function c8(e){for(const t of e)if(zW(t)&&NY(t))return!0;return!1}var u8=e=>"clientY"in e;function d8(e,t){if(!t||!u8(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,o=a&&e.clientY>t.offsetTop+t.clientHeight;return!!function(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(a?16:0)},{x:e.clientX,y:e.clientY})&&(r||o)}function p8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=YW(e),c=ZW(e),u=function(e){const t={each(t){var n;for(let r=0;r<(null==(n=e.frames)?void 0:n.length);r+=1){const n=e.frames[r];n&&t(n)}},addEventListener:(e,n,r)=>(t.each((t=>{try{t.document.addEventListener(e,n,r)}catch{}})),()=>{try{t.removeEventListener(e,n,r)}catch{}}),removeEventListener(e,n,r){t.each((t=>{try{t.document.removeEventListener(e,n,r)}catch{}}))}};return t}(c),d=function(e){const t=null!=e.frameElement?e.parent:null;return{addEventListener:(e,n,r)=>{try{null==t||t.addEventListener(e,n,r)}catch{}return()=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}}}(c);function p(t,r){if(!zW(r))return!1;if(!r.isConnected)return!1;if(WW(e,r))return!1;if(function(e,t){if(!u8(t)||!e)return!1;const n=e.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}(e,t))return!1;if(s&&aY(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(d8(t,zY(a)))return!1}return!d8(t,zY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=$W(null==e?void 0:e.getRootNode());let m=!1;function g(t){m=!0;const n=()=>{m=!1};function r(n){var r;const s=i&&!uY()?DY:e=>e(),l=n??t,c=(null==(r=null==l?void 0:l.composedPath)?void 0:r.call(l))??[null==l?void 0:l.target];s((()=>{const n=h?c[0]:fY(t);if(e&&p(t,n)){if(a||o){const t=dW(a,o);e.addEventListener(s8,t,{once:!0})}h8(e,s8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:yY(l),focusable:c8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(xY(l,"click",r,{once:!0})),f.add(d.addEventListener("click",r,{once:!0})),f.add(u.addEventListener("click",r,{once:!0}))):r()}const y=new Set,b=setTimeout((()=>{y.add(xY(l,"pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0))}),0);function v(t){if(m)return;(i?DY:e=>e())((()=>{var n;const a=(null==(n=null==t?void 0:t.composedPath)?void 0:n.call(t))??[null==t?void 0:t.target],i=h?a[0]:fY(t);if(e&&p(t,i)){if(r||o){const t=dW(r,o);e.addEventListener(l8,t,{once:!0})}h8(e,l8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:NY(i),target:i}})}}))}return uY()||(y.add(xY(l,"focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0))),()=>{clearTimeout(b),f.forEach((e=>e())),y.forEach((e=>e()))}}function f8(e,t){const{defer:n}=t,r=n?DY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(p8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function h8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function m8(e,t){return xY(YW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var g8,y8="layer:request-dismiss",b8={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter((e=>e.pointerBlocking))},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(null==(t=this.topMostPointerBlockingLayer())?void 0:t.node):-1)},isTopMost(e){const t=this.layers[this.count()-1];return(null==t?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter((t=>t.type===e))},getNestedLayersByType(e,t){const n=this.indexOf(e);return-1===n?[]:this.layers.slice(n+1).filter((e=>e.type===t))},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find((e=>e.type===t))},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some((e=>WW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>WW(t,e)))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(!(t<0)){if(this.recentlyRemoved.add(e),MY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>b8.dismiss(t.node,e)))}this.layers.splice(t,1),this.syncLayers()}},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach(((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested");this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)}))},indexOf(e){return this.layers.findIndex((t=>t.node===e))},dismiss(e,t){const n=this.indexOf(e);if(-1===n)return;const r=this.layers[n];var a,o;a=y8,o=e=>{var t;null==(t=r.requestDismiss)||t.call(r,e),e.defaultPrevented||null==r||r.dismiss()},e.addEventListener(a,o,{once:!0}),function(e,t,n){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});e.dispatchEvent(a)}(e,y8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v8(){b8.layers.forEach((({node:e})=>{e.style.pointerEvents=b8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function k8(e,t){const n=YW(e),r=[];return b8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(g8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=GY((()=>{const t=e();return zW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(VY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{b8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=g8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function x8(e,t){const{defer:n}=t,r=n?DY:e=>e(),a=[];return a.push(r((()=>{const n=rW(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void hW("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;const{onDismiss:r,onRequestDismiss:a,pointerBlocking:o,exclude:i,debug:s,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:o,requestDismiss:a};b8.add(c),v8();const u=[o?k8(e,t.persistentElements):void 0,m8(e,(function(n){var a;b8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),f8(e,{exclude:function(n){var r;if(!e)return!1;const a="function"==typeof i?i():i,o=Array.isArray(a)?a:[a],s=null==(r=t.persistentElements)?void 0:r.map((e=>e())).filter(zW);return s&&o.push(...s),o.some((e=>WW(e,n)))||b8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=fY(e.detail.originalEvent);b8.isInBranch(o)||(null==(n=t.onFocusOutside)||n.call(t,e),null==(a=t.onInteractOutside)||a.call(t,e),e.defaultPrevented||(s&&console.log("onFocusOutside:",e.detail.originalEvent),null==r||r()))},onPointerDownOutside:function(n){var a,o;const i=fY(n.detail.originalEvent);b8.isBelowPointerBlockingLayer(e)||b8.isInBranch(i)||(null==(a=t.onPointerDownOutside)||a.call(t,n),null==(o=t.onInteractOutside)||o.call(t,n),n.defaultPrevented||(s&&console.log("onPointerDownOutside:",n.detail.originalEvent),null==r||r()))},defer:t.defer})];return()=>{b8.remove(e),v8(),function(e){e.style.pointerEvents=""}(e),u.forEach((e=>null==e?void 0:e()))}}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}var w8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var E8=null,_8=new Set,S8=new Map,T8=!1,C8=!1,A8={Tab:!0,Escape:!0};function I8(e,t){for(let n of _8)n(e,t)}function N8(e){T8=!0,function(e){return!(e.metaKey||!pY()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(E8="keyboard",I8("keyboard",e))}function O8(e){E8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(T8=!0,I8("pointer",e))}function R8(e){mY(e)&&(T8=!0,E8="virtual")}function P8(e){const t=fY(e);t!==ZW(t)&&t!==YW(t)&&e.isTrusted&&(T8||C8||(E8="virtual",I8("virtual",e)),T8=!1,C8=!1)}function L8(){T8=!1,C8=!0}var D8=(e,t)=>{const n=ZW(e),r=YW(e),a=S8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",N8,!0),r.removeEventListener("keyup",N8,!0),r.removeEventListener("click",R8,!0),n.removeEventListener("focus",P8,!0),n.removeEventListener("blur",L8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",O8,!0),r.removeEventListener("pointermove",O8,!0),r.removeEventListener("pointerup",O8,!0)):(r.removeEventListener("mousedown",O8,!0),r.removeEventListener("mousemove",O8,!0),r.removeEventListener("mouseup",O8,!0)),S8.delete(n)}};function M8(){return"keyboard"===E8||"virtual"===E8}function F8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||S8.get(ZW(e)))return;const t=ZW(e),n=YW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){T8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",N8,!0),n.addEventListener("keyup",N8,!0),n.addEventListener("click",R8,!0),t.addEventListener("focus",P8,!0),t.addEventListener("blur",L8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",O8,!0),n.addEventListener("pointermove",O8,!0),n.addEventListener("pointerup",O8,!0)):(n.addEventListener("mousedown",O8,!0),n.addEventListener("mousemove",O8,!0),n.addEventListener("mouseup",O8,!0)),t.addEventListener("beforeunload",(()=>{D8(e)}),{once:!0}),S8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||M8(),modality:E8});const o=(e,n)=>{(function(e,t,n){const r=n?fY(n):null,a=YW(r),o=ZW(r),i=KW(a);return!((e=e||i instanceof o.HTMLInputElement&&!w8.has(null==i?void 0:i.type)||i instanceof o.HTMLTextAreaElement||i instanceof o.HTMLElement&&i.isContentEditable)&&"keyboard"===t&&n instanceof o.KeyboardEvent&&!Reflect.has(A8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:M8(),modality:e}))};return _8.add(o),()=>{_8.delete(o)}}var{guards:j8,createMachine:z8,choose:B8}={guards:{and:(...e)=>function(t){return e.every((e=>t.guard(e)))},or:(...e)=>function(t){return e.some((e=>t.guard(e)))},not:e=>function(t){return!t.guard(e)}},createMachine:e=>IW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:H8,not:U8}=j8,$8=z8({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){jY(e)},collection:k6.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open.suggesting":"closed.idle",context({prop:e,bindable:t,getContext:n,getEvent:r}){const a=e("value")??e("defaultValue")??[],o=e("collection").findMany(a);return{currentPlacement:t((()=>({defaultValue:void 0}))),value:t((()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:eW,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=b6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:b6({values:s,collection:o,selectedItemMap:i.nextSelectedItemMap});a.set("selectedItemMap",l.nextSelectedItemMap),null==(r=e("onValueChange"))||r({value:t,items:i.selectedItems})}}))),highlightedValue:t((()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){var n;const r=e("collection").find(t);null==(n=e("onHighlightChange"))||n({highlightedValue:t,highlightedItem:r})}}))),inputValue:t((()=>{let t=e("inputValue")||e("defaultInputValue");const n=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){const r=e("collection").stringifyMany(n);t=pW(e("selectionBehavior"),{preserve:t||r,replace:r,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){var n;const a=r(),o=(a.previousEvent||a).src;null==(n=e("onInputValueChange"))||n({inputValue:t,reason:o})}}})),highlightedItem:t((()=>{const t=e("highlightedValue");return{defaultValue:e("collection").find(t)}})),selectedItemMap:t((()=>({defaultValue:v6({selectedItems:o,collection:e("collection")})})))}},computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,selectedItems:({context:e,prop:t})=>g6({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:r,send:a}){n([()=>e.hash("value")],(()=>{r(["syncSelectedItems"])})),n([()=>e.get("inputValue")],(()=>{r(["syncInputValue"])})),n([()=>e.get("highlightedValue")],(()=>{r(["syncHighlightedItem","autofillInputValue"])})),n([()=>t("open")],(()=>{r(["toggleVisibility"])})),n([()=>t("collection").toString()],(()=>{a({type:"CHILDREN_CHANGE"})}))},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:B8([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{closed:{tags:["closed"],initial:"idle",states:{idle:{tags:["idle"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"open.interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"open.suggesting"},{target:"open.interacting"}],"INPUT.CHANGE":[{guard:H8("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"open.suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:H8("isCustomValue",U8("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:H8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:H8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}}}},open:{tags:["open","focused"],entry:["setInitialFocus"],effects:["trackFocusVisible","scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"closed.focused",actions:["setFinalFocus"]},{target:"closed.idle"}],"INPUT.ENTER":[{guard:H8("isOpenControlled","isCustomValue",U8("hasHighlightedItem"),U8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:H8("isCustomValue",U8("hasHighlightedItem"),U8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:H8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:H8("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:H8("isOpenControlled","isCustomValue",U8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:H8("isCustomValue",U8("allowCustomValue")),target:"closed.idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"closed.focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]},initial:"interacting",states:{interacting:{on:{CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:H8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:H8("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.ESCAPE":[{guard:H8("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"closed.focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:H8("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return!0===(r=n)||!1===r?n:!!(null==n?void 0:n({inputValue:t.get("inputValue")}));var r},restoreFocus:({event:e})=>{var t;const n=e.restoreFocus??(null==(t=e.previousEvent)?void 0:t.restoreFocus);return null==n||!!n},isChangeEvent:({event:e})=>{var t;return"INPUT.CHANGE"===(null==(t=e.previousEvent)?void 0:t.type)},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackFocusVisible({scope:e}){var t;return F8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return x8((()=>J6(n)),{type:"listbox",defer:!0,exclude:()=>{return[e8(n),r8(n),(e=n,e.getById(Z6(e)))];var e},onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement:({context:e,prop:t,scope:n})=>(e.set("currentPlacement",t("positioning").placement),H6((()=>n8(n)||r8(n)),(()=>t8(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=e8(n);let a=[];const o=r=>{if("pointer"===E8)return;const o=e.get("highlightedValue");if(!o)return;const i=J6(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>a8(n,o)})}const l=a8(n,o),c=DY((()=>{$Y(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=DY((()=>{var e;E8=e="virtual",I8(e,null),o(!0)}));a.push(i);const s=FY(r,{attributes:["aria-activedescendant"],callback:()=>o(!1)});return a.push(s),()=>{a.forEach((e=>e()))}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){H6((()=>n8(n)),(()=>t8(n)),{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:r}=e,a=r("collection"),o=n.get("highlightedValue");if(!o||!a.has(o))return;const i=r("multiple")?Qq(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=pW(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){MY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=a8(n,r),o=J6(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>a8(n,r)})}else $Y(a,{rootEl:o,block:"nearest"})}))},selectItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{var e;const r=a("multiple")?Qq(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=pW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r),clear:""});t.set("inputValue",o)}))},clearItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{const e=Xq(t.get("value"),n.value);t.set("value",e);const r=pW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){DY((()=>{o8(e)}))},setFinalFocus({scope:e}){DY((()=>{const t=r8(e);null==(null==t?void 0:t.dataset.focusable)?o8(e):(e=>{const t=r8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=e8(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&LW(r)})))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const r=pW(t("selectionBehavior"),{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){const{context:t,flush:n,event:r,prop:a}=e;n((()=>{t.set("value",r.value);const e=pW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r.value),clear:""});t.set("inputValue",e)}))},clearSelectedItems(e){const{context:t,flush:n,prop:r}=e;n((()=>{t.set("value",[]);const e=pW(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany([]),clear:""});t.set("inputValue",e)}))},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const r=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>a8(t,r)})}else{const e=J6(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=V8(t);null==(r=e("onOpenChange"))||r({open:!0,reason:a,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;const a=V8(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(J6(n)?queueMicrotask:DY)((()=>{const n=t("collection").firstValue;n&&e.set("highlightedValue",n)}))},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(J6(n)?queueMicrotask:DY)((()=>{const n=t("collection").lastValue;n&&e.set("highlightedValue",n)}))},highlightNextItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getNextValue(r),!n&&t("loopFocus")&&(n=a.firstValue)):n=a.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getPreviousValue(r),!n&&t("loopFocus")&&(n=a.lastValue)):n=a.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){DY((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){DY((()=>{let r=null;r=n("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue,r&&e.set("highlightedValue",r)}))},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){DY((()=>{const r=t("collection");let a=null;a=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue,a&&e.set("highlightedValue",a)}))},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:a}){const o=e8(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));DY((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=b6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=pW(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:r.stringifyMany(a),clear:""});t.set("inputValue",i)}))},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function V8(e){return(e.previousEvent||e).src}const G8=X.forwardRef(((e,t)=>{const{children:n,defaultValue:r=[],items:a,multiple:o=!1,placeholder:i,name:s,disabled:l,required:c,id:u,onValueChange:d}=e,p=X.useId(),f=u??p,h=qO(),[m,g]=X.useState(a),y=X.useMemo((()=>k6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=i8(ZY($8,{id:f,collection:y,defaultValue:r,multiple:o,placeholder:i,name:s,disabled:l,required:c,openOnClick:!0,getRootNode:()=>{var e;return(null==(e=null==h?void 0:h.shadowHost)?void 0:e.shadowRoot)??document},selectionBehavior:o?"clear":"replace",onOpenChange(e){e.open||g(a)},onInputValueChange(e){const t=""===e.inputValue.trim()?a:a.filter((t=>t.label.toLowerCase().includes(e.inputValue.toLowerCase())));g(t.length>0?t:[])},onValueChange(e){null==d||d(e)}}),JY),v=X.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return og.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:og.jsx(o9.Provider,{value:v,children:n})})}));G8.displayName="ComboboxRoot";const q8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=i9(),o=a.getControlProps();return og.jsx("div",{"data-scope":"combobox","data-part":"control","data-state":a.open?"open":"closed","data-disabled":a.disabled?"":void 0,"data-focus":a.focused?"":void 0,...o,ref:W8(t,o.ref),...r,children:n})}));function W8(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}q8.displayName="ComboboxControl";const Y8=X.forwardRef(((e,t)=>{const n=i9(),r=n.getInputProps();return og.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:W8(t,r.ref)})}));Y8.displayName="ComboboxInput";const Z8=X.forwardRef(((e,t)=>{const n=i9(),r=n.getTriggerProps();return og.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:W8(t,r.ref),...e,children:e.children??"▼"})}));Z8.displayName="ComboboxTrigger";const K8=X.forwardRef((function(e,t){const n=i9();return og.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),X8=X.forwardRef(((e,t)=>{const n=i9(),r=n.getContentProps();return og.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:W8(t,r.ref),...e,children:e.children})}));X8.displayName="ComboboxContent";const Q8=X.forwardRef(((e,t)=>{const n=i9().getListProps();return og.jsx("div",{ref:W8(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));Q8.displayName="ComboboxList";const J8=({children:e})=>{const t=function(){const e=X.useContext(o9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return og.jsx(og.Fragment,{children:e(t)})};J8.displayName="ComboboxListItems";const e9=X.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));e9.displayName="ComboboxListEmpty";const t9=X.createContext(null),n9=X.forwardRef(((e,t)=>{const{item:n,...r}=e,a=i9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return og.jsx(t9.Provider,{value:n,children:og.jsx("div",{ref:W8(t,i.ref),"data-scope":"combobox","data-part":"item","data-value":n.value,"data-highlighted":o.highlighted?"":void 0,"data-state":o.selected?"checked":"unchecked","data-disabled":o.disabled?"":void 0,...i,...r,children:e.children})})}));n9.displayName="ComboboxItem";const r9=X.forwardRef(((e,t)=>{const n=X.useContext(t9),r=i9(),a=n?r.getItemTextProps({item:n}):{};return og.jsx("span",{ref:W8(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));r9.displayName="ComboboxItemText";const a9=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.useContext(t9),o=i9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?og.jsx("span",{ref:W8(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??og.jsx(qG,{iconSettings:{builtIn:"LuCheck"}})}):null}));a9.displayName="ComboboxItemIndicator";const o9=X.createContext(null);function i9(){const e=X.useContext(o9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const s9=X.forwardRef(((e,t)=>{const n=i9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>og.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,og.jsx("button",{type:"button","data-part":"tag-clear","aria-label":`Remove ${t.label}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t.value)},children:og.jsx(qG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));s9.displayName="ComboboxSelectedTags";var l9=Object.defineProperty,c9=(e,t,n)=>((e,t,n)=>t in e?l9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),u9={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},d9=[],p9=class{constructor(e,t){c9(this,"trapStack"),c9(this,"config"),c9(this,"doc"),c9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),c9(this,"portalContainers",new Set),c9(this,"listenerCleanups",[]),c9(this,"handleFocus",(e=>{const t=fY(e),n=this.findContainerIndex(t,e)>=0;if(n||BW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(PY(this.state.mostRecentlyFocusedNode)>0){const e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){const e=r.findIndex((e=>e===this.state.mostRecentlyFocusedNode));e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some((e=>e.tabbableNodes.some((e=>PY(e)>0))))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0})),c9(this,"handlePointerDown",(e=>{const t=fY(e);this.findContainerIndex(t,e)>=0||(y9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):y9(this.config.allowOutsideClick,e)||e.preventDefault())})),c9(this,"handleClick",(e=>{const t=fY(e);this.findContainerIndex(t,e)>=0||y9(this.config.clickOutsideDeactivates,e)||y9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),c9(this,"handleTabKey",(e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;const t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;h9(e)&&e.preventDefault(),this.tryFocus(n)}})),c9(this,"handleEscapeKey",(e=>{b9(e)&&!1!==y9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),c9(this,"_mutationObserver"),c9(this,"setupMutationObserver",(()=>{const e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver((e=>{e.some((e=>Array.from(e.removedNodes).some((e=>e===this.state.mostRecentlyFocusedNode))))&&this.tryFocus(this.getInitialFocusNode());e.some((e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return!!function(e){var t;return!!function(e){return e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")}(e)||Boolean(null==(t=e.querySelector)?void 0:t.call(e,'[aria-controls][aria-expanded="true"]'))}(t)||!(!t.id||this.state.containers.some((e=>e.contains(t))))&&iY(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),c9(this,"updateObservedNodes",(()=>{var e;null==(e=this._mutationObserver)||e.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map((e=>{var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})})),this.portalContainers.forEach((e=>{this.observePortalContainer(e)})))})),c9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!NY(e)){const t=KW(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{const t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");if(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return e})),c9(this,"tryFocus",(e=>{!1!==e&&e!==KW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,k9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),c9(this,"deactivate",(e=>{if(!this.state.active)return this;const t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),u9.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const n=this.getOption(t,"onDeactivate"),r=this.getOption(t,"onPostDeactivate"),a=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");null==n||n();const i=()=>{v9((()=>{if(o){const e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}null==r||r()}))};if(o&&a){return a(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(i,i),this}return i(),this})),c9(this,"pause",(e=>{if(this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onPause"),n=this.getOption(e,"onPostPause");return this.state.paused=!0,null==t||t(),this.removeListeners(),this.updateObservedNodes(),null==n||n(),this})),c9(this,"unpause",(e=>{if(!this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onUnpause"),n=this.getOption(e,"onPostUnpause");return this.state.paused=!1,null==t||t(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n(),this})),c9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),c9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),c9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),c9(this,"getNodeForOption",((e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if("function"==typeof r&&(r=r(...n)),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let a=r;if("string"==typeof r){try{a=this.doc.querySelector(r)}catch($Ie){throw new Error(`\`${e}\` appears to be an invalid selector; error="${$Ie.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),c9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||fY(t);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const e=this.findContainerIndex(r,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)a=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex((({firstTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||NY(r)&&!RY(r)&&!(null==o?void 0:o.nextTabbableNode(r,!1)))&&(n=e),n>=0){const e=0===n?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];a=PY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else h9(t)||(a=null==o?void 0:o.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex((({lastTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||NY(r)&&!RY(r)&&!(null==o?void 0:o.nextTabbableNode(r)))&&(n=e),n>=0){const e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];a=PY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else h9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||d9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:m9,isKeyBackward:g9,...t};this.doc=n.document||YW(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach((e=>{oY(e).forEach((e=>{this.addPortalContainer(e)}))}))}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return this.state.containerGroups.findIndex((({container:t,tabbableNodes:r})=>t.contains(e)||(null==n?void 0:n.includes(t))||r.find((t=>t===e))||this.isControlledElement(t,e)))}isControlledElement(e,t){return!!this.config.followControlledElements&&aY(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=OY(e,{getShadowRoot:this.config.getShadowRoot}),n=IY(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],o=r,i=a;let s=!1;for(let l=0;l<t.length;l++)if(PY(t[l])>0){s=!0;break}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:i,nextTabbableNode:function(e,r=!0){const a=t.indexOf(e);if(a>=0)return t[a+(r?1:-1)];const o=n.indexOf(e);if(!(o<0))if(r){for(let t=o+1;t<n.length;t++)if(RY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(RY(n[t]))return n[t]}}})),this.state.tabbableGroups=this.state.containerGroups.filter((e=>e.tabbableNodes.length>0)),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find((e=>e.posTabIndexesFound))&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return u9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?v9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(xY(this.doc,"focusin",this.handleFocus,!0),xY(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),xY(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),xY(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),xY(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),xY(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach((e=>e())),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=KW(this.doc),null==t||t();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},f9=e=>"keydown"===(null==e?void 0:e.type),h9=e=>f9(e)&&"Tab"===(null==e?void 0:e.key),m9=e=>f9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),g9=e=>f9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),y9=(e,...t)=>"function"==typeof e?e(...t):e,b9=e=>!e.isComposing&&"Escape"===e.key,v9=e=>setTimeout(e,0),k9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var x9=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef(null),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=w9(r.current);o.current="mounted"===s?e:"none"}),[s]),HO((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=w9(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),HO((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=w9(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=w9(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=$5(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function w9(e){return(null==e?void 0:e.animationName)||"none"}x9.displayName="Presence";var E9="data-scroll-lock";function _9(e){const t=eY(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function S9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(E9))return;const o=_9(r)||_9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(E9,"");const s=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(r),l=[function(e,t,n){if(!e)return DW;const r=e.style.getPropertyValue(t);return r===n?DW:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),dY()?(()=>{const{scrollX:e,scrollY:t,visualViewport:r}=n,l=(null==r?void 0:r.offsetLeft)??0,c=(null==r?void 0:r.offsetTop)??0,u={position:"fixed",overflow:"hidden",top:-(t-Math.floor(c))+"px",left:-(e-Math.floor(l))+"px",right:"0"};!o&&i>0&&(u[s]=`${i}px`);const d=VY(a,u);return()=>{null==d||d(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(()=>{const e={overflow:"hidden"};return!o&&i>0&&(e[s]=`${i}px`),VY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(E9)}}const T9="Dialog",[C9]=z5(T9),[A9,I9]=C9(T9),N9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=X.useRef(null),l=X.useRef(null),[c=!1,u]=fR({prop:r,defaultProp:a??!1,onChange:o});return og.jsx(A9,{scope:t,triggerRef:s,contentRef:l,contentId:VO(),titleId:VO(),descriptionId:VO(),open:c,onOpenChange:u,onOpenToggle:X.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};N9.displayName=T9;const O9="DialogTrigger";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(O9,n),o=$5(t,a.triggerRef);return og.jsx(g3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Z9(a.open),...r,ref:o,onClick:j5(e.onClick,a.onOpenToggle)})})).displayName=O9;const R9="DialogPortal",[P9,L9]=C9(R9,{forceMount:void 0}),D9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=I9(R9,t);return og.jsx(P9,{scope:t,forceMount:n,children:X.Children.map(r,(e=>og.jsx(x9,{present:n||o.open,children:og.jsx(J3,{asChild:!0,container:a,children:e})})))})};D9.displayName=R9;const M9="DialogOverlay",F9=X.forwardRef(((e,t)=>{const n=L9(M9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=I9(M9,e.__scopeDialog);return o.modal?og.jsx(x9,{present:r||o.open,children:og.jsx(j9,{...a,ref:t})}):null}));F9.displayName=M9;const j9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(M9,n),o=qO();return X.useEffect((()=>{var e;return S9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),og.jsx(g3.div,{"data-dialog-overlay":"","data-state":Z9(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),z9="DialogContent",B9=X.forwardRef(((e,t)=>{const n=L9(z9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=I9(z9,e.__scopeDialog);return og.jsx(x9,{present:r||o.open,children:o.modal?og.jsx(H9,{...a,ref:t}):og.jsx(U9,{...a,ref:t})})}));B9.displayName=z9;const H9=X.forwardRef(((e,t)=>{const n=I9(z9,e.__scopeDialog),r=X.useRef(null),a=$5(t,n.contentRef,r);return X.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return G1([e,...Array.from(t)])}}),[]),og.jsx($9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:j5(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault();e.target.closest("[data-ikp-component]")&&e.preventDefault()})),onFocusOutside:j5(e.onFocusOutside,(e=>e.preventDefault()))})})),U9=X.forwardRef(((e,t)=>{const n=I9(z9,e.__scopeDialog),r=X.useRef(!1),a=X.useRef(!1);return og.jsx($9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),$9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=I9(z9,n),l=X.useRef(null),c=$5(t,l);return h3(),X.useEffect((()=>{if(r)return function(e,t={}){let n;const r=DY((()=>{const r=(Array.isArray(e)?e:[e]).map((e=>"function"==typeof e?e():e)).filter((e=>null!=e));if(0===r.length)return;const a=r[0];n=new p9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:YW(a)});try{n.activate()}catch{}}));return function(){null==n||n.deactivate(),r()}}(l.current,{preventScroll:!0,onActivate:a,onDeactivate:o,initialFocus:!1,allowOutsideClick:e=>{var t;const n=(null==(t=e.composedPath)?void 0:t.call(e)[0])??e.target;return!!n.closest("[data-ikp-component]")||!!n.closest("[data-dialog-overlay]")}})}),[]),og.jsx(u3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Z9(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),V9="DialogTitle",G9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(V9,n);return og.jsx(g3.h2,{id:a.titleId,...r,ref:t})}));G9.displayName=V9;const q9="DialogDescription";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(q9,n);return og.jsx(g3.p,{id:a.descriptionId,...r,ref:t})})).displayName=q9;const W9="DialogClose",Y9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=I9(W9,n);return og.jsx(g3.button,{type:"button",...r,ref:t,onClick:j5(e.onClick,(()=>a.onOpenChange(!1)))})}));function Z9(e){return e?"open":"closed"}Y9.displayName=W9;const K9=N9,X9=D9,Q9=F9,J9=B9,e7=G9,t7=Y9,n7=X.forwardRef(((e,t)=>{const n=X.useId();return og.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[og.jsx("title",{children:"AI Avatar"}),og.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${n}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${n}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${n}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsxs("defs",{children:[og.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),r7=X.forwardRef(((e,t)=>og.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[og.jsx("title",{children:"User Avatar"}),og.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}))),a7=X.forwardRef((({isExternal:e,...t},n)=>og.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));a7.displayName="Link";const o7=X.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=oR(),o=Object.assign({},a.urlQueryParamsToAppend,t),i=e?function(e,t){if(!t)return e;try{const n=new URL(e);for(const e of Object.keys(t))t[e]&&n.searchParams.append(e,t[e]);return n.href}catch{return e}}(e,o):e;return og.jsx(a7,{ref:r,href:i,...n})}));function i7(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(a,r).trim();!e&&o||t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function s7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}o7.displayName="LinkWithQueryParams";const l7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u7={};function d7(e,t){return(u7.jsx?c7:l7).test(e)}const p7=/[ \t\n\f\r]/g;function f7(e){return""===e.replace(p7,"")}class h7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function m7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new h7(n,r,t)}function g7(e){return e.toLowerCase()}h7.prototype.normal={},h7.prototype.property={},h7.prototype.space=void 0;class y7{constructor(e,t){this.attribute=t,this.property=e}}y7.prototype.attribute="",y7.prototype.booleanish=!1,y7.prototype.boolean=!1,y7.prototype.commaOrSpaceSeparated=!1,y7.prototype.commaSeparated=!1,y7.prototype.defined=!1,y7.prototype.mustUseProperty=!1,y7.prototype.number=!1,y7.prototype.overloadedBoolean=!1,y7.prototype.property="",y7.prototype.spaceSeparated=!1,y7.prototype.space=void 0;let b7=0;const v7=T7(),k7=T7(),x7=T7(),w7=T7(),E7=T7(),_7=T7(),S7=T7();function T7(){return 2**++b7}const C7=Object.freeze(Object.defineProperty({__proto__:null,boolean:v7,booleanish:k7,commaOrSpaceSeparated:S7,commaSeparated:_7,number:w7,overloadedBoolean:x7,spaceSeparated:E7},Symbol.toStringTag,{value:"Module"})),A7=Object.keys(C7);class I7 extends y7{constructor(e,t,n,r){let a=-1;if(super(e,t),N7(this,"space",r),"number"==typeof n)for(;++a<A7.length;){const e=A7[a];N7(this,A7[a],(n&C7[e])===C7[e])}}}function N7(e,t,n){n&&(e[t]=n)}function O7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new I7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[g7(r)]=r,n[g7(o.attribute)]=r}return new h7(t,n,e.space)}I7.prototype.defined=!0;const R7=O7({properties:{ariaActiveDescendant:null,ariaAtomic:k7,ariaAutoComplete:null,ariaBusy:k7,ariaChecked:k7,ariaColCount:w7,ariaColIndex:w7,ariaColSpan:w7,ariaControls:E7,ariaCurrent:null,ariaDescribedBy:E7,ariaDetails:null,ariaDisabled:k7,ariaDropEffect:E7,ariaErrorMessage:null,ariaExpanded:k7,ariaFlowTo:E7,ariaGrabbed:k7,ariaHasPopup:null,ariaHidden:k7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:E7,ariaLevel:w7,ariaLive:null,ariaModal:k7,ariaMultiLine:k7,ariaMultiSelectable:k7,ariaOrientation:null,ariaOwns:E7,ariaPlaceholder:null,ariaPosInSet:w7,ariaPressed:k7,ariaReadOnly:k7,ariaRelevant:null,ariaRequired:k7,ariaRoleDescription:E7,ariaRowCount:w7,ariaRowIndex:w7,ariaRowSpan:w7,ariaSelected:k7,ariaSetSize:w7,ariaSort:null,ariaValueMax:w7,ariaValueMin:w7,ariaValueNow:w7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function P7(e,t){return t in e?e[t]:t}function L7(e,t){return P7(e,t.toLowerCase())}const D7=O7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_7,acceptCharset:E7,accessKey:E7,action:null,allow:null,allowFullScreen:v7,allowPaymentRequest:v7,allowUserMedia:v7,alt:null,as:null,async:v7,autoCapitalize:null,autoComplete:E7,autoFocus:v7,autoPlay:v7,blocking:E7,capture:null,charSet:null,checked:v7,cite:null,className:E7,cols:w7,colSpan:null,content:null,contentEditable:k7,controls:v7,controlsList:E7,coords:w7|_7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v7,defer:v7,dir:null,dirName:null,disabled:v7,download:x7,draggable:k7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v7,formTarget:null,headers:E7,height:w7,hidden:x7,high:w7,href:null,hrefLang:null,htmlFor:E7,httpEquiv:E7,id:null,imageSizes:null,imageSrcSet:null,inert:v7,inputMode:null,integrity:null,is:null,isMap:v7,itemId:null,itemProp:E7,itemRef:E7,itemScope:v7,itemType:E7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v7,low:w7,manifest:null,max:null,maxLength:w7,media:null,method:null,min:null,minLength:w7,multiple:v7,muted:v7,name:null,nonce:null,noModule:v7,noValidate:v7,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:v7,optimum:w7,pattern:null,ping:E7,placeholder:null,playsInline:v7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v7,referrerPolicy:null,rel:E7,required:v7,reversed:v7,rows:w7,rowSpan:w7,sandbox:E7,scope:null,scoped:v7,seamless:v7,selected:v7,shadowRootClonable:v7,shadowRootDelegatesFocus:v7,shadowRootMode:null,shape:null,size:w7,sizes:null,slot:null,span:w7,spellCheck:k7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:w7,step:null,style:null,tabIndex:w7,target:null,title:null,translate:null,type:null,typeMustMatch:v7,useMap:null,value:k7,width:w7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:E7,axis:null,background:null,bgColor:null,border:w7,borderColor:null,bottomMargin:w7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v7,declare:v7,event:null,face:null,frame:null,frameBorder:null,hSpace:w7,leftMargin:w7,link:null,longDesc:null,lowSrc:null,marginHeight:w7,marginWidth:w7,noResize:v7,noHref:v7,noShade:v7,noWrap:v7,object:null,profile:null,prompt:null,rev:null,rightMargin:w7,rules:null,scheme:null,scrolling:k7,standby:null,summary:null,text:null,topMargin:w7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:w7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:v7,disableRemotePlayback:v7,prefix:null,property:null,results:w7,security:null,unselectable:null},space:"html",transform:L7}),M7=O7({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:S7,accentHeight:w7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:w7,amplitude:w7,arabicForm:null,ascent:w7,attributeName:null,attributeType:null,azimuth:w7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:w7,by:null,calcMode:null,capHeight:w7,className:E7,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:w7,diffuseConstant:w7,direction:null,display:null,dur:null,divisor:w7,dominantBaseline:null,download:v7,dx:null,dy:null,edgeMode:null,editable:null,elevation:w7,enableBackground:null,end:null,event:null,exponent:w7,externalResourcesRequired:null,fill:null,fillOpacity:w7,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:_7,g2:_7,glyphName:_7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:w7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:w7,horizOriginX:w7,horizOriginY:w7,id:null,ideographic:w7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:w7,k:w7,k1:w7,k2:w7,k3:w7,k4:w7,kernelMatrix:S7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:w7,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:w7,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:w7,overlineThickness:w7,paintOrder:null,panose1:null,path:null,pathLength:w7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:E7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:w7,pointsAtY:w7,pointsAtZ:w7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:S7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:S7,rev:S7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:S7,requiredFeatures:S7,requiredFonts:S7,requiredFormats:S7,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:w7,specularExponent:w7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:w7,strikethroughThickness:w7,string:null,stroke:null,strokeDashArray:S7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:w7,strokeOpacity:w7,strokeWidth:null,style:null,surfaceScale:w7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:S7,tabIndex:w7,tableValues:null,target:null,targetX:w7,targetY:w7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:S7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:w7,underlineThickness:w7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:w7,values:null,vAlphabetic:w7,vMathematical:w7,vectorEffect:null,vHanging:w7,vIdeographic:w7,version:null,vertAdvY:w7,vertOriginX:w7,vertOriginY:w7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:w7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:P7}),F7=O7({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),j7=O7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:L7}),z7=O7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),B7={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"},H7=/[A-Z]/g,U7=/-[a-z]/g,$7=/^data[-\w.:]+$/i;function V7(e,t){const n=g7(t);let r=t,a=y7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&$7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(U7,q7);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!U7.test(e)){let n=e.replace(H7,G7);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=I7}return new a(r,t)}function G7(e){return"-"+e.toLowerCase()}function q7(e){return e.charAt(1).toUpperCase()}const W7=m7([R7,D7,F7,j7,z7],"html"),Y7=m7([R7,M7,F7,j7,z7],"svg");function Z7(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function K7(e){return e.join(" ").trim()}var X7={},Q7=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,J7=/\n/g,eee=/^\s*/,tee=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,nee=/^:\s*/,ree=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,aee=/^[;\s]*/,oee=/^\s+|\s+$/g,iee="";function see(e){return e?e.replace(oee,iee):iee}var lee=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(J7);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(eee)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;iee!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,iee===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(tee);if(t){if(d(),!l(nee))return s("property missing ':'");var n=l(ree),r=e({type:"declaration",property:see(t[0].replace(Q7,iee)),value:n?see(n[0].replace(Q7,iee)):iee});return l(aee),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},cee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X7,"__esModule",{value:!0}),X7.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,uee.default)(e),a="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const uee=cee(lee);var dee={};Object.defineProperty(dee,"__esModule",{value:!0}),dee.camelCase=void 0;var pee=/^--[a-zA-Z0-9_-]+$/,fee=/-([a-z])/g,hee=/^[^-]+$/,mee=/^-(webkit|moz|ms|o|khtml)-/,gee=/^-(ms)-/,yee=function(e,t){return t.toUpperCase()},bee=function(e,t){return"".concat(t,"-")};dee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||hee.test(e)||pee.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(gee,bee):e.replace(mee,bee)).replace(fee,yee))};var vee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},kee=vee(X7),xee=dee;function wee(e,t){var n={};return e&&"string"==typeof e?((0,kee.default)(e,(function(e,r){e&&r&&(n[(0,xee.camelCase)(e,t)]=r)})),n):n}wee.default=wee;const Eee=l(wee),_ee=Tee("end"),See=Tee("start");function Tee(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 Cee(e){return e&&"object"==typeof e?"position"in e||"type"in e?Iee(e.position):"start"in e||"end"in e?Iee(e):"line"in e||"column"in e?Aee(e):"":""}function Aee(e){return Nee(e&&e.line)+":"+Nee(e&&e.column)}function Iee(e){return Aee(e&&e.start)+"-"+Aee(e&&e.end)}function Nee(e){return e&&"number"==typeof e?e:1}class Oee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="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:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.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=Cee(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Oee.prototype.file="",Oee.prototype.name="",Oee.prototype.reason="",Oee.prototype.message="",Oee.prototype.stack="",Oee.prototype.column=void 0,Oee.prototype.line=void 0,Oee.prototype.ancestors=void 0,Oee.prototype.cause=void 0,Oee.prototype.fatal=void 0,Oee.prototype.place=void 0,Oee.prototype.ruleId=void 0,Oee.prototype.source=void 0;const Ree={}.hasOwnProperty,Pee=new Map,Lee=/[A-Z]/g,Dee=new Set(["table","tbody","thead","tfoot","tr"]),Mee=new Set(["td","th"]),Fee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jee(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,a,o){const i=Array.isArray(a.children),s=See(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.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,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Y7:W7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=zee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function zee(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=Y7,e.schema=a);e.ancestors.push(t);const o=Vee(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Ree.call(t.properties,a)){const o=$ee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Mee.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Uee(e,t);Dee.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&f7(t.value):f7(t));var t})));return Bee(e,i,o,t),Hee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,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)}Gee(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=Y7,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:Vee(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 a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Gee(e,t.position);else{const a=r.name;let o;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,o=e.evaluater.evaluateExpression(t.expression)}else Gee(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Uee(e,t);return Bee(e,i,o,t),Hee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,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);Gee(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Hee(r,Uee(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 Bee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Uee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Pee;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=zee(e,o,i);void 0!==s&&n.push(s)}return n}function $ee(e,t,n){const r=V7(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?s7(n):K7(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Eee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Oee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Fee+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Ree.call(e,n)&&(t[qee(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?B7[r.property]||r.property:r.attribute,n]}}function Vee(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=d7(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=d7(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 Ree.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Gee(e)}function Gee(e,t){const n=new Oee("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=Fee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qee(e){let t=e.replace(Lee,Wee);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Wee(e){return"-"+e.toLowerCase()}const Yee={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"]},Zee={};function Kee(e,t){return Xee(e,"boolean"!=typeof Zee.includeImageAlt||Zee.includeImageAlt,"boolean"!=typeof Zee.includeHtml||Zee.includeHtml)}function Xee(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qee(e.children,t,n)}return Array.isArray(e)?Qee(e,t,n):""}function Qee(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Xee(e[a],t,n);return r.join("")}const Jee=document.createElement("i");function ete(e){const t="&"+e+";";Jee.innerHTML=t;const n=Jee.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function tte(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function nte(e,t){return e.length>0?(tte(e,e.length,0,t),e):t}const rte={}.hasOwnProperty;function ate(e){const t={};let n=-1;for(;++n<e.length;)ote(t,e[n]);return t}function ote(e,t){let n;for(n in t){const r=(rte.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){rte.call(r,o)||(r[o]=[]);const e=a[o];ite(r[o],Array.isArray(e)?e:e?[e]:[])}}}function ite(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);tte(e,0,0,r)}function ste(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 lte(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cte=xte(/[A-Za-z]/),ute=xte(/[\dA-Za-z]/),dte=xte(/[#-'*+\--9=?A-Z^-~]/);function pte(e){return null!==e&&(e<32||127===e)}const fte=xte(/\d/),hte=xte(/[\dA-Fa-f]/),mte=xte(/[!-/:-@[-`{-~]/);function gte(e){return null!==e&&e<-2}function yte(e){return null!==e&&(e<0||32===e)}function bte(e){return-2===e||-1===e||32===e}const vte=xte(new RegExp("\\p{P}|\\p{S}","u")),kte=xte(/\s/);function xte(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function wte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ute(e.charCodeAt(n+1))&&ute(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Ete(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(bte(r))return e.enter(n),i(r);return t(r)};function i(r){return bte(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const _te={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"),Ete(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,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):gte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const Ste={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return tte(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Tte,u,d)(a)}function u(e){return r&&b(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Tte,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):gte(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;tte(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Tte={tokenize:function(e,t,n){return Ete(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Cte(e){return null===e||yte(e)||kte(e)?1:vte(e)?2:void 0}function Ate(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Ite={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Nte(d,-s),Nte(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=nte(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=nte(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=nte(l,Ate(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=nte(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=nte(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,tte(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Cte(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=Cte(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Nte(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ote={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"),a};function a(t){return cte(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ute(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||ute(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(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||pte(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):dte(t)?(e.consume(t),l):n(t)}function c(e){return ute(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||ute(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Rte={partial:!0,tokenize:function(e,t,n){return function(t){return bte(t)?Ete(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||gte(e)?t(e):n(e)}}};const Pte={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(bte(t))return Ete(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Pte,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"),a}return n(t)};function a(n){return bte(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Lte={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 mte(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Dte={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ute,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=hte,c):(e.enter("characterReferenceValue"),a=7,o=fte,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ute||ete(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const Mte={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Fte={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),bte(t)?Ete(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),bte(t)?Ete(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||gte(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=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,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),bte(t)?Ete(e,c,"whitespace")(t):c(t))}function c(n){return null===n||gte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Mte,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||gte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):bte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ete(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||gte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||gte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&bte(t)?Ete(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||gte(t)?e.check(Mte,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||gte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const jte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Ete(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):gte(t)?e.attempt(zte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||gte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},zte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):gte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):Ete(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):gte(e)?a(e):n(e)}}};const Bte={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,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):gte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||gte(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class Hte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Ute(this.left,n),a.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),Ute(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ute(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);Ute(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Ute(this.left,t.reverse())}}}function Ute(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 $te(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new Hte(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Vte(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return tte(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Vte(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const Gte={resolve:function(e){return $te(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?a(t):gte(t)?e.check(qte,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},qte={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"),Ete(e,a,"linePrefix")};function a(a){if(null===a||gte(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Wte(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||pte(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||gte(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!yte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||pte(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Yte(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):gte(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||gte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!bte(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Zte(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):gte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Ete(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||gte(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Kte(e,t){let n;return function r(a){if(gte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(bte(a))return Ete(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const Xte={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Yte.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=lte(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 yte(t)?Kte(e,s)(t):s(t)}function s(t){return Wte(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Qte,c,c)(t)}function c(t){return bte(t)?Ete(e,u,"whitespace")(t):u(t)}function u(o){return null===o||gte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Qte={partial:!0,tokenize:function(e,t,n){return function(t){return yte(t)?Kte(e,r)(t):n(t)};function r(t){return Zte(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return bte(t)?Ete(e,o,"whitespace")(t):o(t)}function o(e){return null===e||gte(e)?t(e):n(e)}}};const Jte={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return gte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const ene={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},tte(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||yte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||gte(n)?(e.exit("atxHeading"),t(n)):bte(n)?Ete(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||yte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const tne=["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"],nne=["pre","script","style","textarea"],rne={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):cte(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):cte(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return cte(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||yte(s)){const l=47===s,c=i.toLowerCase();return l||o||!nne.includes(c)?tne.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||ute(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function g(t){return bte(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||cte(t)?(e.consume(t),b):bte(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||ute(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):bte(t)?(e.consume(t),v):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):bte(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||gte(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||yte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||bte(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||gte(t)?T(t):bte(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),N):60===t&&1===a?(e.consume(t),O):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!gte(t)||6!==a&&7!==a?null===t||gte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(ane,M,C)(t))}function C(t){return e.check(one,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||gte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),L):T(t)}function O(t){return 47===t?(e.consume(t),i="",R):T(t)}function R(t){if(62===t){const n=i.toLowerCase();return nne.includes(n)?(e.consume(t),D):T(t)}return cte(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),R):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||gte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},ane={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Rte,t,n)}}},one={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(gte(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const ine={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):cte(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):cte(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):gte(t)?(i=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):gte(t)?(i=h,R(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):gte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):gte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return cte(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ute(t)?(e.consume(t),x):w(t)}function w(t){return gte(t)?(i=w,R(t)):bte(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||ute(t)?(e.consume(t),E):47===t||62===t||yte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||cte(t)?(e.consume(t),S):gte(t)?(i=_,R(t)):bte(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ute(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):gte(t)?(i=T,R(t)):bte(t)?(e.consume(t),T):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):gte(t)?(i=C,R(t)):bte(t)?(e.consume(t),C):(e.consume(t),I)}function A(t){return t===a?(e.consume(t),a=void 0,N):null===t?n(t):gte(t)?(i=A,R(t)):(e.consume(t),A)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||yte(t)?_(t):(e.consume(t),I)}function N(e){return 47===e||62===e||yte(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return bte(t)?Ete(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const sne={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&tte(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=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(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=nte(o,e.slice(r+1,r+s+3)),o=nte(o,[["enter",u,t]]),o=nte(o,Ate(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=nte(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=nte(o,e.slice(a+1)),o=nte(o,[["exit",l,t]]),tte(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(lte(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(lne,c,o?c:u)(t):91===t?e.attempt(cne,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(une,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},lne={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 yte(t)?Kte(e,a)(t):a(t)}function a(t){return 41===t?c(t):Wte(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return yte(t)?Kte(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Zte(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return yte(t)?Kte(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},cne={tokenize:function(e,t,n){const r=this;return function(t){return Yte.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(lte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},une={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 dne={name:"labelStartImage",resolveAll:sne.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"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const pne={name:"labelStartLink",resolveAll:sne.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"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const fne={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ete(e,t,"linePrefix")}}};const hne={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||gte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),bte(t)?Ete(e,o,"whitespace")(t):o(t))}}};const mne={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rte,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ete(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!bte(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ete(e,e.attempt(mne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:fte(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(hne,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return fte(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Rte,r.interrupt?n:c,e.attempt(gne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return bte(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},gne={partial:!0,tokenize:function(e,t,n){const r=this;return Ete(e,(function(e){const a=r.events[r.events.length-1];return!bte(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},yne={partial:!0,tokenize:function(e,t,n){const r=this;return Ete(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const bne={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),bte(t)?Ete(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||gte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const vne={tokenize:function(e){const t=this,n=e.attempt(Rte,(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,Ete(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Gte,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 kne={resolveAll:_ne()},xne=Ene("string"),wne=Ene("text");function Ene(e){return{resolveAll:_ne("text"===e?Sne:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function _ne(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function Sne(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],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const Tne={42:mne,43:mne,45:mne,48:mne,49:mne,50:mne,51:mne,52:mne,53:mne,54:mne,55:mne,56:mne,57:mne,62:Pte},Cne={91:Xte},Ane={[-2]:jte,[-1]:jte,32:jte},Ine={35:ene,42:hne,45:[bne,hne],60:rne,61:bne,95:hne,96:Fte,126:Fte},Nne={38:Dte,92:Lte},One={[-5]:fne,[-4]:fne,[-3]:fne,33:dne,38:Dte,42:Ite,60:[Ote,ine],91:pne,92:[Jte,Lte],93:sne,95:Ite,96:Bte},Rne={null:[Ite,kne]},Pne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Cne,disable:{null:[]},document:Tne,flow:Ine,flowInitial:Ane,insideSpan:Rne,string:Nne,text:One},Symbol.toStringTag,{value:"Module"}));function Lne(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){gte(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){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&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=nte(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=Ate(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),a}function y(e){return f.restore(),++u<i.length?m(i[u]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&tte(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const Dne=/[\0\t\n\r]/g;const Mne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ste(n.slice(t?2:1),t?16:10)}return ete(n)||e}const jne={}.hasOwnProperty;function zne(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:o(X),blockQuote:o(q),characterEscape:S,characterReference:S,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:S,data:S,codeFlowValue:S,definition:o(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:S,htmlText:o(J,i),htmlTextData:S,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(X),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:G,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(O),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(I),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:F,resource:j,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:w,strong:l(),thematicBreak:l()}};Hne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];jne.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||$ne).call(o,void 0,e[0])}for(r.position={start:Bne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Bne(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(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:Bne(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Cee({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||$ne).call(this,e,r[0])}n.position.end=Bne(e.end)}function u(){return Kee(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lte(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Bne(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Bne(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Bne(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){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 L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Mne,Fne)}(t),n.identifier=lte(t).toLowerCase()}function D(){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 M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function j(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=lte(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=ste(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=ete(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Bne(e.end)}function V(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){T.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 Y(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!$te(e););return e}(function(e){const t={constructs:ate([Pne,...(e||{}).extensions||[]]),content:n(_te),defined:[],document:n(Ste),flow:n(vne),lazy:{},string:n(xne),text:n(wne)};return t;function n(e){return function(n){return Lne(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(Dne.lastIndex=u,l=Dne.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Bne(e){return{line:e.line,column:e.column,offset:e.offset}}function Hne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Hne(e,r):Une(e,r)}}function Une(e,t){let n;for(n in t)if(jne.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 $ne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cee({start:t.start,end:t.end})+") is still open")}function Vne(e){const t=this;t.parser=function(n){return zne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Gne(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 a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function qne(e){const t=e.spread;return null==t?e.children.length>1:t}function Wne(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Yne(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Yne(t.slice(a),a>0,!1)),o.join("")}function Yne(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const Zne={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={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},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(),a=wte(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},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 Gne(e,t);const a={src:wte(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:wte(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 Gne(e,t);const a={href:wte(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:wte(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),a=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=qne(n[r])}return t}(n):qne(t),o={},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:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];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 o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},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(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=See(t.children[1]),i=_ee(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},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,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Wne(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:Kne,yaml:Kne,definition:Kne,footnoteDefinition:Kne};function Kne(){}const Xne="object"==typeof self?self:globalThis,Qne=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new Xne[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);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 Xne[o](i),a)};return r})(new Map,e)(0),Jne="",{toString:ere}={},{keys:tre}=Object,nre=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ere.call(e).slice(8,-1);switch(n){case"Array":return[1,Jne];case"Object":return[2,Jne];case"Date":return[3,Jne];case"RegExp":return[4,Jne];case"Map":return[5,Jne];case"Set":return[6,Jne];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},rre=([e,t])=>0===e&&("function"===t||"symbol"===t),are=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=nre(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of tre(r))!e&&rre(nre(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[a,i]of r)(e||!rre(nre(a))&&!rre(nre(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&rre(nre(a))||t.push(o(a));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},ore="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Qne(are(e,t)):structuredClone(e):(e,t)=>Qne(are(e,t));function ire(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 sre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const lre=function(e){if(null==e)return ure;if("function"==typeof e)return cre(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lre(e[n]);return cre(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 cre(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return cre(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function cre(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ure(){return!0}const dre=[],pre=!0,fre=!1;function hre(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=lre(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=dre;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[pre,e];return null==e?dre:[e]}(n(a,l)),p[0]===fre))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===fre)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function mre(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),hre(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}const gre={}.hasOwnProperty,yre={};function bre(e,t){e.position&&(t.position=function(e){const t=See(e),n=_ee(e);if(t&&n)return{start:t,end:n}}(e))}function vre(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=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&&a&&Object.assign(n.properties,ore(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function kre(e,t){const n=t.data||{},r=!("value"in t)||gre.call(n,"hProperties")||gre.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 xre(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 wre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ere(e,t){const n=function(e,t){const n=t||yre,r=new Map,a=new Map,o=new Map,i={...Zne,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=wre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=wre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:vre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(gre.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=ore(n);return r.children=s.all(e),r}return ore(e)}return(s.options.unknownHandler||kre)(s,e,t)},options:n,patch:bre,wrap:xre};return mre(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ire,r=e.options.footnoteBackLabel||sre,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=wte(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ore(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function _re(e,t){return e&&"run"in e?async function(n,r){const a=Ere(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Ere(n,{file:r,...e||t})}}function Sre(e){if(e)throw e}var Tre=Object.prototype.hasOwnProperty,Cre=Object.prototype.toString,Are=Object.defineProperty,Ire=Object.getOwnPropertyDescriptor,Nre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Cre.call(e)},Ore=function(e){if(!e||"[object Object]"!==Cre.call(e))return!1;var t,n=Tre.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Tre.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Tre.call(e,t)},Rre=function(e,t){Are&&"__proto__"===t.name?Are(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Pre=function(e,t){if("__proto__"===t){if(!Tre.call(e,t))return;if(Ire)return Ire(e,t).value}return e[t]},Lre=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Pre(s,n),s!==(a=Pre(t,n))&&(u&&a&&(Ore(a)||(o=Nre(a)))?(o?(o=!1,i=r&&Nre(r)?r:[]):i=r&&Ore(r)?r:{},Rre(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Rre(s,{name:n,newValue:a}));return s};const Dre=l(Lre);function Mre(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 Fre(){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 a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(a);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return a(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(i,a):s instanceof Error?a(s):i(s))}function a(e,...r){n||(n=!0,t(e,...r))}function i(e){a(null,e)}}(s,a)(...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 jre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');zre(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(zre(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){zre(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)zre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){zre(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function zre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Bre={cwd:function(){return"/"}};function Hre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Ure(e){if("string"==typeof e)e=new URL(e);else if(!Hre(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 $re=["history","path","basename","stem","extname","dirname"];class Vre{constructor(e){let t;t=e?Hre(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Bre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<$re.length;){const e=$re[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)$re.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?jre.basename(this.path):void 0}set basename(e){qre(e,"basename"),Gre(e,"basename"),this.path=jre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?jre.dirname(this.path):void 0}set dirname(e){Wre(this.basename,"dirname"),this.path=jre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?jre.extname(this.path):void 0}set extname(e){if(Gre(e,"extname"),Wre(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=jre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Hre(e)&&(e=Ure(e)),qre(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?jre.basename(this.path,this.extname):void 0}set stem(e){qre(e,"stem"),Gre(e,"stem"),this.path=jre.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 Oee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Gre(e,t){if(e&&e.includes(jre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jre.sep+"`")}function qre(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Wre(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Yre=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Zre={}.hasOwnProperty;class Kre extends Yre{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=Fre()}copy(){const e=new Kre;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Dre(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(eae("data",this.frozen),this.namespace[e]=t,this):Zre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(eae("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=rae(e),n=this.parser||this.Parser;return Qre("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Qre("process",this.parser||this.Parser),Jre("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=rae(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Qre("processSync",this.parser||this.Parser),Jre("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Sre(e),t=r})),nae("processSync","process",n),t}run(e,t,n){tae(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=rae(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Sre(e),n=t,r=!0})),nae("runSync","run",r),n}stringify(e,t){this.freeze();const n=rae(t),r=this.compiler||this.Compiler;return Jre("stringify",r),tae(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(eae("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(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=Dre(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];Mre(i)&&Mre(r)&&(r=Dre(!0,i,r)),n[a]=[e,r,...o]}}}}const Xre=(new Kre).freeze();function Qre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Jre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function eae(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 tae(e){if(!Mre(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function nae(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rae(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Vre(e)}const aae=[],oae={allowDangerousHtml:!0},iae=/^(https?|ircs?|mailto|xmpp)$/i,sae=[{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 lae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||aae,l=e.remarkPlugins||aae,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oae}:oae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||cae,f=Xre().use(Vne).use(l).use(_re,c).use(s),h=new Vre;"string"==typeof r&&(h.value=r);for(const y of sae)Object.hasOwn(e,y.from)&&(y.from,y.to&&y.to,y.id);const m=f.parse(h);let g=f.runSync(m,h);return a&&(g={type:"element",tagName:"div",properties:{className:a},children:"root"===g.type?g.children:[g]}),mre(g,(function(e,r,a){if("raw"===e.type&&a&&"number"==typeof r)return u?a.children.splice(r,1):a.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in Yee)if(Object.hasOwn(Yee,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Yee[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,a)),o&&a&&"number"==typeof r)return d&&e.children?a.children.splice(r,1,...e.children):a.children.splice(r,1),r}})),jee(g,{Fragment:og.Fragment,components:o,ignoreInvalidStyle:!0,jsx:og.jsx,jsxs:og.jsxs,passKeys:!0,passNode:!0})}function cae(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||iae.test(e.slice(0,t))?e:""}const uae=/[#.]/g;function dae(e,t,n){const r=n?function(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...o){let i;if(null==n){i={type:"root",children:[]};const e=a;o.unshift(e)}else{i=function(e,t){const n=e||"",r={};let a,o,i=0;for(;i<n.length;){uae.lastIndex=i;const e=uae.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?"#"===a?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=i.tagName.toLowerCase(),l=r?r.get(s):void 0;if(i.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(a))o.unshift(a);else for(const[t,n]of Object.entries(a))pae(e,i.properties,t,n)}for(const e of o)fae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function pae(e,t,n,r){const a=V7(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?Z7(r):a.commaSeparated?i7(r):a.commaOrSpaceSeparated?Z7(i7(r).join(" ")):hae(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(hae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function fae(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)fae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?fae(e,t.children):e.push(t)}}function hae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||g7(n)===g7(t)))return!0}return n}const mae=dae(W7,"div"),gae=dae(Y7,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]);function yae(e,t){const n=e.indexOf("\r",t),r=e.indexOf("\n",t);return-1===r?n:-1===n||n+1===r?r:n<r?n:r}const bae={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},vae={}.hasOwnProperty,kae=Object.prototype;function xae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Eae(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:wae(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];return{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){const e=n[n.length-1],r=yae(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}const r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){const e=yae(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),a=r.toPoint(0),o=r.toPoint(t.length);n.position={start:a,end:o}}return n}case"#documentType":return n={type:"doctype"},Eae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},Eae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===bae.svg?Y7:W7;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;vae.call(kae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?gae:mae,i=o(t.tagName,a,wae(e,t.childNodes));if(Eae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&_ae(r.startTag),o=r&&r.endTag&&_ae(r.endTag),s=xae(e,n.content);a&&o&&e.file&&(s.position={start:a.end,end:o.start}),i.content=s}return e.schema=n,i}(e,t),n}}function wae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=xae(e,t[n]);r.push(a)}return r}function Eae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=_ae(n);if("element"===t.type){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const r={};let a;if(n.attrs)for(a in n.attrs)vae.call(n.attrs,a)&&(r[V7(e.schema,a).property]=_ae(n.attrs[a]));n.startTag;const o=_ae(n.startTag),i=n.endTag?_ae(n.endTag):void 0,s={opening:o};i&&(s.closing=i),s.properties=r,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _ae(e){const t=Sae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sae(e){return e.line&&e.column?e:void 0}const Tae={}.hasOwnProperty;function Cae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&Tae.call(t,e)){const n=String(t[e]);a=Tae.call(o,n)?o[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Aae={},Iae={}.hasOwnProperty,Nae=Cae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Rae(e.children,n,t),Pae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=Y7);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&Iae.call(e.properties,o)){const t=Oae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:bae[i],childNodes:[],parentNode:null};s.childNodes=Rae(e.children,s,r),Pae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Rae(e.children,n,t),Pae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Pae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Pae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Pae(e,t),t}}});function Oae(e,t,n){const r=V7(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?s7(n):K7(n));const a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=bae[r.space]}return a}function Rae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Nae(e[r],n);o.parentNode=t,a.push(o)}return a}function Pae(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Lae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Dae=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Mae="�";var Fae,jae;(jae=Fae||(Fae={}))[jae.EOF=-1]="EOF",jae[jae.NULL=0]="NULL",jae[jae.TABULATION=9]="TABULATION",jae[jae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",jae[jae.LINE_FEED=10]="LINE_FEED",jae[jae.FORM_FEED=12]="FORM_FEED",jae[jae.SPACE=32]="SPACE",jae[jae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",jae[jae.QUOTATION_MARK=34]="QUOTATION_MARK",jae[jae.AMPERSAND=38]="AMPERSAND",jae[jae.APOSTROPHE=39]="APOSTROPHE",jae[jae.HYPHEN_MINUS=45]="HYPHEN_MINUS",jae[jae.SOLIDUS=47]="SOLIDUS",jae[jae.DIGIT_0=48]="DIGIT_0",jae[jae.DIGIT_9=57]="DIGIT_9",jae[jae.SEMICOLON=59]="SEMICOLON",jae[jae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",jae[jae.EQUALS_SIGN=61]="EQUALS_SIGN",jae[jae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",jae[jae.QUESTION_MARK=63]="QUESTION_MARK",jae[jae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",jae[jae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",jae[jae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",jae[jae.GRAVE_ACCENT=96]="GRAVE_ACCENT",jae[jae.LATIN_SMALL_A=97]="LATIN_SMALL_A",jae[jae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const zae="--",Bae="[CDATA[",Hae="doctype",Uae="script",$ae="public",Vae="system";function Gae(e){return e>=55296&&e<=57343}function qae(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Wae(e){return e>=64976&&e<=65007||Dae.has(e)}var Yae,Zae;(Zae=Yae||(Yae={})).controlCharacterInInputStream="control-character-in-input-stream",Zae.noncharacterInInputStream="noncharacter-in-input-stream",Zae.surrogateInInputStream="surrogate-in-input-stream",Zae.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Zae.endTagWithAttributes="end-tag-with-attributes",Zae.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Zae.unexpectedSolidusInTag="unexpected-solidus-in-tag",Zae.unexpectedNullCharacter="unexpected-null-character",Zae.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Zae.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Zae.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Zae.missingEndTagName="missing-end-tag-name",Zae.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Zae.unknownNamedCharacterReference="unknown-named-character-reference",Zae.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Zae.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Zae.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Zae.eofBeforeTagName="eof-before-tag-name",Zae.eofInTag="eof-in-tag",Zae.missingAttributeValue="missing-attribute-value",Zae.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Zae.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Zae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Zae.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Zae.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Zae.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Zae.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Zae.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Zae.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Zae.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Zae.cdataInHtmlContent="cdata-in-html-content",Zae.incorrectlyOpenedComment="incorrectly-opened-comment",Zae.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Zae.eofInDoctype="eof-in-doctype",Zae.nestedComment="nested-comment",Zae.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Zae.eofInComment="eof-in-comment",Zae.incorrectlyClosedComment="incorrectly-closed-comment",Zae.eofInCdata="eof-in-cdata",Zae.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Zae.nullCharacterReference="null-character-reference",Zae.surrogateCharacterReference="surrogate-character-reference",Zae.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Zae.controlCharacterReference="control-character-reference",Zae.noncharacterCharacterReference="noncharacter-character-reference",Zae.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Zae.missingDoctypeName="missing-doctype-name",Zae.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Zae.duplicateAttribute="duplicate-attribute",Zae.nonConformingDoctype="non-conforming-doctype",Zae.missingDoctype="missing-doctype",Zae.misplacedDoctype="misplaced-doctype",Zae.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Zae.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Zae.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Zae.openElementsLeftAfterEof="open-elements-left-after-eof",Zae.abandonedHeadElementChild="abandoned-head-element-child",Zae.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Zae.nestedNoscriptInHead="nested-noscript-in-head",Zae.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class Kae{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:a}=this,o=r+t,i=a+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:i,endOffset:i}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Fae.EOF;return this._err(Yae.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++){if((32|this.html.charCodeAt(this.pos+n))!==e.charCodeAt(n))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Fae.EOF;const n=this.html.charCodeAt(t);return n===Fae.CARRIAGE_RETURN?Fae.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Fae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Fae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Fae.LINE_FEED;if(e===Fae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Gae(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Fae.LINE_FEED||e===Fae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){qae(e)?this._err(Yae.controlCharacterInInputStream):Wae(e)&&this._err(Yae.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xae,Qae;function Jae(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}(Qae=Xae||(Xae={}))[Qae.CHARACTER=0]="CHARACTER",Qae[Qae.NULL_CHARACTER=1]="NULL_CHARACTER",Qae[Qae.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Qae[Qae.START_TAG=3]="START_TAG",Qae[Qae.END_TAG=4]="END_TAG",Qae[Qae.COMMENT=5]="COMMENT",Qae[Qae.DOCTYPE=6]="DOCTYPE",Qae[Qae.EOF=7]="EOF",Qae[Qae.HIBERNATION=8]="HIBERNATION";const eoe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),toe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var noe,roe;(roe=noe||(noe={}))[roe.NUM=35]="NUM",roe[roe.SEMI=59]="SEMI",roe[roe.EQUALS=61]="EQUALS",roe[roe.ZERO=48]="ZERO",roe[roe.NINE=57]="NINE",roe[roe.LOWER_A=97]="LOWER_A",roe[roe.LOWER_F=102]="LOWER_F",roe[roe.LOWER_X=120]="LOWER_X",roe[roe.LOWER_Z=122]="LOWER_Z",roe[roe.UPPER_A=65]="UPPER_A",roe[roe.UPPER_F=70]="UPPER_F",roe[roe.UPPER_Z=90]="UPPER_Z";var aoe,ooe,ioe,soe,loe,coe,uoe,doe,poe,foe,hoe,moe,goe,yoe,boe,voe;function koe(e){return e>=noe.ZERO&&e<=noe.NINE}function xoe(e){return e===noe.EQUALS||function(e){return e>=noe.UPPER_A&&e<=noe.UPPER_Z||e>=noe.LOWER_A&&e<=noe.LOWER_Z||koe(e)}(e)}(ooe=aoe||(aoe={}))[ooe.VALUE_LENGTH=49152]="VALUE_LENGTH",ooe[ooe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",ooe[ooe.JUMP_TABLE=127]="JUMP_TABLE",(soe=ioe||(ioe={}))[soe.EntityStart=0]="EntityStart",soe[soe.NumericStart=1]="NumericStart",soe[soe.NumericDecimal=2]="NumericDecimal",soe[soe.NumericHex=3]="NumericHex",soe[soe.NamedEntity=4]="NamedEntity",(coe=loe||(loe={}))[coe.Legacy=0]="Legacy",coe[coe.Strict=1]="Strict",coe[coe.Attribute=2]="Attribute";class woe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=ioe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=loe.Strict}startEntity(e){this.decodeMode=e,this.state=ioe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case ioe.EntityStart:return e.charCodeAt(t)===noe.NUM?(this.state=ioe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=ioe.NamedEntity,this.stateNamedEntity(e,t));case ioe.NumericStart:return this.stateNumericStart(e,t);case ioe.NumericDecimal:return this.stateNumericDecimal(e,t);case ioe.NumericHex:return this.stateNumericHex(e,t);case ioe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===noe.LOWER_X?(this.state=ioe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=ioe.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const a=e.charCodeAt(t);if(!(koe(a)||(r=a,r>=noe.UPPER_A&&r<=noe.UPPER_F||r>=noe.LOWER_A&&r<=noe.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!koe(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===noe.SEMI)this.consumed+=1;else if(this.decodeMode===loe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=toe.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==noe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],a=(r&aoe.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=Eoe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===loe.Attribute&&(0===a||xoe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&aoe.VALUE_LENGTH)>>14,0!==a){if(o===noe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==loe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&aoe.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~aoe.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case ioe.NamedEntity:return 0===this.result||this.decodeMode===loe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case ioe.NumericDecimal:return this.emitNumericEntity(0,2);case ioe.NumericHex:return this.emitNumericEntity(0,3);case ioe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ioe.EntityStart:return 0}}}function Eoe(e,t,n,r){const a=(t&aoe.BRANCH_LENGTH)>>7,o=t&aoe.JUMP_TABLE;if(0===a)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=a?-1:e[n+t]-1}let i=n,s=i+a-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+a];s=t-1}}return-1}(doe=uoe||(uoe={})).HTML="http://www.w3.org/1999/xhtml",doe.MATHML="http://www.w3.org/1998/Math/MathML",doe.SVG="http://www.w3.org/2000/svg",doe.XLINK="http://www.w3.org/1999/xlink",doe.XML="http://www.w3.org/XML/1998/namespace",doe.XMLNS="http://www.w3.org/2000/xmlns/",(foe=poe||(poe={})).TYPE="type",foe.ACTION="action",foe.ENCODING="encoding",foe.PROMPT="prompt",foe.NAME="name",foe.COLOR="color",foe.FACE="face",foe.SIZE="size",(moe=hoe||(hoe={})).NO_QUIRKS="no-quirks",moe.QUIRKS="quirks",moe.LIMITED_QUIRKS="limited-quirks",(yoe=goe||(goe={})).A="a",yoe.ADDRESS="address",yoe.ANNOTATION_XML="annotation-xml",yoe.APPLET="applet",yoe.AREA="area",yoe.ARTICLE="article",yoe.ASIDE="aside",yoe.B="b",yoe.BASE="base",yoe.BASEFONT="basefont",yoe.BGSOUND="bgsound",yoe.BIG="big",yoe.BLOCKQUOTE="blockquote",yoe.BODY="body",yoe.BR="br",yoe.BUTTON="button",yoe.CAPTION="caption",yoe.CENTER="center",yoe.CODE="code",yoe.COL="col",yoe.COLGROUP="colgroup",yoe.DD="dd",yoe.DESC="desc",yoe.DETAILS="details",yoe.DIALOG="dialog",yoe.DIR="dir",yoe.DIV="div",yoe.DL="dl",yoe.DT="dt",yoe.EM="em",yoe.EMBED="embed",yoe.FIELDSET="fieldset",yoe.FIGCAPTION="figcaption",yoe.FIGURE="figure",yoe.FONT="font",yoe.FOOTER="footer",yoe.FOREIGN_OBJECT="foreignObject",yoe.FORM="form",yoe.FRAME="frame",yoe.FRAMESET="frameset",yoe.H1="h1",yoe.H2="h2",yoe.H3="h3",yoe.H4="h4",yoe.H5="h5",yoe.H6="h6",yoe.HEAD="head",yoe.HEADER="header",yoe.HGROUP="hgroup",yoe.HR="hr",yoe.HTML="html",yoe.I="i",yoe.IMG="img",yoe.IMAGE="image",yoe.INPUT="input",yoe.IFRAME="iframe",yoe.KEYGEN="keygen",yoe.LABEL="label",yoe.LI="li",yoe.LINK="link",yoe.LISTING="listing",yoe.MAIN="main",yoe.MALIGNMARK="malignmark",yoe.MARQUEE="marquee",yoe.MATH="math",yoe.MENU="menu",yoe.META="meta",yoe.MGLYPH="mglyph",yoe.MI="mi",yoe.MO="mo",yoe.MN="mn",yoe.MS="ms",yoe.MTEXT="mtext",yoe.NAV="nav",yoe.NOBR="nobr",yoe.NOFRAMES="noframes",yoe.NOEMBED="noembed",yoe.NOSCRIPT="noscript",yoe.OBJECT="object",yoe.OL="ol",yoe.OPTGROUP="optgroup",yoe.OPTION="option",yoe.P="p",yoe.PARAM="param",yoe.PLAINTEXT="plaintext",yoe.PRE="pre",yoe.RB="rb",yoe.RP="rp",yoe.RT="rt",yoe.RTC="rtc",yoe.RUBY="ruby",yoe.S="s",yoe.SCRIPT="script",yoe.SEARCH="search",yoe.SECTION="section",yoe.SELECT="select",yoe.SOURCE="source",yoe.SMALL="small",yoe.SPAN="span",yoe.STRIKE="strike",yoe.STRONG="strong",yoe.STYLE="style",yoe.SUB="sub",yoe.SUMMARY="summary",yoe.SUP="sup",yoe.TABLE="table",yoe.TBODY="tbody",yoe.TEMPLATE="template",yoe.TEXTAREA="textarea",yoe.TFOOT="tfoot",yoe.TD="td",yoe.TH="th",yoe.THEAD="thead",yoe.TITLE="title",yoe.TR="tr",yoe.TRACK="track",yoe.TT="tt",yoe.U="u",yoe.UL="ul",yoe.SVG="svg",yoe.VAR="var",yoe.WBR="wbr",yoe.XMP="xmp",(voe=boe||(boe={}))[voe.UNKNOWN=0]="UNKNOWN",voe[voe.A=1]="A",voe[voe.ADDRESS=2]="ADDRESS",voe[voe.ANNOTATION_XML=3]="ANNOTATION_XML",voe[voe.APPLET=4]="APPLET",voe[voe.AREA=5]="AREA",voe[voe.ARTICLE=6]="ARTICLE",voe[voe.ASIDE=7]="ASIDE",voe[voe.B=8]="B",voe[voe.BASE=9]="BASE",voe[voe.BASEFONT=10]="BASEFONT",voe[voe.BGSOUND=11]="BGSOUND",voe[voe.BIG=12]="BIG",voe[voe.BLOCKQUOTE=13]="BLOCKQUOTE",voe[voe.BODY=14]="BODY",voe[voe.BR=15]="BR",voe[voe.BUTTON=16]="BUTTON",voe[voe.CAPTION=17]="CAPTION",voe[voe.CENTER=18]="CENTER",voe[voe.CODE=19]="CODE",voe[voe.COL=20]="COL",voe[voe.COLGROUP=21]="COLGROUP",voe[voe.DD=22]="DD",voe[voe.DESC=23]="DESC",voe[voe.DETAILS=24]="DETAILS",voe[voe.DIALOG=25]="DIALOG",voe[voe.DIR=26]="DIR",voe[voe.DIV=27]="DIV",voe[voe.DL=28]="DL",voe[voe.DT=29]="DT",voe[voe.EM=30]="EM",voe[voe.EMBED=31]="EMBED",voe[voe.FIELDSET=32]="FIELDSET",voe[voe.FIGCAPTION=33]="FIGCAPTION",voe[voe.FIGURE=34]="FIGURE",voe[voe.FONT=35]="FONT",voe[voe.FOOTER=36]="FOOTER",voe[voe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",voe[voe.FORM=38]="FORM",voe[voe.FRAME=39]="FRAME",voe[voe.FRAMESET=40]="FRAMESET",voe[voe.H1=41]="H1",voe[voe.H2=42]="H2",voe[voe.H3=43]="H3",voe[voe.H4=44]="H4",voe[voe.H5=45]="H5",voe[voe.H6=46]="H6",voe[voe.HEAD=47]="HEAD",voe[voe.HEADER=48]="HEADER",voe[voe.HGROUP=49]="HGROUP",voe[voe.HR=50]="HR",voe[voe.HTML=51]="HTML",voe[voe.I=52]="I",voe[voe.IMG=53]="IMG",voe[voe.IMAGE=54]="IMAGE",voe[voe.INPUT=55]="INPUT",voe[voe.IFRAME=56]="IFRAME",voe[voe.KEYGEN=57]="KEYGEN",voe[voe.LABEL=58]="LABEL",voe[voe.LI=59]="LI",voe[voe.LINK=60]="LINK",voe[voe.LISTING=61]="LISTING",voe[voe.MAIN=62]="MAIN",voe[voe.MALIGNMARK=63]="MALIGNMARK",voe[voe.MARQUEE=64]="MARQUEE",voe[voe.MATH=65]="MATH",voe[voe.MENU=66]="MENU",voe[voe.META=67]="META",voe[voe.MGLYPH=68]="MGLYPH",voe[voe.MI=69]="MI",voe[voe.MO=70]="MO",voe[voe.MN=71]="MN",voe[voe.MS=72]="MS",voe[voe.MTEXT=73]="MTEXT",voe[voe.NAV=74]="NAV",voe[voe.NOBR=75]="NOBR",voe[voe.NOFRAMES=76]="NOFRAMES",voe[voe.NOEMBED=77]="NOEMBED",voe[voe.NOSCRIPT=78]="NOSCRIPT",voe[voe.OBJECT=79]="OBJECT",voe[voe.OL=80]="OL",voe[voe.OPTGROUP=81]="OPTGROUP",voe[voe.OPTION=82]="OPTION",voe[voe.P=83]="P",voe[voe.PARAM=84]="PARAM",voe[voe.PLAINTEXT=85]="PLAINTEXT",voe[voe.PRE=86]="PRE",voe[voe.RB=87]="RB",voe[voe.RP=88]="RP",voe[voe.RT=89]="RT",voe[voe.RTC=90]="RTC",voe[voe.RUBY=91]="RUBY",voe[voe.S=92]="S",voe[voe.SCRIPT=93]="SCRIPT",voe[voe.SEARCH=94]="SEARCH",voe[voe.SECTION=95]="SECTION",voe[voe.SELECT=96]="SELECT",voe[voe.SOURCE=97]="SOURCE",voe[voe.SMALL=98]="SMALL",voe[voe.SPAN=99]="SPAN",voe[voe.STRIKE=100]="STRIKE",voe[voe.STRONG=101]="STRONG",voe[voe.STYLE=102]="STYLE",voe[voe.SUB=103]="SUB",voe[voe.SUMMARY=104]="SUMMARY",voe[voe.SUP=105]="SUP",voe[voe.TABLE=106]="TABLE",voe[voe.TBODY=107]="TBODY",voe[voe.TEMPLATE=108]="TEMPLATE",voe[voe.TEXTAREA=109]="TEXTAREA",voe[voe.TFOOT=110]="TFOOT",voe[voe.TD=111]="TD",voe[voe.TH=112]="TH",voe[voe.THEAD=113]="THEAD",voe[voe.TITLE=114]="TITLE",voe[voe.TR=115]="TR",voe[voe.TRACK=116]="TRACK",voe[voe.TT=117]="TT",voe[voe.U=118]="U",voe[voe.UL=119]="UL",voe[voe.SVG=120]="SVG",voe[voe.VAR=121]="VAR",voe[voe.WBR=122]="WBR",voe[voe.XMP=123]="XMP";const _oe=new Map([[goe.A,boe.A],[goe.ADDRESS,boe.ADDRESS],[goe.ANNOTATION_XML,boe.ANNOTATION_XML],[goe.APPLET,boe.APPLET],[goe.AREA,boe.AREA],[goe.ARTICLE,boe.ARTICLE],[goe.ASIDE,boe.ASIDE],[goe.B,boe.B],[goe.BASE,boe.BASE],[goe.BASEFONT,boe.BASEFONT],[goe.BGSOUND,boe.BGSOUND],[goe.BIG,boe.BIG],[goe.BLOCKQUOTE,boe.BLOCKQUOTE],[goe.BODY,boe.BODY],[goe.BR,boe.BR],[goe.BUTTON,boe.BUTTON],[goe.CAPTION,boe.CAPTION],[goe.CENTER,boe.CENTER],[goe.CODE,boe.CODE],[goe.COL,boe.COL],[goe.COLGROUP,boe.COLGROUP],[goe.DD,boe.DD],[goe.DESC,boe.DESC],[goe.DETAILS,boe.DETAILS],[goe.DIALOG,boe.DIALOG],[goe.DIR,boe.DIR],[goe.DIV,boe.DIV],[goe.DL,boe.DL],[goe.DT,boe.DT],[goe.EM,boe.EM],[goe.EMBED,boe.EMBED],[goe.FIELDSET,boe.FIELDSET],[goe.FIGCAPTION,boe.FIGCAPTION],[goe.FIGURE,boe.FIGURE],[goe.FONT,boe.FONT],[goe.FOOTER,boe.FOOTER],[goe.FOREIGN_OBJECT,boe.FOREIGN_OBJECT],[goe.FORM,boe.FORM],[goe.FRAME,boe.FRAME],[goe.FRAMESET,boe.FRAMESET],[goe.H1,boe.H1],[goe.H2,boe.H2],[goe.H3,boe.H3],[goe.H4,boe.H4],[goe.H5,boe.H5],[goe.H6,boe.H6],[goe.HEAD,boe.HEAD],[goe.HEADER,boe.HEADER],[goe.HGROUP,boe.HGROUP],[goe.HR,boe.HR],[goe.HTML,boe.HTML],[goe.I,boe.I],[goe.IMG,boe.IMG],[goe.IMAGE,boe.IMAGE],[goe.INPUT,boe.INPUT],[goe.IFRAME,boe.IFRAME],[goe.KEYGEN,boe.KEYGEN],[goe.LABEL,boe.LABEL],[goe.LI,boe.LI],[goe.LINK,boe.LINK],[goe.LISTING,boe.LISTING],[goe.MAIN,boe.MAIN],[goe.MALIGNMARK,boe.MALIGNMARK],[goe.MARQUEE,boe.MARQUEE],[goe.MATH,boe.MATH],[goe.MENU,boe.MENU],[goe.META,boe.META],[goe.MGLYPH,boe.MGLYPH],[goe.MI,boe.MI],[goe.MO,boe.MO],[goe.MN,boe.MN],[goe.MS,boe.MS],[goe.MTEXT,boe.MTEXT],[goe.NAV,boe.NAV],[goe.NOBR,boe.NOBR],[goe.NOFRAMES,boe.NOFRAMES],[goe.NOEMBED,boe.NOEMBED],[goe.NOSCRIPT,boe.NOSCRIPT],[goe.OBJECT,boe.OBJECT],[goe.OL,boe.OL],[goe.OPTGROUP,boe.OPTGROUP],[goe.OPTION,boe.OPTION],[goe.P,boe.P],[goe.PARAM,boe.PARAM],[goe.PLAINTEXT,boe.PLAINTEXT],[goe.PRE,boe.PRE],[goe.RB,boe.RB],[goe.RP,boe.RP],[goe.RT,boe.RT],[goe.RTC,boe.RTC],[goe.RUBY,boe.RUBY],[goe.S,boe.S],[goe.SCRIPT,boe.SCRIPT],[goe.SEARCH,boe.SEARCH],[goe.SECTION,boe.SECTION],[goe.SELECT,boe.SELECT],[goe.SOURCE,boe.SOURCE],[goe.SMALL,boe.SMALL],[goe.SPAN,boe.SPAN],[goe.STRIKE,boe.STRIKE],[goe.STRONG,boe.STRONG],[goe.STYLE,boe.STYLE],[goe.SUB,boe.SUB],[goe.SUMMARY,boe.SUMMARY],[goe.SUP,boe.SUP],[goe.TABLE,boe.TABLE],[goe.TBODY,boe.TBODY],[goe.TEMPLATE,boe.TEMPLATE],[goe.TEXTAREA,boe.TEXTAREA],[goe.TFOOT,boe.TFOOT],[goe.TD,boe.TD],[goe.TH,boe.TH],[goe.THEAD,boe.THEAD],[goe.TITLE,boe.TITLE],[goe.TR,boe.TR],[goe.TRACK,boe.TRACK],[goe.TT,boe.TT],[goe.U,boe.U],[goe.UL,boe.UL],[goe.SVG,boe.SVG],[goe.VAR,boe.VAR],[goe.WBR,boe.WBR],[goe.XMP,boe.XMP]]);function Soe(e){var t;return null!==(t=_oe.get(e))&&void 0!==t?t:boe.UNKNOWN}const Toe=boe,Coe={[uoe.HTML]:new Set([Toe.ADDRESS,Toe.APPLET,Toe.AREA,Toe.ARTICLE,Toe.ASIDE,Toe.BASE,Toe.BASEFONT,Toe.BGSOUND,Toe.BLOCKQUOTE,Toe.BODY,Toe.BR,Toe.BUTTON,Toe.CAPTION,Toe.CENTER,Toe.COL,Toe.COLGROUP,Toe.DD,Toe.DETAILS,Toe.DIR,Toe.DIV,Toe.DL,Toe.DT,Toe.EMBED,Toe.FIELDSET,Toe.FIGCAPTION,Toe.FIGURE,Toe.FOOTER,Toe.FORM,Toe.FRAME,Toe.FRAMESET,Toe.H1,Toe.H2,Toe.H3,Toe.H4,Toe.H5,Toe.H6,Toe.HEAD,Toe.HEADER,Toe.HGROUP,Toe.HR,Toe.HTML,Toe.IFRAME,Toe.IMG,Toe.INPUT,Toe.LI,Toe.LINK,Toe.LISTING,Toe.MAIN,Toe.MARQUEE,Toe.MENU,Toe.META,Toe.NAV,Toe.NOEMBED,Toe.NOFRAMES,Toe.NOSCRIPT,Toe.OBJECT,Toe.OL,Toe.P,Toe.PARAM,Toe.PLAINTEXT,Toe.PRE,Toe.SCRIPT,Toe.SECTION,Toe.SELECT,Toe.SOURCE,Toe.STYLE,Toe.SUMMARY,Toe.TABLE,Toe.TBODY,Toe.TD,Toe.TEMPLATE,Toe.TEXTAREA,Toe.TFOOT,Toe.TH,Toe.THEAD,Toe.TITLE,Toe.TR,Toe.TRACK,Toe.UL,Toe.WBR,Toe.XMP]),[uoe.MATHML]:new Set([Toe.MI,Toe.MO,Toe.MN,Toe.MS,Toe.MTEXT,Toe.ANNOTATION_XML]),[uoe.SVG]:new Set([Toe.TITLE,Toe.FOREIGN_OBJECT,Toe.DESC]),[uoe.XLINK]:new Set,[uoe.XML]:new Set,[uoe.XMLNS]:new Set},Aoe=new Set([Toe.H1,Toe.H2,Toe.H3,Toe.H4,Toe.H5,Toe.H6]);var Ioe,Noe;goe.STYLE,goe.SCRIPT,goe.XMP,goe.IFRAME,goe.NOEMBED,goe.NOFRAMES,goe.PLAINTEXT,(Noe=Ioe||(Ioe={}))[Noe.DATA=0]="DATA",Noe[Noe.RCDATA=1]="RCDATA",Noe[Noe.RAWTEXT=2]="RAWTEXT",Noe[Noe.SCRIPT_DATA=3]="SCRIPT_DATA",Noe[Noe.PLAINTEXT=4]="PLAINTEXT",Noe[Noe.TAG_OPEN=5]="TAG_OPEN",Noe[Noe.END_TAG_OPEN=6]="END_TAG_OPEN",Noe[Noe.TAG_NAME=7]="TAG_NAME",Noe[Noe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Noe[Noe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Noe[Noe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Noe[Noe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Noe[Noe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Noe[Noe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Noe[Noe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Noe[Noe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Noe[Noe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Noe[Noe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Noe[Noe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Noe[Noe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Noe[Noe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Noe[Noe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Noe[Noe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Noe[Noe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Noe[Noe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Noe[Noe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Noe[Noe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Noe[Noe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Noe[Noe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Noe[Noe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Noe[Noe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Noe[Noe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Noe[Noe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Noe[Noe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Noe[Noe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Noe[Noe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Noe[Noe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Noe[Noe.COMMENT_START=42]="COMMENT_START",Noe[Noe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Noe[Noe.COMMENT=44]="COMMENT",Noe[Noe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Noe[Noe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Noe[Noe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Noe[Noe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Noe[Noe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Noe[Noe.COMMENT_END=50]="COMMENT_END",Noe[Noe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Noe[Noe.DOCTYPE=52]="DOCTYPE",Noe[Noe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Noe[Noe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Noe[Noe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Noe[Noe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Noe[Noe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Noe[Noe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Noe[Noe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Noe[Noe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Noe[Noe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Noe[Noe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Noe[Noe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Noe[Noe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Noe[Noe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Noe[Noe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Noe[Noe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Noe[Noe.CDATA_SECTION=68]="CDATA_SECTION",Noe[Noe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Noe[Noe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Noe[Noe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Noe[Noe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Ooe={DATA:Ioe.DATA,RCDATA:Ioe.RCDATA,RAWTEXT:Ioe.RAWTEXT,SCRIPT_DATA:Ioe.SCRIPT_DATA,PLAINTEXT:Ioe.PLAINTEXT,CDATA_SECTION:Ioe.CDATA_SECTION};function Roe(e){return e>=Fae.LATIN_CAPITAL_A&&e<=Fae.LATIN_CAPITAL_Z}function Poe(e){return function(e){return e>=Fae.LATIN_SMALL_A&&e<=Fae.LATIN_SMALL_Z}(e)||Roe(e)}function Loe(e){return Poe(e)||function(e){return e>=Fae.DIGIT_0&&e<=Fae.DIGIT_9}(e)}function Doe(e){return e+32}function Moe(e){return e===Fae.SPACE||e===Fae.LINE_FEED||e===Fae.TABULATION||e===Fae.FORM_FEED}function Foe(e){return Moe(e)||e===Fae.SOLIDUS||e===Fae.GREATER_THAN_SIGN}class joe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Ioe.DATA,this.returnState=Ioe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Kae(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new woe(eoe,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Yae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Yae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Fae.NULL?Yae.nullCharacterReference:e>1114111?Yae.characterReferenceOutsideUnicodeRange:Gae(e)?Yae.surrogateCharacterReference:Wae(e)?Yae.noncharacterCharacterReference:qae(e)||e===Fae.CARRIAGE_RETURN?Yae.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:Xae.START_TAG,tagName:"",tagID:boe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xae.END_TAG,tagName:"",tagID:boe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:Xae.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:Xae.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===Jae(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Yae.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Soe(e.tagName),e.type===Xae.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(Yae.endTagWithAttributes),e.selfClosing&&this._err(Yae.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Xae.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case Xae.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case Xae.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Xae.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Moe(e)?Xae.WHITESPACE_CHARACTER:e===Fae.NULL?Xae.NULL_CHARACTER:Xae.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Xae.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Ioe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?loe.Attribute:loe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Ioe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Ioe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Ioe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Ioe.DATA:this._stateData(e);break;case Ioe.RCDATA:this._stateRcdata(e);break;case Ioe.RAWTEXT:this._stateRawtext(e);break;case Ioe.SCRIPT_DATA:this._stateScriptData(e);break;case Ioe.PLAINTEXT:this._statePlaintext(e);break;case Ioe.TAG_OPEN:this._stateTagOpen(e);break;case Ioe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Ioe.TAG_NAME:this._stateTagName(e);break;case Ioe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Ioe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Ioe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Ioe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Ioe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Ioe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Ioe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Ioe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Ioe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Ioe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Ioe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Ioe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Ioe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Ioe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Ioe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Ioe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Ioe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Ioe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Ioe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Ioe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Ioe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Ioe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Ioe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Ioe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Ioe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Ioe.BOGUS_COMMENT:this._stateBogusComment(e);break;case Ioe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Ioe.COMMENT_START:this._stateCommentStart(e);break;case Ioe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Ioe.COMMENT:this._stateComment(e);break;case Ioe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Ioe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Ioe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Ioe.COMMENT_END:this._stateCommentEnd(e);break;case Ioe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Ioe.DOCTYPE:this._stateDoctype(e);break;case Ioe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Ioe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Ioe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Ioe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Ioe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Ioe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Ioe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Ioe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Ioe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Ioe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Ioe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Ioe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Ioe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Ioe.CDATA_SECTION:this._stateCdataSection(e);break;case Ioe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Ioe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Ioe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Ioe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Fae.LESS_THAN_SIGN:this.state=Ioe.TAG_OPEN;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitCodePoint(e);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.LESS_THAN_SIGN:this.state=Ioe.RCDATA_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Fae.LESS_THAN_SIGN:this.state=Ioe.RAWTEXT_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Poe(e))this._createStartTagToken(),this.state=Ioe.TAG_NAME,this._stateTagName(e);else switch(e){case Fae.EXCLAMATION_MARK:this.state=Ioe.MARKUP_DECLARATION_OPEN;break;case Fae.SOLIDUS:this.state=Ioe.END_TAG_OPEN;break;case Fae.QUESTION_MARK:this._err(Yae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Ioe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Fae.EOF:this._err(Yae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(Yae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Ioe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Poe(e))this._createEndTagToken(),this.state=Ioe.TAG_NAME,this._stateTagName(e);else switch(e){case Fae.GREATER_THAN_SIGN:this._err(Yae.missingEndTagName),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(Yae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Ioe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_ATTRIBUTE_NAME;break;case Fae.SOLIDUS:this.state=Ioe.SELF_CLOSING_START_TAG;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.tagName+=Mae;break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Roe(e)?Doe(e):e)}}_stateRcdataLessThanSign(e){e===Fae.SOLIDUS?this.state=Ioe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Ioe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Poe(e)?(this.state=Ioe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=Ioe.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Ioe.BEFORE_ATTRIBUTE_NAME,!1;case Fae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Ioe.SELF_CLOSING_START_TAG,!1;case Fae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Ioe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Fae.SOLIDUS?this.state=Ioe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Ioe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Poe(e)?(this.state=Ioe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=Ioe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Fae.SOLIDUS:this.state=Ioe.SCRIPT_DATA_END_TAG_OPEN;break;case Fae.EXCLAMATION_MARK:this.state=Ioe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Poe(e)?(this.state=Ioe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Fae.HYPHEN_MINUS?(this.state=Ioe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Fae.HYPHEN_MINUS?(this.state=Ioe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Ioe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Fae.HYPHEN_MINUS:this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.SCRIPT_DATA,this._emitChars(">");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Fae.SOLIDUS?this.state=Ioe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Poe(e)?(this._emitChars("<"),this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Poe(e)?(this.state=Ioe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Uae,!1)&&Foe(this.preprocessor.peek(Uae.length))){this._emitCodePoint(e);for(let e=0;e<Uae.length;e++)this._emitCodePoint(this._consume());this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Ioe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Fae.HYPHEN_MINUS:this._emitChars("-");break;case Fae.LESS_THAN_SIGN:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.SCRIPT_DATA,this._emitChars(">");break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Mae);break;case Fae.EOF:this._err(Yae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Fae.SOLIDUS?(this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Uae,!1)&&Foe(this.preprocessor.peek(Uae.length))){this._emitCodePoint(e);for(let e=0;e<Uae.length;e++)this._emitCodePoint(this._consume());this.state=Ioe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Ioe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.SOLIDUS:case Fae.GREATER_THAN_SIGN:case Fae.EOF:this.state=Ioe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Fae.EQUALS_SIGN:this._err(Yae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Ioe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=Ioe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:case Fae.SOLIDUS:case Fae.GREATER_THAN_SIGN:case Fae.EOF:this._leaveAttrName(),this.state=Ioe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Fae.EQUALS_SIGN:this._leaveAttrName(),this.state=Ioe.BEFORE_ATTRIBUTE_VALUE;break;case Fae.QUOTATION_MARK:case Fae.APOSTROPHE:case Fae.LESS_THAN_SIGN:this._err(Yae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.name+=Mae;break;default:this.currentAttr.name+=String.fromCodePoint(Roe(e)?Doe(e):e)}}_stateAfterAttributeName(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.SOLIDUS:this.state=Ioe.SELF_CLOSING_START_TAG;break;case Fae.EQUALS_SIGN:this.state=Ioe.BEFORE_ATTRIBUTE_VALUE;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=Ioe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.QUOTATION_MARK:this.state=Ioe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this.state=Ioe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingAttributeValue),this.state=Ioe.DATA,this.emitCurrentTagToken();break;default:this.state=Ioe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Fae.QUOTATION_MARK:this.state=Ioe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.value+=Mae;break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Fae.APOSTROPHE:this.state=Ioe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.value+=Mae;break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this._leaveAttrValue(),this.state=Ioe.BEFORE_ATTRIBUTE_NAME;break;case Fae.AMPERSAND:this._startCharacterReference();break;case Fae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this.currentAttr.value+=Mae;break;case Fae.QUOTATION_MARK:case Fae.APOSTROPHE:case Fae.LESS_THAN_SIGN:case Fae.EQUALS_SIGN:case Fae.GRAVE_ACCENT:this._err(Yae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this._leaveAttrValue(),this.state=Ioe.BEFORE_ATTRIBUTE_NAME;break;case Fae.SOLIDUS:this._leaveAttrValue(),this.state=Ioe.SELF_CLOSING_START_TAG;break;case Fae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this._err(Yae.missingWhitespaceBetweenAttributes),this.state=Ioe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Fae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=Ioe.DATA,this.emitCurrentTagToken();break;case Fae.EOF:this._err(Yae.eofInTag),this._emitEOFToken();break;default:this._err(Yae.unexpectedSolidusInTag),this.state=Ioe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.data+=Mae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(zae,!0)?(this._createCommentToken(zae.length+1),this.state=Ioe.COMMENT_START):this._consumeSequenceIfMatch(Hae,!1)?(this.currentLocation=this.getCurrentLocation(Hae.length+1),this.state=Ioe.DOCTYPE):this._consumeSequenceIfMatch(Bae,!0)?this.inForeignNode?this.state=Ioe.CDATA_SECTION:(this._err(Yae.cdataInHtmlContent),this._createCommentToken(Bae.length+1),this.currentToken.data="[CDATA[",this.state=Ioe.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Yae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Ioe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_START_DASH;break;case Fae.GREATER_THAN_SIGN:{this._err(Yae.abruptClosingOfEmptyComment),this.state=Ioe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_END;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptClosingOfEmptyComment),this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_END_DASH;break;case Fae.LESS_THAN_SIGN:t.data+="<",this.state=Ioe.COMMENT_LESS_THAN_SIGN;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.data+=Mae;break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Fae.EXCLAMATION_MARK:t.data+="!",this.state=Ioe.COMMENT_LESS_THAN_SIGN_BANG;break;case Fae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Fae.HYPHEN_MINUS?this.state=Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Ioe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Fae.HYPHEN_MINUS?this.state=Ioe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Ioe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Fae.GREATER_THAN_SIGN&&e!==Fae.EOF&&this._err(Yae.nestedComment),this.state=Ioe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:this.state=Ioe.COMMENT_END;break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EXCLAMATION_MARK:this.state=Ioe.COMMENT_END_BANG;break;case Fae.HYPHEN_MINUS:t.data+="-";break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Fae.HYPHEN_MINUS:t.data+="--!",this.state=Ioe.COMMENT_END_DASH;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.incorrectlyClosedComment),this.state=Ioe.DATA,this.emitCurrentComment(t);break;case Fae.EOF:this._err(Yae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=Ioe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_DOCTYPE_NAME;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Fae.EOF:{this._err(Yae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Yae.missingWhitespaceBeforeDoctypeName),this.state=Ioe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Roe(e))this._createDoctypeToken(String.fromCharCode(Doe(e))),this.state=Ioe.DOCTYPE_NAME;else switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),this._createDoctypeToken(Mae),this.state=Ioe.DOCTYPE_NAME;break;case Fae.GREATER_THAN_SIGN:{this._err(Yae.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Ioe.DATA;break}case Fae.EOF:{this._err(Yae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Ioe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.AFTER_DOCTYPE_NAME;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.name+=Mae;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Roe(e)?Doe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch($ae,!1)?this.state=Ioe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Vae,!1)?this.state=Ioe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Yae.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Fae.QUOTATION_MARK:this._err(Yae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this._err(Yae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.QUOTATION_MARK:t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:t.publicId="",this.state=Ioe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Fae.QUOTATION_MARK:this.state=Ioe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.publicId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Fae.APOSTROPHE:this.state=Ioe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.publicId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.QUOTATION_MARK:this._err(Yae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this._err(Yae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.QUOTATION_MARK:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:this.state=Ioe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Fae.QUOTATION_MARK:this._err(Yae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:this._err(Yae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.QUOTATION_MARK:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Fae.APOSTROPHE:t.systemId="",this.state=Ioe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.DATA,this.emitCurrentDoctype(t);break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Fae.QUOTATION_MARK:this.state=Ioe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.systemId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Fae.APOSTROPHE:this.state=Ioe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter),t.systemId+=Mae;break;case Fae.GREATER_THAN_SIGN:this._err(Yae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Fae.SPACE:case Fae.LINE_FEED:case Fae.TABULATION:case Fae.FORM_FEED:break;case Fae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.EOF:this._err(Yae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Yae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Ioe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Fae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Ioe.DATA;break;case Fae.NULL:this._err(Yae.unexpectedNullCharacter);break;case Fae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Fae.RIGHT_SQUARE_BRACKET:this.state=Ioe.CDATA_SECTION_BRACKET;break;case Fae.EOF:this._err(Yae.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Fae.RIGHT_SQUARE_BRACKET?this.state=Ioe.CDATA_SECTION_END:(this._emitChars("]"),this.state=Ioe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Fae.GREATER_THAN_SIGN:this.state=Ioe.DATA;break;case Fae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=Ioe.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(!this.preprocessor.lastChunkWritten)return this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,void(this.preprocessor.endOfChunkHit=!0);e=this.entityDecoder.end()}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Fae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Loe(this.preprocessor.peek(1))?Ioe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Loe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Fae.SEMICOLON&&this._err(Yae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const zoe=new Set([boe.DD,boe.DT,boe.LI,boe.OPTGROUP,boe.OPTION,boe.P,boe.RB,boe.RP,boe.RT,boe.RTC]),Boe=new Set([...zoe,boe.CAPTION,boe.COLGROUP,boe.TBODY,boe.TD,boe.TFOOT,boe.TH,boe.THEAD,boe.TR]),Hoe=new Set([boe.APPLET,boe.CAPTION,boe.HTML,boe.MARQUEE,boe.OBJECT,boe.TABLE,boe.TD,boe.TEMPLATE,boe.TH]),Uoe=new Set([...Hoe,boe.OL,boe.UL]),$oe=new Set([...Hoe,boe.BUTTON]),Voe=new Set([boe.ANNOTATION_XML,boe.MI,boe.MN,boe.MO,boe.MS,boe.MTEXT]),Goe=new Set([boe.DESC,boe.FOREIGN_OBJECT,boe.TITLE]),qoe=new Set([boe.TR,boe.TEMPLATE,boe.HTML]),Woe=new Set([boe.TBODY,boe.TFOOT,boe.THEAD,boe.TEMPLATE,boe.HTML]),Yoe=new Set([boe.TABLE,boe.TEMPLATE,boe.HTML]),Zoe=new Set([boe.TD,boe.TH]);class Koe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=boe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===boe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===uoe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==uoe.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Aoe,uoe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Zoe,uoe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Yoe,uoe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Woe,uoe.HTML)}clearBackToTableRowContext(){this.clearBackTo(qoe,uoe.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===boe.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===boe.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case uoe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case uoe.SVG:if(Goe.has(r))return!1;break;case uoe.MATHML:if(Voe.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Hoe)}hasInListItemScope(e){return this.hasInDynamicScope(e,Uoe)}hasInButtonScope(e){return this.hasInDynamicScope(e,$oe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case uoe.HTML:if(Aoe.has(t))return!0;if(Hoe.has(t))return!1;break;case uoe.SVG:if(Goe.has(t))return!1;break;case uoe.MATHML:if(Voe.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===uoe.HTML)switch(this.tagIDs[t]){case e:return!0;case boe.TABLE:case boe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===uoe.HTML)switch(this.tagIDs[e]){case boe.TBODY:case boe.THEAD:case boe.TFOOT:return!0;case boe.TABLE:case boe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===uoe.HTML)switch(this.tagIDs[t]){case e:return!0;case boe.OPTION:case boe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&zoe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Boe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Boe.has(this.currentTagId);)this.pop()}}var Xoe,Qoe;(Qoe=Xoe||(Xoe={}))[Qoe.Marker=0]="Marker",Qoe[Qoe.Element=1]="Element";const Joe={type:Xoe.Marker};class eie{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,a=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let i=0;i<this.entries.length;i++){const e=this.entries[i];if(e.type===Xoe.Marker)break;const{element:t}=e;if(this.treeAdapter.getTagName(t)===a&&this.treeAdapter.getNamespaceURI(t)===o){const e=this.treeAdapter.getAttrList(t);e.length===r&&n.push({idx:i,attrs:e})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let a=0;for(let o=0;o<n.length;o++){const e=n[o];e.attrs.every((e=>r.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(Joe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:Xoe.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Xoe.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Joe);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===Xoe.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===Xoe.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===Xoe.Element&&t.element===e))}}const tie={createDocument:()=>({nodeName:"#document",mode:hoe.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({nodeName:"#text",value:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=n,a.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};tie.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(tie.isTextNode(n))return void(n.value+=t)}tie.appendChild(e,tie.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&tie.isTextNode(r)?r.value+=t:tie.insertBefore(e,tie.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},nie="html",rie=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],aie=[...rie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],oie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),iie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],sie=[...iie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function lie(e,t){return t.some((t=>e.startsWith(t)))}const cie="text/html",uie="application/xhtml+xml",die=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),pie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:uoe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:uoe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:uoe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:uoe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:uoe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:uoe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:uoe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:uoe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:uoe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:uoe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:uoe.XMLNS}]]),fie=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),hie=new Set([boe.B,boe.BIG,boe.BLOCKQUOTE,boe.BODY,boe.BR,boe.CENTER,boe.CODE,boe.DD,boe.DIV,boe.DL,boe.DT,boe.EM,boe.EMBED,boe.H1,boe.H2,boe.H3,boe.H4,boe.H5,boe.H6,boe.HEAD,boe.HR,boe.I,boe.IMG,boe.LI,boe.LISTING,boe.MENU,boe.META,boe.NOBR,boe.OL,boe.P,boe.PRE,boe.RUBY,boe.S,boe.SMALL,boe.SPAN,boe.STRONG,boe.STRIKE,boe.SUB,boe.SUP,boe.TABLE,boe.TT,boe.U,boe.UL,boe.VAR]);function mie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function gie(e){for(let t=0;t<e.attrs.length;t++){const n=die.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function yie(e){for(let t=0;t<e.attrs.length;t++){const n=pie.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function bie(e,t,n,r){return(!r||r===uoe.HTML)&&function(e,t,n){if(t===uoe.MATHML&&e===boe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===poe.ENCODING){const e=n[r].value.toLowerCase();return e===cie||e===uie}return t===uoe.SVG&&(e===boe.FOREIGN_OBJECT||e===boe.DESC||e===boe.TITLE)}(e,t,n)||(!r||r===uoe.MATHML)&&function(e,t){return t===uoe.MATHML&&(e===boe.MI||e===boe.MO||e===boe.MN||e===boe.MS||e===boe.MTEXT)}(e,t)}var vie,kie;(kie=vie||(vie={}))[kie.INITIAL=0]="INITIAL",kie[kie.BEFORE_HTML=1]="BEFORE_HTML",kie[kie.BEFORE_HEAD=2]="BEFORE_HEAD",kie[kie.IN_HEAD=3]="IN_HEAD",kie[kie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",kie[kie.AFTER_HEAD=5]="AFTER_HEAD",kie[kie.IN_BODY=6]="IN_BODY",kie[kie.TEXT=7]="TEXT",kie[kie.IN_TABLE=8]="IN_TABLE",kie[kie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",kie[kie.IN_CAPTION=10]="IN_CAPTION",kie[kie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",kie[kie.IN_TABLE_BODY=12]="IN_TABLE_BODY",kie[kie.IN_ROW=13]="IN_ROW",kie[kie.IN_CELL=14]="IN_CELL",kie[kie.IN_SELECT=15]="IN_SELECT",kie[kie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",kie[kie.IN_TEMPLATE=17]="IN_TEMPLATE",kie[kie.AFTER_BODY=18]="AFTER_BODY",kie[kie.IN_FRAMESET=19]="IN_FRAMESET",kie[kie.AFTER_FRAMESET=20]="AFTER_FRAMESET",kie[kie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",kie[kie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const xie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wie=new Set([boe.TABLE,boe.TBODY,boe.TFOOT,boe.THEAD,boe.TR]),Eie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:tie,onParseError:null};class _ie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=vie.INITIAL,this.originalInsertionMode=vie.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Eie,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new joe(this.options,this),this.activeFormattingElements=new eie(this.treeAdapter),this.fragmentContextID=n?Soe(this.treeAdapter.getTagName(n)):boe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new Koe(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...Eie,...t};null!=e||(e=n.treeAdapter.createElement(goe.TEMPLATE,uoe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",uoe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===boe.TEMPLATE&&a.tmplInsertionModeStack.unshift(vie.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const a=null!==(r=e.location)&&void 0!==r?r:xie,o={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,a;null===(a=(r=this.treeAdapter).onItemPush)||void 0===a||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===uoe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,uoe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=vie.TEXT}switchToPlaintextParsing(){this.insertionMode=vie.TEXT,this.originalInsertionMode=vie.IN_BODY,this.tokenizer.state=Ooe.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===goe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===uoe.HTML)switch(this.fragmentContextID){case boe.TITLE:case boe.TEXTAREA:this.tokenizer.state=Ooe.RCDATA;break;case boe.STYLE:case boe.XMP:case boe.IFRAME:case boe.NOEMBED:case boe.NOFRAMES:case boe.NOSCRIPT:this.tokenizer.state=Ooe.RAWTEXT;break;case boe.SCRIPT:this.tokenizer.state=Ooe.SCRIPT_DATA;break;case boe.PLAINTEXT:this.tokenizer.state=Ooe.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,uoe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,uoe.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(goe.HTML,uoe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,boe.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,o=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===Xae.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==boe.SVG||this.treeAdapter.getTagName(t)!==goe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==uoe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===boe.MGLYPH||e.tagID===boe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,uoe.HTML))}_processToken(e){switch(e.type){case Xae.CHARACTER:this.onCharacter(e);break;case Xae.NULL_CHARACTER:this.onNullCharacter(e);break;case Xae.COMMENT:this.onComment(e);break;case Xae.DOCTYPE:this.onDoctype(e);break;case Xae.START_TAG:this._processStartTag(e);break;case Xae.END_TAG:this.onEndTag(e);break;case Xae.EOF:this.onEof(e);break;case Xae.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return bie(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===Xoe.Marker||this.openElements.contains(e.element)));for(let n=-1===t?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=vie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(boe.P),this.openElements.popUntilTagNamePopped(boe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case boe.TR:return void(this.insertionMode=vie.IN_ROW);case boe.TBODY:case boe.THEAD:case boe.TFOOT:return void(this.insertionMode=vie.IN_TABLE_BODY);case boe.CAPTION:return void(this.insertionMode=vie.IN_CAPTION);case boe.COLGROUP:return void(this.insertionMode=vie.IN_COLUMN_GROUP);case boe.TABLE:return void(this.insertionMode=vie.IN_TABLE);case boe.BODY:return void(this.insertionMode=vie.IN_BODY);case boe.FRAMESET:return void(this.insertionMode=vie.IN_FRAMESET);case boe.SELECT:return void this._resetInsertionModeForSelect(e);case boe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case boe.HTML:return void(this.insertionMode=this.headElement?vie.AFTER_HEAD:vie.BEFORE_HEAD);case boe.TD:case boe.TH:if(e>0)return void(this.insertionMode=vie.IN_CELL);break;case boe.HEAD:if(e>0)return void(this.insertionMode=vie.IN_HEAD)}this.insertionMode=vie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===boe.TEMPLATE)break;if(e===boe.TABLE)return void(this.insertionMode=vie.IN_SELECT_IN_TABLE)}this.insertionMode=vie.IN_SELECT}_isElementCausesFosterParenting(e){return wie.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case boe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===uoe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case boe.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Coe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:Die(this,e);break;case vie.BEFORE_HEAD:Mie(this,e);break;case vie.IN_HEAD:zie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:Bie(this,e);break;case vie.AFTER_HEAD:Hie(this,e);break;case vie.IN_BODY:case vie.IN_CAPTION:case vie.IN_CELL:case vie.IN_TEMPLATE:Vie(this,e);break;case vie.TEXT:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case vie.IN_TABLE:case vie.IN_TABLE_BODY:case vie.IN_ROW:Jie(this,e);break;case vie.IN_TABLE_TEXT:ase(this,e);break;case vie.IN_COLUMN_GROUP:lse(this,e);break;case vie.AFTER_BODY:yse(this,e);break;case vie.AFTER_AFTER_BODY:bse(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Mae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:Die(this,e);break;case vie.BEFORE_HEAD:Mie(this,e);break;case vie.IN_HEAD:zie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:Bie(this,e);break;case vie.AFTER_HEAD:Hie(this,e);break;case vie.TEXT:this._insertCharacters(e);break;case vie.IN_TABLE:case vie.IN_TABLE_BODY:case vie.IN_ROW:Jie(this,e);break;case vie.IN_COLUMN_GROUP:lse(this,e);break;case vie.AFTER_BODY:yse(this,e);break;case vie.AFTER_AFTER_BODY:bse(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Rie(this,e);else switch(this.insertionMode){case vie.INITIAL:case vie.BEFORE_HTML:case vie.BEFORE_HEAD:case vie.IN_HEAD:case vie.IN_HEAD_NO_SCRIPT:case vie.AFTER_HEAD:case vie.IN_BODY:case vie.IN_TABLE:case vie.IN_CAPTION:case vie.IN_COLUMN_GROUP:case vie.IN_TABLE_BODY:case vie.IN_ROW:case vie.IN_CELL:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:case vie.IN_TEMPLATE:case vie.IN_FRAMESET:case vie.AFTER_FRAMESET:Rie(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case vie.AFTER_AFTER_BODY:case vie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case vie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?hoe.QUIRKS:function(e){if(e.name!==nie)return hoe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return hoe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),oie.has(n))return hoe.QUIRKS;let e=null===t?aie:rie;if(lie(n,e))return hoe.QUIRKS;if(e=null===t?iie:sie,lie(n,e))return hoe.LIMITED_QUIRKS}return hoe.NO_QUIRKS}(t);(function(e){return e.name===nie&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,Yae.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=vie.BEFORE_HTML}(this,e);break;case vie.BEFORE_HEAD:case vie.IN_HEAD:case vie.IN_HEAD_NO_SCRIPT:case vie.AFTER_HEAD:this._err(e,Yae.misplacedDoctype);break;case vie.IN_TABLE_TEXT:ose(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Yae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===boe.FONT&&e.attrs.some((({name:e})=>e===poe.COLOR||e===poe.SIZE||e===poe.FACE))||hie.has(t)}(t))vse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===uoe.MATHML?mie(t):r===uoe.SVG&&(!function(e){const t=fie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Soe(e.tagName))}(t),gie(t)),yie(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:!function(e,t){t.tagID===boe.HTML?(e._insertElement(t,uoe.HTML),e.insertionMode=vie.BEFORE_HEAD):Die(e,t)}(this,e);break;case vie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.HEAD:e._insertElement(t,uoe.HTML),e.headElement=e.openElements.current,e.insertionMode=vie.IN_HEAD;break;default:Mie(e,t)}}(this,e);break;case vie.IN_HEAD:Fie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.BASEFONT:case boe.BGSOUND:case boe.HEAD:case boe.LINK:case boe.META:case boe.NOFRAMES:case boe.STYLE:Fie(e,t);break;case boe.NOSCRIPT:e._err(t,Yae.nestedNoscriptInHead);break;default:Bie(e,t)}}(this,e);break;case vie.AFTER_HEAD:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.BODY:e._insertElement(t,uoe.HTML),e.framesetOk=!1,e.insertionMode=vie.IN_BODY;break;case boe.FRAMESET:e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_FRAMESET;break;case boe.BASE:case boe.BASEFONT:case boe.BGSOUND:case boe.LINK:case boe.META:case boe.NOFRAMES:case boe.SCRIPT:case boe.STYLE:case boe.TEMPLATE:case boe.TITLE:e._err(t,Yae.abandonedHeadElementChild),e.openElements.push(e.headElement,boe.HEAD),Fie(e,t),e.openElements.remove(e.headElement);break;case boe.HEAD:e._err(t,Yae.misplacedStartTagForHeadElement);break;default:Hie(e,t)}}(this,e);break;case vie.IN_BODY:Zie(this,e);break;case vie.IN_TABLE:ese(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.IN_CAPTION:!function(e,t){const n=t.tagID;ise.has(n)?e.openElements.hasInTableScope(boe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(boe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=vie.IN_TABLE,ese(e,t)):Zie(e,t)}(this,e);break;case vie.IN_COLUMN_GROUP:sse(this,e);break;case vie.IN_TABLE_BODY:cse(this,e);break;case vie.IN_ROW:dse(this,e);break;case vie.IN_CELL:!function(e,t){const n=t.tagID;ise.has(n)?(e.openElements.hasInTableScope(boe.TD)||e.openElements.hasInTableScope(boe.TH))&&(e._closeTableCell(),dse(e,t)):Zie(e,t)}(this,e);break;case vie.IN_SELECT:fse(this,e);break;case vie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===boe.CAPTION||n===boe.TABLE||n===boe.TBODY||n===boe.TFOOT||n===boe.THEAD||n===boe.TR||n===boe.TD||n===boe.TH?(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fse(e,t)}(this,e);break;case vie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case boe.BASE:case boe.BASEFONT:case boe.BGSOUND:case boe.LINK:case boe.META:case boe.NOFRAMES:case boe.SCRIPT:case boe.STYLE:case boe.TEMPLATE:case boe.TITLE:Fie(e,t);break;case boe.CAPTION:case boe.COLGROUP:case boe.TBODY:case boe.TFOOT:case boe.THEAD:e.tmplInsertionModeStack[0]=vie.IN_TABLE,e.insertionMode=vie.IN_TABLE,ese(e,t);break;case boe.COL:e.tmplInsertionModeStack[0]=vie.IN_COLUMN_GROUP,e.insertionMode=vie.IN_COLUMN_GROUP,sse(e,t);break;case boe.TR:e.tmplInsertionModeStack[0]=vie.IN_TABLE_BODY,e.insertionMode=vie.IN_TABLE_BODY,cse(e,t);break;case boe.TD:case boe.TH:e.tmplInsertionModeStack[0]=vie.IN_ROW,e.insertionMode=vie.IN_ROW,dse(e,t);break;default:e.tmplInsertionModeStack[0]=vie.IN_BODY,e.insertionMode=vie.IN_BODY,Zie(e,t)}}(this,e);break;case vie.AFTER_BODY:!function(e,t){t.tagID===boe.HTML?Zie(e,t):yse(e,t)}(this,e);break;case vie.IN_FRAMESET:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.FRAMESET:e._insertElement(t,uoe.HTML);break;case boe.FRAME:e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.NOFRAMES:Fie(e,t)}}(this,e);break;case vie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.NOFRAMES:Fie(e,t)}}(this,e);break;case vie.AFTER_AFTER_BODY:!function(e,t){t.tagID===boe.HTML?Zie(e,t):bse(e,t)}(this,e);break;case vie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.NOFRAMES:Fie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===boe.P||t.tagID===boe.BR)return vse(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===uoe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==boe.HTML&&n!==boe.HEAD&&n!==boe.BODY&&n!==boe.BR||Die(e,t)}(this,e);break;case vie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===boe.HEAD||n===boe.BODY||n===boe.HTML||n===boe.BR?Mie(e,t):e._err(t,Yae.endTagWithoutMatchingOpenElement)}(this,e);break;case vie.IN_HEAD:!function(e,t){switch(t.tagID){case boe.HEAD:e.openElements.pop(),e.insertionMode=vie.AFTER_HEAD;break;case boe.BODY:case boe.BR:case boe.HTML:zie(e,t);break;case boe.TEMPLATE:jie(e,t);break;default:e._err(t,Yae.endTagWithoutMatchingOpenElement)}}(this,e);break;case vie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case boe.NOSCRIPT:e.openElements.pop(),e.insertionMode=vie.IN_HEAD;break;case boe.BR:Bie(e,t);break;default:e._err(t,Yae.endTagWithoutMatchingOpenElement)}}(this,e);break;case vie.AFTER_HEAD:!function(e,t){switch(t.tagID){case boe.BODY:case boe.HTML:case boe.BR:Hie(e,t);break;case boe.TEMPLATE:jie(e,t);break;default:e._err(t,Yae.endTagWithoutMatchingOpenElement)}}(this,e);break;case vie.IN_BODY:Xie(this,e);break;case vie.TEXT:!function(e,t){var n;t.tagID===boe.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case vie.IN_TABLE:tse(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case boe.CAPTION:case boe.TABLE:e.openElements.hasInTableScope(boe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(boe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=vie.IN_TABLE,n===boe.TABLE&&tse(e,t));break;case boe.BODY:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TBODY:case boe.TD:case boe.TFOOT:case boe.TH:case boe.THEAD:case boe.TR:break;default:Xie(e,t)}}(this,e);break;case vie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case boe.COLGROUP:e.openElements.currentTagId===boe.COLGROUP&&(e.openElements.pop(),e.insertionMode=vie.IN_TABLE);break;case boe.TEMPLATE:jie(e,t);break;case boe.COL:break;default:lse(e,t)}}(this,e);break;case vie.IN_TABLE_BODY:use(this,e);break;case vie.IN_ROW:pse(this,e);break;case vie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case boe.TD:case boe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=vie.IN_ROW);break;case boe.TABLE:case boe.TBODY:case boe.TFOOT:case boe.THEAD:case boe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),pse(e,t));break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:break;default:Xie(e,t)}}(this,e);break;case vie.IN_SELECT:hse(this,e);break;case vie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===boe.CAPTION||n===boe.TABLE||n===boe.TBODY||n===boe.TFOOT||n===boe.THEAD||n===boe.TR||n===boe.TD||n===boe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):hse(e,t)}(this,e);break;case vie.IN_TEMPLATE:!function(e,t){t.tagID===boe.TEMPLATE&&jie(e,t)}(this,e);break;case vie.AFTER_BODY:gse(this,e);break;case vie.IN_FRAMESET:!function(e,t){t.tagID!==boe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===boe.FRAMESET||(e.insertionMode=vie.AFTER_FRAMESET))}(this,e);break;case vie.AFTER_FRAMESET:!function(e,t){t.tagID===boe.HTML&&(e.insertionMode=vie.AFTER_AFTER_FRAMESET)}(this,e);break;case vie.AFTER_AFTER_BODY:bse(this,e)}}onEof(e){switch(this.insertionMode){case vie.INITIAL:Lie(this,e);break;case vie.BEFORE_HTML:Die(this,e);break;case vie.BEFORE_HEAD:Mie(this,e);break;case vie.IN_HEAD:zie(this,e);break;case vie.IN_HEAD_NO_SCRIPT:Bie(this,e);break;case vie.AFTER_HEAD:Hie(this,e);break;case vie.IN_BODY:case vie.IN_TABLE:case vie.IN_CAPTION:case vie.IN_COLUMN_GROUP:case vie.IN_TABLE_BODY:case vie.IN_ROW:case vie.IN_CELL:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:Qie(this,e);break;case vie.TEXT:!function(e,t){e._err(t,Yae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case vie.IN_TABLE_TEXT:ose(this,e);break;case vie.IN_TEMPLATE:mse(this,e);break;case vie.AFTER_BODY:case vie.IN_FRAMESET:case vie.AFTER_FRAMESET:case vie.AFTER_AFTER_BODY:case vie.AFTER_AFTER_FRAMESET:Pie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Fae.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case vie.IN_HEAD:case vie.IN_HEAD_NO_SCRIPT:case vie.AFTER_HEAD:case vie.TEXT:case vie.IN_COLUMN_GROUP:case vie.IN_SELECT:case vie.IN_SELECT_IN_TABLE:case vie.IN_FRAMESET:case vie.AFTER_FRAMESET:this._insertCharacters(e);break;case vie.IN_BODY:case vie.IN_CAPTION:case vie.IN_CELL:case vie.IN_TEMPLATE:case vie.AFTER_BODY:case vie.AFTER_AFTER_BODY:case vie.AFTER_AFTER_FRAMESET:$ie(this,e);break;case vie.IN_TABLE:case vie.IN_TABLE_BODY:case vie.IN_ROW:Jie(this,e);break;case vie.IN_TABLE_TEXT:rse(this,e)}}}function Sie(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Kie(e,t),n}function Tie(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Cie(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,i=a;i!==n;o++,i=a){a=e.openElements.getCommonAncestor(i);const n=e.activeFormattingElements.getElementEntry(i),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(i)):(i=Aie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Aie(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Iie(e,t,n){const r=Soe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===boe.TEMPLATE&&a===uoe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Nie(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function Oie(e,t){for(let n=0;n<8;n++){const n=Sie(e,t);if(!n)break;const r=Tie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=Cie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&Iie(e,o,a),Nie(e,r,n)}}function Rie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Pie(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Lie(e,t){e._err(t,Yae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,hoe.QUIRKS),e.insertionMode=vie.BEFORE_HTML,e._processToken(t)}function Die(e,t){e._insertFakeRootElement(),e.insertionMode=vie.BEFORE_HEAD,e._processToken(t)}function Mie(e,t){e._insertFakeElement(goe.HEAD,boe.HEAD),e.headElement=e.openElements.current,e.insertionMode=vie.IN_HEAD,e._processToken(t)}function Fie(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.BASE:case boe.BASEFONT:case boe.BGSOUND:case boe.LINK:case boe.META:e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.TITLE:e._switchToTextParsing(t,Ooe.RCDATA);break;case boe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ooe.RAWTEXT):(e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_HEAD_NO_SCRIPT);break;case boe.NOFRAMES:case boe.STYLE:e._switchToTextParsing(t,Ooe.RAWTEXT);break;case boe.SCRIPT:e._switchToTextParsing(t,Ooe.SCRIPT_DATA);break;case boe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=vie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(vie.IN_TEMPLATE);break;case boe.HEAD:e._err(t,Yae.misplacedStartTagForHeadElement);break;default:zie(e,t)}}function jie(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==boe.TEMPLATE&&e._err(t,Yae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(boe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Yae.endTagWithoutMatchingOpenElement)}function zie(e,t){e.openElements.pop(),e.insertionMode=vie.AFTER_HEAD,e._processToken(t)}function Bie(e,t){const n=t.type===Xae.EOF?Yae.openElementsLeftAfterEof:Yae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=vie.IN_HEAD,e._processToken(t)}function Hie(e,t){e._insertFakeElement(goe.BODY,boe.BODY),e.insertionMode=vie.IN_BODY,Uie(e,t)}function Uie(e,t){switch(t.type){case Xae.CHARACTER:Vie(e,t);break;case Xae.WHITESPACE_CHARACTER:$ie(e,t);break;case Xae.COMMENT:Rie(e,t);break;case Xae.START_TAG:Zie(e,t);break;case Xae.END_TAG:Xie(e,t);break;case Xae.EOF:Qie(e,t)}}function $ie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Vie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Gie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,uoe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qie(e){const t=Jae(e,poe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Wie(e,t){e._switchToTextParsing(t,Ooe.RAWTEXT)}function Yie(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML)}function Zie(e,t){switch(t.tagID){case boe.I:case boe.S:case boe.B:case boe.U:case boe.EM:case boe.TT:case boe.BIG:case boe.CODE:case boe.FONT:case boe.SMALL:case boe.STRIKE:case boe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case boe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(goe.A);n&&(Oie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case boe.H1:case boe.H2:case boe.H3:case boe.H4:case boe.H5:case boe.H6:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Aoe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.P:case boe.DL:case boe.OL:case boe.UL:case boe.DIV:case boe.DIR:case boe.NAV:case boe.MAIN:case boe.MENU:case boe.ASIDE:case boe.CENTER:case boe.FIGURE:case boe.FOOTER:case boe.HEADER:case boe.HGROUP:case boe.DIALOG:case boe.DETAILS:case boe.ADDRESS:case boe.ARTICLE:case boe.SEARCH:case boe.SECTION:case boe.SUMMARY:case boe.FIELDSET:case boe.BLOCKQUOTE:case boe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.LI:case boe.DD:case boe.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===boe.LI&&t===boe.LI||(n===boe.DD||n===boe.DT)&&(t===boe.DD||t===boe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==boe.ADDRESS&&t!==boe.DIV&&t!==boe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.BR:case boe.IMG:case boe.WBR:case boe.AREA:case boe.EMBED:case boe.KEYGEN:Gie(e,t);break;case boe.HR:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._appendElement(t,uoe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case boe.RB:case boe.RTC:!function(e,t){e.openElements.hasInScope(boe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.RT:case boe.RP:!function(e,t){e.openElements.hasInScope(boe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(boe.RTC),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.PRE:case boe.LISTING:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case boe.XMP:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ooe.RAWTEXT)}(e,t);break;case boe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),gie(t),yie(t),t.selfClosing?e._appendElement(t,uoe.SVG):e._insertElement(t,uoe.SVG),t.ackSelfClosing=!0}(e,t);break;case boe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case boe.BASE:case boe.LINK:case boe.META:case boe.STYLE:case boe.TITLE:case boe.SCRIPT:case boe.BGSOUND:case boe.BASEFONT:case boe.TEMPLATE:Fie(e,t);break;case boe.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case boe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case boe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(boe.NOBR)&&(Oie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,uoe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case boe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),mie(t),yie(t),t.selfClosing?e._appendElement(t,uoe.MATHML):e._insertElement(t,uoe.MATHML),t.ackSelfClosing=!0}(e,t);break;case boe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==hoe.QUIRKS&&e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),e.framesetOk=!1,e.insertionMode=vie.IN_TABLE}(e,t);break;case boe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,uoe.HTML),qie(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case boe.PARAM:case boe.TRACK:case boe.SOURCE:!function(e,t){e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0}(e,t);break;case boe.IMAGE:!function(e,t){t.tagName=goe.IMG,t.tagID=boe.IMG,Gie(e,t)}(e,t);break;case boe.BUTTON:!function(e,t){e.openElements.hasInScope(boe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(boe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.framesetOk=!1}(e,t);break;case boe.APPLET:case boe.OBJECT:case boe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case boe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ooe.RAWTEXT)}(e,t);break;case boe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===vie.IN_TABLE||e.insertionMode===vie.IN_CAPTION||e.insertionMode===vie.IN_TABLE_BODY||e.insertionMode===vie.IN_ROW||e.insertionMode===vie.IN_CELL?vie.IN_SELECT_IN_TABLE:vie.IN_SELECT}(e,t);break;case boe.OPTION:case boe.OPTGROUP:!function(e,t){e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,uoe.HTML)}(e,t);break;case boe.NOEMBED:case boe.NOFRAMES:Wie(e,t);break;case boe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_FRAMESET)}(e,t);break;case boe.TEXTAREA:!function(e,t){e._insertElement(t,uoe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ooe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=vie.TEXT}(e,t);break;case boe.NOSCRIPT:e.options.scriptingEnabled?Wie(e,t):Yie(e,t);break;case boe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(boe.P)&&e._closePElement(),e._insertElement(t,uoe.HTML),e.tokenizer.state=Ooe.PLAINTEXT}(e,t);break;case boe.COL:case boe.TH:case boe.TD:case boe.TR:case boe.HEAD:case boe.FRAME:case boe.TBODY:case boe.TFOOT:case boe.THEAD:case boe.CAPTION:case boe.COLGROUP:break;default:Yie(e,t)}}function Kie(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==boe.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,o))break}}function Xie(e,t){switch(t.tagID){case boe.A:case boe.B:case boe.I:case boe.S:case boe.U:case boe.EM:case boe.TT:case boe.BIG:case boe.CODE:case boe.FONT:case boe.NOBR:case boe.SMALL:case boe.STRIKE:case boe.STRONG:Oie(e,t);break;case boe.P:!function(e){e.openElements.hasInButtonScope(boe.P)||e._insertFakeElement(goe.P,boe.P),e._closePElement()}(e);break;case boe.DL:case boe.UL:case boe.OL:case boe.DIR:case boe.DIV:case boe.NAV:case boe.PRE:case boe.MAIN:case boe.MENU:case boe.ASIDE:case boe.BUTTON:case boe.CENTER:case boe.FIGURE:case boe.FOOTER:case boe.HEADER:case boe.HGROUP:case boe.DIALOG:case boe.ADDRESS:case boe.ARTICLE:case boe.DETAILS:case boe.SEARCH:case boe.SECTION:case boe.SUMMARY:case boe.LISTING:case boe.FIELDSET:case boe.BLOCKQUOTE:case boe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case boe.LI:!function(e){e.openElements.hasInListItemScope(boe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(boe.LI),e.openElements.popUntilTagNamePopped(boe.LI))}(e);break;case boe.DD:case boe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case boe.H1:case boe.H2:case boe.H3:case boe.H4:case boe.H5:case boe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case boe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(goe.BR,boe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case boe.BODY:!function(e,t){if(e.openElements.hasInScope(boe.BODY)&&(e.insertionMode=vie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case boe.HTML:!function(e,t){e.openElements.hasInScope(boe.BODY)&&(e.insertionMode=vie.AFTER_BODY,gse(e,t))}(e,t);break;case boe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(boe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(boe.FORM):n&&e.openElements.remove(n))}(e);break;case boe.APPLET:case boe.OBJECT:case boe.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case boe.TEMPLATE:jie(e,t);break;default:Kie(e,t)}}function Qie(e,t){e.tmplInsertionModeStack.length>0?mse(e,t):Pie(e,t)}function Jie(e,t){if(void 0!==e.openElements.currentTagId&&wie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=vie.IN_TABLE_TEXT,t.type){case Xae.CHARACTER:ase(e,t);break;case Xae.WHITESPACE_CHARACTER:rse(e,t)}else nse(e,t)}function ese(e,t){switch(t.tagID){case boe.TD:case boe.TH:case boe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(goe.TBODY,boe.TBODY),e.insertionMode=vie.IN_TABLE_BODY,cse(e,t)}(e,t);break;case boe.STYLE:case boe.SCRIPT:case boe.TEMPLATE:Fie(e,t);break;case boe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(goe.COLGROUP,boe.COLGROUP),e.insertionMode=vie.IN_COLUMN_GROUP,sse(e,t)}(e,t);break;case boe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,uoe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case boe.TABLE:!function(e,t){e.openElements.hasInTableScope(boe.TABLE)&&(e.openElements.popUntilTagNamePopped(boe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case boe.TBODY:case boe.TFOOT:case boe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_TABLE_BODY}(e,t);break;case boe.INPUT:!function(e,t){qie(t)?e._appendElement(t,uoe.HTML):nse(e,t),t.ackSelfClosing=!0}(e,t);break;case boe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_CAPTION}(e,t);break;case boe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_COLUMN_GROUP}(e,t);break;default:nse(e,t)}}function tse(e,t){switch(t.tagID){case boe.TABLE:e.openElements.hasInTableScope(boe.TABLE)&&(e.openElements.popUntilTagNamePopped(boe.TABLE),e._resetInsertionMode());break;case boe.TEMPLATE:jie(e,t);break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TBODY:case boe.TD:case boe.TFOOT:case boe.TH:case boe.THEAD:case boe.TR:break;default:nse(e,t)}}function nse(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Uie(e,t),e.fosterParentingEnabled=n}function rse(e,t){e.pendingCharacterTokens.push(t)}function ase(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ose(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)nse(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ise=new Set([boe.CAPTION,boe.COL,boe.COLGROUP,boe.TBODY,boe.TD,boe.TFOOT,boe.TH,boe.THEAD,boe.TR]);function sse(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.COL:e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.TEMPLATE:Fie(e,t);break;default:lse(e,t)}}function lse(e,t){e.openElements.currentTagId===boe.COLGROUP&&(e.openElements.pop(),e.insertionMode=vie.IN_TABLE,e._processToken(t))}function cse(e,t){switch(t.tagID){case boe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_ROW;break;case boe.TH:case boe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(goe.TR,boe.TR),e.insertionMode=vie.IN_ROW,dse(e,t);break;case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.TBODY:case boe.TFOOT:case boe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE,ese(e,t));break;default:ese(e,t)}}function use(e,t){const n=t.tagID;switch(t.tagID){case boe.TBODY:case boe.TFOOT:case boe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE);break;case boe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE,tse(e,t));break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TD:case boe.TH:case boe.TR:break;default:tse(e,t)}}function dse(e,t){switch(t.tagID){case boe.TH:case boe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,uoe.HTML),e.insertionMode=vie.IN_CELL,e.activeFormattingElements.insertMarker();break;case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.TBODY:case boe.TFOOT:case boe.THEAD:case boe.TR:e.openElements.hasInTableScope(boe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY,cse(e,t));break;default:ese(e,t)}}function pse(e,t){switch(t.tagID){case boe.TR:e.openElements.hasInTableScope(boe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY);break;case boe.TABLE:e.openElements.hasInTableScope(boe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY,use(e,t));break;case boe.TBODY:case boe.TFOOT:case boe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(boe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=vie.IN_TABLE_BODY,use(e,t));break;case boe.BODY:case boe.CAPTION:case boe.COL:case boe.COLGROUP:case boe.HTML:case boe.TD:case boe.TH:break;default:tse(e,t)}}function fse(e,t){switch(t.tagID){case boe.HTML:Zie(e,t);break;case boe.OPTION:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e._insertElement(t,uoe.HTML);break;case boe.OPTGROUP:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===boe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,uoe.HTML);break;case boe.HR:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===boe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,uoe.HTML),t.ackSelfClosing=!0;break;case boe.INPUT:case boe.KEYGEN:case boe.TEXTAREA:case boe.SELECT:e.openElements.hasInSelectScope(boe.SELECT)&&(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode(),t.tagID!==boe.SELECT&&e._processStartTag(t));break;case boe.SCRIPT:case boe.TEMPLATE:Fie(e,t)}}function hse(e,t){switch(t.tagID){case boe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===boe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===boe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===boe.OPTGROUP&&e.openElements.pop();break;case boe.OPTION:e.openElements.currentTagId===boe.OPTION&&e.openElements.pop();break;case boe.SELECT:e.openElements.hasInSelectScope(boe.SELECT)&&(e.openElements.popUntilTagNamePopped(boe.SELECT),e._resetInsertionMode());break;case boe.TEMPLATE:jie(e,t)}}function mse(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(boe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Pie(e,t)}function gse(e,t){var n;if(t.tagID===boe.HTML){if(e.fragmentContext||(e.insertionMode=vie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===boe.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else yse(e,t)}function yse(e,t){e.insertionMode=vie.IN_BODY,Uie(e,t)}function bse(e,t){e.insertionMode=vie.IN_BODY,Uie(e,t)}function vse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==uoe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}goe.AREA,goe.BASE,goe.BASEFONT,goe.BGSOUND,goe.BR,goe.COL,goe.EMBED,goe.FRAME,goe.HR,goe.IMG,goe.INPUT,goe.KEYGEN,goe.LINK,goe.META,goe.PARAM,goe.SOURCE,goe.TRACK,goe.WBR;const kse=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xse=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),wse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ese(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=Cae("type",{handlers:{root:Sse,element:Tse,text:Cse,comment:Nse,doctype:Ase,raw:Ose},unknown:Rse}),a={parser:n?new _ie(wse):_ie.getFragmentParser(void 0,wse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),Pse(a,See());const o=function(e,t){const n=t||{};return xae({file:n.file||void 0,location:!1,schema:"svg"===n.space?Y7:W7,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&mre(o,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===o.type&&1===o.children.length&&o.children[0].type===e.type?o.children[0]:o}function _se(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Sse(e,t){_se(e.children,t)}function Tse(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ooe.PLAINTEXT)return;Pse(t,See(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:bae.html;a===bae.html&&"svg"===n&&(a=bae.svg);const o=function(e,t){const n=(t||Aae).space;return Nae(e,"svg"===n?Y7:W7)}({...e,children:[]},{space:a===bae.svg?"svg":"html"}),i={type:Xae.START_TAG,tagName:n,tagID:Soe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Dse(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),_se(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Lae.includes(n))return;if(t.parser.tokenizer.state===Ooe.PLAINTEXT)return;Pse(t,_ee(e));const r={type:Xae.END_TAG,tagName:n,tagID:Soe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Dse(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Ooe.RCDATA&&t.parser.tokenizer.state!==Ooe.RAWTEXT&&t.parser.tokenizer.state!==Ooe.SCRIPT_DATA||(t.parser.tokenizer.state=Ooe.DATA)}(e,t)}function Cse(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xae.CHARACTER,chars:e.value,location:Dse(e)};Pse(t,See(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ase(e,t){const n={type:Xae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Dse(e)};Pse(t,See(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ise(e,t){t.stitches=!0;const n=function(e){return ore("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=Ese({type:"root",children:e.children},t.options);n.children=r.children}Nse({type:"comment",value:{stitch:n}},t)}function Nse(e,t){const n=e.value,r={type:Xae.COMMENT,data:n,location:Dse(e)};Pse(t,See(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ose(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Lse(t,See(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(kse,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Rse(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw xse.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+e)}Ise(n,t)}function Pse(e,t){Lse(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ooe.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Lse(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Dse(e){const t=See(e)||{line:void 0,column:void 0,offset:void 0},n=_ee(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Mse(e){return function(t,n){return Ese(t,{...e,file:n})}}function Fse(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function jse(e,t,n){const r=lre((n||{}).ignore||[]),a=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([zse(e[0]),Bse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)hre(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function zse(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Bse(e){return"function"==typeof e?e:function(){return e}}const Hse="phrasing",Use=["autolink","link","image","label"];function $se(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vse(e){this.config.enter.autolinkProtocol.call(this,e)}function Gse(e){this.config.exit.autolinkProtocol.call(this,e)}function qse(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Wse(e){this.config.exit.autolinkEmail.call(this,e)}function Yse(e){this.exit(e)}function Zse(e){jse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kse],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Xse]],{ignore:["link","linkReference"]})}function Kse(e,t,n,r,a){let o="";if(!Qse(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=Fse(e,"(");let o=Fse(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function Xse(e,t,n,r){return!(!Qse(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qse(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||kte(n)||vte(n))&&(!t||47!==n)}function Jse(){this.buffer()}function ele(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tle(){this.buffer()}function nle(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function rle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ale(e){this.exit(e)}function ole(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ile(e){this.exit(e)}function sle(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function lle(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?ule:cle)));return s(),i},footnoteReference:sle},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function cle(e,t,n){return 0===t?e:ule(e,t,n)}function ule(e,t,n){return(n?"":" ")+e}sle.peek=function(){return"["};const dle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function ple(e){this.enter({type:"delete",children:[]},e)}function fle(e){this.exit(e)}function hle(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function mle(e){return e.length}function gle(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function yle(e,t,n){return">"+(n?"":" ")+e}function ble(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function vle(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&(o=n.stack,i=n.unsafe[a],ble(o,i.inConstruct,!0)&&!ble(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function kle(e,t,n){return(n?"":" ")+e}function xle(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ele(e,t,n){const r=Cte(e),a=Cte(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function _le(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ele(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=wle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ele(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+wle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Sle(e){return e.value||""}function Tle(e,t,n,r){const a=xle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Cle(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ale(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function Ile(e,t){const n=Kee(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Nle(e,t,n,r){const a=xle(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Ile(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Ole(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Rle(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ple(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}hle.peek=function(){return"~"},_le.peek=function(e,t,n){return n.options.emphasis||"*"},Sle.peek=function(){return"<"},Tle.peek=function(){return"!"},Cle.peek=function(){return"!"},Ale.peek=function(){return"`"},Nle.peek=function(e,t,n){return Ile(e,n)?"<":"["},Ole.peek=function(){return"["};const Lle=lre(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dle(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ele(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=wle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ele(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+wle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Dle.peek=function(e,t,n){return n.options.strong||"*"};const Mle={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),yle);return a(),i},break:vle,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,kle);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=xle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:_le,hardBreak:vle,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return mre(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,fre})),Boolean((!e.depth||e.depth<3)&&Kee(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=wle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Sle,image:Tle,imageReference:Cle,inlineCode:Ale,link:Nle,linkReference:Ole,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Rle(n);const s=e.ordered?"."===i?")":".":function(e){const t=Rle(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ple(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Rle(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some((function(e){return Lle(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Dle,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ple(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Fle(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function jle(e){this.exit(e),this.data.inTable=void 0}function zle(e){this.enter({type:"tableRow",children:[]},e)}function Ble(e){this.exit(e)}function Hle(e){this.enter({type:"tableCell",children:[]},e)}function Ule(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$le));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $le(e,t){return"|"===t?t:e}function Vle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Mle.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=s([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||mle,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=null==(d=e[u][o])?"":String(d);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)o[p]=gle(r[p]);else{const e=gle(r);for(;++p<c;)o[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=o[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[p]&&(l[p]=a),h[p]=a),f[p]=i}i.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const e=i[u],t=s[u];p=-1;const r=[];for(;++p<c;){const a=e[p]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=o[p];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function Gle(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function qle(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Wle(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=Mle.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const Yle={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},Zle={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(Xle,l,s)(t):null===t||yte(t)||kte(t)||45!==t&&vte(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},Kle={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(Xle,t,o)(i):null===i||yte(i)||kte(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},Xle={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||yte(i)||kte(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||yte(e)||kte(e)?t(e):r(e)}function o(e){return cte(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):cte(t)?(e.consume(t),i):n(t)}},partial:!0},Qle={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ute(e)?n(e):t(e)}},partial:!0},Jle={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!ace.call(r,r.previous)||lce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Yle,e.attempt(Zle,e.attempt(Kle,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:ace},ece={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&oce.call(r,r.previous)&&!lce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(cte(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||pte(t)||yte(t)||kte(t)||vte(t)?n(t):e.attempt(Zle,e.attempt(Kle,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:oce},tce={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!sce(t)||!ice.call(r,r.previous)||lce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return sce(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Qle,c,l)(t):45===t||95===t||ute(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&cte(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:ice},nce={};let rce=48;for(;rce<123;)nce[rce]=tce,rce++,58===rce?rce=65:91===rce&&(rce=97);function ace(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||yte(e)}function oce(e){return!cte(e)}function ice(e){return!(47===e||sce(e))}function sce(e){return 43===e||45===e||46===e||95===e||ute(e)}function lce(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}nce[43]=tce,nce[45]=tce,nce[46]=tce,nce[95]=tce,nce[72]=[tce,ece],nce[104]=[tce,ece],nce[87]=[tce,Jle],nce[119]=[tce,Jle];const cce={tokenize:function(e,t,n){const r=this;return Ete(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function uce(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=lte(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function dce(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function pce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||yte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(lte(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return yte(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function fce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||yte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=lte(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return yte(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),Ete(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function hce(e,t,n){return e.check(Rte,t,e.attempt(cce,t,n))}function mce(e){e.exit("gfmFootnoteDefinition")}function gce(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=Cte(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=Cte(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&tte(i,i.length,0,Ate(s,e.slice(r+1,n),t)),tte(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),tte(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class yce{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function bce(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function vce(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?k:s;if(o===k&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):gte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):bte(t)?Ete(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||yte(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,bte(t)?Ete(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return bte(t)?Ete(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||gte(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return bte(t)?Ete(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||gte(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function k(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||gte(n)?(e.exit("tableRow"),t(n)):bte(n)?Ete(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||yte(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:w)}function E(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function kce(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new yce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(wce(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=xce(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=xce(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=xce(p,t,l,s,o,a)):0!==c[1]&&(a=xce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&wce(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=bce(t.events,o))}return e}function xce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},Ece(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Ece(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=Ece(t.events,n[2]),o=Ece(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},Ece(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function wce(e,t,n,r,a){const o=[],i=Ece(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ece(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const _ce={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return yte(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return gte(r)?t(r):bte(r)?e.check({tokenize:Sce},t,n)(r):n(r)}}};function Sce(e,t,n){return Ete(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Tce={};function Cce(e){const t=e||Tce,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return ate([{text:nce},{document:{91:{name:"gfmFootnoteDefinition",tokenize:fce,continuation:{tokenize:hce},exit:mce}},text:{91:{name:"gfmFootnoteCall",tokenize:pce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uce,resolveTo:dce}}},gce(e),{flow:{null:{name:"table",tokenize:vce,resolveAll:kce}}},{text:{91:_ce}}])}(t)),a.push([{transforms:[Zse],enter:{literalAutolink:$se,literalAutolinkEmail:Vse,literalAutolinkHttp:Vse,literalAutolinkWww:Vse},exit:{literalAutolink:Yse,literalAutolinkEmail:Wse,literalAutolinkHttp:Gse,literalAutolinkWww:qse}},{enter:{gfmFootnoteCallString:Jse,gfmFootnoteCall:ele,gfmFootnoteDefinitionLabelString:tle,gfmFootnoteDefinition:nle},exit:{gfmFootnoteCallString:rle,gfmFootnoteCall:ale,gfmFootnoteDefinitionLabelString:ole,gfmFootnoteDefinition:ile}},{canContainEols:["delete"],enter:{strikethrough:ple},exit:{strikethrough:fle}},{enter:{table:Fle,tableData:Hle,tableHeader:Hle,tableRow:zle},exit:{codeText:Ule,table:jle,tableData:Ble,tableHeader:Ble,tableRow:Ble}},{exit:{taskListCheckValueChecked:Gle,taskListCheckValueUnchecked:Gle,paragraph:qle}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hse,notInConstruct:Use},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Hse,notInConstruct:Use},{character:":",before:"[ps]",after:"\\/",inConstruct:Hse,notInConstruct:Use}]},lle(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dle}],handlers:{delete:hle}},Vle(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wle}}]}}(t))}const Ace=function(e){if(null==e)return Nce;if("string"==typeof e)return function(e){return Ice(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ace(e[n]);return Ice(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return Ice(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return Ice(e);throw new Error("Expected function, string, or object as test")};function Ice(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Nce(){return!0}const Oce=!0,Rce=!1,Pce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=Ace(t),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=[];if((!t||a(i,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Oce,e];return[e]}(n(i,l)),p[0]===Rce))return p;if(i.children&&"skip"!==p[0])for(u=(r?i.children.length:-1)+o,d=l.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,d)(),c[0]===Rce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Lce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Pce(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Dce(){return e=>{Lce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\^/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)})),Lce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\~/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)}))}}function Mce(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Mce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Mce(e))&&(r&&(r+=" "),r+=t);return r}var jce,zce,Bce,Hce,Uce,$ce,Vce,Gce=Object.create,qce=Object.defineProperty,Wce=Object.defineProperties,Yce=Object.getOwnPropertyDescriptor,Zce=Object.getOwnPropertyDescriptors,Kce=Object.getOwnPropertyNames,Xce=Object.getOwnPropertySymbols,Qce=Object.getPrototypeOf,Jce=Object.prototype.hasOwnProperty,eue=Object.prototype.propertyIsEnumerable,tue=(e,t,n)=>t in e?qce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nue=(e,t)=>{for(var n in t||(t={}))Jce.call(t,n)&&tue(e,n,t[n]);if(Xce)for(var n of Xce(t))eue.call(t,n)&&tue(e,n,t[n]);return e},rue=(e,t)=>Wce(e,Zce(t)),aue=(e,t)=>{var n={};for(var r in e)Jce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Xce)for(var r of Xce(e))t.indexOf(r)<0&&eue.call(e,r)&&(n[r]=e[r]);return n},oue=(jce={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new s;return l(a,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,y=!!m.lookbehind,b=!!m.greedy,v=m.alias;if(b&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var x=m.pattern||m,w=s.next,E=u;w!==t.tail&&!(d&&E>=d.reach);E+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,T=1;if(b){if(!(S=o(x,E,e,y))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,I=E;for(I+=w.value.length;C>=I;)I+=(w=w.next).value.length;if(E=I-=w.value.length,w.value instanceof a)continue;for(var N=w;N!==t.tail&&(I<A||"string"==typeof N.value);N=N.next)T++,I+=N.value.length;T--,_=e.slice(E,I),S.index-=E}else if(!(S=o(x,0,_,y)))continue;C=S.index;var O=S[0],R=_.slice(0,C),P=_.slice(C+O.length),L=E+_.length;d&&L>d.reach&&(d.reach=L);var D=w.prev;if(R&&(D=l(t,D,R),E+=R.length),c(t,D,T),w=l(t,D,new a(p,g?r.tokenize(O,g):O,v,O)),P&&l(t,w,P),T>1){var M={cause:p+","+h,reach:L};i(e,t,n,w.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return zce||(0,jce[Kce(jce)[0]])((zce={exports:{}}).exports,zce),zce.exports}),iue=((e,t,n)=>(n=null!=e?Gce(Qce(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Kce(t))Jce.call(e,a)||a===n||qce(e,a,{get:()=>t[a],enumerable:!(r=Yce(t,a))||r.enumerable});return e})(e&&e.__esModule?n:qce(n,"default",{value:e,enumerable:!0}),e)))(oue());iue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},iue.languages.markup.tag.inside["attr-value"].inside.entity=iue.languages.markup.entity,iue.languages.markup.doctype.inside["internal-subset"].inside=iue.languages.markup,iue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(iue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:iue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:iue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},iue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(iue.languages.markup.tag,"addAttribute",{value:function(e,t){iue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:iue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),iue.languages.html=iue.languages.markup,iue.languages.mathml=iue.languages.markup,iue.languages.svg=iue.languages.markup,iue.languages.xml=iue.languages.extend("markup",{}),iue.languages.ssml=iue.languages.xml,iue.languages.atom=iue.languages.xml,iue.languages.rss=iue.languages.xml,Bce=iue,Hce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},$ce="(?:[^\\\\-]|"+(Uce=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",$ce=RegExp($ce+"-"+$ce),Vce={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Bce.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:$ce,inside:{escape:Uce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":Hce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:Uce}},"special-escape":Hce,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":Vce}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:Uce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":Vce}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},iue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},iue.languages.javascript=iue.languages.extend("clike",{"class-name":[iue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),iue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,iue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:iue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:iue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:iue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:iue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:iue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),iue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:iue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),iue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),iue.languages.markup&&(iue.languages.markup.tag.addInlined("script","javascript"),iue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),iue.languages.js=iue.languages.javascript,iue.languages.actionscript=iue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),iue.languages.actionscript["class-name"].alias="function",delete iue.languages.actionscript.parameter,delete iue.languages.actionscript["literal-property"],iue.languages.markup&&iue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:iue.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(iue),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(iue),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(iue),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(iue),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(iue),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a,o=t[n];"code"!==o.type?e(o.content):(a=o.content[1],o=o.content[3],a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content&&(a=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),a="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,a]:o.alias.push(a):o.alias=[a]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r];if(o=/language-(.+)/.exec(o)){n=o[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(iue),iue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:iue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},iue.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<a.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=a.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))a++;else if(r.test(s)&&0==--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),iue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=d.length)return;var i,l,p,f,h,m,g,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(m="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=m.substring(0,g),h=u[i],p=void 0,(f={})["interpolation-punctuation"]=a,3===(f=e.tokenize(h,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,h),f=m.substring(g+i.length),h=[],l&&h.push(l),h.push(p),f&&(t(m=[f]),h.push.apply(h,m)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(h)),o+=h.length-1):y.content=h)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,a=n.length;r<a;r++){var o,i,s,c=n[r];"string"!=typeof c&&(o=c.content,Array.isArray(o)?"template-string"===c.type?(c=o[1],3===o.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(o[1]=l(i,s,c))):t(o):"string"!=typeof o&&t([o]))}}(t.tokens)}))}(iue),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(iue),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(iue),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(iue),iue.languages.n4js=iue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),iue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),iue.languages.n4jsd=iue.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];a=(o="RegExp"===e.util.type(o)?e.languages.javascript[a]={pattern:o}:o).inside||{};(o.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(iue),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;"string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"!==a.content[a.content.length-1].content&&n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces&&(o=s(a),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(o+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(o=s(t[r-1])+o,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",o,null,o)),a.content&&"string"!=typeof a.content&&i(a.content)}}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(iue),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(iue),iue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},iue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=iue.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(iue),iue.languages.c=iue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),iue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),iue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},iue.languages.c.string],char:iue.languages.c.char,comment:iue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:iue.languages.c}}}}),iue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete iue.languages.c.boolean,iue.languages.objectivec=iue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete iue.languages.objectivec["class-name"],iue.languages.objc=iue.languages.objectivec,iue.languages.reason=iue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),iue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete iue.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(iue),iue.languages.go=iue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),iue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete iue.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(iue),iue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},iue.languages.python["string-interpolation"].inside.interpolation.inside.rest=iue.languages.python,iue.languages.py=iue.languages.python,iue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},iue.languages.webmanifest=iue.languages.json;var sue={};((e,t)=>{for(var n in t)qce(e,n,{get:t[n],enumerable:!0})})(sue,{dracula:()=>lue,duotoneDark:()=>cue,duotoneLight:()=>uue,github:()=>due,gruvboxMaterialDark:()=>Aue,gruvboxMaterialLight:()=>Iue,jettwaveDark:()=>_ue,jettwaveLight:()=>Sue,nightOwl:()=>pue,nightOwlLight:()=>fue,oceanicNext:()=>gue,okaidia:()=>yue,oneDark:()=>Tue,oneLight:()=>Cue,palenight:()=>bue,shadesOfPurple:()=>vue,synthwave84:()=>kue,ultramin:()=>xue,vsDark:()=>wue,vsLight:()=>Eue});var lue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},cue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},uue={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},due={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},pue={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},fue={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},hue="#c5a5c5",mue="#8dc891",gue={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:hue}},{types:["attr-value"],style:{color:mue}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:mue}},{types:["punctuation"],style:{color:mue}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:hue}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},yue={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},bue={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},vue={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},kue={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},xue={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},wue={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Eue={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},_ue={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Sue={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Tue={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},Cue={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Aue={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Iue={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Nue=/\r\n|\r|\n/,Oue=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Rue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Pue=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(o=r[i]++)<a[i];){let e,c=t[i];const u=n[i][o];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=Rue(c,u.type),u.alias&&(c=Rue(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Nue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Oue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Oue(s),l},Lue=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=nue(nue({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=rue(nue({},n),{backgroundColor:void 0}),r},Due=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Lue(r,o),s=(e=>X.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=aue(n,["className","style","line"]);const s=rue(nue({},i),{className:Fce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=nue(nue({},s.style||{}),a)),s}),[e]))(i),l=(e=>{const t=X.useCallback((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return X.useCallback((e=>{var n=e,{token:r,className:a,style:o}=n,i=aue(n,["token","className","style"]);const s=rue(nue({},i),{className:Fce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=nue(nue({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>X.useMemo((()=>{if(null==n)return Pue([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),Pue(a.tokens)}),[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:c,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:s,getTokenProps:l})},Mue=e=>X.createElement(Due,rue(nue({},e),{prism:e.prism||iue,theme:e.theme||wue,code:e.code,language:e.language}))
71
71
  /*! Bundled license information:
72
72
 
73
73
  prismjs/prism.js: